aspose file tools*
The moose likes Servlets and the fly likes Need to hook two servlets together, how do I do that? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Need to hook two servlets together, how do I do that?" Watch "Need to hook two servlets together, how do I do that?" New topic
Author

Need to hook two servlets together, how do I do that?

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
Hello I have two servlets.

I want the first one to hook onto the second one (UploadVideo.java) as follows:

The first one is here: [I want to hook on the second one after // handle uploaded Video Files (local and Server) ]

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61761
    
  67

Forward?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Piyush Mangal
Ranch Hand

Joined: Jan 22, 2007
Posts: 196
You can use RequestDispatcher to include another servlet.
Piyush Mangal
Ranch Hand

Joined: Jan 22, 2007
Posts: 196
You can also use forward to second servlet for this as suggested by bear.
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
can you give an example?

Thanks,
Michele
Piyush Mangal
Ranch Hand

Joined: Jan 22, 2007
Posts: 196
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
Thanks, that worked great.

Thanks again,

Michele
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

For another example look at line 412 of the code you posted.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need to hook two servlets together, how do I do that?