Results 1 to 5 of 5
Thread: Servlet communication
- 12-17-2010, 09:54 AM #1
Member
- Join Date
- Dec 2010
- Posts
- 1
- Rep Power
- 0
Servlet communication
Hi all!
I have a problem with my first HttpServlet.
I have 2 HttpServlet (S1 & S2) on 2 different computers.
what I want them to do is:
- S1 changes values of some parameters in HttpServletRequest that it recieved, then sends modified request to S2.
- S2 does something with HttpServletRequest sent by S1, then sends HttpServletResponse to S1.
Anyone can show me what I have to do!
Thanks!!!
- 12-17-2010, 02:06 PM #2
because one servlet needs to invoke a http request to the second servlet, i imagine you would need something like a http client inside the first servlet to originate a request to the second servlet. see also: HttpClient - HttpClient Home
- 12-20-2010, 03:44 PM #3
Member
- Join Date
- Oct 2010
- Posts
- 7
- Rep Power
- 0
If all servlet1 does is modify the request before sending it on to servlet2, it sounds like you should just use a ServletFilter, instead of having a whole separate servlet.
The Essentials of Filters
- 12-20-2010, 05:16 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Except Servlet 2 is on a different machine, so is part of a different web app.
It all smacks of web services gone a bit strange, but each to their own I suppose.
- 12-20-2010, 05:52 PM #5
Member
- Join Date
- Oct 2010
- Posts
- 7
- Rep Power
- 0
Similar Threads
-
Java Servlet and Web Services Communication
By kiran.doddi in forum Java ServletReplies: 0Last Post: 03-16-2010, 07:36 PM -
Java Servlet and Web Service communication
By shussain@del.aithent.com in forum Java ServletReplies: 36Last Post: 03-16-2010, 07:28 PM -
applet servlet communication
By viswamadhavi in forum Java AppletsReplies: 0Last Post: 04-06-2009, 01:12 PM -
Servlet - apache tomcat/glassfish server shuts down on servlet usage
By StewS in forum Java ServletReplies: 1Last Post: 12-02-2008, 12:23 AM -
applet servlet communication
By hardc0d3r in forum Java AppletsReplies: 1Last Post: 07-12-2007, 06:58 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks