Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Get source using Apache Httpclient

 
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.


 
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • 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
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • 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.
 
Marshal
Posts: 24935
61
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.
 
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!