This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I have some pages in an /admin/ folder of my Struts-enabled site. One page has a link which executes an Action, which then forwards back to the same page. However, upon the forward (using mapping.findForward()), the page loses its style completely! I.e. the CSS that was once applied making it all nice and sexy, seems to no longer work and the page is all bland. I'm sure I've seen this before but have no idea why? Any clues? Andy UK
This is quite a general point -- in Struts (& other MVC frameworks), the location of the JSP is the location where your view happens to sit. This does not necessarily have a lot to do with the request URL. In your JSPs, you should therefore avoid any relative path, because you cannot make assumptions about what you're going to be relative to. The Struts link and rewrite tags will help you here. The only exceptions are static <@includes>. I'll leave the reason why as an exercise for the reader - Peter