RequestDispatcher 's forward method take you to a page but no IMG.!
Joined: Oct 24, 2000
Hi, a.html -> b.jsp -> validate.java when I enter b.jsp from a.html by clicking a link i can see a IMG that I included. but when I click on a button that calls validate.java it will validate some info. and depending on the validation it may call b.jsp again to prompt the user to corrent things.. but when it does that the IMG is not seen !! I don't know why... also is there a better approach to achive the above functionality? some kind of methos that has the same effect as a user pushing BACK button so that all the form data will still be there automatically... Thanks heaps
Sean <br />SCJP2, SCJP2p1.4, SCWCD
Author and all-around good cowpoke
Joined: Mar 22, 2000
I am betting that your image tag was not an absolute URL but a relative one. When the server serves a servlet, it looks to the browser like it is coming from a /servlet directory so thats where the browser requests the image from. The solution: Use a <base> tag in the <head> area of the page to point the browser to the directory for images and other resources (as applet classes.) Bill