aspose file tools*
The moose likes Servlets and the fly likes HTTP 500 - Internal server error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTTP 500 - Internal server error" Watch "HTTP 500 - Internal server error" New topic
Author

HTTP 500 - Internal server error

Rao Daggumalli
Greenhorn

Joined: Dec 18, 2008
Posts: 3
Hi,

I am working with a java program which looks for file(s) in a given directory whose name(s) starts with a specific string and lists them on the webpage provided links to the same. I have written the following method to fulfill this.


The above code works fine with Firefox browser. But when I run the same in IE 6.0 browser, an HTTP 500 Internal Server Error was encountered. If we include the output.println line commented just above the if loop, it works fine in IE 6.0 too.

I have gone through the code many times but couldn't find any problem. Did anyone of you ever faced the same kind of problem. If so can you please share your experience with me about how you solved the problem.

Thank You
[ December 22, 2008: Message edited by: Rao Daggumalli ]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19723
    
  20

"Studentone", I think you missed our naming policy. It's one of the few rules we have, so please follow it. While you're at it, you may want to read How To Ask Questions On JavaRanch as well.

Thank you,

Rob


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Rao Daggumalli
Greenhorn

Joined: Dec 18, 2008
Posts: 3
Did anyone faced same kind of issue (mentioned in my first post)?

Thanks
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19723
    
  20

I think you'll have some more success in the Servlet forum.
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8829
    
    5
in fact, let's try the servlets forum...


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
An HTTP 500 error in a JSP/Servlet environment means that there's an exception been thrown in your code. The web container can't handle the request anymore.

You can find the exception and the stacktrace in the application server logs. Once found that, just fix the code accordingly.
Rao Daggumalli
Greenhorn

Joined: Dec 18, 2008
Posts: 3
Bauke Scholtz,

Thanks for looking into it. I have somehow managed to solve this problem by changing the HTTP status code sent in the response header of the error page to HTTP 200

Source: http://narencoolgeek.blogspot.com/2007/04/show-friendly-http-error-messages-in-ie.html

I was not sure how the impact will be for this act.

Please let me know if this solution is appropriate or not.

Thanks
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
I repeat: read the appserver logs.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: HTTP 500 - Internal server error