Hi,
I have read two threadS here on this but both seemed inconclusive, hence posting a new one. Here're the deatils:
Objects:
-------
I have an Applet that calls a Servlet. The Servlet in turn calls a utility class. The utility class generates random logging messages. Flow:
-----
The Applet passes data to the servlet in onMigrate() method. The Servlet instantiates a new DummyLogger and gets some messages. The Servlet then passes the log messages back to the Applet. The Applet uses a timer to wake up, checks if there's a new log message and then displays them in it's text area. Problem:
--------
When I use the doGet() in the servlet, the code works only if I create a new URLConnection object everytime in the run method. When I use the doPost() method the following exception is thrown: Questions:
----------
What am I doing wrong? I read all over the web that one need to include the method that's causing an HTTP 405 error, in the response's "Allow" header. Isn't that the ServletContainer's job (setting response headers). I did try the following two ways, but neither worked: and
How do I get this to work? I'm now going to attach the code for my app, apologies for the long code/ For the sake of simplicity - I have omitted the complex logging logic (as it used other classes also) but just using
System.set/getProperty(new java.util.Date()); to simulate 50 different log messages.
MigrationApplet.java MigrationServlet.java DummyLogger.java [ September 07, 2007: Message edited by: Prashant Sehgal ]
[ September 09, 2007: Message edited by: Prashant Sehgal ]