Might seem silly but have you checked the firewall rules for the production
server? 

I have seen lots of times where the firewalls or routers are set up in such
a way that you cannot hit your own site(s)/boxes from within the firewall,
or even resolve the DNS name (easily fixed with a etc/hosts entry of
course).

I would run down the network path since you say it works on a development
server.

Al


-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Morgan
Sent: Wednesday, November 17, 2004 3:28 PM
To: [EMAIL PROTECTED]
Subject: Using commons HttpUtils to call an Action, but it doesn't work.

I'm using the following code in an initialization routine to call an Action.

This occurs the first time a user hits the application. This was all working
on 
WebSphere 4.0.4, but we upgraded to WS 5.1.0.5 and now it doesn't work. No 
error, no logs, no exception. Just like it doesn't get called. Of course,
the 
same app (EAR file) works fine on a development server.

Any reason why this wouldn't work in the execute() method of another action?

// Create Action URL
String requestUrl = request.getRequestURL().toString();
String webAppUrl = requestUrl.substring(0, requestUrl.lastIndexOf("/") );
String loadStateFormsUrl = webAppUrl + "/initAction.do";

HttpClient client = new HttpClient();     
HttpMethod method = new GetMethod(url);
try {
    int statusCode = client.executeMethod(method);
} catch (HttpRecoverableException e) {
    result = "Exception occurred: " + e.getMessage();
} catch (IOException e) {
    result = "Failed to get a URL's response.";
}

// Read the response body.
byte[] responseBody = method.getResponseBody();
result = new String(responseBody);

// Release the connection.
method.releaseConnection();




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to