Good day

2005-07-07 Thread arieh . markel
The message cannot be represented in 7-bit ASCII encoding and has been sent as 
a binary attachment.



Norton AntiVirus Deleted1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Good day

2005-07-07 Thread arieh . markel
The message cannot be represented in 7-bit ASCII encoding and has been sent as 
a binary attachment.



Norton AntiVirus Deleted1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Tomcat Admin Web Interface

2001-06-14 Thread Arieh Markel

And following on this topic.

Following brief conversations during JavaOne with Craig, Costin, Remy,
I began thinking of developing some code (base in my past experience in
embedding Tomcat and subsequently 'advertising' my container through Jini)
that would allow to 'publish' the existence of Tomcat instances in
distributed environments.

The list of APIs that this could apply to includes but is not limited
to:
Jini - would allow to have an RMI-based administrative interface
SLP - to expose a service interface through the Service Locator
Protocol
JXTA - similar to the above, using the JXTA infrastructure and APIs

>From the perspective of my own experience, I have an initial implementation
of the first one (the one for the StorEdge embedding of Tomcat), while the
two others would force to develop a lot more code, since the support
infrastructure is not there yet (for JXTA at least, to my understanding).

--

In any case, if such contributions are deemed useful, there would be
a need to define the administrative service interface that Tomcat
requires, to be implemented by the Jini/JXTA/SLP service(s).

--

What do you think ?

Arieh

PS - I forgot to mention a J2EE interface to manage Tomcat, which
 probably fits the view of those in the J2EE world.

> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> X-Sender: craigmcc@localhost
> To: [EMAIL PROTECTED]
> Subject: Re: Tomcat Admin Web Interface
> 
> 
> 
> On Thu, 14 Jun 2001, M B wrote:
> 
> > Hello All,
> > 
> > In response to the recent postings regarding Tomcat
> > documentation and administration (Re: ~rant~ Docs,
> > user list, etc.), I am willing to contribute much
> > effort in this area.  In addition to documentation, I
> > am particularly interested in helping to build an
> > administrative web interface for Tomcat 4.0, something
> > similar to JRun Management Console, for example.
> > 
> 
> That would be awesome!
> 
> > Naturally, I want to coordinate my efforts with the
> > Tomcat community.  Can anyone please point out where I
> > should begin, or who I should contact?  Is there a
> > project for this?  The Catalina TODO identifies John
> > Shin as volunteer for producing an admin interface,
> > but I thought I should email this list before
> > contacting him directly.  
> > 
> 
> He volunteered long, long, ago but I haven't heard anything from him
> lately.
> 
> As it happens, I've been accumulating a list of functional requirements
> for admin capabilities that I'd like to post for discussion.  I'll be
> finished with what I'm thinking in the next couple of days.
> 
> What I'd like to see us do on issues like this is to discuss and agree on
> a functional specs document that is checked in to the CVS repository, and
> then start working together on the pieces.  It's a little more formal than
> the usual :-) open source approach, but I think it will help in the long
> run.  Does that sound like a useful plan?
> 
> > Thanks,
> > Matt
> > 
> 
> Craig

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




RE: [VOTE] Final release of Tomcat 3.2.2

2001-05-18 Thread Arieh Markel


Great job.

See you at JavaOne.


-
 
 Vote to release the tomcat_32 branch as Tomcat 3.2.2.
 
 [X] +1.  I agree with the proposal and I will help support
  the release.
 [ ] +0.  I agree with the proposal but I will not be able
  to help support the release.
 [ ] -0.  I don't agree with the proposal but I won't stop
  the release.
 [ ] -1.  I disagree with the proposal and will explain my
  reasons.

Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: FW: Java World Editors' Choice Awards

2001-05-14 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Delivered-To: mailing list [EMAIL PROTECTED]
> User-Agent: Microsoft-Entourage/9.0.1.3108
> Subject: FW: Java World Editors' Choice Awards
> From: Jon Stevens <[EMAIL PROTECTED]>
> To: tomcat-dev <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> 
> I'm totally amazed no one from here has responded to Scott yet (especially
> you Sun people).
> 
> Come on people, please get in touch with him.

For what is worth, (having contributed some code to TC 3.2)
I will be at JavaOne during that week.

Is anybody else going to be present there ?

Arieh

