100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
PRJ301 Complete Answers $9.89   Add to cart

Exam (elaborations)

PRJ301 Complete Answers

 0 view  0 purchase
  • Course
  • PRJ301 A
  • Institution
  • PRJ301 A

PRJ301 Complete Answers Entity bean is _______ Select one: a. a persistent data component b. a database object c. an object-relational mapping d. an application logic component ️a Identify the correct order of phases in the Public/Private Key encryption? 1. Server provides its pub...

[Show more]

Preview 4 out of 186  pages

  • October 1, 2024
  • 186
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • PRJ301 A
  • PRJ301 A
avatar-seller
CertifiedGrades
PRJ301 All Answers Correct

Given the HTTP message fragment: HTTP/1.1 500 Internal Server Errors Choose the correct statement
Select one:

a. The fragment message describes the request line of HTTP response message

b. None of the others

c. The fragment message describes the status line of HTTP response message

d. The fragment message describes the status line of HTTP request message

e. The fragment message describes the header information of HTTP response message ✔️c



A JSP page called test.jsp is passed a parameter name in the URL using
http://localhost/Final/test.jsp?name=John. The test.jsp contains the following code. <% String
myName=request.getParameter("name");%> <% String test= "Welcome " + myName; %> <%=test%>
What is the output? Select one:

a. The program gives a syntax error because of the statement <%=test%>

b. The program gives a syntax error because of the statement <% String
myName=request.getParameter("name");%>

c. The program gives a syntax error because of the statement <% String test= "Welcome " + myName;
%>

d. None of the others.

e. The page display "Welcome John" ✔️e



Which scripting element lets you define methods or fields that get inserted into the main body of the
servlet class (outside of the _jspService method that is called by service to process the request)? Select
one:

a. expression

b. scriptlet

c. None of the others

d. declaration e. comment ✔️d



Which method returns the actual length of the request sent by the client? Select one:

,a. getContentLength()

b. None of the others

c. getParameter()

d. getServerName()

e. getAttribute() ✔️a



Which of the followings is a correct syntax of the method that is used to get the initialized parameter in
ServletContext or ServletConfig? Select one:

a. String getInitializedParameter(String name);

b. String getInitParameter(String name);

c. All of the others.

d. String getContextParameter(String name); ✔️b



To send text outptut in a response, the following method of HttpServletResponse may be used to get
the appropriate Writer/Stream object. Select one or more:

a. getOutputStream

b. getBinaryStream

c. getStream

d. getWriter ✔️a,d



Which of the following statements about Web Container is true? Select one:



a. Container is a program, which manages the execution of servlets

b. A Web application is accessible to all users connected to the Web

c. The performance of a servlet is independent of the efficiency of the container

d. The Web Container takes request from a servlet and passes it to a Web Server for processing

e. None of the others ✔️a



Which of the following represents the XML equivalent of this statement <%@ include file="a.jsp"%> .

,Select one correct statement.

Select one:



a. <jsp:include page="a.jsp"/>

b. There is no XML equivalent of include directive.

c. <jsp:directive.include file="a.jsp"/>

d. None of the others

e. <jsp:include file="a.jsp"/> ✔️c



Which of the following attributes of the Page directive is used to specify the page to display errors which
may occur in the JSP page? Select one:



a. excption

b. isErrorPage

c. Error

d. None of the others

e. errorPage ✔️e



Name the implicit variable available to JSP pages that may be used to access all the other implicit
objects. Select one:



a. pageContext

b. request

c. response

d. page

e. out ✔️a



Which of the following statement is an expression in scripting element? Select one:

, a. <%= for(int i=0; i<n; i++) {out.println(i)} %>

b. <%= x + y - 8 %>

c. All of the others

d. <%= x + y; %> ✔️b



Given a JSP code fragment <% int a = Integer.parseInt("a"); %> Choose the correct statement Select one:



a. The code is generated in jspInit method by JSP enginer

b. None of the others

c. The code is generated in _jspService method by JSP engine

d. The code is generated besides of _jspService method by JSP engine ✔️c



Which of the following statements about Request and Response message structure is false? Select one:



a. Request message structure consists of request line and header information

b. Request line returns the User-Agent along with the Accept header

c. Header information in response message contains information such as server, last modified date,
content-length and content type

d. None of the others ✔️b



Assume that you need to write a JSP page that adds numbers from one to ten, and then print the
output.



<% int sum = 0;

for(j = 0; j < 10; j++) { %>

<% // XXX --- Add j to sum %>

<% } %>

<% // YYY --- Display ths sum %>

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

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

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

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 $9.89. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

79751 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$9.89
  • (0)
  Add to cart