Sreejobs Logo
   For Latest Job Updates  
sreenutech.com Online Exams
Home Govt Jobs IT Fresher Jobs IT Exp Jobs IT Walk-Ins MBA Jobs BPO Jobs Register FAQ’s Post Job Contact Us
Search:
SreeJob Fees   Feeds
Hot Jobs
Welcome Guest
Login | Register
Total No Of Questions: 100.
1) Servlet A forwarded a request to servlet B using the forward method of RequestDispatcher. What attribute in B's request object contains the URI of the original request received by servlet A?


2) Which method must be used to encode a URL passed as an argument to HttpServletResponse.sendRedirect when using URL rewriting for session tracking?


3)

Every page of your web site must include a common set of navigation menus at the top of the page. This menu is static HTML and changes frequently, so you have decided to use JSP's static import mechanism.

Which JSP code snippet accomplishes this goal?


4) Which two are characteristics of the Service Locator pattern? (Choose two.)


5) Which retrieves all cookies sent in a given HttpServletRequest request?


6)

You are creating a content management system (CMS) with a web

application front-end. The JSP that displays a given document in the CMS has the following general

structure:

1. <%-- tag declaration --%>

2. <t:document>

...

11. <t:paragraph>... <t:citation docID='xyz' /> ...</t:paragraph>

...

99. </t:document>

The citation tag must store information in the document tag for the document tag to generate a reference section at the end of the generated web page.

The document tag handler follows the Classic tag model and the citation tag handler follows the Simple

tag model. Furthermore, the citation tag could also be embedded in other custom tags that could have

either the Classic or Simple tag handler model.

Which tag handler method allows the citation tag to access the document tag?


7)

Given the definition of MyServlet:

11. public class MyServlet extends HttpServlet {

12. public void service(HttpServletRequest request,

13. HttpServletResponse response)

14. throws ServletException, IOException {

15. HttpSession session = request.getSession();

16 session.setAttribute("myAttribute","myAttributeValue");

17. session.invalidate();

18. response.getWriter().println("value=" +

19. session.getAttribute("myAttribute"));

20. }

21. }

What is the result when a request is sent to MyServlet?



8) You have a use case in your web application that adds several session-scoped attributes. At the end of the use case, one of these objects, the manager attribute, is removed and then it needs to decide which of the other session-scoped attributes to remove. How can this goal be accomplished?


9) If you want to use the Java EE platform's built-in type of authentication that uses a custom HTML page for authentication, which two statements are true? (Choose two.)


10)

Which two JSTL URL-related tags perform URL rewriting?

(Choose two.)