> 
> -jon
> 
> -- Forwarded Message
> From: [EMAIL PROTECTED]
> Date: Mon, 14 May 2001 11:13:13 -0700
> To: [EMAIL PROTECTED]
> Subject: Java World Editors' Choice Awards
> 
> Jon,
> 
> I haven't heard from anyone yet. Can you represent Tomcat at the ceremony?
> It'll be on Tuesday evening , June 5, here in San Francisco. Up to four
> people can attend. If yes, would you send me your contact information, as
> outlined in the email below?
> 
> Regards,
> Scott
> 
> - Forwarded by Scott Plamondon/ITWORLD on 05/14/2001 11:13 AM -
>
> Dear Jakarta Project,
> 
> Congratulations! JavaWorld has selected Jakarta Project's Tomcat 3.2 as a
> finalist in the Most Innovative Java Product category of our Editors'
> Choice Awards.
> 
> Established in 1997, the awards recognize those innovative companies,
> organizations, and individuals committed to developing new Java tools and
> technologies that drive the platform forward. More than 100 products and
> technologies were nominated by vendors, readers, as well as JavaWorld
> editors and writers. We'll publish the complete list of finalists in each
> category by 5 p.m. PDT on Friday, May 4 (go to:
> http://www.javaworld.com/jw-05-2001/jw-0504-finalists.html).
> 
> As a finalist, members of your product team will be invited to attend
> JavaWorld's Editors' Choice Awards ceremony at the JavaOne Conference and
> Expo from June 4-8 in San Francisco, where a winner in each category will
> be announced. Invitations to the ceremony, with the date and location, will
> be mailed in mid-May.
> 
> With that in mind, I need to confirm your organization's contact
> information. Please let me know to whom we should send the invitation at
> your earliest convenience:
> 
> Contact Name:
> Title:
> Product Name:
> Address:
> City, State, Zip:
> Phone:
> Email:
> 
> If you have any questions, please don't hesitate to email me at this
> address or call 415-975-2651.
> 
> Regards,
> 
> Scott Plamondon
> Senior Editor
> JavaWorld
> [EMAIL PROTECTED]
> 415-975-2651
> 
> 
> 
> 
> -- End of Forwarded Message

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: Solaris Sparc Performance Problem

2001-04-24 Thread Arieh Markel

Here is what I would do to see the differences:

. on Solaris, run the application through truss

. on Linux, run the application through strace

This should yield information about where the time is being spent.

I am also wondering whether the Solaris machine is properly configured
with regards to things like nameserver lookups, proxy setups, etc.

Arieh

> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: [EMAIL PROTECTED] (Douglas E. Hornig)
> Subject: Solaris Sparc Performance Problem
> To: [EMAIL PROTECTED]
> Content-Disposition: inline
> X-MIME-Autoconverted: from quoted-printable to 8bit by amon.Central.Sun.COM id 
LAA19808
> 
> I posed this problem to the good folks on the users list.  While they are a 
great bunch, and several offered some suggestions, I was unable to get any help 
from them so I'm trying the dev list now.
> 
> The problem in a nutshell is that requests I make to tomcat running on a 
Solaris Sparc from a Windows client take at least 0.15 to 0.20 seconds.  If I 
run tomcat on a Linux PC, or use a Linux PC as a client instead of Windows, the 
turnaround time is more like 0.01 seconds.
> 
> Here are the particulars:
> 
> * All machines are on the same 100Mbit ethernet.
> * Tomcat is running standalone.
> * I tried a couple of different Sparcs, a 420R and an Ultra 5, neither with 
any load.  No difference.
> * I wrote a simple Java program to use as the test client so there are no 
browsers involved.
> * I tried various different Java VM releases on the Sparcs, 1.2.1 and 1.3.0 
with no difference seen.
> * I tried a couple different PCs (NT4 and Win2000) and found the same results.
> * Other programmers here reported slowness using VisualBasic as the client 
instead of Java (that's how I got started investigating this).  Java Web Server 
2.0 also appeared to have the same problem as tomcat.  I have not personally 
been able to verify these assertions.
> * The results seem very repeatable.
> * I used a generic tomcat 3.2.1 for the server and hit the 
examples/servlet/HelloWorldExample URL for these tests.
> 
> This is a very serious problem for us.  The above mentioned VB client that 
we're developing can make dozens of calls to the server per screen, so those 0.2 
second delays add up.  I like Linux a lot myself but the bosses here feel more 
comfortable with more traditional business models, and besides shouldn't Java 
run best on a Sparc with Solaris?  I am perplexed as to what the problem is and 
would greatly appreciate any help or ideas I can get.
> 
> Thanks in advance,
> 
> Douglas Hornig
> Dartmouth-Hitchcock Medical Center
> Lebanon, NH

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: TC3.3 - building javadoc

2001-03-26 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: Mel Martinez <[EMAIL PROTECTED]>
> Subject: TC3.3 - building javadoc
> To: [EMAIL PROTECTED]
> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
> 
> Currently, when you run the build script (for TC 3.3),
> build.xml has 'dist' dependent on the 'javadoc'
> target.  The 'javadoc' target compiles javadoc pages
> for org.apache.tomcat.core and
> org.apache.tomcat.modules.*.
> 
> I dunno about you, but this seems insufficient for
> 'dist'.  Shouldn't the javadoc set for distribution
> include all or most of the packages?  
> 
> Also, it would probably be useful for dev
> documentation purposes to have some secondary javadoc
> targets like javadoc.tomcat.core',
> 'javadoc.tomcat.util', 'javadoc.tomcat.modules',
> 'javadoc.jasper', etc.  That way when you work on the
> javadocs for a package you can rapidly compile just
> that section.  This MIGHT encourage better documenting
> of code than is currently happening... :-)
> 
> Anybody else think this is a good (or bad) idea?

I think this is a good idea.

Here is a snipped of a modified generatedocs.sh script that I built to
create the javadocs (it is not updated but a snapshot of 3.3 at the time):

javadoc -verbose -sourcepath src/share -d 
/ws/sx1.0-tools/jakarta/v3.2-4/dist/jakarta-tomcat/doc/api -use -version -author 
-windowtitle "Jakarta/Java Servlet API Reference, v2.2" -doctitle "Jakarta/Java 
Servlet API Reference, v2.2" \
javax.servlet \
javax.servlet.http \
javax.servlet.jsp \
javax.servlet.jsp.tagext \
org.apache.jasper \
org.apache.jasper.compiler \
org.apache.jasper.runtime \
org.apache.jasper.servlet \
org.apache.tomcat.context \
org.apache.tomcat.core \
org.apache.tomcat.helper \
org.apache.tomcat.logging \
org.apache.tomcat.modules.server \
org.apache.tomcat.request \
org.apache.tomcat.service \
org.apache.tomcat.service.connector \
org.apache.tomcat.service.http \
org.apache.tomcat.session \
org.apache.tomcat.startup \
org.apache.tomcat.task \
org.apache.tomcat.util \
org.apache.tomcat.util.depend \
org.apache.tomcat.util.net \
org.apache.tomcat.util.pattern \
org.apache.tomcat.util.threads \
org.apache.tomcat.util.xml 

(the package list need to be updated).

Arieh
> 
> Mel
> 
> 
> __
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail. 
> http://personal.mail.yahoo.com/

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




RE: to trim or not to trim (was Re: cvs commit: jakarta-tomcat/sr c/share/org/apache/tomcat/util FileUtil.java)

2001-03-21 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: Larry Isaacs <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: RE: to trim or not to trim (was Re: cvs commit: jakarta-tomcat/sr 
c/share/org/apache/tomcat/util FileUtil.java)
> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
> 

> 
> The trim() was removed to fix a security vulnerability that can
> occur if the URL ends with ".jsp%20".  This results in the JSP
> being served statically.  See Bugzilla Bug #748.
> 
> Where would valid spaces or CRLF come from?  Perhaps we can look
> for a better place to trim them.  Doing this in patch() means
> that some portions of Tomcat will see a request that is
> technically different from what other portions see.

I will remove the 'trim()' call.

Arieh

> 
> Cheers,
> Larry
> 
> > 
> > Have you seen any problem with the current version ?
> > 
> > Other opinions ?
> > 
> > Thanks,
> > 
> > Arieh
> > 
> > > 
> > > Yoshiyuki Karezaki   [EMAIL PROTECTED]
> > 
> > --
> >  Arieh Markel   Sun Microsystems Inc.
> >  Network Storage500 Eldorado Blvd. MS 
> > UBRM11-194
> >  e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
> >  Pray for snow  Phone: (303) 272-8547 x78547
> >  (e-mail me with subject SEND PUBLIC KEY to get public key)
> > 

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




to trim or not to trim (was Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util FileUtil.java)

2001-03-21 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: Yoshiyuki Karezaki <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util 
FileUtil.java
> User-Agent: Wanderlust/2.4.1 (Stand By Me) Emacs/20.4 Mule/4.1 (AOI)
> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
> 
> Hi arieh,
> 
> In article ,
>   [EMAIL PROTECTED] wrote:
> |public static String patch(String path) {
> |   - String patchPath = path;
> |   + String patchPath = path.trim();
> 
> The fix of 1.9.2.6 becomes ineffective.
> trim() should be removed ?

Yoshiyuki,

Thanks for your comments.

Before I go ahead with reverting the code to what it was before.

Can you explain why the addition of trim makes the fix ineffective ?

The trim() protects from generating invalid paths that may result
from appended spaces.

Are you suggesting that we don't try to fix the possible existence of
appended spaces (or CR LF) ?

Have you seen any problem with the current version ?

Other opinions ?

Thanks,

Arieh

> 
> Yoshiyuki Karezaki   [EMAIL PROTECTED]

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: [TC3.2.2] Codebase frozen (was RE: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/request StaticInterceptor.java)

2001-03-19 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: "Marc Saegesser" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: [TC3.2.2] Codebase frozen (was RE: cvs commit: 
jakarta-tomcat/src/share/org/apache/tomcat/request StaticInterceptor.java)
> Importance: Normal
> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
> 
> You are correct, this should not have gone into the tomcat_32 branch.  The
> only things that should be commited to tomcat_32 are bug fixes for existing
> functionality.  Anything else should only be committed with the approval of
> the Release Manager (i.e. Me).  I'm going to review these changes to see if
> they will remain in the 3.2 code base or not.  Arieh, could you please
> supply some test cases and updated documentation?

I will do that shortly.

It is not clear to me how to automate the testing. The way I have been
testing is to use my browser, alternate to set different language
preferences and test that I am getting the right page according to
the language selected.

In any case, I will document how to test.

I will proceed with supplying the documentation.

Arieh

> 
> I had hoped to have released 3.2.2b2 by now, but I've been very busy with my
> day job and so have not had much time to devote to the release.  Things
> should be winding down now so I hope to be wrapping up the beta release
> shortly.  We're down to about 75 open bugs against Tomcat-3.  I'm still
> working through all of these to evaluate if they are real problems or user
> errors.  If they are real problems I'm making a determination of whether
> they should be fixed in 3.2.2 or differed.  The major decision criteria is
> specification compliance, but simple fixes to existing functionality are
> being made, too.
> 
> On a related topic.  Lots of the remaining Bugzilla issues have assigned
> owners.  The 3.2.2 release plan calls for all open issues to have a
> resolution other than NEW (e.g. FIXED, LATER, INVALID, ...).  If developers
> have time to update their assigned issues I would appreciate it.  If I make
> a change to one of your assigned items that you disagree with, please don't
> hesitate to contact me so we can work it out.
> 
> > -Original Message-
> > From: David Rees [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, March 17, 2001 12:16 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: cvs commit:
> > jakarta-tomcat/src/share/org/apache/tomcat/request
> > StaticInterceptor.java
> >
> >
> > On Fri, Mar 16, 2001 at 11:42:00PM -, [EMAIL PROTECTED] wrote:
> > > arieh   01/03/16 15:42:00
> > >
> > >   Modified:src/share/org/apache/tomcat/request Tag: tomcat_32
> > >         StaticInterceptor.java
> > >   Log:
> > >   Add support for docbase localization lookup.
> >
> > Maybe I'm missing something here, but should this have been committed
> > to the tomcat_32 branch when the code is frozen for 3.2.2?
> >
> > -Dave

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Question - Re: cvs commit: DefaultCMSetter.java

2001-03-16 Thread Arieh Markel

Just a question ...

> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> Delivered-To: [EMAIL PROTECTED]
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/context 
DefaultCMSetter.java
> 
> marcsaeg01/03/16 16:26:44
> 
>   Modified:src/share/org/apache/tomcat/context Tag: tomcat_32
> DefaultCMSetter.java
>   Log:
>   Use the default locale for generated error pages.
>   
>   Reported by [EMAIL PROTECTED] (Yoshiyuki Karezaki).
>   
>   PR:  691
>   Submitted by:   Kazuhiro Kazama
>   
>   Revision  ChangesPath
>   No   revision
>   
>   
>   No   revision
>   
>   
>   1.45.2.9  +20 -4 
jakarta-tomcat/src/share/org/apache/tomcat/context/Attic/DefaultCMSetter.java
>   
>   Index: DefaultCMSetter.java
>   ===
>   RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/context/Attic/DefaultCMSe
tter.java,v
>   retrieving revision 1.45.2.8
>   retrieving revision 1.45.2.9
>   diff -u -r1.45.2.8 -r1.45.2.9
>   --- DefaultCMSetter.java2000/11/11 02:56:57 1.45.2.8
>   +++ DefaultCMSetter.java2001/03/17 00:26:39 1.45.2.9
>   @@ -151,7 +151,11 @@
>public void doService(Request req, Response res)
>   throws Exception
>{
>   -   res.setContentType("text/html");// ISO-8859-1 default


Shouldn't the charset be according to the Locale and Charset of the
request that was passed ?

Arieh


>   +   String charset = LocaleToCharsetMap.getCharset(Locale.getDefault());
>   +   if (charset == null || charset.equalsIgnoreCase("ISO-8859-1"))
>   +   res.setContentType("text/html");
>   +   else
>   +   res.setContentType("text/html; charset=" + charset);
>
>   String requestURI = (String)req.
>   getAttribute("javax.servlet.include.request_uri");
>   @@ -226,7 +230,11 @@
>   return;
>   }
>
>   -   res.setContentType("text/html");
>   +   String charset = LocaleToCharsetMap.getCharset(Locale.getDefault());
>   +   if (charset == null || charset.equalsIgnoreCase("ISO-8859-1"))
>   +   res.setContentType("text/html");
>   +   else
>   +   res.setContentType("text/html; charset=" + charset);
>   res.setStatus( 500 );
>   
>   StringBuffer buf = new StringBuffer();
>   @@ -331,7 +339,11 @@
>   String msg=(String)req.getAttribute("javax.servlet.error.message");
>   String errorURI = res.getErrorURI();
>   
>   -   res.setContentType("text/html");
>   +   String charset = LocaleToCharsetMap.getCharset(Locale.getDefault());
>   +   if (charset == null || charset.equalsIgnoreCase("ISO-8859-1"))
>   +   res.setContentType("text/html");
>   +   else
>   +   res.setContentType("text/html; charset=" + charset);
>   // res is reset !!!
>   // status is already set
>   int sc=res.getStatus();
>   @@ -432,7 +444,11 @@
>
>   if( debug>0) ctx.log("Redirect " + location + " " + req );
>
>   -   res.setContentType("text/html");// ISO-8859-1 default
>   +   String charset = LocaleToCharsetMap.getCharset(Locale.getDefault());
>   +   if (charset == null || charset.equalsIgnoreCase("ISO-8859-1"))
>   +   res.setContentType("text/html");
>   +   else
>   +   res.setContentType("text/html; charset=" + charset);
>   res.setHeader("Location", location);
>
>   StringBuffer buf = new StringBuffer();
>   
>   
>   

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




RE: [VOTE] New Committer: Amy Roh

2001-03-16 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: GOMEZ Henri <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: RE: [VOTE] New Committer:  Amy Roh
> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
> 
> >That's what I've been telling Gomez in a private thread, we're 
> >going to meet later in April somewhere in the French alps with 
> >a BIG whiteboard...

If there is enough snow, make that:

riding (snow)boards over BIG white (stuff) ...

Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




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

2001-03-16 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: "Arshad Mahmood" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: Re: Proposal for implementation of lookup of localized 
web-resources
> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
> 
> 
> - Original Message -
> From: "Arieh Markel" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, March 16, 2001 3:00 PM
> Subject: Re: Proposal for implementation of lookup of localized
> web-resources
> 
> 
> >
> > > To: [EMAIL PROTECTED]
> > > Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
> > > Subject: Re: Proposal for implementation of lookup of localized
> > web-resources
> > > From: [EMAIL PROTECTED] (Kazuhiro Kazama)
> > > X-Dispatcher: imput version 2228(IM140)
> > >
> > > Arieh,
> > >
> > > Basically lookup of localized resources is welcomed. As I have
> > > evaluated your localization codes to 3.2, I write comments:
> > >
> > > 1, Your file-based naming scheme isn't compatible with apache
> > > MultiView function that David Rees and Takashi Okamoto says.
> > >
> > > Now apache naming scheme becomes popular in Japan. But almost nobody
> > > uses your naming scheme. It is unhappy that we must change all
> > > filename that is written by apache naming scheme.
> > >
> > > At the least, compatible option is needed.
> >
> > I don't think that my intent was to be compatible with Apache.
> >
> > My first goal was to be compatible with Java localization.
> >
> > The context in which I am using Jakarta is as an 'embedded' servlet
> > container inside of a Java application.
> 
> This is something which I am currently in need of for a project. The only
> reason I can see support for the Apache model is that the new mod_webapp
> connector I believe is structured so that static html is served by Apache
> and the dynamic side by tomcat, under these circumstances it would be better
> if they were both the same.
> 
> Having said that, my own preference for my current project is for a DocBase
> approach.

Arshad,

thanks for your comments.

The implementation does not enforce any default.

Initially, there are three optional lookup schemes:

a. no localization (do not set the localization attribute on
StaticInterceptor) - this is the default
b. docbase localization (set to "docbase")
c. file localization (set to "file")

As mentioned in a previous post, the mechanisms are in place to add
other localization schemes.

Arieh

PS: as an aside, I believe Apache would benefit with a docbase-like
localization scheme. The advantage is to preserve separation of
localized content (which makes it easier to manage, especially
when developing the content).
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




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

2001-03-16 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: "Takashi Okamoto" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: Re: Proposal for implementation of lookup of localized 
web-resources
> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
> 
> 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.

I am not aware that we have compatibility with Apache now.

>From my own perspective implementing exclusively apache localization
compatibility is actually 'bad'. Our deliverables are usually not apache
dependent/nor based. Out localization experts seek compatibility
with Java localization.


> Please rewrite your proposal.

No, I am not going to rewrite my proposal. I explain below how developers
interested on the apache scheme can implement it.

I 'scratched my own itch' with the proposal that I brought up. My own
itch does not include compatibility with Apache, it includes
compatibility with localization schemes in the Java world (the ones
I looked up are ResourceBundle and JavaHelp).

Given that the alternative is to choose from the below:

. use the current proposal as the basis, and extend to support
  all kinds of localization
. not have localization at all until someone implements exclusive
  apache localization

tell me which one you prefer.

---

As an aside, here is how apache compatibility can be achieved (I will
leave the implementation of apache-compatible localization as an exercise
to those who have that itch to scratch).

. the StaticInterceptor has the 'localization' attribute available.

  currently, 'file', 'docbase' are the options.
  
  Add a 'apache' option to the permissible values.
  
  On FileUtil, implement a:
  
getApacheLocalizedResource ()

  method
  
  On Context, add to the logic of 'getRealFile()' to handle 'apache'
  type localization, invoking the method in FileUtil.
  

Such a scheme will allow to add more different localization mechanisms
in the future.

---

So, what I proposed is the mechanism for introduction for various
localization lookup schemes, and to start from the set that I proposed.


Thanks for your comments.

Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




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

2001-03-16 Thread Arieh Markel


> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
> Subject: Re: Proposal for implementation of lookup of localized 
web-resources
> From: [EMAIL PROTECTED] (Kazuhiro Kazama)
> X-Dispatcher: imput version 2228(IM140)
> 
> Arieh,
> 
> Basically lookup of localized resources is welcomed. As I have
> evaluated your localization codes to 3.2, I write comments:
> 
> 1, Your file-based naming scheme isn't compatible with apache
> MultiView function that David Rees and Takashi Okamoto says.
> 
> Now apache naming scheme becomes popular in Japan. But almost nobody
> uses your naming scheme. It is unhappy that we must change all
> filename that is written by apache naming scheme.
> 
> At the least, compatible option is needed.

I don't think that my intent was to be compatible with Apache.

My first goal was to be compatible with Java localization.

The context in which I am using Jakarta is as an 'embedded' servlet
container inside of a Java application.

> 
> 2, In your file-based approach & docbase-approach, we can't specify
> charset of HTML files. It is desiable that charset will be supported
> in consideration of Content-Type header.

That is certainly an improvement that can be done.

> 
> 3, I think your file-based lookup don't work for JSP files by my
> experience (true?). But I hope you will support same localization for
> JSP files.

I believe it does.


Since you appear to be very experienced in areas of localization, it
would be very welcome if you proceeded to enhance the work that I
started.

Thanks for your comments.

Arieh

> 
> Kazuhiro Kazama ([EMAIL PROTECTED])   NTT Network Innovation Laboratories

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: [VOTE] New commiter - Casey Lucas

2001-03-16 Thread Arieh Markel

+1

Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




RE: Proposal for implementation of lookup of localized web-resour ces

2001-03-15 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: Mike Braden <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: RE: Proposal for implementation of lookup of localized web-resour ces
> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
> 
> It seems like this would be much more logical to manage
> multi-lingual sites, since each lang would be in it's
> own dir structure.
> 
> Of course, it also means that you would have to duplicate
> anything that is not lang dependent, such as images.
> (I assume that the doc-based locale would re-direct all
> requests???)

There is no need to duplicate things that do not to be language
dependent, since the lookup falls back to the non-locale-relevant
name.

For example,

request to get: /foo/foobar.gif
requestLocale:  fr_FR
fallbackLocale: en_US


lookup sequence:

using docbase scheme:

1. /fr_FR/foo/foobar.gif
2. /fr/foo/foobar.gif
3. /en_US/foo/foobar.gif
4. /en/foo/foobar.gif
5. /foo/foobar.gif

using filebase scheme:

1. /foo/foobar_fr_FR.gif
2. /foo/foobar_fr.gif
3. /foo/foobar_en_US.gif
4. /foo/foobar_en.gif
5. /foo/foobar.gif

There is also no need to change the contents of the links inside of the 
documents.

The localized resource lookup method is also exposed to developers so
that they can invoke obtaining the resource from within a servlet as well.

Arieh
        
> 
> Mike.
> --
> Mike Braden
> [EMAIL PROTECTED]
> 
> 
> -Original Message-
> From: Arieh Markel [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 14, 2001 10:19 AM
> To: [EMAIL PROTECTED]
> Subject: Proposal for implementation of lookup of localized
> web-resources
> 
> 
> We are about to release a product on which we include Tomcat 3.2.
> 
> Our testing and localization people have been banging at our product
> and come up with several remarks about how lookup for a localized
> resource (file: html, gif, javascript, etc) are being done.
> 
> I have in the past contributed localization code to the 3.2 code base.
> 
> I have received a couple of remarks from the localization people.
> 
> The current way that localization is done on the code I contributed
> to 3.2 was what I called 'file-based' lookup.
> 
> An alternative method that I implemented in our application (but have
> not contributed to Jakarta yet) is 'docbase-based' lookup.
> 
> Here is a brief overview of both mechanisms:
> 
> 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
> 
> 
> File-based lookup works in a manner similar to how ResourceBundle does.
> 
> Docbase-based lookup is similar to how JavaHelp organizes the files.
> 
> 
> 
> Implementation proposal:
> 
> a. create a class 'org.apache.tomcat.util.Localization' (for 3.x).
> 'org.apache.catalina.util.Localization' (for 4.x).
> 
> b. implement two static methods:
> 
>   public static String getLocalizedPathFileBased (
>   String dir, String path, Locale loc, Locale fbLoc)
>   
>   public static String getLocalizedPathDocBaseBased (
>   String dir, String path, Locale loc, Locale fbLoc)
> 
> 
> c. For 3.x:  in StaticInterceptor, add "localization" as a property
>with valid values of:
>   "file" "docbase"
>   
> d. For 4.x:  (I have just begun looking at the code yesterday - would
> appreciate some pointers from the 4.x experts of where the
> serving of resource is done)
> 
> 
> 
> Any opinions ?
> 
> Much of the code has already been written and has been tested.
> 
> 
> Arie

Proposal for implementation of lookup of localized web-resources

2001-03-15 Thread Arieh Markel

We are about to release a product on which we include Tomcat 3.2.

Our testing and localization people have been banging at our product
and come up with several remarks about how lookup for a localized
resource (file: html, gif, javascript, etc) are being done.

I have in the past contributed localization code to the 3.2 code base.

I have received a couple of remarks from the localization people.

The current way that localization is done on the code I contributed
to 3.2 was what I called 'file-based' lookup.

An alternative method that I implemented in our application (but have
not contributed to Jakarta yet) is 'docbase-based' lookup.

Here is a brief overview of both mechanisms:

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


File-based lookup works in a manner similar to how ResourceBundle does.

Docbase-based lookup is similar to how JavaHelp organizes the files.



Implementation proposal:

a. create a class 'org.apache.tomcat.util.Localization' (for 3.x).
  'org.apache.catalina.util.Localization' (for 4.x).

b. implement two static methods:

public static String getLocalizedPathFileBased (
String dir, String path, Locale loc, Locale fbLoc)

public static String getLocalizedPathDocBaseBased (
String dir, String path, Locale loc, Locale fbLoc)


c. For 3.x:  in StaticInterceptor, add "localization" as a property
   with valid values of:
"file" "docbase"

d. For 4.x:  (I have just begun looking at the code yesterday - would
  appreciate some pointers from the 4.x experts of where the
  serving of resource is done)
  


Any opinions ?

Much of the code has already been written and has been tested.


Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: Clarification on Catalina TODO item: CGI emulation servlet

2001-02-20 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: Martin T Dengler <[EMAIL PROTECTED]>
> User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; 0.7) Gecko/20010109
> To: [EMAIL PROTECTED]
> Subject: Re: Clarification on Catalina TODO item: CGI emulation servlet
> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
> 
> Craig R. McClanahan wrote:
> 
> > That was exactly the original thinking -- create a servlet that would be 
able
> > to execute external applications in conformance with the CGI spec 
requirements
> > (principally related to environment variables, and connecting standard input
> > and output of the application program to the request and response streams
> > appropriately.
> 
> Excellent.  I suppose the right thing to do now is propose a design to 
> this list with specification references for review.  If that is too 
> heavyweight I can just run the code by somebody (you, Craig?) after 
> testing on my own Catalina build.
> 
> > Having this functionality implemented as a servlet means that you can map it 
to
> > a directory path ("/cgi-bin/*") and/or a filename extension ("*.cgi"), in 
the
> > same way that you would do so in a web server.  Or, in a security conscious
> > environment, you could just remove the mappings to make CGI service
> > unavailable.
> 
> Exactly, and I suppose the directory path w/could obviously be web 
> app-specific, giving the normal encapsulation benefits.
> Would there be any scope for extra web-app-related information being 
> available in the spawned-process' environment, so it (the CGI) could 
> figure out the context path, etc.?

I am wondering if this will result on creating cgi-emulation
servlets that result in being platform-specific (initially, because of
the need of adapting differently to the manner in which the host's
environment variables need to be set, establishment of PATH,
probably there is more), or operate in a platform-specific manner.

(I am not aware of a Java API that allows to modify the external - host -
environment).


Arieh

> 
> 
> > That would be great!  I will sign you up for that item.
> 
> Thanks, I look forward to helping out; if I do something wrong please 
> let me know.
> 
> > 
> > Craig McClanahan
> > 
> 
> 
> Chrs,
> Martin
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


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




Re: Bugzilla categories

2001-02-05 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: [EMAIL PROTECTED]
> X-Sender: costin@costin
> To: [EMAIL PROTECTED]
> Subject: Bugzilla categories
> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
> 
> Hi,
> 
> What about another category - "Encoding" for all encoding-related bugs ?
> ( that would include all "special chars", charsets, etc). It's a big
> issue and I want to have all the related bugs grouped togheter.

I think that 'i18n' would be more appropriate.

Arieh

> 
> ( I'll work on them - but it's not easy and will take few weeks to sort it
> out )
> 
> -- 
> Costin
> 
> 
> -----
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


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




Re: [VOTE] Tomcat 3.3 Release Plan

2001-02-02 Thread Arieh Markel


<- Please return this portion with your vote ->

 Tomcat 3.3 Release Plan Ballot:

   [ ] +1I am in favor of this plan and will help
   [X] +0I am in favor of this plan, but am unable to help
   [ ] -0I am not in favor of this plan
   [ ] -1I am against this plan being executed, and my
 reason is:
<->


--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


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




RE: String/StringBuffer (was Re: An alternative to JSP)

2001-01-26 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: RE: String/StringBuffer (was Re: An alternative to JSP)
> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
> X-MIME-Autoconverted: from quoted-printable to 8bit by amon.Central.Sun.COM id 
KAA15483
> 
> > Last paragraph in the java.lang.String javadoc says:
> > 
> > The Java language provides special support for the string 
> > concatentation operator
> > ( + ), and for conversion of other objects to strings. String 
> > concatenation is
> > implemented through the StringBuffer class and its append 
> > method. String
> > conversions are implemented through the method toString, 
> > defined by Object and
> > inherited by all classes in Java. For additional information 
> > on string concatenation
> > and conversion, see Gosling, Joy, and Steele, The Java 
> > Language Specification. 
> 
> And the Java Language Specification (Section 3.10.5: String Literals) says
> this:
> 
> "Strings computed by constant expressions (§15.27) are computed at compile
> time and then treated as if they were literals"
> 
> http://java.sun.com/docs/books/jls/html/3.doc.html#101083
> 
> 
> > >   Just thought that I would point out that: 
> > > "My " + "dog " + "has " + "fleas." will be compiled as one String:
> > > "My dog has fleas." and incurs no runtime penalties.  In the case
> > 
> > Paul,
> > 
> > Actually, my investigations in the past have shown that (at least in
> > Sun's JDK 1.2) this is implemented as:
> > 
> > new StringBuffer 
> > ("My").append("dog").append("has").append("fleas").toString();
> 
> If this is actually the case, Sun's JDK is not in compliance with the spec.
> However, in my tests, this is not the case. 
> 
> From this class: 
> 
> public class StringTest {
>   static String blah = "My " + "dog " + "has " + "fleas.";
> }
> 
> The following is the result from "javap -c StringTest" after compiling:
> 
> Compiled from StringTest.java
> public class StringTest extends java.lang.Object {
> static java.lang.String blah;
> static {};
> public StringTest();
> }
> 
> Method static {}
>0 ldc #1 
>2 putstatic #5 
>5 return
> 
> Method StringTest()
>0 aload_0
>1 invokespecial #4 
>4 return
> 
> 

Michael,

thanks. I stand corrected.

Arieh

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

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


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




String/StringBuffer (was Re: An alternative to JSP)

2001-01-26 Thread Arieh Markel
 the
> > > paper and that I use
> > > in my own I-do-it-all work.
> > >
> > > Also there is nothing that requires these view
> > > methods to contain
> > > hardcoded strings, other than the crude measurements
> > > in the
> > > Conclusion section that makes me doubt that the
> > > space issue is a
> > > primary concern. Each method could aim MLS at an
> > > html file at runtime
> > > (using the doStream() method that it provides for
> > > this purpose but
> > > which I didn't mention in the article) and let it do
> > > the executable
> > > inclusion at runtime. But good point; I'll make this
> > > explicit in the
> > > article.
> > >
> > > This would also eliminate the need for the outermost
> > > enclosing {{...}}, but
> > > the executable inclusion brackets would remain. Do
> > > you object to my
> > > belief that html experts and their tools couldn't be
> > > trained to
> > > ignore the {{...}} wrappers around the html? I'd be
> > > interested in
> > > hearing more about this. After all, JSP has the same
> > > problem its <%=
> > > ... %> executable inclusion syntax.
> > >
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! Auctions - Buy the things you want at great prices.
> > http://auctions.yahoo.com/
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


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




Re: [PROPOSAL] Tomcat 3.3 Release Plan

2001-01-24 Thread Arieh Markel



Larry Isaacs wrote:
> 
> > -Original Message-
> > From: Sam Ruby [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 24, 2001 2:28 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PROPOSAL] Tomcat 3.3 Release Plan
> >
> >
> > Jon Stevens wrote:
> > >
> > > > It should be noted that when this plan comes up for a vote, a +1
> > > > by a committer will constitute a commitment not only to helping
> > > > with the release, but to provide maintenance support beyond the
> > > > release.
> > >
> > > I'm not sure that I agree with this. What if I want to state my
> > > approval, but don't want to help out?
> >
> > The consensus seems to be that in the context of a release
> > vote, a "+0"
> > means I agree but may not contribute, and "+1" means I agree
> > and will help.
> >
> > It looks like Larry is trying to keep up with the latest
> > proposal on the
> > jakarta mailing list, as maintained by Ted Husted.  Ted
> > originally tried to
> > make a case for a separate set of indicators for approval and
> > committed to
> > make it happen (his specific proposal was a "binding"
> > suffix), but that was
> > voted down in favor of the simpler -1/-0/+0/+1 scheme.
> >
> > Even though Ted's overall proposal hasn't been ratified, this
> > particular
> > provision makes sense to me as there was much concern
> > expressed over the
> > lack of support for previous releases.
> 
> My understanding it that the text "but to provide maintenance support
> beyond the release" is a requirement for this release.  Is this
> accurate?
> 
> If so, we may need a way to distinguish between those who are and
> aren't committing to maintenance.  Both of these +1's should be
> counted when comparing against -1's.  I wouldn't want to lose
> any potential +1's because they didn't want to commit to maintenance.
> Whether there are the 3 required committers for maintenance should
> be a separate issue.
> 
> Perhaps the vote should include voting for plan approval and a
> separate indication of willingness to do maintenance?

I like this.

+1 for plan approval
+0 for maintenance (may become +1 depending on workload).

Arieh
> 
> Cheers,
> Larry
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

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




Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/request SimpleMapper1.java StaticInterceptor.java

2000-12-12 Thread Arieh Markel

The fix is incorrect.

indexOf returns -1 when the substring is not found, not 0.

The way the current code is set forces wrong behavior.

It should be:

(relativePath.indexOf("/META-INF/") != -1) ||
(relativePath.indexOf("/WEB-INF/") != -1))

Arieh

> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> Delivered-To: [EMAIL PROTECTED]
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/request 
>SimpleMapper1.java 
StaticInterceptor.java
> 
> craigmcc00/12/11 09:52:31
> 
>   Modified:src/share/org/apache/tomcat/request Tag: tomcat_32
> SimpleMapper1.java StaticInterceptor.java
>   Log:
>   Fix a security vulnerability that would display the contents of sensitive
>   files when a URL like this was used:
>   
>   http://localhost:8080/examples//WEB-INF/web.xml
>   
>   This vulnerability appears on Linux (and any other OS that ignores "//" in
>   the middle of a pathname), but not on Windows.
>   
>   Submitted by: Ramon Cacha <[EMAIL PROTECTED]>
>   PR: BugRat Bug Report #565
>   
>   Revision  ChangesPath
>   No   revision
>   
>   
>   No   revision
>   
>   
>   1.15.2.4  +2 -2  
jakarta-tomcat/src/share/org/apache/tomcat/request/SimpleMapper1.java
>   
>   Index: SimpleMapper1.java
>   ===
>   RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/request/SimpleMapper1.java,v
>   retrieving revision 1.15.2.3
>   retrieving revision 1.15.2.4
>   diff -u -r1.15.2.3 -r1.15.2.4
>   --- SimpleMapper1.java  2000/12/01 03:00:41 1.15.2.3
>   +++ SimpleMapper1.java  2000/12/11 17:52:30 1.15.2.4
>   @@ -343,8 +343,8 @@
>requestURI.substring(contextPath.length()).toUpperCase();
>if (relativePath.equals("/META-INF") ||
>relativePath.equals("/WEB-INF") ||
>   -relativePath.startsWith("/META-INF/") ||
>   -relativePath.startsWith("/WEB-INF/"))
>   +(relativePath.indexOf("/META-INF/") != 0) ||
>   +(relativePath.indexOf("/WEB-INF/") != 0))
>return 404;
>
>   return OK;
>   
>   
>   
>   1.7.2.5   +3 -1  
jakarta-tomcat/src/share/org/apache/tomcat/request/StaticInterceptor.java
>   
>   Index: StaticInterceptor.java
>   ===
>   RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/request/StaticInterceptor.java,v
>   retrieving revision 1.7.2.4
>   retrieving revision 1.7.2.5
>   diff -u -r1.7.2.4 -r1.7.2.5
>   --- StaticInterceptor.java  2000/11/07 22:52:52 1.7.2.4
>   +++ StaticInterceptor.java  2000/12/11 17:52:30 1.7.2.5
>   @@ -418,7 +418,9 @@
>
>   String relPathU=relPath.toUpperCase();
>   if ( relPathU.startsWith("WEB-INF") ||
>   -       relPathU.startsWith("META-INF")) {
>   + relPathU.startsWith("META-INF") ||
>   +(relPathU.indexOf("/WEB-INF/") != 0) ||
>   +(relPathU.indexOf("/META-INF/") != 0) ) {
>   return null;
>   }
>   }
>   
>   
>   

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: [SECURITY] Security Vulnerabilities in Tomcat 3.1 and 3.2

2000-12-12 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022
> Subject: Re: [SECURITY] Security Vulnerabilities in Tomcat 3.1 and 3.2
> From: Jon Stevens <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> on 12/11/2000 5:59 PM, "Craig R. McClanahan" <[EMAIL PROTECTED]>
> wrote:
> 
> > I'm certainly game to remove 3.1 once we know that 3.1.1 doesn't introduce any
> > nasty
> > problems, but just removing 3.1 doesn't help all the thousands of people who
> > have
> > apps running on 3.1 and who cannot, for various reasons, immediately upgrade.
> 
> They can upgrade to 3.1.1 but not 3.2? Huh?

Yes, that is actually the situation.

I can tell you that in our application, the changes implied by moving from
3.1 to 3.2 were significant (we use Tomcat in an embedded manner, dynamically
incorporating servlets to contexts), mainly because there were implementation
differences in the APIs (for Contexts, facades, etc).

> 
> No, make people upgrade to 3.2. There are WAY to many advantages to having
> 3.2.

We cannot 'make people upgrade'. There are organizations that rely on
a certain revision of the software. The decision of upgrading or not is not
only hinged on the advantages but in the drawbacks (the time to regression-test
that the application still functions, the time to spend to verify that the
change is 'transparent', etc), therefore, there are going to be users that
will not upgrade to 3.2 but will be willing to move to 3.1.1.

I would argue that a move from 3.1 to 3.1.1 falls into the category of
transparent move, while not being able to say the same of moving from 3.1
to 3.2.

Arieh
> 
> -jon
> 
> -- 
> Honk if you love peace and quiet.
> 

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: Problem to limit the number of connections

2000-12-08 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> Delivered-To: moderator for [EMAIL PROTECTED]
> From: Sophie Lemonnier <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Problem to limit the number of connections
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> Hello,
> 
> I have a machine with little ressouces and with other applications than
> tomcat are running.
> Consequently, I would like to prevent too many clients to connect to
> tomcat...
> I haven't managed yet to limit the number of connections
> Can anyone help me?

Sophie,

you did not mention the version of Tomcat that you are using.

In any case, I believe that for 3.2, the solution is in properties for the
org.apache.tomcat.service.PoolTcpConnector class:

the properties below control the number of threads (which will be associated
with inbound socket connections) that the connector has.

public static final String THREAD_POOL = "thread_pool";
public static final String MAX_THREADS = "max_threads";
public static final String MAX_SPARE_THREADS = "max_spare_threads";
public static final String MIN_SPARE_THREADS = "min_spare_threads";

What you need to do is modify your server.xml to explicitly set the
property values that are appropriate for you:

(Here is an example from an old server.xml I was using)










Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




How to close a bug ? (was Re: BugRat Report #543 has been filed.)

2000-12-07 Thread Arieh Markel

I want to close this (543) bug.

I believe that this is not a bug (as I explained in the attached
message on which I replied to the bug filing).

I think I cannot close a bug on the bugrat database.

Can somebody do it for me ?

Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: BugRat Mail System <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: BugRat Report #543 has been filed.
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> Bug report #543 has just been filed.
> 
> You can view the report at the following URL:
> 
><http://znutar.cortexity.com/BugRatViewer/ShowReport/543>
> 
> REPORT #543 Details.
> 
> Project: Tomcat
> Category: Bug Report
> SubCategory: New Bug Report
> Class: swbug
> State: received
> Priority: high
> Severity: critical
> Confidence: public
> Environment: 
>Release: 3.2 Final
>JVM Release: Sun JDK 1.3.0-C
>Operating System: NT4
>OS Release: SP5
>Platform: intel
> 
> Synopsis: 
> calling getServletContext().getRequestDispatcher() always returns null
> 
> Description:
> Making a call to:
> getServletContext().getRequestDispatcher("http://www.google.com/")
> 
> with any string, always returns null;

Follows the javadoc for getRequestDispatcher().

What can be seen is that it explicitly says that the path must
begin with a "/", and your usage does not.

The javadoc does not say that you can pass any URL as an argument.

>From the implementation perspective, if what you want to do is
perform a redirection to a URL outside your tomcat servlet container,
RequestDispatcher redirection is not what you need to do.
You should probably do location redirect.

response.setHeader("Location", url);


Here is the javadoc.


public RequestDispatcher getRequestDispatcher(java.lang.String path)

 Returns a RequestDispatcher object that acts as a wrapper for the resource located
 at the given path. A RequestDispatcher object can be used to forward a request to
 the resource or to include the resource in a response. The resource can be 
dynamic or
 static. 

 The pathname must begin with a "/" and is interpreted as relative to the current
 context root. Use getContext to obtain a RequestDispatcher for resources in
 foreign contexts. This method returns null if the ServletContext cannot return a
 RequestDispatcher.
 Parameters:
 path - a String specifying the pathname to the resource
 Returns:
     a RequestDispatcher object that acts as a wrapper for the resource at the
 specified path
 See Also: 
 RequestDispatcher, getContext(java.lang.String)


Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)





Re: BugRat Report #543 has been filed.

2000-12-07 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: BugRat Mail System <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: BugRat Report #543 has been filed.
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> Bug report #543 has just been filed.
> 
> You can view the report at the following URL:
> 
><http://znutar.cortexity.com/BugRatViewer/ShowReport/543>
> 
> REPORT #543 Details.
> 
> Project: Tomcat
> Category: Bug Report
> SubCategory: New Bug Report
> Class: swbug
> State: received
> Priority: high
> Severity: critical
> Confidence: public
> Environment: 
>Release: 3.2 Final
>JVM Release: Sun JDK 1.3.0-C
>Operating System: NT4
>OS Release: SP5
>Platform: intel
> 
> Synopsis: 
> calling getServletContext().getRequestDispatcher() always returns null
> 
> Description:
> Making a call to:
> getServletContext().getRequestDispatcher("http://www.google.com/")
> 
> with any string, always returns null;

Follows the javadoc for getRequestDispatcher().

What can be seen is that it explicitly says that the path must
begin with a "/", and your usage does not.

The javadoc does not say that you can pass any URL as an argument.

>From the implementation perspective, if what you want to do is
perform a redirection to a URL outside your tomcat servlet container,
RequestDispatcher redirection is not what you need to do.
You should probably do location redirect.

response.setHeader("Location", url);


Here is the javadoc.


public RequestDispatcher getRequestDispatcher(java.lang.String path)

 Returns a RequestDispatcher object that acts as a wrapper for the resource located
 at the given path. A RequestDispatcher object can be used to forward a request to
 the resource or to include the resource in a response. The resource can be 
dynamic or
 static. 

 The pathname must begin with a "/" and is interpreted as relative to the current
 context root. Use getContext to obtain a RequestDispatcher for resources in
 foreign contexts. This method returns null if the ServletContext cannot return a
 RequestDispatcher.
 Parameters:
 path - a String specifying the pathname to the resource
 Returns:
     a RequestDispatcher object that acts as a wrapper for the resource at the
 specified path
 See Also: 
 RequestDispatcher, getContext(java.lang.String)


Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Improvement to Bugrat ?

2000-12-07 Thread Arieh Markel

I am wondering how difficult would be to change bugrat so that
the synopsis (or part of it) appears on the mail subject line.

Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: Proposal: new commiter

2000-12-05 Thread Arieh Markel


> 
> Hi,
> 
> Please vote for Dan Milstein as a new commiter for tomcat.

+1

Arieh

> 
> Dan did an excelent review of the connector code, documented the protocol,
> proposed many enhancements and re-factored the Ajp13 adapter. 
> 
> We are very lucky to have someone who is interested in this difficult
> area and continues the great work that Gal Shachor started.
> 
> Thanks,
> Costin

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: Problem with context initialization ?

2000-11-21 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: [EMAIL PROTECTED]
> X-Sender: costin@costin
> To: [EMAIL PROTECTED], Arieh Markel <[EMAIL PROTECTED]>
> Subject: Re: Problem with context initialization ?
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> Hi Arieh,
> 
> I know about this problem, and 3.3 is going to fix this ( and other
> similar problems ) by defining a startup order and changing the code 
> to implement it.
> 
> I don't know any simple fix for 3.2, there is a lot of code that has to be
> changed.

Luckily, as you can see from the stack trace, the exception is caused
inside of a base class that we have defined (CMCServlet), when trying to access
a static method in another class that we have defined (ServerUtils).

I believe I should be able to catch the NoClassDefFoundError at the
appropriate time.

I am trying to find out what are the actions that I may take to correct
the problem when catching the error.

In essence, what in the API is there to perhaps force a reload/re-init
of the Context that is giving me the problem.

Any ideas ?

Arieh

> 
> Costin 
> 
> On Mon, 20 Nov 2000, Arieh Markel wrote:
> 
> > We are running into the following problem:
> > 
> > . we start Tomcat in an embedded manner:
> > 
> > use a server.xml that only includes interceptors and connectors
> > 
> > create contexts programmatically
> > 
> > initialize the context manager
> > 
> > 
> > I am observing the following behavior:
> > 
> >   the tomcat is making the ports available before the context finished
> >   being initialized.
> >   
> >   On trying to access the application at that time, we get the following  
> > 
> > java.lang.NoClassDefFoundError: com/sun/esm/web/server/ServerUtils
> > at com.sun.esm.web.servlet.CMCServlet.service(CMCServlet.java:354)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at 
> > org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387)
> > at org.apache.tomcat.core.Handler.service(Handler.java:263)
> > at 
> > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371)
> > at 
> > 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:787)
> > at 
> > org.apache.tomcat.core.ContextManager.service(ContextManager.java:733)
> > at 
> > 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConne
> > ctionHandler.java:210)
> > at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
> > at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled 
Code)
> > at java.lang.Thread.run(Compiled Code)
> > 
> >  
> >   From that moment on, we are never able to access the webserver, getting
> >   the same message again and again.
> >   
> > -
> > 
> > It appears that there is a race condition on the ContextManager.start()
> > method.
> > 
> > I instrumented my context manager startup to print when the return
> > from ContextManager.start occurs.
> > 
> > I try to access my initial page (which is actually a servlet)
> > repeatedly from a browser trying to catch the point in time where
> > the connector is made available by the contexts are not.
> > 
> > When I manage to access the port on the connector
> > the result is the above exception.
> > 
> > Does anybody else see something similar ?
> > 
> > -
> > 
> > Arieh   
> > --
> >  Arieh Markel   Sun Microsystems Inc.
> >  Network Storage500 Eldorado Blvd. MS UBRM11-194
> >  e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
> >  Let's go Panthers  Phone: (303) 272-8547 x78547
> >  (e-mail me with subject SEND PUBLIC KEY to get public key)
> > 

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: Problem with context initialization ?

