PRJ301 FULL VERIFIED ANSWERS
To send binary output in a response, which of the following method of HttpServletResponse get the
appropriate Writer/Stream object?
getOutputStream
Which of the following is NOT a valid attribute for useBean tag?
className
Which of the following defines the ...
To send binary output in a response, which of the following method of HttpServletResponse get the
appropriate Writer/Stream object?
getOutputStream
Which of the following is NOT a valid attribute for useBean tag?
className
Which of the following defines the name of a tag in a taglibrary descriptor?
name
Study the statements about web.xml file:
1)The deployment descriptor file is called web.xml, and it must be located in the WEB-INF directory.
2)web.xml is in XML (extended markup language) format. Its root element is <web>.
Only statement 1 is true
Which interface you CANNOT use to obtain a ResquestDispatcher Object?
ServletContext
Which security mechanism proves that data has not been tampered with during its transit through the
network?
Data integrity
Which interface can you use to retrieve a resource that belongs to the current web application
ServletContext
Your jsp page uses classes from java.util package. Which of the following statement would allow you to
import the package? (Choose one)
<%@ page import="java.util*"%>
,Which of the following statement correctly store an object associated with a name at a place where all
the servlets/jsps of the same webapp participating in a session can access it? Assume that request,
response, name, value etc. are references to objects of appropriate types.(Choose one)
request.getSession().setAttribute(name, value);
Which element of the deployment descriptor of a web application includes the welcome-file-list
element as a sub element?
web-app
Which syntax is correct for JSP Declarations?
<%! code %>
When you obtain a session( using getSession() of HttpServletRequest object), the web manufactures a
unique ID string for the session. This passed as a token between the client and server.
True
1 multiple choice option
Which statements are the BEST describe page attribute of <jsp:include page =...> Action?
Dynamically includes another resource in a JSP. As the JSP executes, the referenced resource is included
and processed.
Data integrity is the biggest issue for your web application. What will you do?(choose one)
Use form-based authentication
The following statement is True or False?
Statement: A URL contains information that directs a browser to the resource that the user wishes to
access
True
1 multiple choice option
The following statement is True or False?
Statement: Servlet methods are executed automatically.
True
, 1 multiple choice option
Which method would you use to put the session id into the URL to support sessions using URL rewriting?
encodeURL() of HttpServletResponse
Regarding URL rewriting for session support, which of the following is true?
Every URL that the client uses must include jsessionid
Which syntax is correct for JSP Scriptlets?
<% code %>
Which of the following is true about Data Integrity?
The information/data is not tampered with, in transit from host to client
What is output to the web page on the second access to the same instance of the following JSP?
<html>
<body>
<%! int x = 0; %>
<%= x++ %>
</body>
</html>
0
The form attribute ____ specifies the server-side form handler, i.e, the program that handles the
request
action
Name the default value of the scope attribute of <jsp:useBean>
A. page
page
The HttpServletRequest has methods by which you can find out about incoming information such as:
All of the others
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller CertifiedGrades. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $10.49. You're not tied to anything after your purchase.