This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 30719 - COMPILE: JSP compilation failure exits with status of 200
Summary: COMPILE: JSP compilation failure exits with status of 200
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: -FFJ-
Hardware: All All
: P4 blocker (vote)
Assignee: Petr Jiricka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-06 02:32 UTC by Jason Rush
Modified: 2004-09-07 12:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Rush 2003-02-06 02:32:43 UTC
Description: 
Build 1127.

If JSP compilation fails, the Tomcat server exits with an exit status of 200. 
However, 200 is "OK" which would indicate that the request had succeeded.  We
should attempt to return a meaningful exit status to the user to aid in the
debugging process.

For example, if compilation fails because the JSP file doesn't exist, we might
return a 404 Not Found status.  Or if compilation fails because the JSP file
exists but does not have appropriate permissions, we might return a 403
Forbidden status.  Or if compilation failed because the page had unknown
compilation errors, we might return a 500 Internal Server Error response.

Evaluation: 
The problem is the modification to the tomcat server. It has been modified 
to return a HTTP response in case the compilation fails. But that's not 
helpful. In examples where the compilation fails because the URI does not 
exist, the 200 OK w/ compilation error is positively misleading


One problem with returning a non-200 response may be that some web browsers do
not show the specific error message returned by the server when an error code is
returned. Rather, they display the browser's own message, which hides the real
reason of the problem, so the problem will be difficult to detect for the user.
 
pjiricka@netbeans.org 2001-06-07

Found out that the previous is not a very bad problem. Fixed - now the status
code is 500.

pjiricka@netbeans.org 2001-06-11


Now if I try to get nonexistent URL, I get correct 404 code. But if I try to get
uncompilable JSP, error code 200 is still returned.

lmartinek@netbeans.org 2001-06-15

A comment.
Comment 1 Jason Rush 2003-02-06 02:36:14 UTC
Transferred from BugTraq 4381515.
Comment 2 Petr Jiricka 2004-09-07 12:21:37 UTC
Fixed in the new JSP compilation/deployment framework in NB 4.0