Hi, I am new in servlet and jsp. I am actually facing a problem when using the RequestDispatcher.forward()method. I used this method in one servlet and forward it to another jsp page. Let say my servlet's URL is http://localhost/servlets/SampleServlet, and my jsp's URL is at http://localhost/web/target.jsp. You can see the different layer fot the both URLs. The target.jsp actually contains other hyperlinks with URLs relative to itself. But when I forward from the servlet to the jsp, the jsp's content is still the same, but the URL now is actually the first one, the servlet's URL. Thus all the relative URLs in my original jsp now is relative to the servlet's URL, which is not wanted. Any suggestion to solve this problem?
Wei Boon
Discussions
Web tier: servlets, JSP, Web frameworks: Relative path can't be used in forward()'s target content?
-
Relative path can't be used in forward()'s target content? (1 messages)
- Posted by: Wei Boon Tan
- Posted on: August 18 2000 02:23 EDT
Threaded Messages (1)
- Relative path can't be used in forward()'s target content? by Dan Josephs on April 19 2001 11:31 EDT
-
Relative path can't be used in forward()'s target content?[ Go to top ]
- Posted by: Dan Josephs
- Posted on: April 19 2001 11:31 EDT
- in response to Wei Boon Tan
I ran into the same problem... did you ever come up with a solution?