2000-11-20 Thread Arieh Markel

A better Exception trace follows (note the  message)

(the following is the tomcat console output)

2000-11-20 06:05:17 - Ctx(  ): Exception in: R(  + /login + null) - 
java.lang.ExceptionInInitializerError: java.lang.NullPointerException
at 
at com.sun.esm.web.servlet.CMCServlet.service(CMCServlet.java:354)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387)
at org.apache.tomcat.core.Handler.service(Handler.java:263)
at 
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:787)
at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:733)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConne
ctionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)


Consider this the initial exception thrown.

Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Problem with context initialization ?

2000-11-20 Thread Arieh Markel

We are running into the following problem:

. we start Tomcat in an embedded manner:

use a server.xml that only includes interceptors and connectors

create contexts programmatically

initialize the context manager


I am observing the following behavior:

  the tomcat is making the ports available before the context finished
  being initialized.
  
  On trying to access the application at that time, we get the following  

java.lang.NoClassDefFoundError: com/sun/esm/web/server/ServerUtils
at com.sun.esm.web.servlet.CMCServlet.service(CMCServlet.java:354)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387)
at org.apache.tomcat.core.Handler.service(Handler.java:263)
at 
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:787)
at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:733)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConne
ctionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)

 
  From that moment on, we are never able to access the webserver, getting
  the same message again and again.
  
-

It appears that there is a race condition on the ContextManager.start()
method.

I instrumented my context manager startup to print when the return
from ContextManager.start occurs.

I try to access my initial page (which is actually a servlet)
repeatedly from a browser trying to catch the point in time where
the connector is made available by the contexts are not.

When I manage to access the port on the connector
the result is the above exception.

Does anybody else see something similar ?

-

Arieh   
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: [Proposal] Tomcat 3.2b8

2000-11-17 Thread Arieh Markel



on 11/17/2000 9:54 AM, "Craig R. McClanahan" <[EMAIL PROTECTED]>
wrote:

> I propose to do a 3.2b8 build on Monday afternoon (which should give us time
> to
> address the remaining b7 issues that I know about).  What do you think?
> 
> Craig

+1

Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: Servlet - Jini - Tomcat3.1

2000-11-15 Thread Arieh Markel


> From: "Flávio Rodrigo M. de Carvalho" <[EMAIL PROTECTED]>
> To: "Arieh Markel" <[EMAIL PROTECTED]>, 
<[EMAIL PROTECTED]>
> Subject: Re: Servlet - Jini - Tomcat3.1
> 
> - Original Message -
> >Flavio,
> >It is not clear from your description what you are trying to do.
> >
> >  . does your server issue a query to obtain a Jini service reference from
> > a lookup server ?
> 
> Exactly, my servlet just make an unicast to receive from the lookup server
> the Registrar (LookupLocator.GETREGISTRAR) . The exception appears after
> that call.
> If it helps, I am trying to connect a servlet to a JavaSpace and
> TransactionManager (mahalo) services.
> 
> >
> >   . are you expecting that the Jini service will upload the WAR over
> > the net to be incorporated ?
> >
> This I didn't understand... (???)

