Connecting Tech Pros Worldwide Help | Site Map

Java Autopostback?

  #1  
Old January 25th, 2008, 11:55 PM
Vittorix
Guest
 
Posts: n/a
Hi everybody,

I'm writing a web server in Java for html and servlets.
when the server receives a GET request, it works fine.

problem: when I use POST, the server program stops and the submit button has
to be clicked another time or the page has to be manually refreshed (after
that it works fine).
so, the program waits for the client to send a new signal/request.
The problem is caused by a in.readLine() statement:

if(method.equals("GET") && URI.contains("?"))
paraLine = URI.substring(URI.indexOf("?")+1, URI.length());
else if(method.equals("POST"))
paraLine = in.readLine(); // in the POST request, the parameters are
in the http request body

how to avoid that?

--
ciao
Vittorix


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Download the JAVA , .NET and SQL Server interview with answers Jobs answers 2 September 26th, 2006 02:25 PM
Download the JAVA , .NET and SQL Server interview PDF Jobs answers 0 September 17th, 2006 02:05 PM
Autopostback and onkeyup event issue Brad answers 3 April 20th, 2006 07:55 PM
aspx web form controls and client side java script Rea Peleg answers 2 November 18th, 2005 03:56 PM