JSP and Servlet Web Development
Covers JSP scripting elements, life cycle, implicit objects, servlet HTTP methods, HTML forms, MVC architecture, and server-side validation in web applications
Questions
In which file will the server side validations will be handled
- Page Handler
- Action Controller
- JSP
- Javascript
Where will the Life Host region of the server be mentioned
- ec_debug.jsp->Configuration->DomainData->LifeHost
- ec_debug.jsp->DomainData->Host.xml
- using wasops
- ec_debug->Jars->Registered Components->DomainData->Host
What is output to the web page on the second access to the same instance of the following JSP? (Choose one.) <%@ page language="java" %>
Chapter 6 Question 2
<%! int x = 0; %> <%! public void jspInit() { System.out.println(x++); } %> <%= x++ %> <% System.out.println(x); %> <% jspInit(); %>- 0
- 1
- 2
- 3
- 4
- Page does not translate.
Which architecture does PS framework follow
- Hibernate Architecture
- Struts Architecture
- MVC Architecture
- Web Architecture
Which of the following are true statements about the JavaServer Page life cycle? (Choose two.)
- The _jspService() method is called from the generated servlet's service() method.
- jspInit() is only ever called on the first request to a JSP instance.
- jspDestroy() is only ever called on the last request to a JSP instance.
- All servlet methods are accessible from the jspInit() method.
- You cannot override or provide a no-parameter init() method in a JSP page.
Which of the following techniques is likely to return an initialization parameter for a JSP page? (Choose two.)
- <%= request.getParameter("myParm") %>
- <% String s = getInitParameter("myParm"); %>
- <% = application.getInitParameter("myParm") %>
- <%= config.getInitParameter("myParm"); %>
- <%= getParameter("myParm") %>
What will be the result of pressing the submit button in the following HTML form? (Choose two.)
- A request is sent with the HTTP method HEAD.
- A request is sent with the HTTP method POST.
- A request is sent with the HTTP method GET.
- The parameter fullName is the only parameter passed to the web server in the request URL.
- The parameters fullName and sbmButton are passed to the web server in the request URL.
- The parameter fullName is the only parameter passed to the web server as part of the request body.
Which of the following are valid servlet methods that match up with HTTP methods? (Choose four.)
- doGet()
- doPost()
- doConnect()
- doOptions()
- doHead()
- doRequest()
What are JSP scripting elements ?
- declarations
- scriptlets
- expressions
- All of the above
How many implicit objects in jsp?
- 4
- 7
- 9
- 8
What are the kinds of comments in JSP?
- <%– JSP Comment –%>
- <!– HTML Comment –>
- Both a and b
- None of the above