D
DiscoStu
Hello Everyone,
I've got this servlet that I am writing, and inside of it, I want
to pass control onto a JSP page. So, because I want to pass on the
request/response objects into my JSP page, I decided to use the
RequestDispatcher class. I call RequestDispatcher.forward(req, resp);
and it sucessfully finds the JSP page but runs it in the servlet
directory, rather then the directory the page is located in (root app
directory).
This causes the images not to show because the images are in the
/images directory off the root. When the page uses relative URL's to
reference its images its getting "servlet/images/imagename.gif"
instead of executing off the root directory "/images/imagename.gif".
How do I make the RequestDispatcher pass control off to the JSP page
AND run the JSP in the directory it's located in and not the directory
of the servlet that the RequestDispatcher class is being called from?
Thanks everyone,
GF
I've got this servlet that I am writing, and inside of it, I want
to pass control onto a JSP page. So, because I want to pass on the
request/response objects into my JSP page, I decided to use the
RequestDispatcher class. I call RequestDispatcher.forward(req, resp);
and it sucessfully finds the JSP page but runs it in the servlet
directory, rather then the directory the page is located in (root app
directory).
This causes the images not to show because the images are in the
/images directory off the root. When the page uses relative URL's to
reference its images its getting "servlet/images/imagename.gif"
instead of executing off the root directory "/images/imagename.gif".
How do I make the RequestDispatcher pass control off to the JSP page
AND run the JSP in the directory it's located in and not the directory
of the servlet that the RequestDispatcher class is being called from?
Thanks everyone,
GF