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.

Given a header in an HTTP request: X-Retries: 4

Which two retrieve the value of the header from a given HttpServletRequest request? (Choose two.)


Given the security constraint in a DD:

101. <security-constraint>

102. <web-resource-collection>

103. <web-resource-name>Foo</web-resource-name>

104. <url-pattern>/Bar/Baz/*</url-pattern>

105. <http-method>POST</http-method>

106. </web-resource-collection>

107. <auth-constraint>

108. <role-name>DEVELOPER</role-name>

109. </auth-constraint>

110. </security-constraint>

And given that "MANAGER" is a valid role-name, which four are true for this security constraint?(Choose four.)

3) Which two are valid and equivalent? (Choose two.)


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?



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

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

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

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

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

Which three EL expressions are valid and evaluate to true? (Choose three.)




Which two produce the output "one, two and three"? (Choose two.)


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


Given an HttpServletRequest request and an HttpServletResponse response:

41. HttpSession session = null;

42. // insert code here

43. if(session == null) {

44. // do something if session does not exist

45. } else {

46. // do something if session exists

47. }

To implement the design intent, which statement must be inserted at line 42?

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


One of the use cases in your web application uses many session-scoped attributes. At the end of the use case, you want to clear out this set of attributes from the session object.

Assume that this static variable holds this set of attribute names:

201. private static final Set<String> USE_CASE_ATTRS;

202. static {

203. USE_CASE_ATTRS.add("customerOID");

204. USE_CASE_ATTRS.add("custMgrBean");

205. USE_CASE_ATTRS.add("orderOID");

206. USE_CASE_ATTRS.add("orderMgrBean");

207. }

Which code snippet deletes these attributes from the session object?