최신 SCWCD 310-083 무료샘플문제:
1. Click the Exhibit button.
Given the HTML form:
1 . <html>
2 . <body>
3 . <form action="submit.jsp">
4 . Name: <input type="text" name="i1"><br>
5 . Price: <input type="text" name="i2"><br>
6 . <input type="submit">
7 . </form>
8 . </body>
9 . </html>
Assume the product attribute does NOT yet exist in any scope.
Which code snippet, in submit.jsp, instantiates an instance of com.example.Product that contains the results of the form submission?
A) <jsp:useBean id="product" type="com.example.Product">
< jsp:setProperty name="product" property="name"
value="<%= request.getParameter( "i1" ) %>" />
< jsp:setProperty name="product" property="price"
value="<%= request.getParameter( "i2" ) %>" />
< /jsp:useBean>
B) <jsp:useBean id="product" class="com.example.Product" />
$ {product.name = param.i1}
$ {product.price = param.i2}
C) <jsp:useBean id="com.example.Product" />
< jsp:setProperty name="product" property="*" />
D) <jsp:useBean id="product" class="com.example.Product">
< jsp:setProperty name="product" property="name"
param="i1" />
< jsp:setProperty name="product" property="price"
param="i2" />
< /jsp:useBean>
2. Which two are valid and equivalent? (Choose two.)
A) <%= int i; %>
B) <jsp:expr>int i;</jsp:expr>
C) <%! int i; %>
D) <jsp:declaration>int i;</jsp:declaration>
E) <jsp:scriptlet>int i;</jsp:scriptlet>
3. Given the two security constraints in a deployment descriptor:
1 01. <security-constraint>
1 02. <!--a correct url-pattern and http-method goes here-->
1 03. <auth-constraint><role-name>SALES</role-name></auth-
1 03. <auth-constraint>
1 04. <role-name>SALES</role-name>
1 05. </auth-constraint>
1 06. </security-constraint>
1 07. <security-constraint>
1 08. <!--a correct url-pattern and http-method goes here-->
1 09. <!-- Insert an auth-constraint here -->
1 10. </security-constraint>
If the two security constraints have the same url-pattern and http-method, which two, inserted independently at line 109, will allow users with role names of either SALES or
MARKETING to access this resource? (Choose two.)
A) <auth-constraint>
< role-name>MARKETING</role-name>
< /auth-constraint>
B) <auth-constraint>
< role-name>ANY</role-name>
< /auth-constraint>
C) <auth-constraint/>
D) <auth-constraint>
< role-name>*</role-name>
< /auth-constraint>
4. DRAG DROP
Click the Task button.
Place the appropriate element names on the left on the web application deployment descriptor on the right so that files ending in ".mpg" are associated with the MIME type
"video/mpeg."
5. Given the element from the web application deployment descriptor:
< jsp-property-group>
< url-pattern>/main/page1.jsp</url-pattern>
< scripting-invalid>true</scripting-invalid>
< /jsp-property-group>
and given that /main/page1.jsp contains:
< % int i = 12; %>
< b><%= i %></b>
What is the result?
A) <b></b>
B) <% int i = 12 %>
< b><%= i %></b>
C) The JSP fails to execute.
D) <b>12</b>
질문과 대답:
질문 # 1 정답: D | 질문 # 2 정답: C,D | 질문 # 3 정답: A,D | 질문 # 4 정답: 회원만 볼 수 있음 | 질문 # 5 정답: C |