Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Applet to Servlet to HMTL

Status
Not open for further replies.

ejcatron

Programmer
Oct 4, 2006
2
US
I'm using a Servlet to generate (through the HTTPServletResponce) an html page. I'm calling the Servlet from an Applet. The Applet passes a String "Some Report Title" to the Servlet using ObjectOutputStream.WriteObject. The report is generated and a PrintWriter (out) is used to create the HTML page. For some reason the Browser never sees the page.

I searched the forum, but did not want to create a temp file and send the name to the Applet using showDoc to display the HTML. It seems to me that I should be able to use the Servlet Responce to display a generated web page. I just need to figure out how to make the Applet let the Servlet Responce take control of the browser, if possible.

Thanks for the help.
 
Wow, would be nice to know the details of such an original design. Too much complicated in my opinion.

Anyway, if you want to replace the page containing the applet with the one generated by the servlet, I can think on two ways:

1.- From the applet make a javascript call setting the location of the document to the servlet.

2.- From the applet, call the servlet, get the response and use javascript to write it to the dom of the document.

Cheers,
Dian
 
Thanks Dian for the options. I like option2.

As for the complication, I have to follow a set of governmant security rules....... Thus making it complicated. Anyway I will try option 2.

Thanks again...
 
Anyway, I'd think a bit about that. I cannot think know in anything an applet can do about security that an ssl connection can't do.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top