Pass4TestはIT試験問題集を提供するウエブダイトで、ここによく分かります。最もよくて最新で資料を提供いたします。こうして、君は安心で試験の準備を行ってください。弊社の資料を使って、100%に合格を保証いたします。

君はまだSUNの310-085認証試験を通じての大きい難度が悩んでいますか? 君はまだSUN 310-085認証試験に合格するために寝食を忘れて頑張って復習しますか? 早くてSUN 310-085認証試験を通りたいですか?Pass4Testを選択しましょう!Pass4TestはきみのIT夢に向かって力になりますよ。Pass4Testは多種なIT認証試験を受ける方を正確な資料を提供者でございます。弊社の無料なサンプルを遠慮なくダウンロードしてください。
IT業界の中でたくさんの野心的な専門家がいって、IT業界の中でより一層頂上まで一歩更に近く立ちたくてSUNの310-085試験に参加して認可を得たくて、SUN の310-085試験が難度の高いので合格率も比較的低いです。Pass4Testの商品は試験問題を広くカーバして、認証試験の受験生が便利を提供し、しかも正確率100%です。そして、試験を安心に参加してください。
試験番号:310-085問題集
試験科目:SUN 「JavaServer Pages and Servlet Developer Certified Expert Exam」
今の競争の激しいのIT業界の中にSUN 310-085認定試験に合格して、自分の社会地位を高めることができます。弊社のIT業で経験豊富な専門家たちが正確で、合理的なSUN 310-085認証問題集を作り上げました。 弊社の勉強の商品を選んで、多くの時間とエネルギーを節約こともできます。
SUNの310-085試験に合格することは容易なことではなくて、良い訓練ツールは成功の保証でPass4Testは君の試験の問題を準備してしまいました。君の初めての合格を目標にします。
購入前にお試し,私たちの試験の質問と回答のいずれかの無料サンプルをダウンロード:http://pdf.pass4test.jp/310-085.pdf
NO.1 Which of the following options is used to get the current session id using EL (Expression Language)?
A. ${pageContext.session.id}
B. ${session.id}
C. ${sessionScope.session.id}
D. We cannot get the session id as there exists no session implicit EL object.
Answer: A
SUN認定資格 310-085認定資格 310-085 310-085 310-085
NO.2 Which of the following code will you use to set the ${param.name} expression value to the
variable 'username'?
A. <c:param var=username value="${param.name}" />
B. <c:setVar var=username value="${param.name}" />
C. <c:import var=username value="${param.name}" />
D. <c:set var=username value="${param.name}" />
Answer: D
SUN 310-085 310-085認定試験 310-085
NO.3 Assume that you have two jsp files with the logic given as follows:
FilE. first.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding ="ISO-8859-1"% >
<html>
<head>
</head>
<body>
<jsp:include page="second.jsp" >
<jsp:param name="acctType" value="Saving" />
<jsp:param name="acctType " value="Checking" />
</jsp:include>
</body>
</html>
FilE. second.jsp
<%
String acctTypes[] = request.getParameterValues("acctType");
for (String accountType : acctTypes) {
out.print(accountType + " ");
}
%>
When you try to access first.jsp with the following url, what would be the output?
http://localhost:9080/BankApp/first.jsp?acctType=Credit
A. Saving Checking
B. Prints Saving, Checking, and Credit in random order.
C. Credit Saving Checking
D. Saving Checking Credit
Answer: D
SUN 310-085 310-085
NO.4 Which of the following is used to set the HttpSession time out element in web.xml?
A. <web-app>
...
< session-config>
<max-inactive-interval>60</max-inactive-interval>
</session-config>
...
</web-app>
B. <web-app>
...
<session-config>
<session-timeout>60</session-timeout>
</session-config>
...
</web-app>
C. <web-app>
...
<session>
<max-inactive-interval>60</max-inactive-interval>
</session>
...
</web-app>
D. <web-app>
...
<session>
<session-timeout>60</session-timeout>
</session>
...
</web-app>
Answer: B
SUN過去問 310-085認定証 310-085 310-085認定証
NO.5 You work as a Software Developer for UcTech Inc. You create a session object and want that it be
destroyed if it is not called for 20 minutes. Drag and drop the appropriate statements that you will use to
accomplish the task.
A.
Answer: A
SUN問題集 310-085 310-085 310-085 310-085参考書 310-085
NO.6 In which of the following tags can the <sql:dateParam> tag be nested?
Each correct answer represents a complete solution. Choose all that apply.
A. <sql:transaction>
B. <sql:update>
C. <sql:setDataSource>
D. <sql:query>
Answer: B, D
SUN認定試験 310-085参考書 310-085練習問題
NO.7 Which of the following statements are true about the differences between the simple and classic tags?
Each correct answer represents a complete solution. Choose all that apply.
A. A unique tag handler instance is created for each usage of a simple tag on a page.
B. While nesting classic tags, the reference type of the tag must be of type JspTag.
C. A classic tag must implement the javax.servlet.jsp.tagext.TagSupport interface.
D. While using classic tags, it is required to implement the doStartTag() and doEndTag() meth ods.
E. Unlike a classic tag, a simple tag cannot access its parent tag.
F. The doEndTag method of classic tags is used to implement iteration and this can be supported by
returning the EVAL_BODY_AGAIN.
Answer: A, D
SUN問題集 310-085 310-085参考書 310-085 310-085認定証
NO.8 Assume that the below logic exists in servlet's doGet() method:
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
...
HttpSession session = request.getSession(true);
...//1.}
At //1, which method of HttpSession is used to find whether the session is newly created or not?
A. sesson.isCreated(true)
B. session.isNewSession()
C. session.isNewlyCreated()
D. session.isNew()
Answer: D
SUN参考書 310-085認定試験 310-085過去問 310-085過去問
NO.9 You have created the following JSP code for displaying the request counter each time when a
client requests a jsp page:
1. <html>
2. <body>
3. <% int counter=0; %>
4. The page request is:
5. <%= ++counter %>
6. </body>
7. </html>
However, the page always displays The page request is:1 as its result on the screen. Which of the
following actions will you take so that the page will display the correct request counter?
A. Replace line number 3 with <%! int counter=0; %>.
B. Replace line number 3 with <%@ int counter=0; %>.
C. Replace line number 5 with <%= ++counter; %>.
D. Replace line number 3 with <%! int counter=0 %>.
Answer: A
SUN過去問 310-085 310-085 310-085認証試験 310-085
NO.10 Assume the following servlet mapping is defined in the deployment descriptor of a Web application:
<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
Which of the following URL requests are serviced by MyServlet?
Each correct answer represents a complete solution. Choose all that apply.
A. /BankApp/account/logout.do
B. /BankApp/Action.do
C. /Action.do
D. /BankApp/*.do
E. /BankApp/do.jsp
F. /BankApp/login/do
Answer: A, B, C, D
SUN 310-085 310-085練習問題 310-085問題集 310-085
NO.11 Which of the following methods would you use to retrieve the number of parameters present in a
request?
A. request.getParameters().size()
B. Use ServletRequest.getParameterNames() to count the number of parameters programmat ically.
C. request.getParameterSize()
D. request.getParamCount()
Answer: B
SUN認定資格 310-085 310-085 310-085参考書
NO.12 Assume that the session attribute you are using is implementing the required listener interface.
When the session is invalidated, which of the following is correct related to the attribute listener?
A. The sessionDestroyed() method of the HttpSessionBindingListener interface is invoked.
B. The valueUnbound() method of the HttpSessionListener interface is invoked.
C. The valueUnbound() method of the HttpSessionBindingListener interface is invoked.
D. The sessionDestroyed() method of the HttpSessionListener interface is invoked.
Answer: C
SUN認定資格 310-085 310-085 310-085認定試験 310-085認定資格 310-085
NO.13 You work as a Software Developer for BlueWell Inc. You are creating a Web application for your
company. You want to make use of a design pattern that provides the following functionalities:
l Hide underlying implementation details, so that the presentation tier components interact
directly with business services.
l Perform recovery operations.
l Intercept remote exceptions.
l Cache results locally.
l Provide loose coupling between client and system's business services.
Which of the following design patterns will you use to accomplish the task?
A. Session Facade
B. Intercepting Filter
C. Business Delegate
D. Model-View-Controller
Answer: C
SUN参考書 310-085参考書 310-085 310-085認定証
NO.14 Assume that you want to use session in your application where session never expires. Which of the
below is correct to achieve this?
Each correct answer represents a complete solution. Choose all that apply.
A. Below declaration in web.xml
<session-config>
<session-timeout>-1</session-timeout>
</session-config>
B. A session should always expire. There is no way we can make it as never expire.
C. <session-config>
<session-timeout>0</session-timeout>
</session-config>
D. Using servlet API
session.setMaxInactiveInterval(-1);
E. Using servlet API
session.setMaxInactiveInterval(0);
Answer: A, C
SUN問題集 310-085参考書 310-085 310-085過去問
NO.15 Assume that you have the listener class in your application that is declared in web.xml. The code for the
listener class is as follows:
public class MyServletContextAttributeListener implements
ServletContextAttributesListener {
public void attributeAdded (ServletContextAttributeEvent event) {
System.out.println(event.getValue());
}
public void attributeRemoved (ServletContextAttributeEvent event) {
System.out.println(event.getValue());
}
public void attributeReplaced (ServletContextAttributeEvent event) {
System.out.println(event.getValue());
}
}
The logic you are using to work on the context attributes is given as follows:
public void doGet(HttpServletRequest req, HttpServletResponse resp) {
ServletContext context = req.getServletContext(); //1.context.setAtttribute("A", "X");
//2.context.setAtttribute("A", "Y"); //3.context.removeAtttribute("A"); .//4.}
Which of the following is a correct output when the doGet() method is successfully executed?
A. XY
B. XYX
C. XY
D. XXY
Answer: D
SUN認定資格 310-085 310-085問題集 310-085練習問題 310-085認証試験
NO.16 Which of the following statements about the HEAD request method are true?
Each correct answer represents a complete solution. Choose all that apply.
A. In the HEAD method, the request parameters are transmitted within the body of the request.
B. It should not modify the information on the server.
C. It is used to request header information.
D. It is idempotent.
Answer: B, C, D
SUN認定証 310-085 310-085 310-085認定試験 310-085 310-085認定試験
NO.17 Assume that you used the below xml declaration in web.xml to declare data confidentiality and
integrity.
<user-data-constraint>
<transport-guarantee>XXX</transport-guarantee>
</user-data-constraint>
Which of the below valid values can be replaced with XXX?
Each correct answer represents a complete solution. Choose all that apply.
A. SECURE
B. INTEGRAL
C. CONFIDENTIAL
D. NONE
Answer: B, C, D
SUN認定証 310-085認定試験 310-085参考書 310-085参考書
NO.18 Assume that you are requested to develop a secured web application. Which of the following would
you consider to prevent from hackers?
Each correct answer represents a complete solution. Choose all that apply.
A. Design application using good design patterns.
B. Use HTTPS instead of HTTP.
C. Audit the web application code.
D. Use firewalls between application and clients.
E. Design and develop using popular software methodologies.
Answer: B
SUN認定証 310-085 310-085
NO.19 When a user submits the following form, what is the correct line of code to get the value of request
parameter "name" from the ServletRequest object?
<html>
<body>
<form action="/servlet/display">
NamE. <input type="text" name="name"> <p>
<input type="submit" value="Display">
</form>
</body>
</html>
A. String username = request.getParameter("name");
B. String username = request.getValue("name");
C. String username = request.getAttribute("name");
D. String username = request.getParameterValues("name");
Answer: A
SUN認定資格 310-085 310-085
NO.20 Assume that you want to display a common error page when any exceptions occurred in your jsp and
you created an error.jsp for the same. Which of the below is the right error page declaration in a jsp page?
A. <%@page errorPage="/common/error.jsp" %>
B. <%@include errorPage="/common/error.jsp" %>
C. <%@page error="/common/error.jsp" %>
D. <%@error page="/common/error.jsp" %>
Answer: A
SUN 310-085 310-085認定証
NO.21 A servlet is defined in deployment descriptor as below:
<servlet>
<servlet-name>MyAction<servlet-name>
<servlet-class>com.test.MyActionServlet</servlet-class>
</servlet>
Select all correct mappings for this servlet that apply.
Each correct answer represents a complete solution. Choose all that apply.
A. <servlet-mapping>
<servlet-name>com.test.MyActionServlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
B. <servlet-mapping>
<servlet-name>MyActionServlet</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
C. <servlet-mapping>
<servlet-name>MyAction</servlet-name>
</servlet-mapping>
D. <servlet-mapping>
<servlet-name>MyAction</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
E. <servlet-mapping>
<servlet-name>MyAction</servlet-name>
<url-pattern>/Controller</url-pattern>
</servlet-mapping>
Answer: D
SUN認証試験 310-085認定試験 310-085認定証 310-085認証試験
NO.22 Fill in the required method name in the space provided in the statement below.
NotE. Write only the name of the element without ().
The findAncestorWithClass() method internally calls the______ method to get further
reference.
A. getParent
Answer: A
SUN 310-085 310-085認証試験 310-085問題集 310-085認証試験
NO.23 Which of the following is used to get a session in the servlet's doGet() method?
Each correct answer represents a complete solution. Choose all that apply.
A. HttpSession session = request.getHttpSession();
B. HttpSession session = request.getSession();
C. HttpSession session = request.getSession(true);
D. HttpSession session = (HttpSession)request.getSession();
E. Session session = request.getSession();
Answer: B, C, D
SUN 310-085認定試験 310-085認定証 310-085認定証
NO.24 Which of the following actions trigger a Web browser to send a HTTP GET request?
Each correct answer represents a complete solution. Choose all that apply.
A. When a user submits a form that specifies attribute method="GET".
B. When a user clicks a link.
C. When a user types a URL in the browser's address bar.
D. When a user submits a form that specifies NO method attribute.
Answer: A, B, C, D
SUN問題集 310-085認定証 310-085 310-085練習問題 310-085練習問題
NO.25 Which of the following are the valid methods in the JspContext class?
Each correct answer represents a complete solution. Choose all that apply.
A. getAttribute()
B. getVariableResolver()
C. popBody()
D. findAttribute()
E. getBody()
F. pushBody()
Answer: A, B, C, D, F
SUN 310-085 310-085 310-085問題集
NO.26 Assume that you want to create a thread safe JSP page. Which of the below is correct?
A. <%@ page isThreadSafe="false" %>
B. <%@ page threadSafe="false" %>
C. <%@ page threadSafe="true" %>
D. <%@ page isThreadSafe="true" %>
Answer: A
SUN認定試験 310-085 310-085問題集 310-085
NO.27 Which of the following web.xml declarations are valid ways of identifying all jsp files under member
directory of a bank.?
Each correct answer represents a complete solution. Choose all that apply.
A. <web-resource-collection>
<web-resource-name>member</web-resource-name>
<url-pattern>/bank/member/*.jsp</url-pattern>
</web-resource-collection>
B. <web-resource-collection>
<web-resource-name>member</web-resource-name>
<url-pattern>/bank/member/*.jsp</url-pattern>
<http-method>POST</http-method>
</web-resource-collection>
C. <resource-collection>
<web-resource-name>member</web-resource-name>
<url-pattern>/bank/member/*.jsp</url-pattern>
</resource-collection>
D. <web-resource-collection>
<resource-name>member</resource-name>
<url-pattern>/bank/member/*.jsp</url-pattern>
</web-resource-collection>
Answer: A, B
SUN認定証 310-085認証試験 310-085認定証 310-085過去問
NO.28 Consider the following implementation class for the interface ServletRequestAttributeListener.
public class AccountServletAttributeListener implements
ServletRequestAttributeListener {
public void attributeAdded(ServletRequestAttributeEvent srae) {
System.out.println("Attribute added : "+srae.getName())
}
public void attributeRemoved(ServletRequestAttributeEvent srae) {
System.out.println("Attribute removeD. "+srae.getName())
}
}
Which of the following statements are true about the AccountServletAttributeListener class?
Each correct answer represents a complete solution. Choose all that apply.
A. Compilation fails because all methods are not implemented from the
ServletRequestAttributeListener listener.
B. Compilation fails because the incorrect method parameter ServletRequestAttributeEvent is used
instead of ServletRequestBindingEvent.
C. The attributeReplaced() method must be added to compile this class.
D. Compilation is successful, but at runtime it throws IllegalStateException.
Answer: A, C
SUN 310-085 310-085 310-085認定証
NO.29 You work as a Software Developer for UcTech Inc. You want to design a pattern with the following
characteristics:
1. It may reduce the network traffic by collapsing multiple remote requests into one.
2. It may be implemented as a serializable object, so that it can be moved across the network.
Which design pattern should you use to accomplish the task?
A. Front Controller
B. Service Locator
C. Business Delegate
D. Intercepting Filter
E. Transfer Object
Answer: E
SUN認定試験 310-085認定資格 310-085認定証
NO.30 Which of the following web.xml declarations are valid ways of identifying all jsp files under
member directory of a bank?
Each correct answer represents a complete solution. Choose all that apply.
A. <web-resource-collection>
<web-resource-name>member</web-resource-name>
<url-pattern>/bank/member/*.jsp</url-pattern>
<http-method>POST</http-method>
</web-resource-collection>
B. <resource-collection>
<web-resource-name>member</web-resource-name>
<url-pattern>/bank/member/*.jsp</url-pattern>
</resource-collection>
C. <web-resource-collection>
<web-resource-name>member</web-resource-name>
<url-pattern>/bank/member/*.jsp</url-pattern>
</web-resource-collection>
D. <web-resource-collection>
<resource-name>member</resource-name>
<url-pattern>/bank/member/*.jsp</url-pattern>
</web-resource-collection>
Answer: A, C
SUN 310-085認定資格 310-085認定試験