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 19805

Summary: USABILITY: Attempting to execute Servlets and JSPs outside a web module give confusing messages
Product: javaee Reporter: jhoffman <jhoffman>
Component: CodeAssignee: _ rkubacki <rkubacki>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Error message when Executing or Debugging a Servlet that's not in a web module
Question dialog box when Executing or Debugging a JSP that's not in a web module

Description jhoffman 2002-01-25 23:58:41 UTC
Attempting to execute (or debug) a servlet that is not in a web module gives an error message:
"There are no web modules in the repository"

Attempting to execute (or debug) as JSP that is not in a web module gives a dialog:
"The object is not in a web module. Do you want to convert this file system to the web module?
Without this conversion the execution/debugging is not allowed." 
buttons: [OK] [Cancel]

These two situations should be identical and should follow the JSP model.  The message should be
worded in a more descriptive manner, such as:
"Execution and debugging of Servlets and JSPs is supported within a web module. Click OK to
convert the current filesystem into a web module. Alternatively, click Cancel and then move 
the JSP/Servlet objects into an existing web module."
Comment 1 jhoffman 2002-01-25 23:59:35 UTC
Created attachment 4431 [details]
Error message when Executing or Debugging a Servlet that's not in a web module
Comment 2 jhoffman 2002-01-26 00:00:14 UTC
Created attachment 4432 [details]
Question dialog box when Executing or Debugging a JSP that's not in a web module
Comment 3 Marek Grummich 2002-07-22 12:07:26 UTC
Set target milestone to TBD
Comment 4 Marek Grummich 2002-07-22 12:15:01 UTC
Set target milestone to TBD
Comment 5 jhoffman 2002-12-17 22:31:11 UTC
Perhaps we should only allow creation of servlets (by default) within
a web module, and provide a message to the user if they attempt to
create one outside a web module.  Same for JSPs.
Comment 6 _ rkubacki 2003-01-27 18:05:22 UTC
These cases *are* different. Automatic conversion to web module
doesn't work for servlets because we can't move them from <ssome_path>
to WEB-INF/classes/<some_path>. There will be likely related classes
and also it is dangerous if user has VCS.

My conclusion is to add better (and more consistent error messages)
and close this.
Comment 8 Jason Rush 2003-02-02 11:49:08 UTC
Verified in NetBeans dev build 200301310100.