struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mississippi John Hurt" <johnh...@gmail.com>
Subject Struts forwarding to jsp Problem, Losing path to image/css/scripts resources
Date Sun, 09 Jul 2006 11:28:38 GMT
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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message