You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Walter <tx...@yahoo.com> on 2001/11/14 19:16:41 UTC

Request Dispatcher

I am trying to use a RequestDispatcher include with a
JSP page, it seems to be including the content above
the location where I have coded the include.  Any 
clues???

Below is my code
<%
RequestDispatcher rd =
request.getRequestDispatcher(pageName);
                                                 
rd.include(request,response);
%>

=====
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scott

__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Request Dispatcher

Posted by Rajah Kalipatnapu <ra...@soundpipe.com>.
thats exactly correct, and if do not want to use forward, may be u can use a
conditional
statement

-----Original Message-----
From: Tom Drake [mailto:rtd@pobox.com]
Sent: Wednesday, November 14, 2001 10:32 AM
To: Tomcat Users List
Subject: Re: Request Dispatcher


JSP provides an easier way to do what you are attempting.
However, the 'hot' include mechanism, is very much like a
function call. the output from the included jsp/servlet simply
appears in the middle of your output stream. It does not replace
the entire page.

If you need a completely different response, you may need
to use the 'forward' mechanism instead. If you do, you must
forward to the other page prior to producing any output
at all.

Tom
----- Original Message -----
From: "Scott Walter" <tx...@yahoo.com>
To: <to...@jakarta.apache.org>
Sent: Wednesday, November 14, 2001 10:16 AM
Subject: Request Dispatcher


| I am trying to use a RequestDispatcher include with a
| JSP page, it seems to be including the content above
| the location where I have coded the include.  Any
| clues???
|
| Below is my code
| <%
| RequestDispatcher rd =
| request.getRequestDispatcher(pageName);
|
| rd.include(request,response);
| %>
|
| =====
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Scott
|
| __________________________________________________
| Do You Yahoo!?
| Find the one for you at Yahoo! Personals
| http://personals.yahoo.com
|
| --
| To unsubscribe:   <ma...@jakarta.apache.org>
| For additional commands: <ma...@jakarta.apache.org>
| Troubles with the list: <ma...@jakarta.apache.org>
|
|
|


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Request Dispatcher

Posted by Tom Drake <rt...@pobox.com>.
JSP provides an easier way to do what you are attempting.
However, the 'hot' include mechanism, is very much like a
function call. the output from the included jsp/servlet simply
appears in the middle of your output stream. It does not replace
the entire page.

If you need a completely different response, you may need
to use the 'forward' mechanism instead. If you do, you must
forward to the other page prior to producing any output
at all.

Tom
----- Original Message ----- 
From: "Scott Walter" <tx...@yahoo.com>
To: <to...@jakarta.apache.org>
Sent: Wednesday, November 14, 2001 10:16 AM
Subject: Request Dispatcher


| I am trying to use a RequestDispatcher include with a
| JSP page, it seems to be including the content above
| the location where I have coded the include.  Any 
| clues???
| 
| Below is my code
| <%
| RequestDispatcher rd =
| request.getRequestDispatcher(pageName);
|                                                  
| rd.include(request,response);
| %>
| 
| =====
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Scott
| 
| __________________________________________________
| Do You Yahoo!?
| Find the one for you at Yahoo! Personals
| http://personals.yahoo.com
| 
| --
| To unsubscribe:   <ma...@jakarta.apache.org>
| For additional commands: <ma...@jakarta.apache.org>
| Troubles with the list: <ma...@jakarta.apache.org>
| 
| 
| 


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>