The fact that an exception of casting happens on a class expected to be 
WARConnection leads me to believe that the code you have is expecting to
have a 'war' file downloaded from over the network.

So my question is if what you intended to do is the following:

  . access an object from the JavaSpace and have that object become/incorporate
a web-application to the Tomcat container

I really can't see how there is a relationship between the Jini Lookup
invocation and the exception thrown.

I wonder if you could post the code (the method) in which this happens.

Arieh


> >
> >Arieh
> 
> 
> 
> 

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


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




Interesting issue with Java and Cygwin under WIN32

2000-11-15 Thread Arieh Markel

We have identified an interesting issue, which I am not sure how to
resolve (if it ever will), and it is not directly relevant to Jakarta.

In our application, in order to leverage the work that has been done
for operating in a Unix environment (rcX.d scripts, utility scripts),
we have decided to use Cygwin to provide a similar environment when
working on a Win32 environment.

What it interesting to note is that we find problems with platform
dependent Java items (like fileSeparator, pathSeparator), which take
it from the host environment and prevent from setting it up externally.

In fact, I would like the ability to override the Win32 default in a
CygWin environment.

Any ideas ?

Opinions ?

Thanks,

Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


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




Re: Servlet - Jini - Tomcat3.1

2000-11-13 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: "Flávio Rodrigo M. de Carvalho" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: Servlet - Jini - Tomcat3.1
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> Hi all,
> 
> My servlet is getting the following exception when running on Tomcat3.1.
> This happens when I try to get the reference of a jini service (by a unicast
> call) :
> 
> java.lang.ClassCastException: org.apache.tomcat.protocol.WARConnection
> 
> A friend told me that it is a bug from Tomcat and that there would be a fix
> for that. I have no idea what this could be. Is there any special
> configuration to use in Tomcat3.1 to use with jini services ? What is this
> excepion about ?

