• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Get source using Apache Httpclient

 
gavin lee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to use apache httpclient to get source from http://marketinformation.natgrid.co.uk/gas/frmDataItemExplorer.aspx

The program listed below try to implement 2 steps:
1. go to http://marketinformation.natgrid.co.uk/gas/frmDataItemExplorer.aspx
2. expand Report node.
For the second step, I always get error 500.

I use temp data to get all post details, and I compared it with the system.out in my program, it is totally same; I also tried to add cookies got from the first step. I tried my best, but the return code is always 500. It drives me crazy.

Could any one give me some advices and help me figure it out, thanks a million.


 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there and welcome to Javaranch! Hint: What is the 500 code trying to tell you?
 
gavin lee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martijn Verburg wrote:Hi there and welcome to Javaranch! Hint: What is the 500 code trying to tell you?



Server Error in '/Gas' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to get hold of the error logs on the server and/or check with their developers.
 
gavin lee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martijn Verburg wrote:You need to get hold of the error logs on the server, check with their developers.



unfortunately, I can't get the error logs on the server.
 
Paul Clapham
Sheriff
Posts: 21113
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gavin lee wrote:
Martijn Verburg wrote:You need to get hold of the error logs on the server, check with their developers.



unfortunately, I can't get the error logs on the server.


Then do the other thing which Martijn suggested.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic