3 posts in topic
Flat View  Flat View

Posted By:   veekay_gounder
Posted On:   Monday, June 11, 2001 06:53 AM

I tried posting some data using http post to a web site. The post doesnt return the required html page as output. I know for sure, the post fails. But, how do I know if I have left some mandatory fields blank or what is going wrong ? Any input(s) appreciated


Posted By:   John_Mitchell  
Posted On:   Sunday, June 17, 2001 03:10 PM

Other folks have already mentioned reading/parsing the header values in the cases where the "error" is returned as an HTTP error.

If your problem is really at the "application" level then the problem is either easy or painful. If you control the server code then you can have the post return you various error codes in an easy to deal with manner. If you do not control the server then you'll have to figure out what the server code does in the various error cases and figure out how to interpret what the server returns.


Posted By:   AlessandroA_Garbagnati  
Posted On:   Monday, June 11, 2001 08:58 AM


If you use the URLConnection object and it's subclass for http (HttpURLConnection) you have a method for reading the headers values.

So, if the "errors" are in some way stored in the header, it's fairly easy to read them.

The fact is that rarely I've seen form errors inserted into the header. Normally they are displayed in the page that is shown, and unless you can find some common pattern, I think that it's tough. If you have access to the servlet (or program) that generates the form after an error, you can have some codes inserted into the headers... maybe this can help.


Posted By:   Ionel_Condor  
Posted On:   Monday, June 11, 2001 08:30 AM

I remember that a few months ago I had the same problem.
I found that there are some software tools that work like a proxy server, so in my web navigator settings I set as a proxy the application that runs on a specific port, then after a specific post/get request
"it captures all HTTP requests/responses and, through a simple browser interface, can display all these HTTP messages including headers, the responses' content, statistics" (I quote from the their website).

The tool that I was using is called webdebug,
is written in Python under a GNU license.
The web site is
About | Sitemap | Contact