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 31924 - I18N - Couldn't generate TagLib correctly with Japanese characters on Linux.
Summary: I18N - Couldn't generate TagLib correctly with Japanese characters on Linux.
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: -S1S-
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Milan Kuchtiak
Keywords: I18N, RELNOTE
Depends on:
Reported: 2003-03-12 09:14 UTC by hiroshiy
Modified: 2004-03-04 22:56 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

"attached file" is here. (4.36 KB, application/octet-stream)
2003-03-12 09:15 UTC, hiroshiy
Here is zipped rh72 environment. This issue ** IS ** re-appeared in rh72. (18.14 KB, application/octet-stream)
2003-03-17 01:45 UTC, hiroshiy
Here is zipped win2000 environment. This issue ** IS NOT ** re-appeared in win2000. (19.25 KB, application/octet-stream)
2003-03-17 01:46 UTC, hiroshiy
3 war files are in this zip. (12.33 KB, application/octet-stream)
2003-03-27 10:57 UTC, hiroshiy
Jar file is here. (3.65 KB, application/octet-stream)
2003-04-01 10:26 UTC, hiroshiy

Note You need to log in before you can comment on or make changes to this bug.
Description hiroshiy 2003-03-12 09:14:19 UTC
   In tag Library functions, generated tag library
works correctly
   in Solaris and Windows, even if we use Japanese
characters to
   Library Name or Tag Name.
   But on RedHat Linux, generated tag library does
not work correctly
   with Japanese characters.

  - RedHat Linux 7.2 japanese
      I've never seen same issue on solaris or
  - S1S nevada Build
      e.g. nevada B_030306
  - S1AS
      Bundled in S1S

To Reproduce 1:
   1. Create new Web Module.
   2. Create New Blank Tag Library (with Japanese
name) in Web Module.
        To switch "Extends Support Class" Option
to [TagSupport]
        at [Code Generation] Tab in [Add New Tag]
        Any other Options keep default.
   3. Create Tag in TagLib which has Japanese tag
   4. Create new "Tag Handler" in new empty
directory and compile it.
   5. Create "Tag Library Jar" and compile it.
   6. Create New JSP and set page directive and
taglib directive.
       e.g. <%@page contentType="text/html;
            <%@taglib uri="/XXXXXX" prefix="YYYYYY"%>
                XXXXXX and YYYYYY are Japanese
   7. Input Japanese tag in JSP content.
       e.g. <PREFIX:TAGNAME>
             PREFIX and TAGNAME are Japanese
   8. Compile JSP.
      Following error message is appeared in
Output Window.
        testjsp.jsp [-1:-1] File "/XXXXXX" not found
        Errors Compiling testjsp.

To Reproduce 2:
   1. Unzip attached "" and Deploy
unzipped "taglibrh72a.war"
      to S1AS in any environment.
        "taglibrh72a.war" contains taglib
environment from my
        redhat desktop.
        This issue is also re-appeared in solaris
or windows environment.
   2. Access to Deployed URL from browser.
   3. Execute "testjsp.jsp".
      Following error message is appeared in browser.
        testjsp.jsp [-1:-1] File "/xxxxxx" not found
        Errors Compiling testjsp.
Comment 1 hiroshiy 2003-03-12 09:15:37 UTC
Created attachment 9367 [details]
"attached file" is here.
Comment 2 hiroshiy 2003-03-12 09:38:36 UTC
Additional Informations:

  - In Linux environment, If I use only ascii characters
      to Library Name and Tag Name, Tag Library is generated
      And generated Library works correctly in any environments.

  - If I create war file which contains generated Japanese Tag
      Library on Linux,
      and I deploy war file to Solaris or Windows environment.
      Same issue is re-appeared.

  - If I create war file which contains generated Janaese Tag
      Library on Solaris or Windows, and I deploy to Linux environment.
      This issue is not re-appleared, even if I use Japanese
      characters to Library Name and Tag Name.
Comment 3 Keiichi Oono 2003-03-12 10:23:40 UTC
Add I18N keyword.
Comment 4 sgleason 2003-03-14 21:34:21 UTC
It seems that the tag library jar in WEB-INF/lib in the attached war
file is corrupted. Even WinZip won't open it. 
Comment 5 sgleason 2003-03-14 21:47:53 UTC
Another thing I notice is that if I change the name of the jar to be
englich, say "JNameJar.jar" then winzip will open it, and the IDE will
mount the jar. 

However, the jar does not have META-INF/taglib.tld in the jar.

There should be two tag library entries in the jar:
META-INF/taglib.tld and META-INF/<taglibname>.tld

Are you getting both tose entries when the tag library jar is being
generated on windows or solaris?

Comment 6 hiroshiy 2003-03-17 01:45:22 UTC
Created attachment 9417 [details]
Here is zipped rh72 environment. This issue ** IS ** re-appeared in rh72.
Comment 7 hiroshiy 2003-03-17 01:46:17 UTC
Created attachment 9418 [details]
Here is zipped win2000 environment. This issue ** IS NOT ** re-appeared in win2000.
Comment 8 hiroshiy 2003-03-17 01:47:54 UTC
Currently 2 zips are actually my environment.
I hope to re-appeared this issue in your test machine.

Usages of 2 zip files are commonly followings.
  - Unzip archive.
  - Mount unzipped 2 folders as local directory.
	"Taglib" folder is mounted as webmodule automatically.
  - Compile testjsp.jsp.
      Error is occurred in rh72, but error is not occurred in win2000.

Comment 9 sgleason 2003-03-17 17:32:54 UTC
In the jar in the linux environment attachment, I can get the 
application to run by changing the name of the jar to ascii, 
changing the taglib entry in the deployment descriptor (web.xml), and
then modifying the jsp to use that new name.

This, I believe, gives us a viable workaround, and allows us to lower
the priority of this bug. 

I will still try to find the cause of this one. 

In the meantime, my suggested workaround is as follows:
1. set the Jar File field in the tag library customizer to 
   an ascii name before generating the jar. I think tag names,
   attribute names, and prefixes can still be in Japanese. It seems
   only to be the jar name that is causing the problem. 
2. if the jar has already been generated, change its name to ascii, 
   and modify jsps and/or web.xml appropriately. 

Comment 10 psuk 2003-03-21 08:43:10 UTC
several questions that can help to isolate the problem:

1. Does the issue happen also if you start the application in external
standalone 4.0 Tomcat (without runing the IDE)? Do you see the same

2. Are you able to create the JAR file that creates problem without
using the IDE?
Comment 11 hiroshiy 2003-03-27 10:56:12 UTC
Hello All,

I am continuing following investigations.

  1. Create WAR file "with" IDE on Linux.
      (Japanese is included partially).
  2. Deploy WAR file to external tomcat "without" IDE.
  3. Restart tomcat "without" IDE.

Results are together with above "To Reproduce 2".

  - If I access to testjsp.jsp in war files, error messages
     are appeared in the browser.
     And, error messages are same as compiling by IDE.
  - If I deploy generated war files to another tomcat
     (e.g. windows or solaris), results are same.
  - War file which generated another environment (e.g. Windows or Solaris)
      are started correctly in Linux.

Details about created war files are followings.
   WarFileName    Library Name   Tag Name     JAR Name  
   taglib1.war    Japanese       Ascii        Ascii
   taglib2.war    Ascii          Japanese     Ascii
   taglib2.war    Ascii          Ascii        Japanese


I couldn't generate JAR file without IDE, now.
Could you suggest me about generating steps for JAR or useful URL?

Comment 12 hiroshiy 2003-03-27 10:57:11 UTC
Created attachment 9558 [details]
3 war files are in this zip.
Comment 13 sgleason 2003-04-01 02:02:31 UTC
to generate a jar for a tag library, do the following:

