100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

PRJ301 Already Rated A+

Rating
-
Sold
-
Pages
26
Grade
A+
Uploaded on
01-10-2024
Written in
2024/2025

PRJ301 Already Rated A+ Which of the following files is the correct name and location of deployment descriptor of a web application. Assume that the web application is rooted at doc-root. Select the one correct answer A. B. C. doc-rootWEB-INF D. doc-rootWEB_INF E. doc-rootWEB-INF F. doc-rootWEB_INF G. doc-rootWEB-INF H.doc-rootWEB-INF ️C 2. Which element of the servlet element in the deployment descriptor is used to specify the parameters for the ServletConfig object. Select the one correct answer. A. aservlet-config B. init-param C. load-on-startup D. filter ️B 3. Which of these is true about deployment descriptors. Select the one correct answer. A. The order of elements in deployment descriptor is not important. The elements can follow any order. B. The elements of deployment descriptor are case insensitive. C. The servlet-mapping element, if defined, must be included within the servlet element. D. The web-app element must include the servlet element. ️A 4. The exception-type element specifies an exception type and is used to handle exceptions generated from a servlet. Which element of the deployment descriptor includes the exception-type as a sub element. Select the one correct answer. A. error-page B. servlet C. exception D. error-handling ️A 5. Which of these is a correct fragment within the web-app element of deployment descriptor. Select the one correct answer. A. <exception> <exception-type> mypackage.MyException</exception-type> <location> /</location> </exception> B. <error-page> <exception-type> mypackage.MyException</exception-type> <location> /</location> </error-page> C. <error-page> <exception> mypackage.MyException </exception-type> <location> / </location> </error-page> D. <error-page> <exception-type> mypackage.MyException</exception-type> </error-page> F. <error-page> <servlet-name> myservlet</servlet-name> <exception-type> mypackage.MyException</exception-type> </error-page> G. <exception> <servlet-name> myservlet</servlet-name> <exception-type> mypackage.MyException</exception-type> </exception> ️B 6. Which element of the deployment descriptor of a web application includes the welcome-file-list element as a subelement. Select the one correct answer. A. web-app B. welcome-file C. servlet D. file-list ️A 7. Which of these is a correct fragment within the web-app element of deployment descriptor. Select the two correct answer. A. <error-page> <error-code>404</error-code> <location>/</location> </error-page> B. <error-page> <exception-type>mypackage.MyException</exception-type> <error-code>404</error code> <location>/</location> </error-page>

Show more Read less
Institution
PRJ301 Already Rated A+
Course
PRJ301 Already Rated A+










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
PRJ301 Already Rated A+
Course
PRJ301 Already Rated A+

Document information

Uploaded on
October 1, 2024
Number of pages
26
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Content preview

PRJ301 Already Rated A+

Which of the following files is the correct name and location of deployment descriptor of a web
application. Assume that the web application is rooted at doc-root. Select the one correct answer

A. doc-rootdd.xml

B. doc-rootweb.xml

C. doc-rootWEB-INFweb.xml

D. doc-rootWEB_INFdd.xml

E. doc-rootWEB-INFdd.xml

F. doc-rootWEB_INFweb.xml

G. doc-rootWEB-INFlibdd.xml

H.doc-rootWEB-INFclassesdd.xml ✔️C



2. Which element of the servlet element in the deployment descriptor is used to specify the parameters
for the ServletConfig object. Select the one correct answer.

A. aservlet-config

B. init-param

C. load-on-startup

D. filter ✔️B



3. Which of these is true about deployment descriptors. Select the one correct answer.

A. The order of elements in deployment descriptor is not important. The elements can follow any order.

B. The elements of deployment descriptor are case insensitive.

C. The servlet-mapping element, if defined, must be included within the servlet element.

D. The web-app element must include the servlet element. ✔️A



4. The exception-type element specifies an exception type and is used to handle exceptions generated
from a servlet. Which element of the deployment descriptor includes the exception-type as a sub-
element. Select the one correct answer.

A. error-page

,B. servlet

C. exception

D. error-handling ✔️A



5. Which of these is a correct fragment within the web-app element of deployment descriptor. Select
the one correct answer.



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> mypackage.MyException </exception-type> <location> /error.jsp
</location> </error-page>

D. <error-page> <exception-type> mypackage.MyException</exception-type> </error-page>

F. <error-page> <servlet-name> myservlet</servlet-name> <exception-type>
mypackage.MyException</exception-type> </error-page>

G. <exception> <servlet-name> myservlet</servlet-name> <exception-type>
mypackage.MyException</exception-type> </exception> ✔️B



6. Which element of the deployment descriptor of a web application includes the welcome-file-list
element as a subelement. Select the one correct answer.

A. web-app

B. welcome-file

C. servlet

D. file-list ✔️A



7. Which of these is a correct fragment within the web-app element of deployment descriptor. Select
the two correct answer.



A. <error-page> <error-code>404</error-code> <location>/error.jsp</location> </error-page>

B. <error-page> <exception-type>mypackage.MyException</exception-type> <error-code>404</error-
code> <location>/error.jsp</location> </error-page>

, C. <error-page> <exception-type>mypackage.MyException</exception-type> <error-code>404</error-
code> </error-page>

D. <error-page> <exception-type>mypackage.MyException</exception-type>
<location>/error.jsp</location> </error-page> ✔️AD



8. Which of these is a correct example of specifying a listener element resented by MyClass class.
Assume myServlet element is defined correctly. Select the one correct answer.

A. <listener>MyClass</listener>

B. <listener> <listener-class>MyClass</listener-class></listener>

C. <listener> <listener-name>aListener</listener-name> <listener-class>MyClass</listener-class>
</listener>

D. <listener> <servlet-name>myServlet</servlet-name> <listener-class>MyClass</listener-class>
</listener> ✔️B



9. The root of the deployment descriptor is named as

A. web

B. web-app

C. name

D. display-name ✔️B



10. With in a context-param element of deployment descriptor, which of the following element is
required?

A. param-name

B. name

C. init-param

D. servlet-name ✔️A



11. Which of these is not a valid top level element in web-app

A. icon

B. listener

C. eror-page

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.
CertifiedGrades Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
141
Member since
2 year
Number of followers
61
Documents
8748
Last sold
1 month ago
High Scores

Hi there! Welcome to my online tutoring store, your ultimate destination for A+ rated educational resources! My meticulously curated collection of documents is designed to support your learning journey. Each resource has been carefully revised and verified to ensure top-notch quality, empowering you to excel academically. Feel free to reach out to consult with me on any subject matter—I'm here to help you thrive!

3.9

38 reviews

5
21
4
6
3
2
2
3
1
6

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

Frequently asked questions