aspose file tools*
The moose likes Other Open Source Projects and the fly likes Get source using Apache Httpclient Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Get source using Apache Httpclient" Watch "Get source using Apache Httpclient" New topic
Author

Get source using Apache Httpclient

gavin lee
Greenhorn

Joined: Jun 06, 2010
Posts: 3
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

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi there and welcome to Javaranch! Hint: What is the 500 code trying to tell you?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
gavin lee
Greenhorn

Joined: Jun 06, 2010
Posts: 3
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

Joined: Jun 24, 2003
Posts: 3274
    
    5

You need to get hold of the error logs on the server and/or check with their developers.
gavin lee
Greenhorn

Joined: Jun 06, 2010
Posts: 3
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
Bartender

Joined: Oct 14, 2005
Posts: 18991
    
    8

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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Get source using Apache Httpclient