dcsimg
call servlet from an Applet
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Prak_Babu
Posted On:   Tuesday, September 18, 2001 07:03 AM

Through the swing applets how to call the servet using param name and value tags


the swing applet using plugin's in html file with those tags how to give servlet reference to the servlet



using this i am not able to get the servlet connection to Applet.

Re: call servlet from an Applet

Posted By:   sandy_singh  
Posted On:   Thursday, September 20, 2001 02:16 PM

U could try this for get method

URLConnection conn=null;
try{
servletURL = new URL("http://mc:8080/servlet/abc");
}catch(MalformedURLException mue) {
mue.printStackTrace();
}
try{
conn = servletURL.openConnection();
conn.setUseCaches(false);
conn.setDefaultUseCaches(false);
}catch(IOException e){
e.printStackTrace();
}



now with the connection object conn u can open an inputstream and read the data etc.


Sandy

About | Sitemap | Contact