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)

Given:

3. class MyServlet extends HttpServlet {

4. public void doPut(HttpServletRequest req,

HttpServletResponse resp)

throws ServletException, IOException {

5. // servlet code here

...

26. }

27. }

If the DD contains a single security constraint associated with MyServlet and its only <http-method> tags and <auth-constraint> tags are:

<http-method>GET</http-method>

<http-method>PUT</http-method>

<auth-constraint>Admin</auth-constraint>

Which four requests would be allowed by the container? (Choose four.)


2)

A developer chooses to avoid using SingleThreadModel but wants to ensure that data is updated in a thread-safe manner. Which two can support this design goal? (Choose two.)



3) 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?


4)

You are developing several tag libraries that will be sold for development of third-party web applications. You are about to publish the first three libraries as JAR files:container-tags.jar, advanced-html-form-tags.jar, and basic-html-form-tags.jar. Which two techniques are appropriate for packaging the TLD files for these tag libraries? (Choose two.)



5)

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?


6)

Given:

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


7)

Which two are true concerning the objects available to developers creating tag files? (Choose two.)



8)

Given:

http://com.example/myServlet.jsp?num=one&num=two&num=three

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


9)

The Squeaky Beans Inc. shopping application was initially developed for a non-distributed environment. The company recently purchased the Acme Application Server, which supports distributed HttpSession objects. When deploying the application to the server, the deployer marks it as distributable in the web application deployment descriptor to take advantage of this feature.

Given this scenario, which two must be true? (Choose two.)


10)

Given an HttpServletRequest request:

22. String id = request.getParameter("jsessionid");

23. // insert code here

24. String name = (String) session.getAttribute("name");

Which three can be placed at line 23 to retrieve an existing HttpSession object? (Choose three.)