struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "raj eev lochanam" <raj_e...@rediffmail.com>
Subject Re: Re: Module and pages Behind WEB-INF don't work...???
Date Thu, 29 Jul 2004 14:21:39 GMT
Hello,
    I am sorry to say that, what you have given solution, i have tried that , that is also
not working with this.

Any more help please,
Rajeev Lochanam A  


On Thu, 29 Jul 2004 Kishore Senji wrote :
>There are two solutions to this problem.
>
>1) Setting contextRelative="true" for every forward.
>(If you do that, then the path will be intrepreted as context relative
>instead of module relative)
>
>2) Using forwardPattern of controller
>The default is $M$P
>meaning the path is prepended with the prefix of the module.
>
>If you use forwardPattern like the one below, then the module prefix
>won't be prepended
><controller forwardPattern="$P"/>
>
>or
>you can use
><controller forwardPattern="/WEB-INF$P"/>
>to save some typing.
>
>P.S: forwardPattern only applies if you haven't set
>contextRelative="true" for a forward.
>
>Thanks,
>Kishore Senji.
>
>
>----- Original Message -----
> From: puneet.a@tcs.com <puneet.a@tcs.com>
>Date: Thu, 29 Jul 2004 12:18:34 +0530
>Subject: Module and pages Behind WEB-INF don't work...???
>To: Struts Users Mailing List <user@struts.apache.org>
>
>
>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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message