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.
1) Which JSP standard action can be used to import content from a resource called foo.jsp?


Given this fragment in a servlet:

23. if(req.isUserInRole("Admin")) {

24. // do stuff

25. }

And the following fragment from the related Java EE deployment descriptor:

812. <security-role-ref>

813. <role-name>Admin</role-name>

814. <role-link>Administrator</role-link>

815. </security-role-ref>

900. <security-role>

901. <role-name>Admin</role-name>

902. <role-name>Administrator</role-name>

903. </security-role>

What is the result?

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

4) You have built your own light-weight templating mechanism. Your servlets, which handle each request, dispatch the request to one of a small set of template JSP pages. Each template JSP controls the layout of the view by inserting the header, body, and footer elements into specific locations within the template page. The URLs for these three elements are stored in request-scoped variables called, headerURL, bodyURL, and footerURL, respectively. These attribute names are never used for other purposes. Which JSP code snippet should be used in the template JSP to insert the JSP content for the body of the page?


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?

6) The Squeaky Bean company has decided to port their web application to a new J2EE 1.4 container. While reviewing the application, a developer realizes that in multiple places within the current application, nearly duplicate code exists that finds enterprise beans. Which pattern should be used to eliminate this duplicate code?

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


You are creating a web form with this HTML:

11. <form action="sendOrder.jsp">

12. <input type="text" name="creditCard">

13. <input type="text" name="expirationDate">

14. <input type="submit">

15. </form>

Which HTTP method is used when sending this request from the browser?

9) You need to retrieve the username cookie from an HTTP request. If this cookie does NOT exist, then the c variable will be null. Which code snippet must be used to retrieve this cookie object?

10) A developer is designing the presentation tier for a web application which requires a centralized request handling to complete common processing required by each request. Which design pattern provides a solution to this problem?