What is a Hidden Comment in JSP?
<%– –%>
<%– %>
</ %---- % / >
<% -----/ %>
SHOW ANSWERWhat is a Expression in JSP?
<%= %>
<% %>
</ % % / >
<% + %>
SHOW ANSWER
Given following form:
<form action=”register.do”>
<input type=”text” name=”Name”>
<input type=”submit” value=”Save”>
</form>
and a servlet code:
public class RegisterServlet extends HttpServlet{
pulic void doPost(HttpServletRequest req, HttpServletResponse res) {
// registration logic goes here
return;
}
}
With the above code, assuming the servlet is configured properly and registration logic works good, trying to register user fails.
Choose one reason.
The registration fails because, above servlet dont have doGet() method.
The registration fails because, above servlet dont have service() method.
The registration fails because, above servlet have doPost() method.
The registration fails because, above servlet have return.
SHOW ANSWERPageContext is an implicit object in jsp.
True
False
SHOW ANSWERJavaServer Pages are processed by Software on the ?
JSP Container
Server
Client
Driver Manager
SHOW ANSWERA JSP is transformed into an ……?
Java applet
Java servlet
Either 1 or 2 above
Neither 1 nor 2 above
SHOW ANSWERThe Java __________ specification defines an application programming interface for communication between the Web server and the application program?
Servlet
Server
Program
Randomize
SHOW ANSWERWhat are Servlets?
Which of the following code is used to get session id of a HTTP Session object in servlets?
Which of the following code is used to get country/region name in servlets?
___________ is a block of java code in JSP that is used define class-wide variables and methods in the generated class file?
__________ provides the ability to directly insert java into an HTML document?
Name the class that includes the getSession method that is used to get the HttpSession object?