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: 50.

Given that a scoped attribute cart exists only in a user's session, which two, taken independently, ensure the scoped attribute cart no longer exists? (Choose two.)

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


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


You are building your own layout mechanism by including dynamic content for the page's header and footer sections. The footer is always static, but the header generates the <title> tag that requires the page name to be specified dynamically when the header is imported. Which JSP code snippet performs the import of the header content?


developer wants a web application to be notified when the application is about to be shut down. Which two actions are necessary to accomplish this goal? (Choose two.)

6) Which basic authentication type is optional for a J2EE 1.4 compliant web container?

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


A developer is designing the presentation tier for a web application that relies on a complex session bean. The session bean is still being developed and the APIs for it are NOT finalized. Any changes to the session bean API directly impacts the development of the presentation tier.

Which design pattern provides a means to manage the uncertainty in the API?

9) You have created a JSP that includes instance variables and a great deal of scriptlet code. Unfortunately, after extensive load testing, you have discovered several race conditions in your JSP scriptlet code. To fix these problems would require significant recoding, but you are already behind schedule. Which JSP code snippet can you use to resolve these concurrency problems?


As a convenience feature, your web pages include an Ajax request every five minutes to a special servlet that monitors the age of the user's session. The client-side JavaScript that handles the Ajax callback displays a message on the screen as the session ages. The Ajax call does NOT pass any cookies, but it passes the session ID in a request parameter called sessionID. In addition, assume that your webapp keeps a hashmap of session objects by the ID. Here is a partial implementation of this servlet:

10. public class SessionAgeServlet extends HttpServlet {

11. public void service(HttpServletRequest request, HttpServletResponse) throws IOException {

12. String sessionID = request.getParameter("sessionID");

13. HttpSession session = getSession(sessionID);

14. long age = // your code here

15. response.getWriter().print(age);

16. } ... // more code here

47. }

Which code snippet on line 14, will determine the age of the session?