Assume the custom tag is GLOOP and the prefix is TWONG. Which of the following is the syntax for an empty custom tag?
<TWONG:GLOOP/> 75.0%
<GLOOP:TWONG/> 0.0%
<GLOOP:TWONG></GLOOP:TWONG> 0.0%
<TWONG:GLOOP></TWONG:GLOOP> 25.0%
Assuming the servlet method for handling HTTPGET requests is doGet(HttpServletRequest req, HTTPServletResponse res), how do you get a request parameter in that servlet?
String value=req.getInitParameter(10); 0.0%
String value=req.getInitParameter("product"); 0.0%
String value=res.getParameter("product"); 0.0%
String value=req.getParameter("product"); 100.0%
Assuming the tag library is in place and the tag handler is correct, which of the following is the correct way to use a custom tag in a JSP page?
<yourLibrary="whatColorlslt" color="red"/> 0.0%
<yourLibrary:whatColorlslt color="red"/> 66.0%
<yourLibrary color="red"/> 0.0%
<yourLibrary.whatColorlslt color="red"/> 33.0%
How would you use a bean in a JSP page?
<jsp:useBean name="houseLotBean" scope="response" class="session.Realestate"/> 25.0%
<jsp:useBean id="houseLotBean" scope="session"><jsp:useBean> 0.0%
<jsp:useBean id="houseLotBean" scope="session" class="session.Realestate"/> 75.0%
<jsp:useBean scope="session" class="session.Realestate"/> 0.0%
If cookies are turned off on the client, which two methods still work with the session ID?
response.getSessionId() 0.0%
encodeRedirectURL() 33.0%
sessionRedirectURL() 33.0%
encodeURL() 33.0%
In which directory do you place any auxiliary JAR files?
WEB-INF/servlets 0.0%
WEB-INF/jar 50.0%
WEB-INF/classes 0.0%
WEB-INF/lib 50.0%
In which directory do you place servlet class files?
WEB-INFservlets 0.0%
webappservlets 0.0%
WEB-INFclasses 100.0%
WEB-INF 0.0%
Read the following code snippet and answer the question based upon it: <taglib> <taglib-uri> http://www.yourcompany.com/you TagLibrary </taglib-uri> <taglib-location> /WEB-INF/your...
The taglib directive can reference a TLD by name 50.0%
This tag goes into the WEB-INF/myApplication/web.xml file 0.0%
This definition is incorrect because the taglib-uri should have been uri 50.0%
This definition is incorrect because the taglib should have been tag 0.0%
Read the following code snippet: 1 <libraryPrefix:handlerName parameterNAme="value"> 2 <%=23*counter %> 3 <b>Congratulations!</b> Which of the following is the correct way to complete the above c...
</libraryPrefix:handlerName> 100.0%
</libraryPrefix:handlerName paremeterName="value"> 0.0%
</handlerName> 0.0%
<libraryPrefix> 0.0%
Suppose you had a servlet that simply returned an error message because that resource was forbidden to that user. Read the following code snippet: 1.public void service(HttpServletRequestrequest, ...
response.sendError(HTTPServletResponse.SC_FORBIDDEN,"Error"); 100.0%
response.setStatus(HTTPServletResponse.SC_FORBIDDEN,"Error"); 0.0%
response.sendError(Response.SC_FORBIDDEN,"Error"); 0.0%
response.setStatus(SC_FORBIDDEN); 0.0%
What does the container do with the following code snippet? <!--#include file="somefile.html"-->
The container passes this line of code through to the client 100.0%
The container includes this file statically 0.0%
The container includes this file dynamically 0.0%
The container will throw an exception 0.0%
What is Template Data?
The JSP blueprint or pattern 0.0%
The plain text (such as HTML) outside JSP tags(non java) in a JSP page 100.0%
The taglib XML namespace 0.0%
What is the file name of the WebApp deployment descriptor?
web.xml 100.0%
deploy.xml 0.0%
init.xml 0.0%
config.xml 0.0%
What is the WebApp deployment descriptor element name for the Servlet Context Initialization Parameters?
<context-init-param> 0.0%
<context-param> 0.0%
<init-param> 100.0%
<context-init> 0.0%
What output will be sent to the browser by the following code snippet? <!-- Que <%="Reader"%> -->
'Que Reader' within HTML comment markers 0.0%
This will cause an error 0.0%
Que <%="Reader"%> within HTML comment markers 0.0%
This is a comment so it is ignored by the container 100.0%
Which among the following objects is the best choice to share information between pages for a single user?
application 0.0%
page 0.0%
request 50.0%
session 50.0%
Which design pattern did technical designers of JSP use to provide centralized dispatching of requests via a controller servlet?
Model-view-Controller 100.0%
Facade 0.0%
Server-Client 0.0%
Publish-Subscribe 0.0%
Which design pattern is used to decouple presentation from core data access functionality?
BusinessDelegate 0.0%
DataAccess Object 100.0%
ModelView Controller 0.0%
Value Object 0.0%
Which design pattern reduces network traffic by acting as a caching proxy of a remote object?
DataAccess Object 0.0%
Model-View-Controller 0.0%
Value Object 100.0%
Business Delegate 0.0%
Which interface and method name should be used to acquire a text stream for the response?
ServletResponse.getOutputStream 100.0%
ServletResponse.getWriterStream 0.0%
ServletResponse.getTextStream 0.0%
ServletResponse.getWriter 0.0%
Which interface and method name should be used to retrieve HTTP request header information?
HttpServletRequest.getHeaderNames 100.0%
ServletRequest.getNames 0.0%
ServletRequest.getHeadNames 0.0%
None of the above 0.0%
Which interface provides access to request scoped attributes?
ServletContext 100.0%
ServletRequest 0.0%
ServletConfig 0.0%
None of these 0.0%
Which JSP action retrieves the value of a property from a properly declared JavaBean in a JSP page?
jsp:getProperty 100.0%
jsp:getParameter 0.0%
jsp:getAtrribute 0.0%
jsp:getValue 0.0%
Which method in the HttpServlet class corresponds to the HTTPPOST method?
postHttp 0.0%
doPost 100.0%
post 0.0%
getPost 0.0%
Which method in the HttpServlet class corresponds to the HTTPPUT method?
put 100.0%
doPut 0.0%
httpPut 0.0%
putHttp 0.0%
Which method is called by the servlet container just after the servlet is removed from service?
public void finalize() {// code...} 0.0%
public void destroy() {// code...} 100.0%
public void destroy()throws ServletException {// code...} 0.0%
public void finalize()throws ServletException {// code...} 0.0%
Which of following interfaces can make a servlet thread safe?
Runnable 0.0%
synchronization 50.0%
Servlets can't be made thread safe 0.0%
None of the above 50.0%
Which of the following are used by Servlet Containers to maintain session information?
Cookies 0.0%
Hidden form fields 0.0%
HTTPS protocol information 0.0%
URL rewriting 100.0%
Which of the following is a JSP implicit object?
objRequest 0.0%
Request.send 0.0%
request 100.0%
servlet 0.0%
Which of the following is not a JSP implicit object?
out 0.0%
in 100.0%
response 0.0%
page 0.0%
Which of the following is the listener interface for servlet context attributes?
ContextAttributeListener 0.0%
ServletContextAttributeListener 0.0%
ServletAttributeListener 0.0%
ServletContextListener 100.0%
Which of the following is the name of the cookie used by Servlet Containers to maintain session information?
SESSIONID 0.0%
SERVLETID 0.0%
JSESSIONID 100.0%
CONTAINERID 0.0%
Which of the following options is a valid declaration?
<%! String name="Patricia" %> 100.0%
<%! String name="Patricia"; %> 0.0%
<% String name="Devyn" %> 0.0%
<% public String name="Devyn"; %> 0.0%
Which of the following options is a valid expression?
<%! String name="Patricia" %> 0.0%
<%! String name="Patricia"; %> 0.0%
<%=(new java.util.Date()).toLocaleString() %> 100.0%
<% public String name="Devyn"; %> 0.0%
Which of the following statements are true regarding declaring a servlet instance in a deployment descriptor?
The tags are nested within <web-app> tags 50.0%
The tags do not define parameters 0.0%
The tags are <servlet-instance></servlet-instance> 0.0%
It specifies the fully qualified class name of the servlet 50.0%
Which of the following statements are true regarding the HTTP GET method?
There is a limit on how much data this HTTP method can send 50.0%
There is no limit on how much data this HTTP method can send 0.0%
This HTTP method is the fastest 50.0%
This HTTP method is used when you click on an HTML link 0.0%
Which of the following statements are true regarding the structure of a WebArchive file?
It has a jar extension 0.0%
It is a JAR archive of the WebApplication structure 0.0%
It has a war extension 50.0%
It is extracted by the container upon the first call to any�servlet it contains 50.0%
Which statement is true regarding a servlet context listener?
An object that implements a context listener is notified when its request objects are created or destroyed 0.0%
An object that implements a context listener is notified when its Web App context is created or destroyed 100.0%
An object that implements a context listener is notified when its Web App deployment descriptor defines it to be notified 0.0%
An object that implements a context listener is notified when its sessions are created or destroyed 0.0%
Which statement is true regarding ServletContext Initialization Parameters in the deployment descriptor?
They are accessible by all servlets in a given web application 0.0%
They are accessible by all servlets in a given session 0.0%
They are accessible by all servlets in a given HTTP request 0.0%
They are accessible by all servlets in a given container 100.0%
Which statements are true regarding ServletContext Init Parameters in the deployment descriptor?
They are set at deployment-time, but accessed at run-time 0.0%
They are accessible from any session within that context 0.0%
They are not set at deployment-time, but accessed at run-time 0.0%
They are set at deployment-time and can be updated at run-time 100.0%
Which two of the following statements are best associated with the HTTPPOST method?
This HTTP method is the one most frequently used by browsers 0.0%
There is no limit on how much data this HTTP method can send 50.0%
There is a limit on how much data this HTTP method can send 0.0%
This method is most often used to submit form data 50.0%
Which two statements among the following apply to redirecting a HTTP request to another URL?
The path must be absolute 0.0%
The path must be relative 50.0%
The redirect method must be called before the response body is committed, otherwise an IllegalStateException is thrown 50.0%
The path may be relative or absolute 0.0%
With regard to the destroy lifecycle method, identify the correct statements about its purpose or about how and when it is invoked.
It gives the servlet an opportunity to clean up resources 100.0%
Like try-catch, it is called upon an exception 0.0%
It is rarely used but can be called to remove a servlet from memory 0.0%
It isn't called if the server crashes 0.0%
With regard to the service() lifecycle method, identify two correct statements about its purpose or about how and when it is invoked.
Upon completion it calls the destroy method 0.0%
It is called whenever the servlet is requested 50.0%
It is called after the init method is called 50.0%
It is only called when the servlet is first requested 0.0%
With regard to the servlet context listener, which of the following methods is valid?
contextListenerEvent 0.0%
contextListenerInitialized 100.0%
contextInitialized 0.0%
contextListenerDestroyed 0.0%