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.
Re: Some help on some multiple questions
Re: Some help on some multiple questions
Quote:
Originally Posted by
djl1990
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
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
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
Re: Some help on some multiple questions
Thanks for the links, but i cant see about attributes? only parameters.
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.