there is a specific file for IIS, check that out. That is the one that will solve your problem in an easy by M$ way. But for that, you will need to have a strong logic for session tracking/profiling the user. I have done that for a desktop application, I will think of a way for the Web and let you know. Regds Lupo
Hello Ajith, Its a wonderful problem most of we guys are facing. What i suggest is go with Asynchronous messaging using JMS. Your servlet will publish the details to a destination and from there ur swing application will subscribe it and gets the details as a message. I cant excatly spare some time...other wise i would have given u atleast a skeleton..But dont forget that there needed a session locatior or identifier whose information it is and i suggest u go with using StingBuffer or String with a few Delimiters written as a message from the servlet. Last which company are u working for and where? What sort of product it is.... mail me in person at firstname.lastname@example.org Regards, karthik
Sun Certified Java Programmer<br />Sun Certified Web Component Developer <br />Sun Certified Business Component Developer<br />BEA Certified Weblogic Server Specialist<br /> <br />Never Stop Questioning......
Originally posted by Ajit Malleri: [...] The servlet needs to send this detail to the swing application. Now the problem is how should I send the detail to the swing application? The swing-servlet communication is through sockets.
Why? Personally, I'd subscribe to the XP mantra of doing the same thing that possibly works. With a servlet in a servlet container, you already have a perfectly fine, lightweight, well-supported network infrastructure. Why not have the servlet -- or a different servlet in the same web-app -- serve up the required information? The Swing application could simply request/poll as required.
I am thinking of sending the hashtable to the swing application where I will de-serialize the information and built it on the client side.
You can do that; have a magic HTTP request (protected using container security if need be) that serves up serialized Java objects. If you want a more portable and flexible approach you could return an XML file or even use XML-RPC or SOAP.
But what about the scenario when I have plenty of information to send? It will consume a lot of resources and will be very slow. How should I solve this problem?
That depends on the information. You might be able to just send what's new. A completely different approach would be to use a SQL database, ranging from a lightweight embeddedhsqldb database through MySQL to Oracle. The servlet would stuff its raw information into the database. The Swing application would query this database; I assume it wants to digest the raw results in some way, and digesting large amounts of information is something databases were designed to do. If firewalls are an issue, you can still tunnel this over HTTP. - Peter [ January 17, 2003: Message edited by: Peter den Haan ]