You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by KIRTI APTE <ki...@yahoo.com> on 2000/07/03 12:30:29 UTC
Request forwarding problem in tomcat
Hi folks
I am new to servlet/jsp development in tomcat.I
am running into following problem related to
request forwarded. Any pointers
from you will be greatly appreciated.
Example: You can try this in tomcat.
a> I have the following jsp "a.jsp" ->
<html>
<a href=./b.jsp>Second jsp</a>
</html>
I have stored it in my_context_root/dir1/dir2/a.jsp
b> I have a servlet which has only 2 lines of code
in its doGet method where I forward the request to
a.jsp
response.setContentType("text/Html");
getServletContext().getRequestDispatcher("/dir1/dir2/a.jsp").forward(request,response);
So basically I just forward the request to a.jsp.