This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet to JSP and use of ShowDocument

 
Sharang Thorat
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i am trying to send data from Applet to Jsp
my requirement is i am sending some data to JSP from
applet. The jsp is processing some data and creating
a form for user.
Now the same jsp with data already sent should be displayed when
i call ShowDocument from Applet.
try
{
/* This vector is assumed to be list of the object ids and object class
currently only object classes are assumed
*/
Properties prop = WTProperties.getLocalProperties();
String urlname = prop.getProperty("wt.server.codebase");
urlname = urlname.concat("/rs/jsp/jsp/RSChecks.jsp");
String param1 = "param1=component¶m2=connection";
URL url = new URL(urlname);
HttpURLConnection con = (HttpURLConnection)url.openConnection();
con.setDoInput(true);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-length",""+ param1.length());
con.connect();
PrintWriter pw = new PrintWriter(con.getOutputStream());
pw.println(param1);
pw.close();
// con.getContent();

java.applet.Applet applet = wt.util.WTContext.getContext().getApplet();
AppletContext context = applet.getAppletContext();
context.showDocument(url,"_blank");

} catch(MalformedURLException exc)
{
exc.printStackTrace();
System.out.println("URL wrong !!!\n");
}catch (Exception eio)
{
eio.printStackTrace();
}
How to Do it. Its ok while sending data to JSP but how to
view same data in jsp after doing the ShowDocument in Applet
Help is needed
Sharang
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic