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 22263 - web module context root property should support more URI strings.
Summary: web module context root property should support more URI strings.
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: -FFJ-
Hardware: All Solaris
: P4 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-09 23:32 UTC by _ hlu
Modified: 2016-07-07 08:56 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 _ hlu 2002-04-09 23:32:59 UTC
Build 020408_1:

Current ide behavior:
1. leave context root empty is OK.
2. user cannot set context root as "/".
3. user cannot set context root as something like
mymapping. It has to be /mymapping. 

Here is what is expected behavior according to
Jeff Hoffman:
"I thought we decided to add the slash to the
beginning if the user 
didn't put it there.  I think 2 and 3 should be
acceptable in the UI and 
we should just do the right thing behind the
scenes.  I don't think 
there's a chance that the user would want "//" or
"//mymapping", so I 
should be able to enter "/" or empty (both mean
the same thing--root 
context), and I should be able to enter
"mymapping" or "/mymapping" 
(both mean the same thing--mymapping context)."
Comment 1 _ rkubacki 2002-04-10 08:55:48 UTC
Servlet2.3 spec chapter 4 The Request, paragraph SRV.4.4 Request Path
Elements

Context Path: The path prefix associated with the ServletContext that
this servlet is part of. If this context is the "default" context
rooted at the base of the web server's URL name space, this path will
be an empty string. Otherwise, if the context is not rooted at the
root of server namespace, the path starts with a "/" character but
does not end with a "/" character. 

It means that 2 and 3 are not valid.
Comment 2 jhoffman 2002-04-10 19:58:00 UTC
I don't want to argue the point against the spec.  You know the spec
and now I know the exact wording of the spec.  Also, the IDE should
know the spec to help the user in this case.  I'll accept that #2 is
invalid.  If I enter a "/", the fact that the IDE gives you a warning
is good.

However, I think it would be much friendlier if #3 was acceptable to
the IDE and that it adds the beginning slash when deploying the web
module.  The current behavior (showing a warning) is somewhat annoying
considering that the IDE can easily assist the user here.
Comment 3 _ rkubacki 2002-04-12 08:18:16 UTC
x
Comment 4 _ rkubacki 2002-05-17 12:23:36 UTC
Currently the issue is: if user sets context root to something that
doesn't starts with slash add this slash.

Should we notify user about this change in such case? If the message
is enough descriptive I'd rather close this as WONTFIX.
Comment 5 Milan Kuchtiak 2002-06-26 09:29:53 UTC
Currently the behaviour is little bit different than Radim 
writes - The message:"The URI string shouldn't start with 
slash character" is shown when user forgets to put slash at 
the beginning.

Now - according to the Jeff's sugesstion - the URI with 
missing initial slash is accepted and the slash is added 
then at the deployment time by the (Tomcat)plugin.

Fixed in Netbeans 3.4
Comment 6 Petr Jiricka 2002-07-10 10:58:38 UTC
The fix applied by Milan and the behavior after the fix is 
not acceptable. Now the user is allowed to enter URI which 
is not compliant with the specification, which is wrong. 
Furthermore, the actual URI used for deployment is not the 
same as the user sees in the property value, which will 
lead to user confusion. Finally, now all plugins (not only 
the Tomcat plugin !) are required to handle paths which 
are not spec.compliant, so this really amounts to an 
incompatible change in the SI APIs.

I suggest the fix should be to allow the user enter non-
compliant value, but change it in the text field,e.g. the 
user would enter 'mymapping' and the field would 
display '/mymapping'.
Comment 7 Marek Grummich 2002-07-22 12:12:53 UTC
Set target milestone to TBD
Comment 8 Marek Grummich 2002-07-22 12:23:31 UTC
Set target milestone to TBD
Comment 9 Martin Balin 2016-07-07 08:56:47 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss