struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jurn Ho <>
Subject Re: Module and pages Behind WEB-INF don't work...???
Date Thu, 29 Jul 2004 13:36:15 GMT
Hi Puneet,

I was just playing with hiding JSP beneath WEB-INF/ and Modules today.

What you can do is edit your struts-module-config.xml
and as part of the <controller> you can add the forwardPattern property

e.g. My setup is  <set-property property="forwardPattern" 
value="/WEB-INF/jsp$M$P"/>, so that my forward paths don't contain the 

read section 5.2.1 at
$M is module, and $P is path
By default it is "$M$P" like you have found out, but you're probably after $P.

I think you might need to add this to each struts module config.xml that 
you do. Does anyone know if you can set default controller properties for 
all modules-config.xml?


At 04:48 PM 29/07/2004, wrote:

>I want to do both "hide my JSPs behind WEB-INF" and use "Struts modules".
>and this does not work, I looked into the struts code. it does the following
>If the path of ActionForward starts with "/", it obtains the module prefix 
>and prefixes this to the path so...
>If my path was say "/WEB-INF/pages/INY0010S.jsp" it becomes 
>( which is unwanted......I wanted..."/WEB-INF/pages/INY0010S.jsp" )
>but if the path of ActionForward does not start with "/", it leaves the 
>path as it is ( i.e. does not prefix the module-prefix)
>but then the requested URI becomes like this
>instead of
>so the problem is there is no slash - "/" before "<ActionForward-path>"
>so if my path was "WEB-INF/pages/INY0010S.jsp" it searches for 
>which gives error...Can anyone suggest the way out..?
>or does this require a fix ? only a Quick resolution of this will be able 
>Puneet Agarwal
>Tata Consultancy Services
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message