|
SCWCD : Session Management Mock Exam Practice Questions
Questions no -1
Which of the following statement is true about URL Rewriting ?
options
A)When a client will not accept a cookie, URL rewriting may be used by the server as the basis for session tracking
B)URL rewriting involves adding data, a session ID, to the URL path that is interpreted by the container to associate the request with a session
C)The session ID must be encoded as a path parameter in the URL string. The name of the parameter must be 'jsessionid'
D)All of the above
Correct answer is : D
Explanations : URL rewriting is the lowest common denominator of session tracking. When a client will not accept a cookie, URL rewriting may be used by the server as the basis for session tracking. URL rewriting involves adding data, a session ID, to the URL path that is interpreted by the container to associate the request with a session.
The session ID must be encoded as a path parameter in the URL string. The name of the parameter must be 'jsessionid' (lowercase !). Here is an example of a URL containing encoded path information:
http://www.javacertifications.net/index.html;jsessionid=1234
Questions no -2
The session-timeout element defines the session timeout interval for all sessions created in this web application.
Which of the below statement is true about session-timeout?
options
A)The specified timeout must be expressed in a whole number of MINUTES
B)If the timeout is 0 or less , sessions is NEVER to time out
C)If this element is not specified, the container must set its default timeout period
D)All of the above
Correct answer is : D
Explanations : The session-timeout element defines the default session timeout interval for all sessions created in this web application.
The specified timeout must be expressed in a whole number of MINUTES. If the timeout is 0 or less, the container ensures the default behaviour of sessions is NEVER to time out.
If this element is not specified, the container must set its default timeout period.
| |