Nov 22, 2009

2 JSP Questions

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Programming > Scripting > JSP (Java Server Pages)

2 JSP Questions

jedipi
Which of the following implicit objects is not available to a JSP page by default?
A. application
B. session
C. exception
D. config


public class TestServlet extends HttpServlet
{
public void doGet(HttpServletRequest req, HttpServletResponse res)
{
private HttpSession session = req.getSession();
private ServletContext ctx = getServletContext();
}
}
Which of the variables used in the above servlet reference objects that are thread safe?
A. req
B. res
C. session
D. ctx

Comment/Reply (w/o sign-up)

shahidiimran
answer is A and D ....

i am a little confused becoz worked in J2EE a long time before, so dats why i am replying so to indulge in discussion with you and in dat way i will remember J2EE......i will make my answer confirm too....

Comment/Reply (w/o sign-up)

cumanji
Hi, only "exception" object is not avaible by default. All others are avaible.
I am not good at multi-threading so i can not answer to your second question sad.gif

Comment/Reply (w/o sign-up)

cdumitru
C. The "exception" object is available only in an exception page, one with "error = true" attribute in <@page>

A, B, C are thread safe because are specific to each user.
D is shared for all the users.

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : Jsp Questions


    Looking for 2, jsp, questions

See Also,

*SIMILAR VIDEOS*
Searching Video's for 2, jsp, questions
advertisement



2 JSP Questions

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com