[PATCH] improve I18N for admintool

2004-01-22 Thread Takashi Okamoto
Hi, 

Could you take this patch to improve admintool's I18N?

http://issues.apache.org/bugzilla/show_bug.cgi?id=25160

regargs,

Takashi Okamoto


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[PATCH] improve I18N and Japanese localization for admintool

2004-01-17 Thread Takashi Okamoto
Hi, 

I post patch to improve I18N and Japanese Localization for Admintool in Bugzilla:

http://issues.apache.org/bugzilla/show_bug.cgi?id=25160

But it isn't commited yet. Could you apply it?

regards,

Takashi Okamoto

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [PATCH] improve internationalization for admin tool

2002-08-12 Thread Takashi Okamoto

From: Takashi Okamoto <[EMAIL PROTECTED]>
Subject: [PATCH] improve internationalization for admin tool
Date: Mon, 12 Aug 2002 22:14:20 +0900 (JST)

> This is the second patch to internationalize the admin tools. First
> patch was commited by amy. New patch will improve at following point:

.. snip ...

> Could you apply this patch?

Oops, I posted wrong patch. Please ignore previous mail. The patch
which is attached this mail is right.

regards,

Takashi Okamoto



? webapps/admin/WEB-INF/classes/filters
Index: catalina/src/share/org/apache/catalina/core/StandardServer.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java,v
retrieving revision 1.30
diff -u -r1.30 StandardServer.java
--- catalina/src/share/org/apache/catalina/core/StandardServer.java 10 Jul 2002 
09:49:01 -  1.30
+++ catalina/src/share/org/apache/catalina/core/StandardServer.java 12 Aug 2002 
+12:32:15 -
@@ -71,6 +71,8 @@
 import java.beans.PropertyDescriptor;
 import java.io.File;
 import java.io.FileWriter;
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
 import java.io.InputStream;
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -742,7 +744,7 @@
 // Open an output writer for the new configuration file
 PrintWriter writer = null;
 try {
-writer = new PrintWriter(new FileWriter(configNew));
+writer = new PrintWriter(new OutputStreamWriter(new 
+FileOutputStream(configNew), "UTF8"));
 } catch (IOException e) {
 if (writer != null) {
 try {
@@ -1916,6 +1918,7 @@
  Server server) throws Exception {
 
 // Store the beginning of this element
+writer.println("");
 for (int i = 0; i < indent; i++) {
 writer.print(' ');
 }
Index: catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java,v
retrieving revision 1.6
diff -u -r1.6 MemoryUserDatabase.java
--- catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java10 Feb 
2002 03:20:17 -  1.6
+++ catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java12 Aug 
+2002 12:32:15 -
@@ -506,11 +506,11 @@
 
 // Configure our PrintWriter
 FileOutputStream fos = new FileOutputStream(fileNew);
-OutputStreamWriter osw = new OutputStreamWriter(fos);
+OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF8");
 writer = new PrintWriter(osw);
 
 // Print the file prolog
-writer.println("");
+writer.println("");
 writer.println("");
 
 // Print entries for each defined role, group, and user
Index: webapps/admin/WEB-INF/web.xml
===
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/admin/WEB-INF/web.xml,v
retrieving revision 1.13
diff -u -r1.13 web.xml
--- webapps/admin/WEB-INF/web.xml   13 Jun 2002 23:43:03 -  1.13
+++ webapps/admin/WEB-INF/web.xml   12 Aug 2002 12:32:16 -
@@ -11,6 +11,25 @@
 Tomcat HTML based administration web application.
   
 
+  
+  
+Set Character Encoding
+filters.SetCharacterEncodingFilter
+
+  encoding
+  UTF8
+
+  
+
+
+  
+  
+Set Character Encoding
+/*
+  
+
+
   
   
 action



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


[PATCH] improve internationalization for admin tool

2002-08-12 Thread Takashi Okamoto

Hi tomcat, (especially amy)

This is the second patch to internationalize the admin tools. First
patch was commited by amy. New patch will improve at following point:

+ store file with utf-8 encoding and add encoding='utf-8' at
  xml header.

+ use filter servlet to decode post and get parameters.
  (you have to include SetCharacterEncodingFilter in admin web
   application with this patch)

Could you apply this patch?

regards,


Takashi Okamoto


diff -uNr 
orig/jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/core/StandardServer.java
 
jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/core/StandardServer.java
--- 
orig/jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/core/StandardServer.java
   Wed Jul 24 00:06:44 2002
+++ 
+jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/core/StandardServer.java
+Sun Aug  4 00:18:37 2002
@@ -71,6 +71,8 @@
 import java.beans.PropertyDescriptor;
 import java.io.File;
 import java.io.FileWriter;
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
 import java.io.InputStream;
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -742,7 +744,7 @@
 // Open an output writer for the new configuration file
 PrintWriter writer = null;
 try {
-writer = new PrintWriter(new FileWriter(configNew));
+writer = new PrintWriter(new OutputStreamWriter(new 
+FileOutputStream(configNew), "UTF8"));
 } catch (IOException e) {
 if (writer != null) {
 try {
@@ -1916,6 +1918,7 @@
  Server server) throws Exception {
 
 // Store the beginning of this element
+writer.println("");
 for (int i = 0; i < indent; i++) {
 writer.print(' ');
 }
diff -uNr 
orig/jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java
 
jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java
--- 
orig/jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java
  Wed Jul 24 00:06:44 2002
+++ 
+jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java
+   Sun Aug  4 01:09:29 2002
@@ -506,11 +506,11 @@
 
 // Configure our PrintWriter
 FileOutputStream fos = new FileOutputStream(fileNew);
-OutputStreamWriter osw = new OutputStreamWriter(fos);
+OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF8");
 writer = new PrintWriter(osw);
 
 // Print the file prolog
-writer.println("");
+writer.println("");
 writer.println("");
 
 // Print entries for each defined role, group, and user



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Re: [PATCH] about kjc

2001-12-05 Thread Takashi Okamoto

At Sun, 2 Dec 2001 15:19:05 -0800 (PST),
Craig R. McClanahan <[EMAIL PROTECTED]> wrote:
> I looked at this option a little bit a while back, and have only one
> concern -- multiple threads trying to compile at the same time.  Ant tasks
> generally assume that they don't need to worry about thread safety issues,
> so we need to review this code carefully. (Of course, this issue applies
> even more so to the "new" Javac entry point in 1.4 -- it writes error
> messages to System.out).

Well, I refered org.apache.tools.ant.taskdefs.compilers.Javac13.java

Class c = Class.forName ("com.sun.tools.javac.Main");
Object compiler = c.newInstance ();
Method compile = c.getMethod ("compile",
new Class [] {(new String [] {}).getClass ()});
int result = ((Integer) compile.invoke
  (compiler, new Object[] {cmd.getArguments()})) .intVal
ue ();

So, above code shows that compiler output messages to System.out. Some
of other compilers are same as Jikes13.java. They are thread-unsafe.
They should be locked.

Takashi Okamoto

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: [PATCH] about kjc

2001-12-01 Thread Takashi Okamoto

Hi, Costin.

At Sat, 1 Dec 2001 09:24:59 -0800 (PST),
<[EMAIL PROTECTED]> wrote:
> +1 for the patch, but there's something that bothers me - we are starting
> to duplicate what's already present in ant. Next we'll have gcj support,
> etc.
> How difficult would it be to add an 'ant' compiler adapter, that will just
> use the ant  task ? 

Of cource, using ant is better:) It's good idea.
It seems not so difficult. You can use Javac or CompilerAdapterFactory
(and Compiler Adapter) class for it.

> And also use the same ant mechansim, a global property - it's
> possible other tools will need a compiler ( what is cocoon doing ? )
> ?

I don't know recent Cocoon. But cocoon 1.8.x was using just tomcat's
JavaCompiler;)

> This would also allow to automatically compile servlets ( the same
> as jsps are compiled ),

Resin has it already. It's very useful:)

thanks.

Takashi Okamoto

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




[PATCH] about kjc

2001-12-01 Thread Takashi Okamoto

Hi, tomcat users and developrs!

/* I have post this patch twice. This is third time. */

Do you know kjc which is one of the completely opensource Java
compiler? If not, you can see detail at http://www.dms.at/kopi.

Accoding to Edouard G. Parmelan's report
(http://rpmfind.net/tools/Kaffe/messages/1291.html), KJC HAVE BEATEN
SUN'S JAVA COMPILER since version 1.5 about JLS compatibility. It was
a grate news for Java open source community;)

I and teik-san (san means Mr. in Japanese) wrote two kjc plugin for
tomcat. One is for 3.3.x, and the other is for 4.0.x. If you take kjc
plugin, it's good advertisement and help for kjc. Do you respect
opensource? If so, could you take them? 


BTW, kjc is distributed under GPL. But you can take these patch in
legal. Because you don't need to include kjc in tomcat. When you want to
use kjc, only then you have to include it. In the fact, I wrote kjc
plugin for Ant and it's really in it. So, you can also use kjc with
Ant fine:)

PS.
usage for tomcat 4.0.x:
download kjc.jar from http://www.dms.at/kopi and include it in
common/lib. 

add specify jspCompilerPlugin at web.xml. For examples.

  
jsp
org.apache.jasper.servlet.JspServlet

  logVerbosityLevel
  WARNING


  jspCompilerPlugin
  org.apache.jasper.compiler.KjcJavaCompiler

3
  


Cheers for opensource!!
-
Takashi OkamotoDebian Project: http://www.debian.org/
[EMAIL PROTECTED]Ja-Jakarta Project: http://www.ingrid.org/jajakarta/
   GnuPG: 8B37 1FE6 76B2 7BA6 D59A  9BF7 E7F4 46C8 5293 6E17




KjcJavaCompiler.java.3.3
Description: Binary data


KjcJavaCompiler.java.4.0
Description: Binary data





--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


[PATCH]JSP compiler plugin for GPLd Java compiler

2001-10-04 Thread Takashi Okamoto
Hi, tomcat.

I wrote JSP compiler plugin for kjc which is open source Java
compiler (see http://www.dms.at/kopi/ for more detail). This plugin
works with tomcat 4.0. You can see TC4.0 example JSPs with this
plugin.

I have posted 3.2 versions already though you didn't take it.
If someone is interested in kjc, please try this patch.

BTW, I'll quit this ml soon. If you have a question or a suggestion about
this,  please forward me
([EMAIL PROTECTED]).

regards.
----
Takashi Okamoto
 KjcJavaCompiler.java


Re: [PATCH] compiler plug-in for kjc

2001-06-16 Thread Takashi Okamoto

At Sat, 16 Jun 2001 14:20:19 -0700 (PDT),
Craig R. McClanahan <[EMAIL PROTECTED]> wrote:
> Ugh, "GPL" is not going to be popular here.  Not so much because
> Apache folks wouldn't like to use it, but because the GPL folks
> consider the two licenses to be incompatible (read Stallman
> et. al. for the gory details).

Sure, I know. My mean is not distributing tomcat with kjc. I want to
give a chance to use tomcat with kjc for users.

> Any chance the KJC folks would consider distributing this under a BSD-like
> license?

I can't say certainly but you don't have such a chance because GPL is
too tough for opensource. But user can use tomcat with kjc freely
(ex. apache needs glibc on Linux) though you can not distribute tomcat
with kjc. 

BTW, I forgot attach the patch because I was too heating up to do it;)
Now I am sure to attach it which was just modified
SunJavaCompiler.java and it should be distrebuted under Apache
Software License;)

Takashi Okamoto 


 KjcJavaCompiler.java





[PATCH] compiler plug-in for kjc

2001-06-16 Thread Takashi Okamoto

Hi, tomcat guys!

I implemented compiler plug-in for KJC Java Compiler. KJC has high
compatibility about Java Language Specification that is repotred to
kaffe-ml by Edouard G. Parmelan (see bibliography end of this
mail). Believe it or not, KJC beats SUN's Java Compiler in JLS. I have
been believing that integrating various opensources bring their
software to good way, and wrote kjc plugin for tomcat (I also wrote
kjc plug-in for ant). I hope tomcat won't become only RI of JSR, but
also RI of Java opensources though I don't know how you feel about
this

Well, I attached a patch. I tested it with only tomcat 3.2.2. But it
may work with tomcat 4.x.(I haven't confirmed yet)

But I must give you a CAUTION that recent stable kjc release
(kjc-1.5A) doesn't work with tomcat because encoding option isn't
supported yet. Although I wrote a patch about this problem for kjc and
it was commited already. Tomcat will work fine with next kjc
release. Well, you may want to test it soon, but compiling kjc from
CVS isn't so easy. So, I provide compiled kjc at following URL:

  http://www21.freeweb.ne.jp/computer/torakun/java/kjc-i18n.jar

You can pick it up freely. It is distributed under GPL. 

One more thing, we can integrate kjc for Coccon by same approach.
If anyone is interested in it, could you implement it?

Cheers.


bibliography:

[KOPI Project]
http://www.dms.at/kopi/

[Edouard G. Parmelan's report]
http://rpmfind.net/tools/Kaffe/messages/1291.html

PS.
Tomcat 3.2.2 Debian package is released. You can do 
'apt-get install tomcat' if you use unstable or testing Debian.
---
 ^^ Takashi Okamoto 
= ..=   Debian Project  http://www.debian.org/
 -o-  Key fingerprint:
8B37 1FE6 76B2 7BA6 D59A  9BF7 E7F4 46C8 5293 6E17



Re: Proposal for implementation of lookup of localized web-resources

2001-03-15 Thread Takashi Okamoto

Hi!!

From: "Arieh Markel" <[EMAIL PROTECTED]>
> Assume locale in request is: fr_CA
> Assume locale of where tomcat is set: en_US
>
>
>requested path
>
>   /dir/.../index.html
>
>file-based: (path/[locale].filetype)
>
> 1. /dir/.../index_fr_CA.html
> 2. /dir/.../index_fr.html
> 3. /dir/.../index_en_US.html
> 4. /dir/.../index_en.html
> 5. /dir/.../index.html
>
>
>docbase-based: ([locale]/path/filename)
>
> 1. /fr_CA/dir/.../index.html
> 2. /fr/.../index.html
> 3. /en_US/.../index.html
> 4. /en/.../index.html
> 5. /dir/.../index.html

Did you read following apache URL?
http://httpd.apache.org/docs-2.0/content-negotiation.html

I think your proopsal is good. But unfortunately, your proposal will lose
compatibility with Apache.
Please rewrite your proposal.

regards.
--
Takashi Okamto




Re: serializing XML to a ServletOutputStream fails

2001-02-05 Thread Takashi Okamoto

From: "Michael Mealling" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, February 05, 2001 7:54 PM
Subject: Re: serializing XML to a ServletOutputStream fails

> P.S. I've also posted this problem to HotDispatch so if you
> can help me solve the problem you could get $50... ;-)

>response.setContentType("text/xml; charset=UTF-8");

Could you try following code instead of this?

   response.setContentType("text/xml; charset=8859_1");
-
takashi



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: [BUG & PATCH] for Kaffe VM

2000-12-28 Thread Takashi Okamoto

Hi, Tomcat developers.

> > I found problem that tomcat 3.2-b8 doesn't work on Kaffe VM.
> > (probably 3.2 final is same)
> > Error occurs at read() method in java.io.BufferedInputStream.

I had a contact to Edouard  who is one of Kaffe VM developer.
He said Tomcat should be fixed.

I forward him mail.
Please fix this problem.

If tomcat don't work on Kaffe VM,Tomcat can't be included Debian main
package
because JDK and JRE isn't free software.


Regards.
- mail form Edouard --
Takashi Okamoto wrote:

> > Could you test the following changes:
> >
> > In methods read() and skip() of java.io.BufferedInputStream, change test
> > pos == buf.length
> > by
> > pos == buf.length || pos >= count
> >
> > and say me if it work.
>
> It's good. Tomcat worked.

Well, I think others methods may not work too (available, mark, reset).

As BufferedInputStream constructor initialize pos, count and markpos, I
think it's a org.apache.tomcat.util.RecycleBufferedInputStream bug.

If setInputStream() and reclycle() do the RightThinkTM, I hope that
Tomcat will work with unmodified Kaffe and GNU Classpath
BufferedInputStream class.

Try the following changes and use unmodified BufferedInputStream.  If
Tomcat then work, could you fill a bug report to Tomcat team ?

public void setInputStream( InputStream is ) {
this.in = is;
this.pos = this.count = 0;
this.markpos = -1;
}

public void recycle() {
this.in = null;
this.pos = this.count = 0;
this.markpos = -1;
}

Hope this help.
--
Edouard G. Parmelan
http://egp.free.fr

-
Takashi Okamoto





Re: [BUG? & PATCH] for Kaffe VM

2000-12-27 Thread Takashi Okamoto

> I found problem that tomcat 3.2-b8 doesn't work on Kaffe VM.
> (probably 3.2 final is same) 
> Error occurs at read() method in java.io.BufferedInputStream.

> # Maybe it's Kaffe VM's problem.(which has problem?)

Kaffe developer resolved this problem in Kaffe VM.
We won't need following patch for next Kaffe release.

*** RecycleBufferedInputStream.java.org Sat Dec  9 02:35:35 2000
--- RecycleBufferedInputStream.java Sat Dec  9 02:35:57 2000
***
*** 73,83 
--- 73,85 
  public void setInputStream( InputStream is ) {
   this.count=0;
   this.in=is;
+  this.pos=0;
  }
  
  public void recycle() {
   this.in=null;
   this.count=0;
+  this.pos=0;
      }
---
Takashi Okamoto




[BUG? & PATCH] for Kaffe VM

2000-12-10 Thread Takashi Okamoto
Hello, developers.

I found problem that tomcat 3.2-b8 doesn't work on Kaffe VM.
(probably 3.2 final is same) 
Error occurs at read() method in java.io.BufferedInputStream.
If you apply this patch to RecycleBufferedInputStream.java,
it will work collectly on Kaffe VM.

But I don't know this cause in detail.
Please check following patch.

# Maybe it's Kaffe VM's problem.(which has problem?)

Regards.


PS.
Now Kaffe VM needs SUN JDK's classes for JSP.
I found code for jikes compiler, but it does not work yet...
----------
Takashi Okamoto


*** RecycleBufferedInputStream.java.org Sat Dec  9 02:35:35 2000
--- RecycleBufferedInputStream.java Sat Dec  9 02:35:57 2000
***
*** 73,83 
--- 73,85 
  public void setInputStream( InputStream is ) {
   this.count=0;
   this.in=is;
+  this.pos=0;
  }
  
  public void recycle() {
   this.in=null;
   this.count=0;
+  this.pos=0;
  }


Re: tomcat for Debian [RPM for jakarta/xml apaches projects]

2000-12-04 Thread Takashi Okamoto

> I didn't know much about debian packaging but there is a tool, alien,
which
> convert from RPM to dpkg.

Alien isn't complete.
Because policies are different between Redhat and Debian.

Stefan is prepareing tomcat package for Debian.
Check here.
http://master.debian.org/~sgybas/tomcat/
------
Takashi Okamoto