You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by rajiv verma <ra...@gmail.com> on 2005/07/14 17:05:12 UTC
Forward path entry in Struts-config
Hi,
I want to place my JSPs under the WEB-INF directory[login directory].
How ths struts-config entries should look in this case.
If I try to add the following forward--entry:
<forward name="success" path="/login/welcome.jsp" redirect="true"
contextRelative="false" />
But, this by default looks everything under the context[root].
Any solution to this? I know there is forward pattern, I was trying to
make use of it, but does not seem to work.
Thanks,
Rajiv
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Forward path entry in Struts-config
Posted by Laurie Harper <la...@holoweb.net>.
rajiv verma wrote:
> Hi,
> I want to place my JSPs under the WEB-INF directory[login directory].
> How ths struts-config entries should look in this case.
> If I try to add the following forward--entry:
>
> <forward name="success" path="/login/welcome.jsp" redirect="true"
> contextRelative="false" />
> But, this by default looks everything under the context[root].
> Any solution to this? I know there is forward pattern, I was trying to
> make use of it, but does not seem to work.
> Thanks,
> Rajiv
Have you tried with a path of /WEB-INF/login/welcome.jsp and redirect set
to false? As Michael points out you wont be able to do this using
redirects, but forwards should work OK.
L.
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/~laurie/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Forward path entry in Struts-config
Posted by Michael Jouravlev <jm...@gmail.com>.
1. Files under WEB-INF cannot be accessed directly from outside, that
is, from browser
2. Redirect generates a new browser request to the server
So, the answer is "not possible" in your current configuration.
JSP generally should not be accessed from outside, they should be
forwarded to from an action class. You redirect to an action, which
forwards to JSP. This will work.
Michael.
On 7/14/05, rajiv verma <ra...@gmail.com> wrote:
> Hi,
> I want to place my JSPs under the WEB-INF directory[login directory].
> How ths struts-config entries should look in this case.
> If I try to add the following forward--entry:
>
> <forward name="success" path="/login/welcome.jsp" redirect="true"
> contextRelative="false" />
> But, this by default looks everything under the context[root].
> Any solution to this? I know there is forward pattern, I was trying to
> make use of it, but does not seem to work.
> Thanks,
> Rajiv
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org