servlet-swing

How to communicate servlet to swing and swing page to servlet?
[69 byte] By [Bala_msa] at [2007-11-26 14:11:35]
# 1
HTTP.But a strong rethink of your design may well be in order based on your question.
cotton.ma at 2007-7-8 1:59:45 > top of Java-index,Java Essentials,New To Java...
# 2

Yes, what my fellow poster said was right

U'd have to send a http request to the servlet from your swing component and get reponse back.

make use of java.net.URL & java.net.URLConnection pacakage to acheive this.

You can checkout an Applet implementation mentioned down below

The Example APPLET code:

http://mindy.cs.bham.ac.uk/AppletServletExample/EgApplet.java.txt

The Example SERVLET code:

http://mindy.cs.bham.ac.uk/AppletServletExample/EgServlet.java.txt

and the Example AppletDemo Class

http://mindy.cs.bham.ac.uk/AppletServletExample/EgApplet.class

just for further reference make use of the link below.

http://www.theserverside.com/discussions/thread.tss?thread_id=33975

http://www.javamaterial.com/Javanetworking.html

http://jan.netcomp.monash.edu.au/distjava/http/lecture2.html

REGARDS,

RaHuL

RahulSharnaa at 2007-7-8 1:59:45 > top of Java-index,Java Essentials,New To Java...
# 3
thanks
bala_msa at 2007-7-8 1:59:45 > top of Java-index,Java Essentials,New To Java...