• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questions about the mock exam.

 
Dongqing Wu
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.The default value for body_content element of tag library descriptor is
a:empty b.jsp c.tagdependent d.none of them
the answer is b But my answer is d
From the specification,the default value is "JSP"
Is the "jsp" equals "JSP" here? I know the xml is case-sensitive. Why?
2.which scope of the setMaxInactiveInterval() method,the session that this method is called or all the sessions after this method called?
please explain these for me. Thanks a lot.
 
Tong Chen
Ranch Hand
Posts: 1011
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Strictly speaking, the default is "JSP", according to the Sun's Spec. However some containers accept both "jsp" and "JSP". This mock question is not designed very well. In the real exam, you will see "JSP" instead of "jsp". So don't take this mock question too seriously just stick to what you think;
2) setMaxInactiveInterval is for THE one session variable not for all the sessions. Eg. you create two sessions called firstSession, secondSession, and then firstSession.setMaxInactiveInterval(60*30), so the MaxInactiveInterval is 30 minutes for the firstSession, this does not affect the MaxInactiveInterval for the secondSession.
Hope this helps,
 
Baruch Sadogursky
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When both the seesion-timeout and the setMaxInactiveInterval are preset, the second overwrites the first for the particular servlet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic