RVASUDEV wrote:
>
> Hi,
>
> Sorry for the partly off-topic question.
>
> > We have an applet which uses URL and URLConnection classes to
> > POST an HTTP request to a web server/app server combo,
> > and it can read the response, which is in HTML format, using
> > getInputStream on the URConnection object.. How can
> > this output be displayed as rendered HTML by the applet ?
I have been searching for the solution to this problem for some time
now... I am afraid what you want can only be done if you render the HTML
yourself by writing a (full fledged) HTML parser. Think of it this way:
If you could really do that simply, and for any (uncontrolled) HTML,
what is the point in the thousand lines of code that constitutes a
browser:-?
> > Can it be done using Javascript ? Or Swing (If Swing is
> > a possibility, does it work with the Java version below ?)
Javascript and other tricks can be used in the following scenario (this
is what I have resorted to for the time being, changing the logic of my
program):
1) get the Server write out a temp HTML page on the server under a
prespecified name
2) get the applet display that page on the normal browser with
showDocument()
There is some example code for that in a tip at www.javaworld.com
> > Or are there any (free) Java components which have this
> > functionality and can be included in the applet ?
The HTML rendering bean inside HotJava is supposed to do just that but I
have not tried to see if I can pull it out from the (bundled) free
version you can download from Sun. Perhaps you could look into that.
If I take off my developer's hat and put on my scientist hat (<grin>) I
must say that if you need to substitute the browser with your applet
there is some serious flaw in your design. It is true on the other side,
that some elementary HTML rendering in an applet would make life
tremendously easier, allowing compact and user-friendly interfaces.
Whether Sun has given up completely on applets or not is something I do
not dare bring on for discussion to this list (unless provoked:-) And I
mean really useful applets.
If you get any better answers, would you be kind enough to forward them
to me?
Thanx,
Kostas
> >
> > Browser is Netscape 4.7.
> > Java version supported by the browser is 1.1.5
> >
> > TIA
> > Vasudev
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html