Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

some doubts..

 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i was doing the mock exam at jiris.com, i found some of the answers confusing..

I checked the servlet file generated by a JSP file and found the following :
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
the ans shld be CDE right ???

I'm sure, D is the right answer ...
-----------
3) is 30 minutes the default inactive period for sessions ??
is it same for all servers ???
----------

wat is the use of hidden values in session management, and Cookies r not madartory for session management right ?? so the ans shld be B
Plz guide me if im wrong..
Thanks
Raj
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3776
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. That is correct as per the specification. page. 50.
2. What is the question?
3. No. The specification has not specified the value for default time out. Usually it is 30 minutes.
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi paul,
thanks for ur reply..
cld u tell me wat is the right answer for question number 1 ??
question 2 is
2) wat is the full path of MailServlet.class file ??
docbase = c:/temp/
context path = /test
alias name = MyMail
servlet-name = com.jiris.common.util.MailServlet
url-pattern = /mail/*
----------------------------------------------
A: c:/temp/mail/com/jiris/util/MailServlet.class
B: c:/temp/test/mail/com/jiris/util/MailServlet.class
C: c:/temp/test/mail/util/MailServlet.class
D: c:/temp/test/com/jiris/util/MailServlet.class
Ans given :
full path = docbase + context path + url-pattern + Resource
B is right
{bold] isnt D the correct answer [/bold]
wat abt question no 4
4) The four methods for session management in the context of web-based application are: Cookie, HttpSession object, URL rewriting and
Hidden value.
A: TRUE
B: FALSE
Thanks
Raj
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.* is automatically imported into all java files, including JSPs.
I'm using Tomcat 4.1.24, and the Java files generated from my JSPs do not import javax.servlet.jsp.tagext.* . Then again, I'm not using any custom tag libraries, just the standard JSTL ones. What application server or container are you using?
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i just tried the mock exam at [bold]JavaRanch [/bold]
lemme copy one question :

in the DTD for taglib its specified as
<!ELEMENT taglib (tlib-version, jsp-version, short-name, uri?, display-name?,
small-icon?, large-icon?, description?, validator?, listener*, tag+) >
cld any1 tell me wat is the answer for this question..
i think tlib-version, jsp-version,short-name are the only mandatory elements of <taglib> but none of them were in the options
am i moving in the wrong direction ?? plz guide me !!
Thanks
Raj
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a DTD,
? means "optional element" - 0 or 1 allowed
* means "0 or more" -- you can have as many as you want, including none
+ means "1 or more" -- you can has as many as you want, but you must have at least one
If none of these symbols are used, the element is mandatory (must be present).
BUT... you are looking in the wrong DTD. The question asks about "web.xml", not about a taglib description file (tld). So you need to look at http://java.sun.com/dtd/web-app_2_3.dtd .
[ July 25, 2003: Message edited by: Ron Newman ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic