Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Struts and the fly likes How to Put JSP under WEB-INF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to Put JSP under WEB-INF" Watch "How to Put JSP under WEB-INF" New topic
Author

How to Put JSP under WEB-INF

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
I am placing JSPs under WEB-INF and is using modules in Struts. The advice I got is to use this forward value:

<forward name=... path="/myview.jsp" />

i.e. without bothering the "/WEB-INF/module" prefix. At the same time, we should just let struts automatically insert this prefix by setting:

<controller forwardPattern="/WEB-INF$M$P"/>

However, once I made this change, how could I forward from 1 action to another action? e.g.

<acton ..
<forward name=... path="/actionB.do"
</action>
<action path="/actionB"..>

The above is problematic because the forward path would be replaced by /WEB-INF/module/actionB.do according to the forwardPattern I set previously.
 
wood burning stoves
 
subject: How to Put JSP under WEB-INF
 
Similar Threads
Hide Module JSP pages under WEB-INF
SwtichAction and forwardPattern attribute
Spring MVC behaviour for Struts
How to share actions and JSP's among sub applications?
Using ActionMapping to open a https page