The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
June 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Loading a page from Servlet in Applet-servlet scenario

Posted by Nitin Kulkarni on June 08, 2000 at 1:29 AM

Hello All

I am writing this mail after I have exhausted all my resources to solve the below problem. I would really appreciate any help from you.

I have an applet which is talking to a servlet. The applet has following piece of code


Then there is a method called
readServletResponse(servletConnection); which reads the response from the

If I comment out the the call to this method the communication does not take place So I have to call this method. Why is this? What if I do not want to get the response from the servlet

However my original problem is that after I send the data(userid and password) to the servlet the servlet authenticates the user and dynamically generates a new HTML page and writes it to the o/p stream. I was expecting the HTML page to be displayed. In normal circumstances the data is sent to the browser which knows how to parse this data.

But in my case this o/p stream is connected to the applet therefore the
applet receives this data and does not know what to do with it.

I cannot generate an HTML page on the servlet which I can load from the applet because anybody can bookmark the page and bypass the authenticaton process next time.

In short in applet-servlet scenario how do I load a new HTML page on the users browser?

Thanks a lot for your time



Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us