Jump to content
xisto Community
Sign in to follow this  
jedipi

2 JSP Questions

Recommended Posts

Which of the following implicit objects is not available to a JSP page by default?A. applicationB. sessionC. exceptionD. configpublic 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. reqB. resC. sessionD. ctx

Share this post


Link to post
Share on other sites

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....

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.