Sreejobs Logo
   For Latest Job Updates 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
SreeJob Fees   Feeds
Hot Jobs
Welcome Guest
Login | Register
Total No Of Questions: 100.

Your web application uses a simple architecture in which servlets handle requests and then forward to a JSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation. This information must NOT be accessible to any other servlet, JSP or session in the webapp. Which two techniques can you use to accomplish this goal?

(Choose two.)

2) For manageability purposes, you have been told to add a "count" instance variable to a critical JSP Document so that a JMX MBean can track how frequent this JSP is being invoked. Which JSP code snippet must you use to declare this instance variable in the JSP Document?


The sl:shoppingList and sl:item tags output a shopping list to the response and are used as follows:

11. <sl:shoppingList>

12. <sl:item name="Bread" />

13. <sl:item name="Milk" />

14. <sl:item name="Eggs" />

15. </sl:shoppingList>

The tag handler for sl:shoppingList is ShoppingListTag and the tag handler for sl:item is ItemSimpleTag.

ShoppingListTag extends BodyTagSupport and ItemSimpleTag extends SimpleTagSupport.

Which is true?

4) Which three are true about the HttpServletRequestWrapper class? (Choose three.)

5) Which implicit object is used in a JSP page to retrieve values associated with <context-param> entries in the deployment descriptor?

6) Which two directives are applicable only to tag files? (Choose two.)

7) You need to store a floating point number, called Tsquare, in the session scope. Which two code snippets allow you to retrieve this value? (Choose two.)

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


To take advantage of the capabilities of modern browsers that use web standards, such as XHTML and CSS, your web application is being converted from simple JSP pages to JSP Document format. However, one of your JSPs, /scripts/screenFunctions.jsp, generates a JavaScript file. This file is included in several web forms to create screen-specific validation functions and are included in these pages with the following statement:

10. <head>

11. <script src='/scripts/screenFunctions.jsp'

12. language='javascript'

13. type='application/javascript'> </script>

14. </head>

15. <!-- body of the web form -->

Which JSP code snippet declares that this JSP Document is a JavaScript file?



11. <% java.util.Map map = new java.util.HashMap();

12. request.setAttribute("map", map);

13. map.put("a", "b");

14. map.put("b", "c");

15. map.put("c", "d"); %>

16. <%-- insert code here --%>

Which three EL expressions, inserted at line 16, are valid and evaluate to "d"? (Choose three.)