dcsimg
Communication between 2 clients via servlet
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   jignesh_gohel
Posted On:   Wednesday, March 9, 2005 04:19 AM

Hello,

I have made two clients in using Java Swing which are standalone applications & a servlet to read a string from ClientA & the servlet sends the received string to ClientB.

I am successful upto posting the string to the servlet from ClientA but I am not able to read the receieved string from the servlet into the ClientB.
Could anyone please tell me how to receive a posted string to the servlet from one client, in another client via a servlet.

Thanking you,
Jignesh

Re: Communication between 2 clients via servlet

Posted By:   Anonymous  
Posted On:   Sunday, March 13, 2005 07:43 PM

i thik u can communicate b/w two clients using the net package .You have to u use two url to receive the parameter from 1 client and the second url used to send the reponse to the different servlet

Re: Communication between 2 clients via servlet

Posted By:   Christopher_Koenigsberg  
Posted On:   Saturday, March 12, 2005 06:26 AM

I think your client B will have to "poll". That is, it will have to send requests to the servlet, asking for the string, IF it is available yet. The servlet will either send the string in the response, or an indication that it is not ready yet.

Re: Communication between 2 clients via servlet

Posted By:   vinay_salehithal  
Posted On:   Friday, March 11, 2005 12:41 PM

I am not sure what u are trying to achieve.

But u can try this:
1. Client 1 speaks(URL Connection) with Servlet, sends soem parameters

2. Servlet retreives these parameters and stores in servlet context.

3. Client 2 speaks(URL Connection) with Servlet and it responds with the parameter obtaining it from the servlet context.

Re: Communication between 2 clients via servlet

Posted By:   sujata_samal  
Posted On:   Friday, March 11, 2005 04:02 AM

In ur servlet get the dispatcher using
getRequestDispatcher() of HttpServletRequest class and
use forward/include method of dispatcher class to
redirect the request parameters of clientA to ClientB.


Thnax.Sujata

About | Sitemap | Contact