Flavio,

I am not aware that there is anything specific with regards to Jini
and Jakarta-Tomcat (our application actually advertises its embedded
tomcat webserver as a Jini service).

As far as your question 'what it this exception about':

a WARConnection is a class that extends URLConnection, in order
to do WAR (Web Application Resource) loading

check the javadoc for java.net.URLCOnnection:

"The abstract class URLConnection is the superclass of all classes that
 
represent a communications link between the application and a URL.
Instances of this class can be used both to read from and to write to 
the resource referenced by the URL. In general, creating a connection
to a URL is a multistep process: ..."




It is not clear from your description what you are trying to do.

   . does your server issue a query to obtain a Jini service reference from
 a lookup server ?
 
   . are you expecting that the Jini service will upload the WAR over
 the net to be incorporated ?


Arieh
   
> 
> Thanks all,
> 
> Flavio.
> 
> 
> -----
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


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




Re: About Form-Login-Config

2000-11-10 Thread Arieh Markel


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Craig, Costin,

thanks for your response.


> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: About Form-Login-Config
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> Arieh Markel wrote:
> 
> > I am reading the (2.3) spec and am realizing that I am not able to
> > share a login page with multiple contexts.
> >
> 
> That's true (also true for servlet 2.2).
> 
> >
> > In our (embedded) use of Tomcat, we have different contexts, but
> > we use a single login form/screen.
> >
> > When configuring the web.xml for those contexts, I realize that there is
> > no way to have a successful form-login-page without it belonging to the
> > same context.
> >
> > In our case, the login form is actually a servlet that belongs to the
> > default context.
> >
> > I was hoping to be able to point at that (default context /login)
> > servlet from the other contexts.
> >
> > One of the solutions could be to define a /login (the same) servlet
> > on all the various contexts.
> >
> > (I will mention that I am defining my contexts as 'trusted').
> > (Another note: I am using 3.2)
> >
> > If I do what mention in the last paragraph, I will end up with having
> > three different instances of the login servlet, right ?
> >
> 
> Yes, assuming you have three contexts.
> 
> But that isn't going to be the worst of it -- a user's identity does not
> propogate across web apps either, so a user that is using all three contexts
> will have to authenticate themselves to all three web apps.

