Q.1.

What class does the object out in JSP pages belong to?

  1. JspWriter
  2. PrintWriter
  3. OutputStream
  4. BufferedOutputStream
  5. ServletOutputStream

Q.2.

Given this JSP code snippet :

1: <%if(request.getParameter("name")==null){%>
2: Error!
3: <%}%>
4: <%=request.getParameter("name")%>

What will be the output if “name” parameter has value null?

  1. Error! Null
  2. Error! NullPointerException
  3. Error! 0

Q.3.

What is the default size of JSP buffer?

Q.4.

<%@ page session="true" %>

what the above directive statement does? Select most appropriate answer.

A.Creates a HttpSession object in the jsp

  1. There is no need for this statement because By default, all JSPs will create a session if one does not already exist
  2. Declared to use the implicit object session inside the jsps

Q.5.

Which of the following JSP variables is not available within a JSP expression?

A.out

  1. session
  2. request
  3. response
  4. httpsession

Q.6.

What is the name of the Servlet API interface that JSP implicit object request references to?

Q.7.

Which of the following can be used as the scope when using a JavaBean with JSP?

A.application

  1. session
  2. request
  3. response
  4. page

Q.8.

Is there a way to reference  thisvariable within a JSP page?

Q.9.

JSP code fragment.

  1. 0 1 2
  2. 1 2 3
  3. null null null
  4. out.print(i); out.print(i); out.print(i);

Q.10.

Which one of following code snippet is valid?

  1. <jsp:include url="catalog.jsp"/>
  2. <jsp:include page="http://myserver/catalog.jsp"/>
  3. <jsp:include page="/servlets/catalogServlet"/>
  4. <%@ include page="catalog.jsp"%>