You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Emmanouil Batsis <Em...@eurodyn.com> on 2004/07/13 12:56:21 UTC
Check for forward
Is there a way to "know" whether the HttpServletRequest I am processing
(in my action or whatever) was forwarded and thus is not a direct or
redirected request?
Thanks,
Manos
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Check for forward
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
There are all sorts of ways to do this. One good one is to put all your
jsp pages inside WEB-INF.
At 04:44 AM 7/13/2004, you wrote:
>Michael McGrady wrote:
>>You can add information to your forwards, but, since they are your
>>forwards, why would you?
>
>I would like to protect resources from direct access (i.e. non forwarded
>requests), and was wondering if there is a more standard way to do it
>besides forcing everyone in my team to mark forwarded requests with an
>attribute.
>
> > I don't understand the practical reach of this
> > question.
>
>Hope it's clearer now.
>
>Cheers,
>
>Manos
>
>---------------------------------------------------------------------
>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
Re: Check for forward
Posted by Emmanouil Batsis <Em...@eurodyn.com>.
Bill Siggelkow wrote:
> Create a custom RequestProcessor that extends the Struts
> RequestProcessor. In the custom class override the processForwardConfig
> method to do whatever you want.
Although not an API call, this is exactly what I needed. Thanks to all
who answered.
Manos
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Check for forward
Posted by Bill Siggelkow <bi...@bellsouth.net>.
Create a custom RequestProcessor that extends the Struts
RequestProcessor. In the custom class override the processForwardConfig
method to do whatever you want.
Emmanouil Batsis wrote:
> Bill Siggelkow wrote:
>
>> You can use container-managed security to restrict access to URLs --
>> IIRC direct requests (or redirects) to the resources is restricted,
>> but forwards are not.
>
>
> True, as Michael also suggests (WEB-INF is by default protected by the
> container). However, I need some more flexibility without having to move
> pages between folders or play with container config files.
>
> So I guess my question should be rephrased as "looking for something in
> the Struts APIs to check if the request has been forwarded or not", as
> all requests go through struts and perhaps there could be something in
> there for this; J2EE-based solutions are known but i'm looking for
> something better.
>
> Thanks,
>
> Manos
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Check for forward
Posted by Emmanouil Batsis <Em...@eurodyn.com>.
Bill Siggelkow wrote:
> You can use container-managed security to restrict access to URLs --
> IIRC direct requests (or redirects) to the resources is restricted, but
> forwards are not.
True, as Michael also suggests (WEB-INF is by default protected by the
container). However, I need some more flexibility without having to move
pages between folders or play with container config files.
So I guess my question should be rephrased as "looking for something in
the Struts APIs to check if the request has been forwarded or not", as
all requests go through struts and perhaps there could be something in
there for this; J2EE-based solutions are known but i'm looking for
something better.
Thanks,
Manos
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Check for forward
Posted by Bill Siggelkow <bi...@bellsouth.net>.
You can use container-managed security to restrict access to URLs --
IIRC direct requests (or redirects) to the resources is restricted, but
forwards are not.
Emmanouil Batsis wrote:
>
> Michael McGrady wrote:
>
>> You can add information to your forwards, but, since they are your
>> forwards, why would you?
>
>
> I would like to protect resources from direct access (i.e. non forwarded
> requests), and was wondering if there is a more standard way to do it
> besides forcing everyone in my team to mark forwarded requests with an
> attribute.
>
> > I don't understand the practical reach of this
> > question.
>
> Hope it's clearer now.
>
> Cheers,
>
> Manos
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Check for forward
Posted by Emmanouil Batsis <Em...@eurodyn.com>.
Michael McGrady wrote:
> You can add information to your forwards, but, since they are your
> forwards, why would you?
I would like to protect resources from direct access (i.e. non forwarded
requests), and was wondering if there is a more standard way to do it
besides forcing everyone in my team to mark forwarded requests with an
attribute.
> I don't understand the practical reach of this
> question.
Hope it's clearer now.
Cheers,
Manos
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Check for forward
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
You can add information to your forwards, but, since they are your
forwards, why would you? I don't understand the practical reach of this
question.
At 03:56 AM 7/13/2004, you wrote:
>Is there a way to "know" whether the HttpServletRequest I am processing
>(in my action or whatever) was forwarded and thus is not a direct or
>redirected request?
>
>Thanks,
>
>Manos
>
>---------------------------------------------------------------------
>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