SUN Sun Certified Web Component Developer for J2EE 5 - 310-083 Exam Practice Test
A developer for the company web site has been told that users may turn off cookie support in their browsers. What must the developer do to ensure that these customers can still use the web application?
Correct Answer: C
Vote an answer
A developer has created a special servlet that is responsible for generating XML content that is sent to a data warehousing subsystem. This subsystem uses HTTP to request these large data files, which are compressed by the servlet to save internal network bandwidth.
The developer has received a request from management to create several more of these data warehousing servlets. The developer is about to copy and paste the compression code into each new servlet. Which design pattern can consolidate this compression code to be used by all of the data warehousing servlets?
The developer has received a request from management to create several more of these data warehousing servlets. The developer is about to copy and paste the compression code into each new servlet. Which design pattern can consolidate this compression code to be used by all of the data warehousing servlets?
Correct Answer: B
Vote an answer
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?
Which pattern should be used to eliminate this duplicate code?
Correct Answer: E
Vote an answer
Which two statements are true about the security-related tags in a valid Java EE deployment descriptor? (Choose two.)
Correct Answer: C,E
Vote an answer
Your IT department is building a lightweight Front Controller servlet that invokes an application logic object with the interface:
public interface ApplicationController {
public String invoke(HttpServletRequest request)
}
The return value of this method indicates a symbolic name of the next view. From this name, the Front Controller servlet looks up the JSP URL in a configuration table. This URL might be an absolute path or a path relative to the current request. Next, the Front
Controller servlet must send the request to this JSP to generate the view. Assume that the servlet variable request is assigned the current HttpServletRequest object and the variable context is assigned the webapp's ServletContext.
Which code snippet of the Front Controller servlet accomplishes this goal?
public interface ApplicationController {
public String invoke(HttpServletRequest request)
}
The return value of this method indicates a symbolic name of the next view. From this name, the Front Controller servlet looks up the JSP URL in a configuration table. This URL might be an absolute path or a path relative to the current request. Next, the Front
Controller servlet must send the request to this JSP to generate the view. Assume that the servlet variable request is assigned the current HttpServletRequest object and the variable context is assigned the webapp's ServletContext.
Which code snippet of the Front Controller servlet accomplishes this goal?
Correct Answer: C
Vote an answer
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?
Which pattern should be used to eliminate this duplicate code?
Correct Answer: E
Vote an answer
Which two are true about authentication? (Choose two.)
Correct Answer: A,C
Vote an answer
Which two security mechanisms can be directed through a sub-element of the <user-data- constraint> element in a web application deployment descriptor? (Choose two.)
Correct Answer: B,D
Vote an answer
You are creating a content management system (CMS) with a web application front-end.
The JSP that displays a given document in the CMS has the following general structure:
1 . <%-- tag declaration --%>
2 . <t:document>
...
11. <t:paragraph>... <t:citation docID='xyz' /> ...</t:paragraph>
...
99. </t:document>
The citation tag must store information in the document tag for the document tag to generate a reference section at the end of the generated web page.
The document tag handler follows the Classic tag model and the citation tag handler follows the Simple tag model. Furthermore, the citation tag could also be embedded in other custom tags that could have either the Classic or Simple tag handler model.
Which tag handler method allows the citation tag to access the document tag?
The JSP that displays a given document in the CMS has the following general structure:
1 . <%-- tag declaration --%>
2 . <t:document>
...
11. <t:paragraph>... <t:citation docID='xyz' /> ...</t:paragraph>
...
99. </t:document>
The citation tag must store information in the document tag for the document tag to generate a reference section at the end of the generated web page.
The document tag handler follows the Classic tag model and the citation tag handler follows the Simple tag model. Furthermore, the citation tag could also be embedded in other custom tags that could have either the Classic or Simple tag handler model.
Which tag handler method allows the citation tag to access the document tag?
Correct Answer: A
Vote an answer
Within the web application deployment descriptor, which defines a valid JNDI environment entry?
Correct Answer: D
Vote an answer
You are building a web application with a scheduling component. On the JSP, you need to show the current date, the date of the previous week, and the date of the next week. To help you present this information, you have created the following EL functions in the 'd' namespace:
name: curDate; signature: java.util.Date currentDate()
name: addWeek; signature: java.util.Date addWeek(java.util.Date, int)
name: dateString; signature: java.util.String getDateString(java.util.Date)
Which EL code snippet will generate the string for the previous week?
name: curDate; signature: java.util.Date currentDate()
name: addWeek; signature: java.util.Date addWeek(java.util.Date, int)
name: dateString; signature: java.util.String getDateString(java.util.Date)
Which EL code snippet will generate the string for the previous week?
Correct Answer: A
Vote an answer
DRAG DROP
Click the Task button.
Given a request from mybox.example.com, with an IP address of 10.0.1.11 on port 33086, place the appropriate ServletRequest methods onto their corresponding return values.

Click the Task button.
Given a request from mybox.example.com, with an IP address of 10.0.1.11 on port 33086, place the appropriate ServletRequest methods onto their corresponding return values.

Correct Answer:

A developer has created a special servlet that is responsible for generating XML content that is sent to a data warehousing subsystem. This subsystem uses HTTP to request these large data files, which are compressed by the servlet to save internal network bandwidth.
The developer has received a request from management to create several more of these data warehousing servlets. The developer is about to copy and paste the compression code into each new servlet. Which design pattern can consolidate this compression code to be used by all of the data warehousing servlets?
The developer has received a request from management to create several more of these data warehousing servlets. The developer is about to copy and paste the compression code into each new servlet. Which design pattern can consolidate this compression code to be used by all of the data warehousing servlets?
Correct Answer: B
Vote an answer