IT技術者に向きの問題集 - Pass4Test.JP

Pass4Test.JPはCisco、Microsoft、IBM、HP、CompTIA、SUN、Oracleなど、各種類のIT認定試験を提供しております。

SUNの310-085認定試験の最新教育資料の登場

IT認証資料を提供したほかのサイトより、Pass4Testのプロかつ高品質の製品は最高のものです。Pass4Testを選んだら成功を選んだということです。Pass4TestのSUNの310-085試験トレーニング資料はあなたが成功への保証です。Pass4Testを利用したら、あなたはきっと高い点数を取ることができ、あなたの理想なところへと進むことができます。

Pass4Testを選択したら、成功が遠くではありません。Pass4Testが提供するSUNの310-085認証試験問題集が君の試験に合格させます。テストの時に有効なツルが必要でございます。

試験番号:310-085問題集
試験科目:SUN 「JavaServer Pages and Servlet Developer Certified Expert Exam」

あなたは弊社の商品を買ったら一年間に無料でアップサービスが提供された認定試験に合格するまで利用しても喜んでいます。もしテストの内容が変われば、すぐにお客様に伝えます。弊社はあなた100%合格率を保証いたします。

SUNの310-085認定試験に受かることを悩んでいたら、Pass4Testを選びましょう。Pass4TestのSUNの310-085試験トレーニング資料は間違いなく最高のトレーニング資料ですから、それを選ぶことはあなたにとって最高の選択です。IT専門家になりたいですか。そうだったら、Pass4Testを利用したください。

今の競争の激しいIT業界ではSUNの310-085試験にパスした方はメリットがおおくなります。給料もほかの人と比べて高くて仕事の内容も豊富です。でも、この試験はそれほど簡単ではありません。

購入前にお試し,私たちの試験の質問と回答のいずれかの無料サンプルをダウンロード:http://www.pass4test.jp/310-085.html

NO.1 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.2 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   310-085認定資格

NO.3 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

NO.4 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.5 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.6 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問題集   310-085認証試験   310-085

NO.7 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.8 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.9 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認定資格   310-085問題集

NO.10 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

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参考書   310-085認定証

NO.12 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

NO.13 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練習問題   310-085認証試験

NO.14 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.15 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

NO.16 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練習問題

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認定資格   310-085

NO.18 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.19 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

NO.20 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認定証   310-085   310-085問題集

NO.21 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   310-085練習問題

NO.22 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問題集

NO.23 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.24 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.25 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

NO.26 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.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 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.29 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認定証

NO.30 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   310-085   310-085

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

投稿日: 2013/8/24 15:32:13  |  カテゴリー: SUN  |  タグ: SUN310-085