Results 1 to 4 of 4
Thread: Server 500 Erros and Java
- 04-15-2009, 12:14 AM #1
Member
- Join Date
- Apr 2009
- Posts
- 2
- Rep Power
- 0
Server 500 Erros and Java
One of my developers and I are having a discussion. He is stating that a server 500 error means that the server (apache) is causing the server 500 error.
I on the other hand am stating that the server 500 error is being caused by a java application that abnormally exists due to a problem.
The problem is Input validation, as I see it. The application is expecting a parameter being sent back from a web form, (example: ?state=NV) but the parameter is not there (example: ?state=&zip=21022) OR the parameter contains bogus information (example: ?state=%27). When this is sent back to the application, it crashes. The application is not showing the java screen dump, because he's capturing it.
From some testing, I found that the application aborts (server 500 error) upon the entry of anything ther than what is expected in the state field.
Now, correct me if I am wrong, but the server 500 error generated is the apache server stating that the application aborted.
I would assume that in Java like other languages, you should be able to capture the error exception prior to the crash and deal with it through an error handler. Right?
My knowledge of Java is limited and I appreciate anyones input here
thanks.
Nitch.
- 04-15-2009, 02:02 AM #2
A 500 is a generic error stating that something went wrong on the server side, rather than an error by the user or the client). This may well be caused by Java applications that the Apache server calls going wrong. Consult your error.log (or wherever your errors go) to find out why Apache is returning a 500 error. If Apache itself had broken I wouldn't expect any status code at all.
Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
- 04-15-2009, 04:20 AM #3
Member
- Join Date
- Apr 2009
- Posts
- 2
- Rep Power
- 0
Correct that the apache log shows this, but as a standard HTML weblog as a server 500 and nin the error log, there is nothing because its not an apache error.
I know that if you cause a problem with other languages as a CGI within apache, you can get this to happen also. Its a generic statement from apache saying "something aborted" and then you have to go back to the CGI log. In this case the Java application does not have a log file, or better put one that the developer is not showing.
Usually with a Java application if something happens within the app, it aborts, dumps a trace to the screen and throws a server 500 error.
The developer is catching the error but is throwing a "not available" message to the screen. I've trying to get him to understand that its the application throwing the exception and causing the 500 error because the app is NOT doing input and or parameter validation correctly.
thanks for the response!
- 04-15-2009, 07:00 PM #4
Perhaps direct him to the Apache manual, or some kind of developer training agency.
Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
Similar Threads
-
Add Java Server Face Fragment in JSP with JAVA
By fabio.beoni in forum New To JavaReplies: 0Last Post: 02-05-2009, 12:14 PM -
Coding an FTP server in java
By Zucheto in forum NetworkingReplies: 3Last Post: 06-22-2008, 04:24 AM -
Java Server Pages (I)
By Java Tutorial in forum Java TutorialReplies: 0Last Post: 02-17-2008, 11:17 AM -
java mail server
By krismedia in forum New To JavaReplies: 2Last Post: 01-23-2008, 04:41 AM -
Help with IRC server in java
By mathias in forum NetworkingReplies: 1Last Post: 08-07-2007, 06:51 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks