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 23135 - compiling errors with same jsps under different directory in web module.
Summary: compiling errors with same jsps under different directory in web module.
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: -FFJ-
Hardware: All Solaris
: P2 blocker with 1 vote (vote)
Assignee: Petr Jiricka
URL:
Keywords: RELNOTE
: 26823 26961 33124 33911 37170 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-05-03 23:51 UTC by _ hlu
Modified: 2004-09-07 16:00 UTC (History)
4 users (show)

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 _ hlu 2002-05-03 23:51:10 UTC
Build 020503:
If there are same jsps but under different
diretories inside web module, and  "Build all" on
web module directory, there are compiling errors
like this:
JSP$jsp.java [9:1] duplicate class:
org.apache.jsp.JSP$jsp
public class JSP$jsp extends HttpJspBase {
       ^
JSP$jsp.java [17:1] modifier private static not
allowed here
    private static boolean _jspx_inited = false;
                           ^
JSP$jsp.java [9:1] org.apache.jsp.JSP$jsp should
be declared abstract; it does not define
_jspService() in
org.apache.jasper.runtime.HttpJspBase
public class JSP$jsp extends HttpJspBase {
       ^
3 errors
Errors compiling.
It is fine if compile them separately. It is also
OK to execute the web module and access each of 
the jsps.
Comment 1 Petr Jiricka 2002-05-07 14:16:51 UTC
This is caused by the fact that the Tomcat JSP compiler 
creates two servlets which are in different locations but 
have the same classname. When the Java compiler then 
compiles them, it does not handle this case. 

This situation does not happen when compiling JSPs one by 
one, because then the Java compiler, too, compiles only 
one page at a time. However, in the case of compiling 
multiple pages at a time, the Java compiler is passed all 
of them at once.

The fix would be to call the Java compiler separately for 
each page, but this may require non-trivial (and 
controversial) changes in the Java module.

The workaround is to compile pages one by one.
Comment 2 Petr Jiricka 2002-06-21 15:14:11 UTC
This should be fixed by removing the compilation feature 
as it is now, and replacing it with 
1) the kind of tools compilation that is specified in JSP 
2.0
2) a JSP validation action
Comment 3 Marek Grummich 2002-07-22 12:12:19 UTC
Set target milestone to TBD
Comment 4 Marek Grummich 2002-07-22 12:22:53 UTC
Set target milestone to TBD
Comment 5 Petr Jiricka 2002-07-23 12:39:24 UTC
*** Issue 25907 has been marked as a duplicate of this issue. ***
Comment 6 Petr Jiricka 2002-07-23 12:40:15 UTC
Raising the priority to P2.
Comment 7 Petr Jiricka 2002-07-23 17:12:59 UTC
The workaround is to set the IDE integration mode to 
Minimal.
Comment 8 Petr Jiricka 2002-07-30 17:49:25 UTC
Requesting to waive for NetBeans 3.4. Per the bug 
description, the fix is non-trivial and would 
significantly delay the release.
Comment 9 iformanek 2002-07-30 17:54:51 UTC
I agree with the waiver.
Comment 10 Patrick Keegan 2002-07-30 22:01:02 UTC
approved waiver; keep my name in cc for release note purposes
Comment 11 Ana.von Klopp 2002-08-27 21:47:08 UTC
*** Issue 26823 has been marked as a duplicate of this issue. ***
Comment 12 _ proxity 2002-08-28 18:26:51 UTC
Having JSPs with the same name in different directories is absolutely
common (e.g. index.jsp). As NetBeans is the best tool when developing
WebApps, I would really appreciate if you can manage to integrate a
sophisticated solution of the problem.
Comment 13 Petr Jiricka 2002-09-03 08:52:35 UTC
*** Issue 26961 has been marked as a duplicate of this issue. ***
Comment 14 Jason Rush 2002-09-18 21:50:38 UTC
Since this defect existed in FFJ4.0 it is automatically qualified for
a waiver for S1S4.1.
Comment 15 Petr Jiricka 2003-04-22 16:49:11 UTC
*** Issue 33124 has been marked as a duplicate of this issue. ***
Comment 16 bendahl 2003-05-26 22:43:51 UTC
*** Issue 33911 has been marked as a duplicate of this issue. ***
Comment 17 Petr Jiricka 2003-11-12 17:12:28 UTC
*** Issue 37170 has been marked as a duplicate of this issue. ***
Comment 18 Petr Jiricka 2004-01-15 18:59:20 UTC
Fixed by removing the JSP compilation feature.
Comment 19 _ proxity 2004-01-16 10:10:24 UTC
What does this mean? You can no longer compile JSPs??
Comment 20 Petr Jiricka 2004-01-16 17:00:25 UTC
JSPs are compiled by the server when they are run on the server.
Instead of compiling JSPs in the IDE, you can use the "Validate"
action, which is much faster and more lightweight than compilation. It
catches almost all errors that compilation did. You can try this our
in the NB 3.6 dev builds, available from www.netbeans.org.
Comment 21 Patrick Keegan 2004-03-03 22:31:44 UTC
I guess for 3.6 we should release note the removal of the "compile
JSP" command. Chris, could you write a quick summary?
Comment 22 Chris Kutler 2004-03-04 16:46:02 UTC
Suggested Release Notes Entry

Validate JSP action replaces Compile JSP Action 

This version of the IDE provides a Validate action instead of a
Compile action. The Validate action detects all syntax problems except
for syntax errors that occur at translation time. These types of
errors are usually limited to files that contain embedded scriptlets.
Comment 23 Martin Schovanek 2004-09-07 16:00:33 UTC
v