• Post Reply Bookmark Topic Watch Topic
  • New Topic

sending message from JAVA-Servlet to C# Client

 
simon worx
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
i have to following situation:
I have a server on which java-servlets are running in a tomcat and i have n-clients which use c# and HTTP to GET() and POST() data to the server. This all works fine, the clients have to loggin, the server send them a JSessionCookie back and they are allowed to use all other functions. What i now need is to send a message out of a JAVA-servlet to a client which is logged in without the client asks for something. An short example:
Client A sends a document to the server, the server stores it into the DB and sees that an other client has to take action to the document, so the server now has to send a message to Client B. The client B will then see: "i have to do something" and the workflow goes on...
How can i implement these functionality without checking every minute if something is to do for the client?? Is it possible with this combination: JAVA-Servlets and C#-HTTP Client??
thank's a lot!!
simon
 
Joe Ess
Bartender
Posts: 9361
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your problem here is that HTTP is a request-response protocol. In order for the server to notify the client you will need to use another protocol. You could easily write a simple server that takes client connections and sends the client a message when a document is available for download. Check out the Custom Networking trail of the Java Tutorial.
 
Ashish Agrawal
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Simon,
Check out the following url. This will definetely help you.
http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet.html
Regards,
Ashish Agrawal.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!