123456789101112131415



Question 1: A JSP page called test.jsp is passed a parameter name in the URL using http://localhost/test.jsp?name="John". The test.jsp contains the following code.

<%! String myName=request.getParameter();%>
<% String test= "welcome" + myName; %>
<%= test%>

1. The program prints "Welcome John"
2. The program gives a syntax error because of the statement
<%! String myName=request.getParameter();%>
3. The program gives a syntax error because of the statement
<% String test= "welcome" + myName; %>
4. The program gives a syntax error because of the statement
<%= test%>