Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Some help on some multiple questions

  1. #1
    Member
    Join Date
    Oct 2011
    Posts
    114
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Some help on some multiple questions

    Hi all I am working through Head First Servlets Book in preperation for an exam, there are some multiple choice questions i am stuck on, I have managed to answer most of them. Here are the ones i am struggling with:

    Which statement INACCURATELY describes Servlet Request parameters
    A) The names are always strings and the values are always strings
    B) They are usually the result of submitting an HTML form
    C) The names are always strings and the values are always objects
    D) They cannot generally be set using a "setter"

    Which statement is true for Servlet Request attributes
    A) The names are always strings and the values are always strings
    B) They are usually the result of submitting an HTML form
    C) They cannot generally be set using a "setter"
    D) They may be defined in the DD

    Which of these does the Tomcat web container NOT automatically give?
    A) Lifecycle Management (Loading classes, initialising Servlets etc)
    B) Multithreading Support (e.g. creating a new thread when a Servlet is requested)
    C) Full J2EE Support (e.g. Enterprise Java Beans)
    D) Declarative Security (using an XML Deployment Descriptor)


    Any ideas?

    Many thanks in advance.


  2. #2
    Member
    Join Date
    Oct 2011
    Posts
    114
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Some help on some multiple questions

    Anyone know ?

  3. #3
    Member
    Join Date
    Apr 2012
    Location
    Superior, CO, USA
    Posts
    80
    Thanks
    0
    Thanked 14 Times in 14 Posts

    Default Re: Some help on some multiple questions

    Quote Originally Posted by djl1990 View Post
    Hi all I am working through Head First Servlets Book in preperation for an exam, there are some multiple choice questions i am stuck on, I have managed to answer most of them. Here are the ones i am struggling with:

    Which statement INACCURATELY describes Servlet Request parameters
    A) The names are always strings and the values are always strings
    B) They are usually the result of submitting an HTML form
    C) The names are always strings and the values are always objects
    D) They cannot generally be set using a "setter"
    ServletRequest.getParameter()

    Quote Originally Posted by djl1990 View Post
    Which statement is true for Servlet Request attributes
    A) The names are always strings and the values are always strings
    B) They are usually the result of submitting an HTML form
    C) They cannot generally be set using a "setter"
    D) They may be defined in the DD
    ServletRequest.getParameter()

    Quote Originally Posted by djl1990 View Post
    Which of these does the Tomcat web container NOT automatically give?
    A) Lifecycle Management (Loading classes, initialising Servlets etc)
    B) Multithreading Support (e.g. creating a new thread when a Servlet is requested)
    C) Full J2EE Support (e.g. Enterprise Java Beans)
    D) Declarative Security (using an XML Deployment Descriptor)
    Tomcat Home Page
    Need Java help? Check out the HotJoe Java Help forums!

  4. #4
    Member
    Join Date
    Oct 2011
    Posts
    114
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Some help on some multiple questions

    Thanks for the links, but i cant see about attributes? only parameters.

  5. #5
    Member
    Join Date
    Apr 2012
    Location
    Superior, CO, USA
    Posts
    80
    Thanks
    0
    Thanked 14 Times in 14 Posts

    Default Re: Some help on some multiple questions

    Yep, my bad - I answered parameters twice. But perhaps you could read about more than one method? Look at the Javadoc - it answers your question by negating 2 of the 4 possible answers. B is simply not true in either case. You've eliminated 3 out of 4 then.
    Need Java help? Check out the HotJoe Java Help forums!

Similar Threads

  1. Replies: 1
    Last Post: April 26th, 2012, 10:06 AM
  2. Need help with some questions!
    By goha14 in forum Java Theory & Questions
    Replies: 6
    Last Post: March 27th, 2012, 08:01 PM
  3. Replies: 6
    Last Post: December 9th, 2011, 05:53 PM
  4. Few questions
    By CSUTD in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 11th, 2011, 09:23 PM
  5. Many questions
    By SharpT in forum What's Wrong With My Code?
    Replies: 11
    Last Post: January 18th, 2011, 09:56 PM