You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by pu...@tcs.com on 2004/08/09 06:21:23 UTC
Re: Module and pages Behind WEB-INF don't work...???
Thanks for the help..yes it works that way...!!!
Puneet Agarwal
Tata Consultancy Services
Mailto: puneet.a@tcs.com
Website: http://www.tcs.com
Jurn Ho <ju...@magicmonster.com>
07/29/2004 07:06 PM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>
To
"Struts Users Mailing List" <us...@struts.apache.org>
cc
Subject
Re: Module and pages Behind WEB-INF don't work...???
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
WEB-INF/jsp
read section 5.2.1 at
http://struts.apache.org/userGuide/configuration.html
$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?
cya,
Jurn
At 04:48 PM 29/07/2004, puneet.a@tcs.com 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
>"/iny/WEB-INF/pages/INY0010S.jsp"
>( 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
>
>http://<ipaddress>:<port>/<web-context-root><ActionForward-path>
>
>instead of
>
>http://<ipaddress>:<port>/<web-context-root>/<ActionForward-path>
>
>so the problem is there is no slash - "/" before "<ActionForward-path>"
>
>so if my path was "WEB-INF/pages/INY0010S.jsp" it searches for
>"http://<ipaddress>:<port>/<web-context-root>WEB-INF/pages/INY0010S.jsp"
>which gives error...Can anyone suggest the way out..?
>
>or does this require a fix ? only a Quick resolution of this will be able
>help.
>
>Regards,
>Puneet Agarwal
>Tata Consultancy Services
>Mailto: puneet.a@tcs.com
>Website: http://www.tcs.com
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
ForwardSourceID:NT00003BD2