I have resolved the authentication issue by sharing the session information
among the servlets of the different contexts (this was done by providing
some utility Java classes that are to be taken advantage by those
who develop our servlets - I admit that the solution is not generic, as
it implies that the servlets are aware of those utility classes).

There is always a single authentication, using the login servlet of the
default context.

On the non-default contexts, I opted to define a login page that performs
a redirection to the login servlet in the default context.

> 
> >
> > --
> >
> > An alternate approach could be to define 'login.html' files in those
> > contexts, and to have that file perform a Location redirect to the
> > default-context /login servlet.
> >
> 
> Won't that cause the user to log in only to the default context?

Yes, but I don't care that it is the case, because the non-default context 
servlets are always reached from the login context.



The division of contexts is not so much to define segregated separate
web applications, as much as a cleaner way to separate between three
pieces of the application that we develop.

The first piece is the 'static' piece of our application, while the
second piece is a 'dynamic' piece, which is populated based on information
about objects discovered in the network.

(A third piece is a JavaHelp context - on which we put a single servlet,
that can access a JavaHelp document repository).



> 
> >
> > --
> >
> > I am wondering about the reasons that may have forced the definition
> > of a context-relative login-form as opposed to allowing a URL to be
> > specified.
> >
> 
> The reasoning for this was the same as the reasoning for everything else in
> a web-app being context relative.  The whole idea is that a web application
> should be a stand alone entity, able to be deployed on *any* server that
> supports the required API levels, without external dependencies.
> 
> The "escape valve" for cross-app authentication that the servlet spec
> provides is the notion of supporting "single sign on" (Servlet 2.2, section
> 11.6, and Servlet 2.3 PFD, section 12.6).  The basic idea is that a user
> authenticates himself or herself to the first app in which they try to
> access a protected page, and then this identity is remembered across all the
> other apps running in the same server.
> 
> Unfortunately for your particular requirements :-(, none of the Tomcat 3.x
> versions support this feature -- although Tomcat 4.0 does.

I guess I must have implemented it in our application ;).

Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


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




