Hi,
I got this question.
---------------------------------------------------------------
Assume that in your
JSP page, you need to forward the request to another page. The url to this page is given by a request parameter named 'redirectto'.
Which of the following code snippets do the above task?
1.<jsp:forward page="request.getParameter('redirectto')" />
2.<% request.getRequestDispatcher( request.getParameter("redirectto") ).forward(request, response); %>
3.<jsp:forward page="%=request.getParameter('redirectto')%" />
4.<jsp:forward page="<%=request.getParameter('redirectto')%>" />
5.<jsp:forward page="%request.getParameter('redirectto')%" />
i thought 2& 3 would be correct answeres. But 2,3,&4 are right. Any comments ? please
Thanks,
Sanla