Hi, I started developing an application with Jakarta Struts 1.1. I decided to build it using multiple modules (sub-apps) and also hide all jsps under WEB-INF. Thus my application structure looks like this: app/img/ app/css/ app/WEB-INF/ app/WEB-INF/classes/ app/WEB-INF/lib/ app/WEB-INF/jsp/ app/WEB-INF/common/ app/WEB-INF/common/mainScreen.jsp ... Now I create an action in stuts-config-common.xml and define it like this: <action forward="/WEB-INF/jsp/common/mainScreen.jsp" path="/test" scope="request" unknown="false" validate="false"/> When I want to fire this action I have to type for ex.: http://localhost:8080/app/common/main.do But then I get a message: type Status report message /common/WEB-INF/jsp/common/mainScreen.jsp description The requested resource (/common/WEB-INF/jsp/common/mainScreen.jsp) is not available. So the module name is used as context(?) and put also before WEB-INF. Why? I don't need this. The module name should be put after jsp, as it is. If I create another action test.do and put in in default module this doesn't happen. -- MK [ December 03, 2002: Message edited by: Maciej Kolodziej ]
Personally, I don't favor placing JSPs under WEB-INF. Some containers do not support this, and if you are linking to Actions rather than JSPs, they are already "hidden". The module feature works by prepending the module name (or context) between the application context and the rest of URI. In the normal course, you should never embed the module name in URI, since Struts puts it there for you. By default, all the JSPs and other resources should be placed under a directory named for your module context. If you want to place your resources under subdirectory, including WEB-INF, you can change the default configuration through the pagePattern property of the controller element in the struts-config. In your case, I believe this would be <controller pagePattern="/WEB-INF$M$P" /> which tells the Struts tags to insert "/WEB-INF" before the usual /commons/page.jsp HTH, Ted.
<a href="http://husted.com/struts/book.html" target="_blank" rel="nofollow">Struts in Action</a>