Ray Tayek wrote:
hi, i am forwarding a request to a static html page that has some pictures included using <IMG SRC="images/help1.jpeg" ...> and using request.getRequestDispatcher("/help.html").forward(request,response);.

the static html file file comes back sans images. but pointing a browser to http://tayek.com:8080/feb/help.html works fine. seems like the path that the static page inherits is hosed somehow. is there some way to set that path?

According to SRV.8.4 of the Servlet 2.3 spec, "The Forward Method":


"The path elements of the request object exposed to the target servlet must reflect the path used to obtain the RequestDispatcher.
The only exception to this is if the RequestDispatcher was obtained via the getNamedDispatcher method. In this case, the path elements of the request object must reflect those of the original request."


I'm not sure how to interpret this exactly -- but it seems to say that the request object inherited in the "target servlet" (which I can only assume also applies to "target HTML pages" as well, since targets of the "forward" method can be either servlets, JSPs, or HTML pages) should match the path used to obtain the RequestDispatcher.

Are you using "getNamedDispatcher"? If so then the request object will have the original HTTP request's path elements. If you are using "getRequestDispatcher" and passing it a path, then this would suggest that you are experiencing a bug in Tomcat.



Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to