About Form-Login-Config

2000-11-10 Thread Arieh Markel

I am reading the (2.3) spec and am realizing that I am not able to
share a login page with multiple contexts.

In our (embedded) use of Tomcat, we have different contexts, but
we use a single login form/screen.

When configuring the web.xml for those contexts, I realize that there is
no way to have a successful form-login-page without it belonging to the
same context.

In our case, the login form is actually a servlet that belongs to the
default context.

I was hoping to be able to point at that (default context /login)
servlet from the other contexts.

One of the solutions could be to define a /login (the same) servlet
on all the various contexts.

(I will mention that I am defining my contexts as 'trusted').
(Another note: I am using 3.2)

If I do what mention in the last paragraph, I will end up with having
three different instances of the login servlet, right ?

--

An alternate approach could be to define 'login.html' files in those
contexts, and to have that file perform a Location redirect to the
default-context /login servlet.

--

I am wondering about the reasons that may have forced the definition
of a context-relative login-form as opposed to allowing a URL to be
specified.


Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


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




Re: Attributes of tag

2000-10-26 Thread Arieh Markel

I believe someone (forgot on which one of the lists) had asked
about valid properties for the Context.

Here is the original message.

Arieh

- Begin Forwarded Message -

Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
list-help: <mailto:[EMAIL PROTECTED]>
list-unsubscribe: <mailto:[EMAIL PROTECTED]>
list-post: <mailto:[EMAIL PROTECTED]>
Delivered-To: mailing list [EMAIL PROTECTED]
From: Arieh Markel <[EMAIL PROTECTED]>
Subject: Re: Attributes of  tag
To: [EMAIL PROTECTED]
Content-MD5: mpQhYlTrDIg1LGV07vWMTg==
X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N


> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> Delivered-To: moderator for [EMAIL PROTECTED]
> From: Grant Klopper <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: Attributes of  tag
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> I need a list of all the attributes that I can use in the  tags in 
> the server.xml file, as well as an explanation of each. I would appreciate 
> it if someone could help

Grant,

inspection of the source for org.apache.tomcat.core.Context gives the
information:

. look at the 'public Object getAttribute() method and you will see 
  the names of the attributes you can change
. look at the various 'public void set[Property](args)' methods
  the attributes will be the lower-case(Property) names
  (pay attention to the arguments that are primitive types or classes)
. look at the various 'public void add[Property](args)' methods
  the attributes will be the lower-case(Property) names


public void setPath(String path)"path"
public void setDocBase( String docB )   "docbase"
public void setReloadable( String s )   "reloadable"
public void setDescription(String description)  "description" 
public void setIcon( String icon )  "icon"
public void setDistributable(String s)  "distributable"
public void setSessionTimeOut(int sessionTimeOut)   "sessionTimeout"
public void setFormLoginPage( String page ) "formLoginPage"
public void setFormErrorPage( String page ) "formErrorPage"
public void setLoginConfig  "loginConfig"
public void setDebug( String level )"debug"
public void setWorkDirPath(String workDir)  "workDirPath"
public void setEngineHeader(String s)   "engineHeader"
public void setIsWARExpanded(boolean isWARExpanded) "isWARExpanded"
public void setIsWARValidated(boolean isWARValidated) "isWARValidated"
public void setHost( String h ) "host"
public void setTrusted( boolean t ) "trusted"
public void addWelcomeFile( String s)   "welcomeFile"
public void addTaglib( String uri, String location )"taglib"
public void addEnvEntry( String name,String type, String value, String 
description )   "envEntry"
public void addInitParameter( String name, String value ) "initParameter"
public void addContentType( String ext, String type) "contentType"
public void addErrorPage( String errorType, String value ) "errorPage"
public void addServletMapping(String path, String servletName) 
"servletMapping"
public void addHostAlias( String alias )"hostAlias"

and from the 'getAttribute()' method:

"org.apache.tomcat"

"org.apache.tomcat.jsp_classpath"

"org.apache.tomcat.protection_domain"

 org.apache.tomcat.classloader"

 FacadeManager.FACADE_ATTRIBUTE


I may have omitted some that did not look to me as if they really need to
be exposed via server.xml configuration. Others may add to this list.

Hope this helps.

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

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage        500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND