Originally posted by Saeed Amer:
Sure! Here they are:
http://java.about.com/cs/javacertification/tp/freescwcd.htm
http://www.poder.net
http://www.javaprepare.com
http://www.j2eecertificate.com (very good)
http://www.jdiscuss.com/index.html (click on FREE Mock Exams)http://www.javaranch.com/carl/scwcd/scwcd_mock_logo.jsp
There may be many more but that is all I know of.
If someone else may add to this list, it would be great help.
HTH
Originally posted by Bryan Basham:
HTH,
Bryan
Originally posted by Sekhar Kadiyala:
Thank you, Kathy.
Would it be fair, if i assume that the web-app element definition thats given in dtd contains the order?
<!ELEMENT web-app (icon?, display-name?, description?, distributable?,
context-param*, filter*, filter-mapping*, listener*, servlet*,
servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,
error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,
login-config?, security-role*, env-entry*, ejb-ref*, ejb-local-ref*)>
Can we assume this order?
Originally posted by john guthrie:
in case you didn't guess, i spent today at my desk studying chapters 3-5 of the HF book, with no access to email, so here is my flood of other questions...
1) does the servlet spec guarantee that a no-arg constructor, and only a no-arg constructor, will be used to, er, construct servlet instances?
Yes. I read it in the specs that no-arg constructor will be used to instantiate a servlet.
2) is there any drawback to having doGet call doPost just out of habit?
3) should you / must you call setContentType before writing to the output stream?
setContentType is method allows us to specify the type of data we are sending in the response. If you plan to use PrintWriter instead of OutputStream, YES you must call setContentType() method before calling getPrintWriter() for the charset to take effect. If setContentType is not called then it is assumed as text/html.
4) a redirect needs to use GET if there are parameters, yes?
sendRedirect() asks the browser to get a resource from elsewhere... I am assuming its just passing URL and not URL with Parameters. For example if somebody enters wrong credentials then we redirect them to login page. Well i guess i am just learning.. I am interested to see whats the correct answer for this.
5) in the web.xml, do the order of <servlet> and <context-param> matter? if so, do the orders of things in web.xml show up on the exams?
Yes, Ofcourse the order matters. If you are setting any servlet context param name and value it should be configured before servlet tag. I don't know about how it comes in the exam...still have to face it
that's all for today...