If the browser requests http://server/appname/login, than ../images/foo.gif will point to http://server/images/foo.gif instead of your desired http://server/appname/images/foo.gif. To solve this simply change the link to the image from ../images/foo.gif into images/foo.gif
regards leon On 7/9/06, Mississippi John Hurt <[EMAIL PROTECTED]> wrote:
Can someone help? When I access my /appname/jsp/login.jsp directly in browser its able to find my images and stylesheets (I use relative ie "../images/file.ext" paths) and everything renders fine. But once I click login, and it goes to my Action then forwards it back to a jsp (for instance "failure" ie /jsp/login.jsp) then it seems as if the browser can't find my images and stylesheets as the html render is messed up, as if it can't find the path to those resources. Why is it that when I directly put in the /jsp/login.jsp into browser it shows up fine, but when Struts "forwards" to that "failure"="/jsp/login.jsp" its able to find the login.jsp page itself, but can't find the resources like (<img src="../images/image.jpg)?? Help me please! My app is structured like: /appname/jsp/login.jsp /appname/images/*.jpg /appname/styles/*.css <action path="/login" type="com.abc.action.LoginAction" name="loginForm" scope="request" input="/pages/login.jsp"> <forward name="failure" path="/jsp/login.jsp"/> <forward name="success" path="/mainMenu.do"/> </action> Anyone knows how to fix this? Thanks.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]