tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wyn Easton <wyn_eas...@yahoo.com>
Subject Re: Can't get RequestDispatcher working..
Date Mon, 24 Apr 2000 21:50:00 GMT
Kevin -

Here is a sample of how to use RequestDispatcher
for a servlet.
Notice the "servlet" in the URL.

RequestDispatcher rd = 
getServletContext().getRequestDispatcher("/servlet/myServlet");

if (rd != null) rd.forward(request,response); 


--- "Kevin J. Slater" <kslater@paradigm4.com> wrote: 
> Help. 
> 
> I'm somewhat new to Jakarta and the Tomcat server 
> and have been 
> successful in putting together a small web 
> application to replace some 
> asp's. Basically my servlets produce a list of items

> from a database 
> table and allow for editing a particular row of that

> database. Currently 
> to return from the edit form to the list view, I use

> a hack by 
> displaying an html page with a 1 second refresh that

> points back to the 
> list. I know that there is a better way to go and I 
> started down the 
> trail of getServlet to directly invoke a method to 
> produce the list. 
> Since this has been deprecated, I found and turned 
> to RequestDispatcher, 
> but it's not behaving like I think it should. 
> Basically, I can't seem to 
> figure out how to get RequestDispatcher to work with

> a servlet URL 
> (/EOC/AdminClientVerify for example). I *can* get it

> work with a 
> straight .html URL though. 
> 
> My platform for testing is WinNT 4.0 with FP 5, 
> running Apache 1.3.12 
> with mod_jserv and Tomcat 3.1. Can somebody give me 
> a pointer or two? 
> 
> ...Kevin 
> 
> 
> 
> 
>
--------------------------------------------------------------------------

> To unsubscribe, email: 
> tomcat-user-unsubscribe@jakarta.apache.org 
> For additional commmands, email: 
> tomcat-user-help@jakarta.apache.org 
> 
> 

=====
Wyn Easton
wyn_easton@yahoo.com

__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com

Mime
View raw message