Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Servlets and the fly likes to do a forward in servelt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "to do a forward in servelt" Watch "to do a forward in servelt" New topic
Author

to do a forward in servelt

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
In jso we have <jsp:forward> but in servelt how do i achieve the forward.
i want to do a forward instead of sendredirect how can i do ?

Thanks,
aakash
Raghunath Madhvapathi
Greenhorn

Joined: Aug 26, 2004
Posts: 6
You can use RequestDispatcher for forwarding from servlet.

RequestDispatcher rd = getServletContext().RequestDispatcher("relative url of jsp").forward(req,res);
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Those are a couple of interesting new technologies you've invented there, Ashaak! I'm not sure that I can comment on JSO and Servelts but with JSP and Servlets it can be done as follows, from doGet() or doPost():

Jules
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: to do a forward in servelt
 
Similar Threads
Session Tracking in Servlets
how to read specific data from a web page..
Servlet security
how to get servlet forward response ?
save grid data