PRJ321 - IA1401 || 100% Accurate Answers.
C correct answers Which of the following section is Servlet definition?
A. "Java classes dynamically process HTTP responses and construct requests, add dynamic
content to Web server, only a single instance of Servlet created on the Web server, gets auto
refreshed on receving a request each time."
B. "Java classes dynamically process HTTP requests and construct responses, add dynamic
content to Web server, multiple instances of Servlet created on the Web server, gets auto
refreshed on receving a request each time."
C. "Java classes dynamically process HTTP requests and construct responses, add dynamic
content to Web server, only a single instance of Servlet created on the Web server, gets auto
refreshed on receving a request each time."
D. "Java classes dynamically process HTTP responses and construct requests, add dynamic
content to Web server, multiple instances of Servlet created on the Web server, gets auto
refreshed on receving a request each time."
B correct answers How to make a Java Class as a Servlet ?
A. By implementing HttpServlet interface.
B. By extending HttpServlet class.
C. By implementing HttpServletRequest interface.
D. By extending HttpServletRequest class.
A correct answers "How to get the value from the form data in the example for method
processRequest(HttpServletRequest request, HttpServletResponse response)?"
A. "request.getParameter(""formData"");"
B. "request.getAttribute(""formData"");"
C. "response.getParameter(""formData"");"
D. "response.getAttribute(""formData"");"
C correct answers Which of the following factors are INCORRECT about a directory
structure of a Java Web Application of Tomcat Server?
A. "Static content, ASP pages, Servlet classes, the deployment descriptor, tag libraries, JAR
files and Java class files."
B. "Static content, JSP pages, Servlet classes, the deployment descriptor, tag libraries, JAR
files and Java class files."
C. "Static content, JSP pages, Servlet classes, the deployment descriptor, tag libraries, EXE
files and Java class files."
D. "Static content, HTML pages, Servlet classes, the deployment descriptor, tag libraries,
JAR files and Java class files."
B correct answers Which of the following HTTP status code is INCORRECT about its
definition?
A. "401: Unauthorized, 500: Internal Server Error, 404: Not found"
B. "401: Unauthorized, 500: Internal Server Error, 405: Permission denied"
C. "400: Bad Request, 500: Internal Server Error, 404: Not found"
D. "408: Request Timeout, 500: Internal Server Error, 404: Not found"
A correct answers Which of the following definition is CORRECT about static web design?
A. "Sending exactly the same response for every request, flexibility, uses HTML code for
developing a website, prebuilt content is same every time the page is loaded."
,B. "Sending exactly the same response for every request, flexibility, uses JSP, ASP.NET,
PHP code for developing a website, prebuilt content is same every time the page is loaded."
C. "Sending different response for each request, flexibility, uses HTML code for developing
a website, prebuilt content is same every time the page is loaded."
D. "Sending the different response for each request, flexibility, uses JSP for developing a
website, prebuilt content may different every time the page is loaded."
C correct answers Which of the following factors are CORRECT about why to use JSP?
A. "A combination of HTML, XML, Servlet and Java code, creating and maintaining
dynamic-content web pages, cotains XML tags."
B. "A combination of Servlet and Java code, creating and maintaining dynamic-content web
pages, cotains HTML tags."
C. "A combination of HTML, XML, Servlet and Java code, creating and maintaining
dynamic-content web pages, cotains HTML tags."
D. "A combination of HTML, XML, Servlet and Java code, creating and maintaining
dynamic-content web pages, does not cotains HTML tags."
B correct answers "Which of the following Java Class is CORRECT about ""exception""
implict object of JSP?"
A. java.lang.Exception
B. java.lang.Throwable
C. java.lang.Error
D. java.lang.JSPException
A correct answers Which of the following advantages are CORRECT for URL Rewriting?
A. "Maintains the state of end-user by modifying the URL, is used when the information to
be transferred is not critical, adds some extra data at the end of the URL."
B. "Maintains the state of server by modifying the URL, is used when the information to be
transferred is not critical, adds some extra data at the end of the URL."
C. "Maintains the state of server by modifying the URL, is used when the information to be
transferred is critical, adds some extra data at the end of the URL."
D. "Maintains the state of end-user by modifying the URL, is used when the information to
be transferred is not critical, removes some extra data at the end of the URL."
A correct answers Which of the following factors are CORRECT about the disadvantages of
Cookies?
A. "The size and number of cookies stored are limited, most browsers enable the user at the
client machine to deactivate cookies, personal information is exposed to the other users,
cookies fails to work if the security level is set too high in the Internet browser."
B. "The size and number of cookies stored are unlimited, most browsers enable the user at the
client machine to deactivate cookies, personal information is exposed to the other users,
cookies fails to work if the security level is set too high in the Internet browser."
C. "The size and number of cookies stored are unlimited, most browsers enable the user at the
client machine to activate cookies, personal information is exposed to the other users, cookies
fails to work if the security level is set too high in the Internet browser."
D. "The size and number of cookies stored are limited, most browsers enable the user at the
client machine to activate cookies, personal information is exposed to the other users, cookies
always work even the security level is set too high in the Internet browser."
, B correct answers Which of the following factors is INCORRECT about deleting session
data?
A. "Deleting the whole session, setting session timeout, logging the user out, removing a
particular attribute, web.xml configuration."
B. "Deleting the whole session, setting session timeout, logging the user out, adding a
particular attribute, web.xml configuration."
C. "Deleting the whole session, setting session timeout, logging the user out, removing a
particular attribute, session-config configuration."
D. "Using invalidate() method, setting session timeout, logging the user out, removing a
particular attribute, web.xml configuration."
B correct answers What are the advantages that are the core make EL Expression easily to
use?
A. "Providing programmers with clear Java code inside JSP Page, it's simple and robust, easy
access application data stored."
B. "Providing programmers with clear syntax, it's simple and robust, easy access application
data stored."
C. "Providing programmers with clear syntax, it's simple and robust, easy access application
data stored without JavaBeans."
D. "Providing programmers with clear Java code inside JSP Page, it's simple and robust, easy
access application data stored without JavaBeans."
A correct answers Which factors are used to build up a JavaBean?
A. "A class always use a package name, a class must have a public no-argument constructor,
public setter methods, public getter methods, attributes of a Java class is not declared as
""public""."
B. "A class only use a package name when the programmers want, a class must have a public
no-argument constructor, public setter methods, public getter methods, attributes of a Java
class is not declared as ""public""."
C. "A class always use a package name, a class must have a public no-argument constructor,
public setter methods, public getter methods, attributes of a Java class can be accessed
without getter/setter methods."
D. "A class always use a package name, a class must have a public no-argument constructor,
public setter methods and public getter methods are not needed, attributes of a Java class is
not declared as ""public""."
A correct answers Which of the following SQL Tag Library syntax is CORRECT?
A. <sql:setDataSource dataSource="datasource"
B. url="jdbcurl" driver="jdbcclassdriver" user="username" password="password"
var="varName" scope="page
C. request
D. session
B correct answers Which of the following functionalities are provided by the tag libraries in
JSTL?
A. "Set/display/remove variable values within JSP Page, support if-else conditions in JSP
Page, use EL combining with JSTL, support looping function retrieved from a collection in
the JavaBeans component, able to import resources from given/re-encode/redirect to URL or
pass additional request parameters."
C correct answers Which of the following section is Servlet definition?
A. "Java classes dynamically process HTTP responses and construct requests, add dynamic
content to Web server, only a single instance of Servlet created on the Web server, gets auto
refreshed on receving a request each time."
B. "Java classes dynamically process HTTP requests and construct responses, add dynamic
content to Web server, multiple instances of Servlet created on the Web server, gets auto
refreshed on receving a request each time."
C. "Java classes dynamically process HTTP requests and construct responses, add dynamic
content to Web server, only a single instance of Servlet created on the Web server, gets auto
refreshed on receving a request each time."
D. "Java classes dynamically process HTTP responses and construct requests, add dynamic
content to Web server, multiple instances of Servlet created on the Web server, gets auto
refreshed on receving a request each time."
B correct answers How to make a Java Class as a Servlet ?
A. By implementing HttpServlet interface.
B. By extending HttpServlet class.
C. By implementing HttpServletRequest interface.
D. By extending HttpServletRequest class.
A correct answers "How to get the value from the form data in the example for method
processRequest(HttpServletRequest request, HttpServletResponse response)?"
A. "request.getParameter(""formData"");"
B. "request.getAttribute(""formData"");"
C. "response.getParameter(""formData"");"
D. "response.getAttribute(""formData"");"
C correct answers Which of the following factors are INCORRECT about a directory
structure of a Java Web Application of Tomcat Server?
A. "Static content, ASP pages, Servlet classes, the deployment descriptor, tag libraries, JAR
files and Java class files."
B. "Static content, JSP pages, Servlet classes, the deployment descriptor, tag libraries, JAR
files and Java class files."
C. "Static content, JSP pages, Servlet classes, the deployment descriptor, tag libraries, EXE
files and Java class files."
D. "Static content, HTML pages, Servlet classes, the deployment descriptor, tag libraries,
JAR files and Java class files."
B correct answers Which of the following HTTP status code is INCORRECT about its
definition?
A. "401: Unauthorized, 500: Internal Server Error, 404: Not found"
B. "401: Unauthorized, 500: Internal Server Error, 405: Permission denied"
C. "400: Bad Request, 500: Internal Server Error, 404: Not found"
D. "408: Request Timeout, 500: Internal Server Error, 404: Not found"
A correct answers Which of the following definition is CORRECT about static web design?
A. "Sending exactly the same response for every request, flexibility, uses HTML code for
developing a website, prebuilt content is same every time the page is loaded."
,B. "Sending exactly the same response for every request, flexibility, uses JSP, ASP.NET,
PHP code for developing a website, prebuilt content is same every time the page is loaded."
C. "Sending different response for each request, flexibility, uses HTML code for developing
a website, prebuilt content is same every time the page is loaded."
D. "Sending the different response for each request, flexibility, uses JSP for developing a
website, prebuilt content may different every time the page is loaded."
C correct answers Which of the following factors are CORRECT about why to use JSP?
A. "A combination of HTML, XML, Servlet and Java code, creating and maintaining
dynamic-content web pages, cotains XML tags."
B. "A combination of Servlet and Java code, creating and maintaining dynamic-content web
pages, cotains HTML tags."
C. "A combination of HTML, XML, Servlet and Java code, creating and maintaining
dynamic-content web pages, cotains HTML tags."
D. "A combination of HTML, XML, Servlet and Java code, creating and maintaining
dynamic-content web pages, does not cotains HTML tags."
B correct answers "Which of the following Java Class is CORRECT about ""exception""
implict object of JSP?"
A. java.lang.Exception
B. java.lang.Throwable
C. java.lang.Error
D. java.lang.JSPException
A correct answers Which of the following advantages are CORRECT for URL Rewriting?
A. "Maintains the state of end-user by modifying the URL, is used when the information to
be transferred is not critical, adds some extra data at the end of the URL."
B. "Maintains the state of server by modifying the URL, is used when the information to be
transferred is not critical, adds some extra data at the end of the URL."
C. "Maintains the state of server by modifying the URL, is used when the information to be
transferred is critical, adds some extra data at the end of the URL."
D. "Maintains the state of end-user by modifying the URL, is used when the information to
be transferred is not critical, removes some extra data at the end of the URL."
A correct answers Which of the following factors are CORRECT about the disadvantages of
Cookies?
A. "The size and number of cookies stored are limited, most browsers enable the user at the
client machine to deactivate cookies, personal information is exposed to the other users,
cookies fails to work if the security level is set too high in the Internet browser."
B. "The size and number of cookies stored are unlimited, most browsers enable the user at the
client machine to deactivate cookies, personal information is exposed to the other users,
cookies fails to work if the security level is set too high in the Internet browser."
C. "The size and number of cookies stored are unlimited, most browsers enable the user at the
client machine to activate cookies, personal information is exposed to the other users, cookies
fails to work if the security level is set too high in the Internet browser."
D. "The size and number of cookies stored are limited, most browsers enable the user at the
client machine to activate cookies, personal information is exposed to the other users, cookies
always work even the security level is set too high in the Internet browser."
, B correct answers Which of the following factors is INCORRECT about deleting session
data?
A. "Deleting the whole session, setting session timeout, logging the user out, removing a
particular attribute, web.xml configuration."
B. "Deleting the whole session, setting session timeout, logging the user out, adding a
particular attribute, web.xml configuration."
C. "Deleting the whole session, setting session timeout, logging the user out, removing a
particular attribute, session-config configuration."
D. "Using invalidate() method, setting session timeout, logging the user out, removing a
particular attribute, web.xml configuration."
B correct answers What are the advantages that are the core make EL Expression easily to
use?
A. "Providing programmers with clear Java code inside JSP Page, it's simple and robust, easy
access application data stored."
B. "Providing programmers with clear syntax, it's simple and robust, easy access application
data stored."
C. "Providing programmers with clear syntax, it's simple and robust, easy access application
data stored without JavaBeans."
D. "Providing programmers with clear Java code inside JSP Page, it's simple and robust, easy
access application data stored without JavaBeans."
A correct answers Which factors are used to build up a JavaBean?
A. "A class always use a package name, a class must have a public no-argument constructor,
public setter methods, public getter methods, attributes of a Java class is not declared as
""public""."
B. "A class only use a package name when the programmers want, a class must have a public
no-argument constructor, public setter methods, public getter methods, attributes of a Java
class is not declared as ""public""."
C. "A class always use a package name, a class must have a public no-argument constructor,
public setter methods, public getter methods, attributes of a Java class can be accessed
without getter/setter methods."
D. "A class always use a package name, a class must have a public no-argument constructor,
public setter methods and public getter methods are not needed, attributes of a Java class is
not declared as ""public""."
A correct answers Which of the following SQL Tag Library syntax is CORRECT?
A. <sql:setDataSource dataSource="datasource"
B. url="jdbcurl" driver="jdbcclassdriver" user="username" password="password"
var="varName" scope="page
C. request
D. session
B correct answers Which of the following functionalities are provided by the tag libraries in
JSTL?
A. "Set/display/remove variable values within JSP Page, support if-else conditions in JSP
Page, use EL combining with JSTL, support looping function retrieved from a collection in
the JavaBeans component, able to import resources from given/re-encode/redirect to URL or
pass additional request parameters."