After a merger with another small business, your company has inherited a legacy WAR file but the originalsource files were lost. After reading the documentation of that web application,you discover that the WARfile contains a useful tag library that you want to reuse in your own webapp packaged as a WAR file.
What do you need to do to reuse this tag library?()
A.Simply rename the legacy WAR file as a JAR file and place it in your webapp’s library directory.
B.Unpack the legacy WAR file, move the TLD file to the META-INF directory, repackage the whole thingas a JAR file, and place that JAR file in your webapp’s library directory.
C.Unpack the legacy WAR file, move the TLD file to the META-INF directory, move the class files to thetop-level directory, repackage the whole thing as a JAR file, and place that JAR file in your webapp’slibrary directory.
D.Unpack the legacy WAR file, move the TLD file to the META-INF directory, move the class files to the top-level directory, repackage the WAR, and place that WAR file in your webapp’s WEB-INF directory.
您可能感興趣的試卷
你可能感興趣的試題
A.
B.
C.
D.
You want to create a valid directory structure for your Java EE web application, and you want to put yourweb application into a WAR file called MyApp.war.
Which two are true about the WAR file?()
A.At deploy time, Java EE containers add a directory called META-INF directly into the MyApp directory.
B.At deploy time, Java EE containers add a file called MANIFEST.MF directly into the MyApp directory.
C.It can instruct your Java EE container to verify, at deploy time, whether you have properly configured your application’s classes.
D.At deploy time, Java EE containers add a directory call META-WAR directly into the MyApp directory.
Servlet A forwarded a request to servlet B using the forward method of RequestDispatcher.
What attributein B’s request object contains the URI of the original request received by servlet A?()
A.REQUEST_URI
B.javax.servlet.forward.request_uri
C.javax.servlet.forward.REQUEST_URI
D.javax.servlet.request_dispatcher.request_uri
E.javax.servlet.request_dispatcher.REQUEST_URI
Given a Filter class definition with this method:
21.public void doFilter(ServletRequest request,
22.ServletResponse response,
23.FilterChain chain)
24.throws ServletException, IOException {
25.// insert code here26. }
Which should you insert at line 25 to properly invoke the next filter in the chain,or the target servlet if thereare no more filters?()
A.chain.forward(request, response);
B.chain.doFilter(request, response);
C.request.forward(request, response);
D.request.doFilter(request, response);
Given the web application deployment descriptor elements: 11.
A.The output "filterAdded = null" is written to the response stream.
B.The output "filterAdded = addedByFilter" is written to the response stream.
C.An exception is thrown at runtime within the service method of the Source servlet.
D.An exception is thrown at runtime within the service method of the Destination servlet.
最新試題
Click the ’Select and Place’ button.Place the events in the order they occur.
Which is true about the web container request processing model?()
A web application allows the HTML title banner to be set using a servlet context initialization parametercalled titleStr.Which two properly set the title in this scenario?()
Given tutorial.jsp:2.EL Tutorial3.Example 14.5.Dear ${my:nickname(user)}6.Which, when added to the web application deployment descriptor,ensures that line 5 is included verbatimin the JSP output?()
Given a Filter class definition with this method:21.public void doFilter(ServletRequest request,22.ServletResponse response,23.FilterChain chain)24.throws ServletException, IOException {25.// insert code here26.}Which should you insert at line 25 to properly invoke the next filter in the chain, or the target servlet if thereare no more filters?()
Which three are true about servlet filters?()
Click the 'Select and Place' button.Place the events in the order they occur.
Click the ’Select and Place’ button.Place the events in the order they occur.
In which three directories, relative to a web application’s root, may a tag library descriptor file reside whendeployed directly into a web application?()
Click the ’Select and Place’ button.Place the events in the order they occur.