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 21699 - USABILITY: Frustrating behavior when attempting to create servlet outside of a web module
Summary: USABILITY: Frustrating behavior when attempting to create servlet outside of ...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: -FFJ-
Hardware: All All
: P4 blocker (vote)
Assignee: Ana.von Klopp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-19 01:36 UTC by jhoffman
Modified: 2003-12-11 14:27 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jhoffman 2002-03-19 01:36:18 UTC
When creating a servlet outside of a web module using the new wizard, the
message "the specified package is not valid for use in a Java source file:
MDBWebApp.WEB-INF.classes" appears *after* the user clicks the "Finish" button
on the wizard.  The message should appear *instead* of the wizard, and should be
changed to say:

"The specified location <show full path here> is either not a web module, or is
not mounted at a web module root directory. The web module must be mounted at
the directory that contains the WEB-INF directory."

I think this message should have a help button which points to the "Developing
JSP and Servlet Files" topic.  This topic describes that a servlet/jsp must be
in a web module and has links to how to create a web module.
Comment 1 _ rkubacki 2002-03-19 11:05:37 UTC
We should allow to create servlet outside of web module too (if the
package name is correct). So the message is little bit misguiding. I
know that it guides you to use our prefered development model.

What about "The specified package is not valid for use in a Java
source file: <show full path here>. If you want to create a servlet
within web module the web module must be mounted at the directory that
contains the WEB-INF directory."

Also note that you may have similar problem when you create pure Java
source files using general Java templates.

Comment 2 jhoffman 2002-03-19 17:03:36 UTC
I would reword the message just a little, but otherwise I think 
it is OK.  The updated message is:

"It is not valid to create a Java source file in the specified 
package: <show full path here>. If you want to create a 
servlet, it must be created within a web module that is mounted 
at the directory containing the WEB-INF directory."

Also, the general behavior here (allowing the user to 
see/finish the wizard and then get an error that could have 
been shown before) is not acceptable usability and I consider 
it a bug.  If this can happen in other instances, then perhaps 
we need to file a bug on the Java module as well.  Please let 
me know what the scenario is that would cause this error when 
creating other Java classes.
Comment 3 _ rkubacki 2002-03-19 17:14:37 UTC
Try to create any class (Class / Main / Applet) in the same scenario.
Finish and Next are always enabled and you get warning that package
name is not valid when you try to use them. The difference is that
wizard remains open after this.
Comment 4 _ rkubacki 2002-03-20 08:28:03 UTC
Conclusion is: "It is not valid to create a Java source file in the
specified package: <show full path here>. If you want to create a
servlet within a web module, the web module must be mounted at the
directory containing the WEB-INF directory."

Comment 5 _ rkubacki 2002-03-20 08:59:33 UTC
http://web.netbeans.org/source/browse/web/core/src/org/netbeans/modules/web/core/jsploader/Bundle.properties.diff?r1=1.1.2.6.2.1&r2=1.1.2.6.2.2

fixed message in orion_fcs. Help button linked to right topic will be
added later (need to resolve cross module dependency).
Comment 6 Marek Grummich 2002-07-22 12:03:03 UTC
Set target milestone to TBD
Comment 7 Marek Grummich 2002-07-22 12:07:34 UTC
Set target milestone to TBD
Comment 8 Ana.von Klopp 2003-11-25 01:33:50 UTC
The issue Jeff describes has been addressed by a new UI. The developer 
can elect to place the servlet in a web module or in a directory, and 
specifies an FQN relative to that location. This means that files are 
placed either in WM/WEB-INF/classes or in the corresponding package 
under the mounted file system. The path part of the FQN is checked for 
validity. 

Any selected location that belongs to a file system will result in the 
servlet being placed in WEB-INF/classes. 
Comment 9 Ana.von Klopp 2003-11-25 01:34:18 UTC
Integrated on 11/24