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


2)

Given a portion of a valid Java EE web application's directory structure:

 MyApp

|

|-- Directory1

|       |-- File1.html

|

|-- META-INF

|            |-- File2.html

|

|-- WEB-INF

         |-- File3.html

 You want to know whether File1.html, File2.html, and/or File3.html is protected from direct access by your web client's browsers.

What statement is true?


3)

Given:

10. public void service(ServletRequest request,

11. ServletResponse response) {

12. ServletInputStream sis =

13. // insert code here

14. }

 Which retrieves the binary input stream on line 13?



4) 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 by the servlet to the JSP; furthermore, that JSP uses a custom tag and must also process this information. This information must NOT be accessible to any other servlet, JSP or session in the webapp. How can you accomplish this goal?


5)

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?


6) You need to store a Java long primitive attribute, called customerOID, into the session scope. Which two code snippets allow you to insert this value into the session? (Choose two.)


7)

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?


8)

You want to create a valid directory structure for your Java EE web application, and your application uses tag files and a JAR file. Which three must be located directly in your WEB-INF directory (NOT in a subdirectory of WEB-INF)? (Choose three.)



9)

In a JSP-centric web application, you need to create a catalog browsing JSP page. The catalog is stored as a List object in the catalog attribute of the webapp's ServletContext object.

Which scriptlet code snippet gives you access to the catalog object?


10) A developer is designing a multi-tier web application and discovers a need to hide the details of establishing and maintaining remote communications from the client. In addition, because the business and resource tiers are distributed, the application needs to minimize the inter-tier network traffic related to servicing client requests. Which design patterns, working together, address these issues?