aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes Sending HTML pages to client Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Sending HTML pages to client" Watch "Sending HTML pages to client" New topic
Author

Sending HTML pages to client

Vernon Gibson
Ranch Hand

Joined: Dec 01, 2000
Posts: 35
I have created a java server application that opens a serverSocket and responds to requests from an applet running on a remote client. The client applet requests and then displays data from the server in an AWT frame.
When the applet sends a request I would like for the server to send an HTML document and have the client browser display it instead of the applet.
I need for this process to run independantly of any web server or servlet container.
I'm confused on how to achieve this. Could someone point me to a set of java classes that provide the functionality I would need to do send HTML pages?
Thanks
VG
Ravee Bhat
Ranch Hand

Joined: Nov 26, 1999
Posts: 72

I guess you could use the java-javascript comunication library for the purpose.
Since the requests sent by the applet will be served sent back to applet itself(I think!). Applet can use javascript methods for displaying the new html document.
Another workaround could be using the HTTP methods, like GET etc and sending the response to the browser itself.I donno how is the implementation.
thanks and regards
ravee.
anand rk
Greenhorn

Joined: Feb 07, 2001
Posts: 25
Hello,
Try using servlets by giving html tags in the system.out.println line.The best part is u can even give JScript and VBScript in the tags.
Bye
:-)
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Sending HTML pages to client
 
Similar Threads
final plea - security and applets
Is it possible to obtain URL Encoded Params in an Applet?
how to send object reference to applet?
applets reading from text file on client machine?
Sockets!