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.
In issue 56280, if project name had multibyte (perhaps also extended ascii), the context root value for web app was seeded with this project name, but the app would not run; would not get deployed ok to AS. see that issue for details. The fix of that issue was to encode the context root name using the % notation for urls ie %E5%A4..... The issue with AS is that it itself does not allow context root with multibyte. That fix does not work but the symptoms are different than original bug so thats why this is being filed. This time, browser shows error page that it can't find the context root file (that is expressed as %E5%A4.... and its not clear if it actually deploys to server or not see gifs Workaround is to change context root to not use multibyte. If the solution to other issue can be fixed, it will still be better than not allowing user to use mbyte in project name at all, but can understand if we need to live with AS restriction. Also, maybe just stripping off the mbyte or assigning some unique ascii value to context root ? I don't know if our docs state that project name becomes context root name and thus user would expect it; I don't know if there is some standard for context root naming as per specs.
Created attachment 22533 [details] attachment2 [details]
Created attachment 22534 [details] attachment1 [details]a
attached is another gif of admin console of AS showing it seems that it feels this app is deployed, as can see by the actual mbyte. (I am assuming that what am seeing in gif is notation of what is deployed) other new gif shows view of nb of deployed web apps, and you can see the multibyte does not look all ok; I don't know if that is because of trying to display the % notation or some other reason like reading encoding of info sent back from AS. When I type this actual mbyte into browser, browser needs to change it itself to the %E5 ... notation and again get the error message page from AS so its not clear if this is just the limitation of AS and that even doing the fix using % notation helps.
Created attachment 22535 [details] attachement 2
Created attachment 22536 [details] attachment3 [details]
First, to scope the problem: If the user explicitly enters multibyte characters into context path we do not need to restrict that, we just want to prevent the situation when we generate a *default* context path that contains multibyte chars. Second, I think that we should let the user use multibyte chars in project name if it does not create other problems. Third, the project name is used as the default context path only for lack of a better unique identifier. The user can always modify the context path. We already replace space in project name with "_" when we create the default context path. The solution for multibyte characters is to replace them with some acceptable chars. In fact we do not need any fancy algorithm, any characters will do as this is just a default.
fixed, the multibyte characters are replaced with '_' http://web.netbeans.org/source/browse/web/project/src/org/netbeans/modules/web/project/Utils.java?r1=1.10&r2=1.11 http://web.netbeans.org/source/browse/web/project/src/org/netbeans/modules/web/project/WebProject.java?r1=1.89&r2=1.90 http://web.netbeans.org/source/browse/web/project/src/org/netbeans/modules/web/project/ui/wizards/ImportLocationVisual.java?r1=1.32&r2=1.33 http://web.netbeans.org/source/browse/web/project/src/org/netbeans/modules/web/project/ui/wizards/PanelConfigureProjectVisual.java?r1=1.15&r2=1.16 http://j2eeserver.netbeans.org/source/browse/j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/spi/J2eeModuleProvider.java?r1=1.48&r2=1.49
VERIFIED