Hi Eva,
I've recently been playing with something that might help you.
I have an applet that needs to communicate with a database.
It has same problem you described, it needs to be signed or security policy needs to be changed. So I made a servlet that acts like a database proxy. The applet passed the query it wants to run to the servlet as a
string. The servlet runs the query against the database, packs the data up in a custom class I created and returns the object to the applet. The trick is that where the servlet ordinarily returns a string of html to the browser, it can also pass an object to a servlet. The code looks like this
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//PrintWriter fail = response.getWriter();
try
{
java.io.ObjectOutputStream out = new java.io.ObjectOutputStream(response.getOutputStream());
String str = request.getParameter("sql");
if(str == null)
{
// fail.println("<html><body> No Sql! </body></html>");
return;
}
out.writeObject(doSelect(str ));
}catch(java.lang.Exception e)
{
//fail.println("<html><body> Exception Occured! </body></html>");
e.printStackTrace();
}
}
the trick is you don't create a regular output stream but a ObjectOutputStream
Maybe you can return your data this way
Good Luck
Dave