You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Martin Haase-Thomas <mh...@meome-ag.de> on 2002/03/12 10:01:42 UTC

[OT?] What exactly is forwarding?

Hi all,

I know this is not perfectly the right list for my topic, but before 
subscribing to another for just one question... forgive me if I'm going 
to be boring. Even more, because my question is rather philosophical.

If you consider JSPs, there is a tag called <jsp:forward page="..." />. 
My question is: how do I have to understand 'forward'? The java 
documentation isn't that verbose, and I can imagine two possible meanings:
1. Forwarding is some sort of an internal redirect to the servlet engine 
which the browser will not be informed of.  From this point of view 
forwarding will be nearly the same as a dynamic include.
2. Forwarding is the same as a redirect.

Maybe a superfluous question for some of you, for me it isn't actually. 
So, if anyone knows an answer - or knows the number of the RFC I'll find 
the information: you're welcome!

Thanx a lot in advance
Martin


-- 
                   http://www.meome.de
-------------------------------------------------------
Martin Haase-Thomas         |       Tel.: 030 43730-558
meOme AG                    |       Fax.: 030 43730-555
Software Development        |           mht@meome-ag.de
-------------------------------------------------------



Re: [OT?] What exactly is forwarding?

Posted by Martin Haase-Thomas <mh...@meome-ag.de>.
Thank you both. I thought so: it is one of these typical JSP features - 
but now it works in perl, too ;)

Cheers
Martin


Perrin Harkins wrote:

> Paul Lindner wrote:
>
>> You'll find that $r->internal_redirect() is the mod_perl equivalent.
>> Also Apache::ASP containts the Transfer() method which accomplishes
>> the same thing.
>
>
> Personally, I always thought this was sort of a strange part of JSP.  
> It really shows the page-centric thinking behind it.  Doing a 
> "forward" is essentially a GOTO statement for JSP.  When I write 
> mod_perl apps, I never feel the need for that sort of thing, with so 
> many better ways to accomplish things (OO, method calls, dispatch 
> tables, template includes).
>
> - Perrin
>
>

-- 
                   http://www.meome.de
-------------------------------------------------------
Martin Haase-Thomas         |       Tel.: 030 43730-558
meOme AG                    |       Fax.: 030 43730-555
Software Development        |           mht@meome-ag.de
-------------------------------------------------------




Re: [OT?] What exactly is forwarding?

Posted by Perrin Harkins <pe...@elem.com>.
Paul Lindner wrote:
> You'll find that $r->internal_redirect() is the mod_perl equivalent.
> Also Apache::ASP containts the Transfer() method which accomplishes
> the same thing.

Personally, I always thought this was sort of a strange part of JSP.  It 
really shows the page-centric thinking behind it.  Doing a "forward" is 
essentially a GOTO statement for JSP.  When I write mod_perl apps, I 
never feel the need for that sort of thing, with so many better ways to 
accomplish things (OO, method calls, dispatch tables, template includes).

- Perrin


Re: [OT?] What exactly is forwarding?

Posted by Paul Lindner <li...@inuus.com>.
On Tue, Mar 12, 2002 at 10:01:42AM +0100, Martin Haase-Thomas wrote:
> Hi all,
> 
> I know this is not perfectly the right list for my topic, but before 
> subscribing to another for just one question... forgive me if I'm going 
> to be boring. Even more, because my question is rather philosophical.
> 
> If you consider JSPs, there is a tag called <jsp:forward page="..." />. 
> My question is: how do I have to understand 'forward'? The java 
> documentation isn't that verbose, and I can imagine two possible meanings:
> 1. Forwarding is some sort of an internal redirect to the servlet engine 
> which the browser will not be informed of.  From this point of view 
> forwarding will be nearly the same as a dynamic include.

*ding* correct!  Basically it says, dump any buffered output and start
a new request.

> 2. Forwarding is the same as a redirect.

nope, see above.

> Maybe a superfluous question for some of you, for me it isn't actually. 
> So, if anyone knows an answer - or knows the number of the RFC I'll find 
> the information: you're welcome!

You'll find that $r->internal_redirect() is the mod_perl equivalent.
Also Apache::ASP containts the Transfer() method which accomplishes
the same thing.

-- 
Paul Lindner    lindner@inuus.com   ||||| | | | |  |  |  |   |   |

    mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
         Human Rights Declaration   http://www.unhchr.ch/udhr/