This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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
Servlet security
how to get servlet forward response ?
Session Tracking in Servlets
how to read specific data from a web page..
save grid data