Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 47 pages
Exam (elaborations)

PRJ321 Questions with Detailed Verified Answers (100% Correct Answers) /Already Graded A+

Document preview thumbnail
Preview 4 out of 47 pages

PRJ321 Questions with Detailed Verified Answers (100% Correct Answers) /Already Graded A+

Content preview

Page |1




PRJ321 Questions with Detailed Verified
Answers (100% Correct Answers) /Already
Graded A+
What gets printed when the following expression is evaluated? Select the one correct
answer.${(1==2) ? 4 : 5}
a. 2
b. 3
c. 4
d. 5
Ans: d



Consider the following HTML page code: Identify the two methods that can be used to
retrieve the value of the name parameter when the form is submitted. Select one or more:
a. getParameterValue( "name");
b. getParameterValues( "name");
c. getParameters( "name");
d. getParameter( "name");
Ans: b d



Which JSTL tag likes <%= ... >?Select one:
a. <c:out.print>
b. <c:output>
c. <c:in>
d. <c:out>
Ans: d



What is the difference between MVC1 and MVC2?

, Page |2


a.MVC1 is page-centric, MVC2 is controller-centric
b.MVC2 is page-centric, MVC1 is controller-centric
c.The MVC1 process goes from one JSP page to another, while MVC2 directs to a common
panel before directing to another page
d.MVC2 makes use of a system controller while MVC1 doesn't.
Ans: c



What are Struts 2 Features? Choose 3
a. Struts 2 Actions are depend on the servlet API
b. Struts 2 Actions are thread safe
c. Any POJO class can be used as Action class.
d. No need of Action forms in Struts 2.
e. Struts 2 allows validation by using the validate() method in Action class.
Ans: c d e



Which of the following statements about the Servlet is false? Select one:
a. Initialization code in servlets is executed every time the program is made to run
b. Servlets are portable
c. Servlets are easy to use
d. All of the others
e. None of the others
Ans: a



The deployment descriptor for a stateless session bean that uses the isCallerInRole method
reads as follows:
3. <security-role-ref>
4. <role-name>manager</role-name>
5. <role-link>humanresources</role-link>
6. <security-role-ref>
16. <security-role>
17. <description>
18. Is allowed to view and update all employee records.

, Page |3


19. </description>
20. <role-name>humanresources</role-name>
21. </security-role>
Which two roles are responsible for creating this deployment descriptor? ( Choose two.) Select
one or more:
a. System Administrator
b. Bean Provider
c. Deployer
d. Application Assembler
Ans: b d



Which method is used to perform DML statements in JDBC?
a. executeResult()
b. execute()
c. executeUpdate()
d. executeQuery()
Ans: c



Which of the following methods can be used to add cookies to a servlet response? Select
one:
a. HttpServletResponse.addCookie( String contents)
b. ServletResponse.addHeader( String name, String value)
c. ServletResponse.addCookie( String contents)
d. ServletResponse.addCookie( Cookie cookie)
e. HttpServletResponse.addCookie( Cookie cookie)
Ans: e



What is the HTTP 1.1 status code that indicates: Everything's fine? Select one:
a. 200
b. 101
c. 202
d. 201

, Page |4


Ans: a



How does container initialize Servlet Object at deploy time?
a. The servlet must be declared into context deployment descriptor with servlet tag
b. The servlet must be declared into web deployment descriptor with servlet tag
c. The servlet must be declared into web deployment descriptor with servlet-mapping tag
d. The servlet does not need to be declared
Ans: b



What object will represent the output stream for the JSP page?
a. dispatch
b. out
c. response
d. writer
Ans: b



How do you manage database transaction in JDBC programming?
a. Database transaction management is depends on JDBC driver
b. Database transaction is managed by DBMS server, not by JDBC driver
c. Turn on auto-commit mode to begin transaction, then commit/ rollback
d. Turn off auto-commit mode to begin transaction, then commit/ rollback
Ans: d



Which is not method of the request object - an instance of HttpServletRequest.
a. sendRedirect(url)
b. getSession()
c. getCookies()
d. getParameterValues(name)
Ans: a



What are benefits of implements ModelDriven for action class? Choose 2 Select one or more:

Document information

Uploaded on
March 24, 2025
Number of pages
47
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$12.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Passit
3.5
(22)
Sold
124
Followers
6
Items
14451
Last sold
2 weeks ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions