SUNの310-085の認定試験証明書を取りたいなら、Pass4Testが貴方達を提供した資料をかったら、お得です。ass4Testはもっぱら認定試験に参加するIT業界の専門の人士になりたい方のために模擬試験の練習問題と解答を提供した評判の高いサイトでございます。

Pass4TestのITの専門研究者はSUN 310-085認証試験の問題と解答を研究して、彼らはあなたにとても有効な訓練試験オンラインサービスツールを提供します。もしあなたはPass4Testの製品を購入したければ弊社が詳しい問題集を提供して、君にとって完全に準備します。弊社のPass4Test商品を安心に選択してPass4Test試験に100%合格しましょう。
Pass4TestはもっぱらITプロ認証試験に関する知識を提供するのサイトで、ほかのサイト使った人はPass4Testが最高の知識源サイトと比較しますた。Pass4Testの商品はとても頼もしい試験の練習問題と解答は非常に正確でございます。
試験番号:310-085問題集
試験科目:SUN 「JavaServer Pages and Servlet Developer Certified Expert Exam」
Pass4Testを通してSUN 310-085試験に合格することがやすくて、SUN 310-085試験をはじめて受ける方はPass4Testの商品を選んで無料なサンプル(例年の試験問題集と解析)をダウンロードしてから、楽に試験の現場の雰囲気を体験することができます。オンラインにいろいろなSUN 310-085試験集があるですけれども、弊社の商品は一番高品質で低価額で、試験の問題が絶えず切れない更新でテストの内容ともっとも真実と近づいてお客様の合格が保証いたします。それほかに、弊社の商品を選んで、勉強の時間も長くではありません。できるだけ早くSUN 310-085認定試験を通ろう。
IT業界の中でたくさんの野心的な専門家がいって、IT業界の中でより一層頂上まで一歩更に近く立ちたくてSUNの310-085試験に参加して認可を得たくて、SUN の310-085試験が難度の高いので合格率も比較的低いです。SUNの310-085試験を申し込むのは賢明な選択で今のは競争の激しいIT業界では、絶えず自分を高めるべきです。しかし多くの選択肢があるので君はきっと悩んでいましょう。
購入前にお試し,私たちの試験の質問と回答のいずれかの無料サンプルをダウンロード:http://pdf.pass4test.jp/310-085.pdf
NO.1 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.2 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 310-085過去問
NO.3 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
NO.4 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認定試験
NO.5 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.6 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 310-085 310-085
NO.7 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練習問題
NO.8 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.9 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.10 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参考書 310-085問題集 310-085
NO.11 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認定試験
NO.12 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認証試験
NO.13 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認定証 310-085
NO.14 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練習問題 310-085練習問題
NO.15 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参考書 310-085
NO.16 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 310-085認証試験
NO.17 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.18 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問題集 310-085練習問題 310-085
NO.19 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.20 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認定証 310-085 310-085
NO.21 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.22 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 310-085認定試験
NO.23 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
NO.24 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.25 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 310-085
NO.26 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.27 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.28 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 310-085認証試験
NO.29 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.30 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認定資格