HI,
I know about swing(JApplet) to servlet communication.
But its not working in JFrame,
Why it is i dont know,
Here is the code for JApplet to servlet communication
private URLConnection getServletConnection(
String servletName) throws MalformedURLException, IOException
{
URL urlServlet = new URL(getCodeBase(), servletName);
con = urlServlet.openConnection();
con.setDoInput(true);
con.setDoOutput(true);
con.setUseCaches(false);
return con;
}
URLConnection con = getServletConnection("db");
OutputStream outstream = con.getOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(outstream);
oos.writeObject(fields);
oos.flush();
oos.close();
// receive result from servlet
InputStream instr = con.getInputStream();
ObjectInputStream inputFromServlet = new ObjectInputStream(instr);
details = (ArrayList) inputFromServlet.readObject();
tell me any one how it is in Frame
Thanks in advance