Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Sending HTML pages to client

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
:-)
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic