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
Exam (elaborations)

PRJ321 || 100% Correct Answers.

Rating
-
Sold
-
Pages
42
Grade
A+
Uploaded on
26-11-2025
Written in
2025/2026

PRJ321 || 100% Correct Answers.

Institution
PRJ321
Course
PRJ321

Content preview

PRJ321 || 100% Correct Answers.
JSP ________ let you insert arbitrary code into the servlet's _JspService method (which is
called by service).
Scriptlets.
A. scriptlets
B. expressions
C. declarations correct answers A

Considerthe HTML code below. Which ofthe following method calls can retrieve the "email"
value sentfrom the browser? (Choose one)
A. getField("email") of HttpServletRequest
B. getFormValue("email") of HttpServletRequest
C. getParameter("email") ofServletRequest
D. getParameters("email") of HttpServlet correct answers C

3. Which ofthe following elements are used for error handling and are child elements of
<web-app> ofa deployment descriptor?
A. <error-location>
B. <error>
C. <error-page>
D. <error_page> correct answers C

4. Consider the following taglibrary descriptor element
<tag>
<name>Hello<lname>
<tag-class>com.abc.HelloTag</tag-class>
<body-content> "- </body-content>
</tag>
Which ofthe following is NOT a valid value for <body-content> element?
A. empty
B. tagdependent
C. JSP
D. generic correct answers C

5. Which statements are BEST describe isErrorPage attribute of <%@ page
isErrorPage=_.°/o> directive?
A. Specifies ifthe current page is an error page thatwill be invoked in response to an error on
another page. lfthe attribute value is true. the implicit object exception is create:
B. Specifies the MIME type ofthe data in the response to the client The default type is
textlhtml.
C. Any exceptions in the current page that are not caught are sent to the error page for
processing. The error page implicit object exception references the original exception.
D. Specifies the class from which the translated JSP will be inherited. This attribute must be a
fully qualified package and class name. correct answers C

6. Which is the CORRECT statement about JMS?
A. JMS enhances access to email services
B. JMS uses JNDI to find destination
C. JMS uses JMX to create a connectionFactory correct answers B

,7. Identify the parent element of <session-timeout> element in webxml correct answers A.
<webapp>
B. <session-config>
C. <session-configuration>
D. <session_config>
B

8. EJB 3.0 specifications are first implemented in_______ correct answers A. Java EE 5
B. Java EE 4
C. Java EE 3
D. Java EE 6
A