1. create your tld and tag handlers, compile the tag handlers. 
2. create a directory structured as follows:
       . META-INF
       .  .  <yourtaglib>.tld
       . <tag handler package>
       .  .   YourTag.class

3. cd <dir> ; jar cvf ../<yourtaglib>.jar .


Comment 14 hiroshiy 2003-04-01 10:25:15 UTC
Hello Simran,

Thank you for your suggestion.
I've verified your procedure in Linux Environment.
But, this issue was re-appeared.

My steps are followings.

 1. Create taglib and tag class "with" IDE.
 2. Create directory structure "without" IDE.
 3. Create jar file "without" IDE.
 4. Create webmodule and jsp for testing "with" IDE.
    And set jar file into "WEB-INF/lib".
 5. Compile jsp from IDE.
     Error has occurred.

I've also verified correctly same procedure in Win2000.
Compilation of jsp was successfully finished.

I attached zipped Jar file just after this procedure from Linux.

Comment 15 hiroshiy 2003-04-01 10:26:22 UTC
Created attachment 9620 [details]
Jar file is here.
Comment 16 Patrick Keegan 2003-04-03 16:06:28 UTC
Adding RELNOTE keyword. Simran, does the release note need 
any more info than the following?:

"When running on the IDE on Linux, tag libraries are not 
correctly generated if they contain Japanese characters."
Comment 17 Petr Jiricka 2003-12-05 10:26:45 UTC
Reassignint to Milan. I am not sure whether this can be fixed for
NetBeans 3.6 - no commitment can be made at this stage.
Comment 18 Ana.von Klopp 2003-12-05 21:57:48 UTC
If you see the issue on some platforms and not on others, it sounds 
like an encoding issue. With the old encoding styles (e.g. EUC) that 
only work for some languages, they often only work on some servers 
too. It's worth checking if this works if you change EUC-JP to UTF-8.
Comment 19 capSS 2004-01-21 12:15:47 UTC
In testjsp.jsp from attached you did not specify .jar 
extesion in taglib directive.
Probably this is the cause.
Comment 20 Milan Kuchtiak 2004-01-21 17:26:13 UTC
The JSP compilation action has been removed from 3.6.

As I understood, the issue reduced to the problem with JSP compilation
on Linux OS for Japanese file names packed in war file.

Now the behaviour should be the same as in standalone Tomcat5.

Could you please test the case again with 3.6 version and compare the
behaviour with behaviour in standalone Tomcat5. 

If there is still a problem in IDE, please reopen the issue.

Comment 21 mtsuruta 2004-01-27 05:19:26 UTC
I have verified for tag library, tag, and prefix using multibyte
chars(ja) name. Not able to execute jsp on current nb36 build using
c-locale and no tag libs, so called jsp via URL on browser and
displayed multibyte chars using tag library and tag which are created
on nb36 and named in multibyte chars.
Still necessary to check with same element named in multibyte chars
again after simple jsp execution becomes to be available, but
creation, compilation on ide, and execution on browser seems properly
working with multibyte-name tags.

With multibyte naming tag library, tag, and prefix,

  could not compile(veridate) jsp with following error.
        testjsp.jsp [-1:-1] File "/xxxxxx" not found
        Errors Compiling testjsp.
  - able to validate on ide with no compile error on nb36

  could not execute jsp on ide
  - Used .war file for linux and called jsp using URL on browser as
    the workaround.  
    Multibyte-char values which are detected by following elements
    are displayed properly.

(used following elements named in multibyte char)
tag library name(display name inclusive)
tag name(display name inclusive)
tag class name
package name for tag class

win2k and nb36 build01181900 - OK
linux and nb36 build01181900 - OK
sol9 and nb36 build01261900 - OK
(jsp execution using tomcat is not available with nb build040118,
040119, 040120(q-build), 040126(nb-trunk))
Comment 22 Patrick Keegan 2004-03-04 22:56:41 UTC
will not release note for 3.6; keeping RELNOTE there in case it's
still relevant for arrow