File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes server to server call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "server to server call" Watch "server to server call" New topic
Author

server to server call

amod gole
Ranch Hand

Joined: Dec 07, 2005
Posts: 83
hi all,

my question is simple,
i hava two weblogic server on two machin,
i am calling simple html file and using this html file and action attribute of form tag i am calling one servlet now in this servlet i am using requestDispatcher to call another servlet or html but when i am calling that second servlet i hava to provide absolute path or name of that servlet in requestDispatcher("name");
but what happens when that servlet is on another server
is their any way to call that servlet
dema rogatkin
Ranch Hand

Joined: Oct 09, 2002
Posts: 294
You can try sendRedirect instead of dispatcher.


Tough in space?, <a href="http://tjws.sf.net" target="_blank" rel="nofollow">Get J2EE servlet container under 150Kbytes here</a><br />Love your iPod and want it anywhere?<a href="http://mediachest.sf.net" target="_blank" rel="nofollow">Check it here.</a><br /><a href="http://7bee.j2ee.us/book/Generics%20in%20JDK%201.5.html" target="_blank" rel="nofollow">Curious about generic in Java?</a><br /><a href="http://7bee.j2ee.us/bee/index-bee.html" target="_blank" rel="nofollow">Hate ant? Use bee.</a><br /><a href="http://7bee.j2ee.us/addressbook/" target="_blank" rel="nofollow">Need contacts anywhere?</a><br /><a href="http://searchdir.sourceforge.net/" target="_blank" rel="nofollow">How to promote your business with a search engine</a>
amod gole
Ranch Hand

Joined: Dec 07, 2005
Posts: 83
hi dema rogatkin ,

thanks for reply,but my question is slightly different.
i know that using sendRedirect we can call another html page

but when we are calling that page using redirect method we are loosing request object



please understand my question


server1 server2

servlet1 servlet2 servlet3 servlet4


requestDispatcher requestDispatcher
servlet1----------------->servlet2 servlet3----------------->servlet4

sendRedirect sendRedirect
servlet1----------------->servlet2 servlet3----------------->servlet4

???
servlet1-------------------->servlet3


now provide solution for ? if you know


thanks
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
I think that you can only use requestDispatcher on a single server you can not transer a request from one domain to another.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: server to server call
 
Similar Threads
how to jump page like RequestDispatcher.forward(...)
Calling getRequestDispatcher method ??
requested resource (first.jsp) not available
Request Dispatcher
forward() and sendRedirect()