Roland Weber wrote:
Hello,
When i am requesting for a page using HttpClient, the server responds
with status code 500.
how can i resolve this Internal Server Error 500.
Fix the server. Most of the times when I got a 500 status code,
it was because I had forgotten to start the application server,
or the application server failed to start because of a problem.
The module in the web server accepts the request, is unable to
forward it to the application server, and responds with code 500.
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
hello Roland
The page, when i am requesting through the browser, i am able to get
the result page.
When i am using HttpClient, the response is 500.
The parameters which i am sending with the request contains some
encypted values, i have pasted the code below,
Please have a look, is there any other way to resolve this problem.
-------------------------------------------------------------------------------------------------------------------------------------------------
PostMethod method3 = new
PostMethod("http://www.airdeccan.net/air/Select_Flight.asp");
NameValuePair nvp25 = new
NameValuePair("hidFlightFrom","29-Jan-2006|05:25");
NameValuePair nvp26 = new
NameValuePair("radFlightFrom","yttyww}ÉÔÎÎËtzx~w|Áy|w}Á|wxgÏgy|gxGwwÐÖÉÎÈààyËtzx~Ëtzx~txw|yy~wwyyxwww");
NameValuePair nvp27 = new NameValuePair("hidFlightFromFlag1","Y");
NameValuePair nvp28 = new NameValuePair("hidFlightFromFlag0","Y");
method3.setRequestBody(new NameValuePair[]{nvp25,nvp26,nvp27,nvp28});
int statueCode3 = client.executeMethod(method3);
InputStream in1 = method3.getResponseBodyAsStream();
try {
InputStreamReader inR1 = new InputStreamReader( in1 );
BufferedReader buf1 = new BufferedReader( inR1 );
String line1;
while ( ( line1 = buf1.readLine() ) != null ) {
System.out.println( line1 );
}
} finally {
in1.close();
}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Wire Log:
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Resorting to
protocol version default close connection policy
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Should NOT close
connection, using HTTP/1.1
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.isResponseAvailable()
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.releaseConnection()
DEBUG [org.apache.commons.httpclient.HttpConnection] Releasing
connection back to connection manager.
DEBUG [org.apache.commons.httpclient.methods.GetMethod] enter
GetMethod(String)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.setQueryString(NameValuePair[])
DEBUG [org.apache.commons.httpclient.HttpClient] enter
HttpClient.executeMethod(HttpMethod)
DEBUG [org.apache.commons.httpclient.HttpClient] enter
HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)
DEBUG [org.apache.commons.httpclient.HttpMethodDirector] Attempt number
1 to process request
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.execute(HttpState, HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.writeRequest(HttpState, HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.writeRequestLine(HttpState, HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.generateRequestLine(HttpConnection, String, String,
String, String)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.print(String)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[])
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[], int, int)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addRequestHeaders(HttpState, HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Adding Host request
header
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpState] enter HttpState.getCookies()
DEBUG [org.apache.commons.httpclient.cookie.CookieSpec] enter
CookieSpecBase.match(String, int, String, boolean, Cookie[])
DEBUG [org.apache.commons.httpclient.cookie.CookieSpec] enter
CookieSpecBase.match(String, int, String, boolean, Cookie
DEBUG [org.apache.commons.httpclient.cookie.CookieSpec] enter
CookieSpecBase.match(String, int, String, boolean, Cookie
DEBUG [org.apache.commons.httpclient.Cookie] enter
Cookie.compare(Object, Object)
DEBUG [org.apache.commons.httpclient.cookie.CookieSpec] enter
RFC2109Spec.formatCookie(Cookie)
DEBUG [org.apache.commons.httpclient.cookie.CookieSpec] enter
RFC2109Spec.formatCookie(Cookie)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addProxyConnectionHeader(HttpState, HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.print(String)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[])
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[], int, int)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.print(String)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[])
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[], int, int)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.print(String)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[])
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[], int, int)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.print(String)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[])
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[], int, int)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.writeLine()
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[])
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[], int, int)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.flushRequestOutputStream()
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.readResponse(HttpState, HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.readStatusLine(HttpState, HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.readLine()
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine(InputStream, String)
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.readResponseHeaders(HttpState,HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.getResponseInputStream()
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HeaderParser.parseHeaders(InputStream, String)
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine(InputStream, String)
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine(InputStream, String)
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine(InputStream, String)
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine(InputStream, String)
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine(InputStream, String)
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine(InputStream, String)
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine(InputStream, String)
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine(InputStream, String)
DEBUG [org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.processResponseHeaders(HttpState, HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.readResponseBody(HttpState, HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.readResponseBody(HttpConnection)
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.getResponseInputStream()
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.canResponseHaveBody(int)
<Script>
if (navigator.appName=='Netscape'){browser='NS';}
if (navigator.appName=='Microsoft Internet Explorer'){browser='MSIE';}
function StatusBar_Hide(obj){
var loc , func;
while(obj.tagName.toUpperCase()!="A") obj=obj.parentElement;
func = obj.getAttribute("link");
loc = func.search("http://");
if(loc!=-1)
window.navigate(func);
else
eval(func);
return false;
}
</script>
<script for="document" event="onreadystatechange">
if(browser=='MSIE'){
var colanchor="";
if(readyState=="complete") {
colanchor = document.getElementsByTagName("A");
for(i=0;i<colanchor.length;i++){
anc = colanchor[i];
href=anc.getAttribute("href");
anc.setAttribute("link",href);
anc.setAttribute("href","javascript:void(0);");
anc.attachEvent("onmouseover",function
hideit(){window.status="";return true;});
anc.attachEvent("onmouseout",function
hideit(){window.status="";return true;});
// anc.attachEvent("onclick",function
ctidy(){alert((window.event.srcElement).getAttribute("link"));return
true;});
anc.attachEvent("onclick",function
tup(){return(StatusBar_Hide(window.event.srcElement));});
}
}
}
</script>
<Script>
if(browser=='NS'){
document.captureEvents(Event.MOUSEOVER);
document.onmouseover=function(event) {
window.status = "";
return(true);
}
}
</script> <font face="Arial" size=2>
<p>Microsoft VBScript runtime </font> <font face="Arial" size=2>error
'800a0009'</font>
<p>
<font face="Arial" size=2>Subscript out of range: '[number: 0]'</font>
<p>
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Resorting to
protocol version default close connection policy
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Should NOT close
connection, using HTTP/1.1
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.isResponseAvailable()
DEBUG [org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.releaseConnection()
DEBUG [org.apache.commons.httpclient.HttpConnection] Releasing
connection back to connection manager.
<font face="Arial" size=2>/air/Select_Flight.asp</font><font
face="Arial" size=2>, line 39</font>
Status Line :::::::::::: HTTP/1.1 500 Internal Server Error
Thanks
rajapandian
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]