9. Study the statements: correct answers 1) The special directory [WEB-INF/lib contains Java
class files-servlets and supporting code.
2) The special directory [WEB-INF/classes contains JAR files with supporting libraries of
code.
A. Both 1 and 2 are true
B. Both 1 and 2 are not true
C. Only statement2 is true
D. Only statement 1 is true
B

10. You want to use a bean that is stored in "com/enthu/GUl.ser" file. Which offollowing
statements correctly defines the tag that accesses the bean? correct answers A. <jsp:useBean
id="pref' name="com.enthu.GUl"
B. <jsp:useBean id="pref' type="com/enthu/GUl.ser"
C. <jsp:useBean id="pref' beanName="com.enthu.GUl" type="com.enthu.GUl"/>
D. <jsp:useBean id="pref" class="com.enthu.GUl.ser"
E. <jsp:useBean id="pref' name="com/enthu/GUI.ser" l>
C

11. Consider the following tag declaration in a TLD file: correct answers <tag>
<name>simplelnterest</name>
<tag-class>SimplelnterestTag</tag-class>
</tag>
SimplelnterestTag calculates simple interest for any amount and requires two attributes
'amount' and 'rate'.
Which of the following sub elements would you need to add inside the <tag> element in the
TLD in place of //1 as shown above?
Two separate <attribute> elements.
A. One <attribute> element with sub'elements
B. One <attribute-list> element with sub-elements
C. One <amount> element and one <rate> element
A

12. An objectwith page scope exists in every JSP ofa patticularWeb application. correct
answers A. True
B. False

,B

13. To be a servlet a class should extend HttpServlet and override doGet or doPost depending
on whetherthe data is being sent by GET or by POST. correct answers A. True
B. False
A

14. In which ofthe following cases will the method doEndTag( ) ofa tag handler be invoked?
correct answers A. lt will be invoked only if doStartTag( ) and doAfterBody( ) complete
successfully.
B. This method is invoked if doStartTag( ) method returns true.
C. lt will be invoked only if doStartTag( ) or doAfterBody( ) return Tag.DO_END_TAG.
D. lt will be invoked in all case even if doStartTag( ) or doAfterBody( ) throw an exception.
C

15. What is the result of attempting to access the following JSP page? correct answers
<html>
<body>
<%! public String methodA(){
return methodB():
}
%>
<%! public String methodB(){
return "JAD Final Test":
}
%>
<h2><%= methodA() %></h2>
</body>
</html>
A. A runtime error occurs.
B. A translation error occurs.
C. The web page is blank.
D. JAD Final Test" is output to the resulting web page.
D

16. Which ofthe following lines of code are correct? (Choose one) correct answers A.
@Entity
public class Company{
...
}
public class Employee extends Company{
...
}
B. @Entity
public class Company{
...
}
@Entity
public class Employee extends Company{
...

, }
C. All of others
D. public class Company{
...
}
C

17. Which ofthe following statement correctly store an object associated with a name at a
place where all the servlets/jsps ofthe same webapp participating in a session can access it'?
correct answers Assume that request response. name. value etc. are references to objects of
appropriate types.(Choose one)
A. request.setAttribute(name, value):
B. request.getSession.setAttribute(name, value):
C. response.setAttribute(name, value);
D. request.setParameter(name, value)
B

18. Your web application named "FWorks" uses SpecialMath.class. This is an unbundled
class and is not contained in any jar file. correct answers Where will you keep this class file?
A. FWorks/WEB-INF
B. FWorks/classes
C. FWorks/WEB-INF/classes
D. FWorks/WEB-lNF/lib/classes
C

19. Which ofthese is a correctfragmentwithin the web-app element ofdeployment descriptor?
Selectthe one correct answer correct answers A. <exception> <exception-type>
mypackage.MyException</exception-type> <location> /error.jsp</location> </exception>
B. <error-page> <exception-type> mypackage.MyException</exception-type> <location>
/error.jsp</location> </error-page>
C. <error-page> <exception> mypackageMyException </exception-type> <location>
/error.jsp </location> </error-page>
D. <error-page> <exception-type> mypackage.MyException</exception-type> </error-page>
E. <error-page> <servlet-name> myservlet</servlet-name> <exception-type>
mypackage.MyException</exception-type> </error-page>
F. <exception> <servlet-name> myservlet</servlet-name> <exception-type>
mypackage.MyException</exception-type> </exception>
B

20. The form attribute __________ specifies the server-side form handler. i.e.. the program
correct answers that handles the request
A. name
B. action
C. localhost
D. id
B

23. Which statements are BEST describe prefix attribute of <%@ taglib prefix=_%>directive
of JSP file? correct answers A. The scripting language used in the JSP. Currently. the only
valid value for this attribute is java.

Written for

Institution
PRJ321
Course
PRJ321

Document information

Uploaded on
November 26, 2025
Number of pages
42
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$16.79
Get access to the full document:

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


Also available in package deal

Get to know the seller

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.
SirAnton NURSING, ECONOMICS, MATHEMATICS, BIOLOGY, AND HISTORY MATERIALS BEST TUTORING, HOMEWORK HELP, EXAMS, TESTS, AND STUDY GUIDE MATERIALS WITH GUARANTEED A+ I am a dedicated medical practitioner with diverse knowledge in matters
Follow You need to be logged in order to follow users or courses
Sold
774
Member since
3 year
Number of followers
438
Documents
38537
Last sold
1 week ago
Reign Supreme Scholarly || Enlightened.

Get your revised study materials available here and elevate your educational outcomes. I have numerous verified learning materials (Research, Exams Questions and answers, Assignments, notes etc) for different courses guaranteed to boost your academic results. I am dedicated to offering you the best and unique learning content. You are encouraged to inquire further assistance from this end whenever need be. Kindly remember to leave your review, understanding your satisfaction is essential . We highly appreciate clients who always come back for more of the study content we offer, you are extremely valued. All the best.

Read more Read less
3.7

116 reviews

5
49
4
20
3
23
2
8
1
16

Recently viewed by you

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