Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Can anyone clear my questions?

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to get 100% correct answers for this questions. If you can give me please help me.

Which three occur during JSP page translation? (Choose three.)
The jspInit method is called.
The JSP page implementation class is created.
The JSP page implementation class is compiled.
The JSP page is validated for syntatic correctness.
The associated tag files are validated for syntatic correctness.
Answer:

Given the web application deployment descriptor:
10. <jsp-config>
11. <jsp-property-group>
12. <url-pattern>*.jsp</url-pattern>
13. <scripting-invalid>false</scripting-invalid>
14. </jsp-property-group>
15. </jsp-config>
and example.jsp:
10 x 5 = ${10 * 5}<br>
2 * 3 = <%= 2 * 3 %><br>
What is the result?
An error occurs during page translation.
Translation is successful, but nothing is included in the response.
Both "10 x 5 = 50" and "2 * 3 = 6" are included in the JSP response.
The text "10 x 5 = 50" is included in the JSP response, but "2 * 3 = 6" is NOT.
The text "2 * 3 = 6" is included in the JSP response, but "10 x 5 = 50" is NOT.

Which EL expression evaluates to the request URI?
${requestURI}
${request.URI}
${request.getURI}
${request.requestURI}
${requestScope.requestURI}
${pageContext.request.requestURI}
${requestScope.request.request.URI}

Given:
<% int[] nums = {42, 420, 4200};
request.setAttribute("foo", nums); %>
${5 + 3 lt 6}
${requestScope['foo'][0] ne 10 div 0}
${10 div 0}
What is the result?
true true
false true
false true 0
true true Infinity
false true Infinity
An exception is thrown.
Compilation or translation fails

Given an EL function foo, in namespace func, that requires a long as a parameter
and returns a Map, which two are valid invocations of function foo? (Choose two.)
${func(1)}
${foo:func(4)}
${func:foo(2)}
${foo(5):func}
${func:foo("easy")}
${func:foo("3").name}


A web application allows the HTML title banner to be set using a servlet context
initialization parameter called titleStr.
Which two properly set the title in this scenario? (Choose two.)
A. <title>${titleStr}</title>
B. <title>${initParam.titleStr}</title>
C. <title>${params[0].titleStr}</title>
D. <title>${paramValues.titleStr}</title>
E. <title>${initParam['titleStr']}</title>
F. <title>${servletParams.titleStr}</title>
G. <title>${request.get("titleStr")}</title>


11. <% java.util.Map map = new java.util.HashMap();
12. request.setAttribute("map", map);
13. map.put("a", "b");
14. map.put ("b", "c");
15. map.put("c", "d"); %>
16. <%-- insert code here -- %>
Which three EL expressions, inserted at line 16, are valid and evaluate to "d"?
(Choose three.)
A. ${map.c}
B. ${map[c]}
C. ${map["c"]}
D. ${map.map.b}
E. ${map[map.b]}
F. ${map.map(map.b)}

Which three are described in the standard web application deployment descriptor?
(Choose three.)
A. session configuration
B. MIME type mappings
C. context root for the application
D. servlet instance pool configuration
E. web container default port bindings
F. ServletContext initialization parameters

A CertKing .com developer chooses to avoid using SingleThreadModel but wants to
ensure that data is updated in a thread-safe manner.
Which two can support this design goal? (Choose two.)
A. Store the data in a vocal variable.
B. Store the data in an instance variable.
C. Store the data in the HttpSession object.
D. Store the data in the ServletContext object.
E. Store the data in the ServletRequest object.
 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What are your answers ?

Thanks
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my answers:


Which three occur during JSP page translation? (Choose three.)
The JSP page implementation class is created.
The JSP page implementation class is compiled.
The JSP page is validated for syntatic correctness.




Given the web application deployment descriptor:
10. <jsp-config>
11. <jsp-property-group>
12. <url-pattern>*.jsp</url-pattern>
13. <scripting-invalid>false</scripting-invalid>
14. </jsp-property-group>
15. </jsp-config>
and example.jsp:
10 x 5 = ${10 * 5}<br>
2 * 3 = <%= 2 * 3 %><br>
What is the result?

Both "10 x 5 = 50" and "2 * 3 = 6" are included in the JSP response.


note that scripting-invalid is set to false not true


Which EL expression evaluates to the request URI?
${pageContext.request.requestURI}




Given:
<% int[] nums = {42, 420, 4200};
request.setAttribute("foo", nums); %>
${5 + 3 lt 6}
${requestScope['foo'][0] ne 10 div 0}
${10 div 0}
What is the result?
false true Infinity




Given an EL function foo, in namespace func, that requires a long as a parameter
and returns a Map, which two are valid invocations of function foo? (Choose two.)
${func:foo(2)}
${func:foo("3").name}




A web application allows the HTML title banner to be set using a servlet context
initialization parameter called titleStr.
Which two properly set the title in this scenario? (Choose two.)
B. <title>${initParam.titleStr}</title>
E. <title>${initParam['titleStr']}</title>




11. <% java.util.Map map = new java.util.HashMap();
12. request.setAttribute("map", map);
13. map.put("a", "b");
14. map.put ("b", "c");
15. map.put("c", "d"); %>
16. <%-- insert code here -- %>
Which three EL expressions, inserted at line 16, are valid and evaluate to "d"?
(Choose three.)
A. ${map.c}
C. ${map["c"]}
E. ${map[map.b]}




Which three are described in the standard web application deployment descriptor?
(Choose three.)
A. session configuration
B. MIME type mappings
F. ServletContext initialization parameters




A CertKing .com developer chooses to avoid using SingleThreadModel but wants to ensure that data is updated in a thread-safe manner.
Which two can support this design goal? (Choose two.)
A. Store the data in a vocal variable.
E. Store the data in the ServletRequest object.


 
My cellmate was this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic