Windows 2000 IIS problem

2001-03-16 Thread Graham Wright

I have a clean installation of Windows 2000 sp1 on which I cannot get 
the redirector to work.  I an running Tomcat 3.2.1 on the same machine 
and can get redirector on a different Windows 2000 machine to connect OK.

The isapi.log file get as far as

[jk_isapi_plugin.c (413)]: HttpFilterProc started
[jk_isapi_plugin.c (434)]: In HttpFilterProc test redirection of /examples/
[jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, 
Found a match ajp12
[jk_isapi_plugin.c (444)]: HttpFilterProc [/examples/] is a servlet url 
- should redirect to ajp12
[jk_isapi_plugin.c (466)]: HttpFilterProc check if [/examples/] is 
points to the web-inf directory
[jk_isapi_plugin.c (497)]: GWW:HttpFilterProc returns 
SF_STATUS_REQ_NEXT_NOTIFICATION

I added some additional logging info to see how far it was getting.  In 
the working redirector the next call seems to be to GetExtensionVersion 
and then to HttpExtensionProc on subsequent calls but I am not getting 
as far as this.  The server respondes with

HTTP/1.1 500 Server Error
Server: Microsoft-IIS/5.0
Date: Fri, 16 Mar 2001 09:55:01 GMT
Connection: close
Content-Type: text/html
Content-Length:

htmlheadtitleError/title/headbodyThe specified module could 
not be found. /body/html

Does anyone have any idea on what might be failing?

thanks

Graham Wright


-- 
*
Information in this email is confidential and may be privileged. It is
intended for the named addressee(s) only. If you have received it in
error please notify the sender immediately and delete it from your
system. You should not otherwise copy, retransmit, use or disclose its
contents to anyone.
*




Re: problem in using SecurityManager with tomcat

2001-03-16 Thread Marcantonio DelDrago

Hi all,

Having tried several times to run tomcat (with apache) using the
SecurityManager,
my idea was simply to set the permissions for running the Tomcat example
servlets and JSP provided.

For that I:

1. Edited server.xml to use Policy:
ContextInterceptor className="org.apache.tomcat.context.PolicyInterceptor"
/

2. Didn't change the default tomcat.policy (I also have tried to set some
paths but nothing has worked yet)

3. Started tomcat with and without the "-security" option.
 tomcat.sh start -security

and Tomcat doesn't start.


Any ideas?

Thanks,

Marcantonio





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: [VOTE] New commiter - Casey Lucas

2001-03-16 Thread Mel Martinez

+1

Mel
--- [EMAIL PROTECTED] wrote:
 Hi,
 
 Please vote for Casey Lucas as commiter.
 
 Casey is working on various optimizations in Jasper,
 with some 
 very promising results ( tag pooling ). He is
 working on supporting
 both branches of jasper, and create
 container-specific adapters.
  
 
 Costin
 
 


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



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: 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
 
docbase/dir/.../index.html
 
 file-based: (path/filebasename[locale].filetype)
 
  1. docbase/dir/.../index_fr_CA.html
  2. docbase/dir/.../index_fr.html
  3. docbase/dir/.../index_en_US.html
  4. docbase/dir/.../index_en.html
  5. docbase/dir/.../index.html
 
 
 docbase-based: ([locale]/path/filename)
 
  1. docbase/fr_CA/dir/.../index.html
  2. docbase/fr/.../index.html
  3. docbase/en_US/.../index.html
  4. docbase/en/.../index.html
  5. docbase/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)




JOIN2: problem with nls

2001-03-16 Thread Tagunov Anthony

Hello, Developers!

I'm more then anctious to join the question.
There clearly is a problem for us using encodings other then Latin-1!

Please, Tomcat developers, could you shed some light on
what is done/can be done/is planned to be done not to leave
all non-latin1 users alone with the necessity to do it all by themselves.
The state of the servlet specs, the plans?..
  form enctype="application/x-www-form-urlencoded; charset=UTF-8"
Doesn't change the headers my IE5 sends to the browser neither does
  form accept-charset=""
also does not affect the behaviour of IE..
Setting a special parameter in the from looks ugly (it may containg
either the name of the encoding the page was served to the 
client with as often browser returns responce in the same coding
or put a hidden field with a set of test characters (not mine idea)
to see how they got recoded..)
This looks ugly, but any better then nothing..

 I'm afraid that if servlet specifications do not address and
solve this issue
in many applicaitons some buffer layers between
the Servlet Container and the code implementing logic will be
needed (that will do nothing but fix encoding)..

Develpers, have you got some insight on this? 

Maybe we, non-latin1 users (are there more of us
those who want to use UTF-8, windows-1252, windows-1251,
koi8-r) then those who are confined with latin-1?) should
bomb some other lists, mail addresses to raise attention
to this problem? (what i want is
max) have a reliable automatic way of getting the encoding right (not possible, er?
 due to the design of the browsers?)
min)  have a way to tell the container that _this request has encoding xyz_ and
 have a method of getting it coded right
mediu) support for these test character sequences built into the specs

On Fri, 16 Mar 2001 11:31:38 +0200, Aleksandras Novikovas wrote:

Hello All,

I'm posting for the first time, so please inform me if I do something wrong ...

First of all - problem description :
I have application in multilanguage (where user can dynamically change charset).
Problem rises when user enters information in selected language.
After parsePostData in HttpUtils I get lots of "" instead of text.
I can not rely on default system encoding, because application has ability to add the 
languages dynamically without recompilation.
So I never know what next encoding system will need.

I have written some code to work around this problem and think it would be nice to 
have it standard package.
Actually I've changed parsePostData - added  encoding parameter.
Now programmer could choose in what encoding InputStream is supplied.
I have tested it with windows-1257 (Baltic) and windows-1251 (Cyrylic) - for me it 
worked.
If someone find any errors - please let me know.
Here is code of that method :


// Parses data from an HTML form that the client sends to 
// the server using the HTTP POST method and the 
// iapplication/x-www-form-urlencoded/i MIME type.
//
// pThe data sent by the POST method contains key-value
// pairs. A key can appear more than once in the POST data
// with different values. However, the key appears only once in 
// the hashtable, with its value being
// an array of strings containing the multiple values sent
// by the POST method.
//
// pThe keys and values in the hashtable are stored in their
// decoded form, so
// any + characters are converted to spaces, and characters
// sent in hexadecimal notation (like i%xx/i) are
// converted to specified encoding.
//
// @param len  an integer specifying the length,
// in characters, of the
// codeServletInputStream/code
// object that is also passed to this
// method
// @param in   the codeServletInputStream/code
// object that contains the data sent
// from the client
// @param enc  a String specifying the character encoding
// of the codeServletInputStream/code
// object
//
// @return a codeHashTable/code object built
// from the parsed key-value pairs
//
// @exception IllegalArgumentException if the data
// sent by the POST method is invalid


public Hashtable parsePostData (int len, ServletInputStream in, String enc)
{
   // XXX
   // should a length of 0 be an IllegalArgumentException
   
   if (len =0)
   return new Hashtable (); // cheap hack to return an empty hash

   if (in == null) {
   throw new IllegalArgumentException ();
   }

   // Make sure we read the entire POSTed body.
   byte [] postedBytes = new byte [len];
   try {
   int offset = 0;
  

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

2001-03-16 Thread Arshad Mahmood


- 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.

 --
  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)

Regards,
Arshad




Re: [VOTE] New commiter - Casey Lucas

2001-03-16 Thread Glenn Nielsen

+1 and glad someone took the lead to implement JSP tag object pooling

[EMAIL PROTECTED] wrote:
 
 Hi,
 
 Please vote for Casey Lucas as commiter.
 
 Casey is working on various optimizations in Jasper, with some
 very promising results ( tag pooling ). He is working on supporting
 both branches of jasper, and create container-specific adapters.
 
 
 Costin

-- 
--
Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder|
MOREnet System Programming   |  * if iz ina coment.  |
Missouri Research and Education Network  |  */   |
--



Re: [VOTE] New Committer: Amy Roh

2001-03-16 Thread Pier P. Fumagalli

[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 I still think it would be a good idea to merge mod_jk and mod_webapp, even
 if Pier is not going to touch 3.x code. Some of the ideas are good, and
 getting them into mod_jk will be good for the users - and that's what
 matters.

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...

Pier (somewhere in Europe... Maybe London???)

-- 

Pier Fumagalli  http://www.betaversion.org/  mailto:[EMAIL PROTECTED]




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: [VOTE] New Committer: Amy Roh

2001-03-16 Thread GOMEZ Henri

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...

And a big piate di pasta.



Re: [VOTE] New Committer: Amy Roh

2001-03-16 Thread cmanolache


On Fri, 16 Mar 2001, Pier P. Fumagalli wrote:

 [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  I still think it would be a good idea to merge mod_jk and mod_webapp, even
  if Pier is not going to touch 3.x code. Some of the ideas are good, and
  getting them into mod_jk will be good for the users - and that's what
  matters.
 
 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...

Well, maybe a better place to meet would be tomcat-dev, isn't it ?

I'm sure Dan Milstein would enjoy a French vacation ( I would ), but 
so far mod_jk was developed by a larger group on tomcat-dev. Dan and Henri
are doing most of the work maintaining mod_jk, and Larry and Nacho ( and
Marc on the 3.2 branch) are doing most of the work maintaining tomcat -
but they are not the only people working on either mod_jk or the
container.


Costin





RE: [VOTE] New commiter - Casey Lucas

2001-03-16 Thread Marc Saegesser

+1

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 15, 2001 5:39 PM
 To: [EMAIL PROTECTED]
 Subject: [VOTE] New commiter - Casey Lucas
 
 
 Hi,
 
 Please vote for Casey Lucas as commiter.
 
 Casey is working on various optimizations in Jasper, with some 
 very promising results ( tag pooling ). He is working on supporting
 both branches of jasper, and create container-specific adapters.
  
 
 Costin
 



RE: [VOTE] New committer: Mike Braden

2001-03-16 Thread Marc Saegesser

+1

 -Original Message-
 From: danmil [mailto:danmil]On Behalf Of Dan Milstein
 Sent: Thursday, March 15, 2001 1:48 PM
 To: [EMAIL PROTECTED]
 Subject: [VOTE] New committer: Mike Braden
 
 
 I would like to propose Mike Braden ([EMAIL PROTECTED]) as a new
 committer.  He has contributed very useful patches to the user docs, has
 fixed bugs in the ApacheConfig class, and has been a helpful presence on
 this list, both in discussing new features, and in answering questions.
 
 -Dan
 -- 
 
 Dan Milstein // [EMAIL PROTECTED]



Re: Deployment Descriptor Editor

2001-03-16 Thread Remy Maucherat

 I have a GUI for editing deployment descriptors in-place in J2EE
 archives or directories laid out like archives (so far EJB 1.1 JARs,
 Servlet 2.2 WARs, JCA 1.0 RARs).  It's open-source under the X license,
 though for the few weeks without a home on the web.  I wonder if you'd be
 interested in including a binary with Tomcat (the 3.x branch for now,
 since it doesn't support 2.3 yet).  If anyone's interested in trying it
 out, I can send you a copy.

Is it the same UI that is used in OpenEJB ?

Also, can it edit the security constraints ?

Remy




problems with forward

2001-03-16 Thread Seemantini Godbole

Hi,

I am running into a problem when using "forward" method in my servlet to
forward the HttpRequest to a JSP page.

The servlet looks like this

public void doGet(HttpServletRequest request, HttpServletResponse
response)
  throws IOException, ServletException
{

HttpSession session = request.getSession(true);
System.out.println("ID " + session.getId());

//do bunch of business logic here
//do more things
.
.
.


getServletConfig().getServletContext().getRequestDispatcher(theJSPPage).forward(request,
response);

}

everything works except the forward part. Every time a JSP is displayed
as a result of forward method, the user is supposed to fill in stuff in
the page and get back to the same servlet after he submits on the page.

However, when the servlet takes over the second time, it has to create a
new session, and the SessionID is changed.
The expected behavior was that the session would have been maintained
though the control was passed from servlet-JSp-back to servlet.

If I comment the forward code statement and replace it by some code such
as

PrintWriter out = response.getWriter();
out.println("htmlheadtitleAlternative
methods/title/head");
out.println("body");

and give a href to bring back the users to the same servlet, in that
case the session is retained.

Any ideas? Anyone? Anyone?

Thanks,
Seemantini Godbole
GetThere, a SABRE company








[PATCH] jakarta-tomcat/src/etc/jk/workers.properties

2001-03-16 Thread Christopher Elkins

Hi, all.

workers.properties has a rogue un-use of $(ps).

-- 
Christopher Elkins


Index: workers.properties
===
RCS file: /home/cvs/jakarta-tomcat/src/etc/jk/workers.properties,v
retrieving revision 1.2
diff -u -r1.2 workers.properties
--- workers.properties  2001/03/02 18:29:58 1.2
+++ workers.properties  2001/03/16 17:45:40
@@ -177,7 +177,7 @@
 # Note: The cmd_line string may not contain spaces.
 #
 worker.inprocess.cmd_line=-config
-worker.inprocess.cmd_line=$(workers.tomcat_home)/conf/jni_server.xml
+worker.inprocess.cmd_line=$(workers.tomcat_home)$(ps)conf$(ps)jni_server.xml
 worker.inprocess.cmd_line=-home
 worker.inprocess.cmd_line=$(workers.tomcat_home)
 



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)




cvs commit: jakarta-tomcat/src/etc/jk workers.properties

2001-03-16 Thread larryi

larryi  01/03/16 12:50:21

  Modified:src/etc/jk workers.properties
  Log:
  Fix hardcoded use of '/'.
  
  Submitted by: Christopher Elkins
  
  Revision  ChangesPath
  1.3   +4 -4  jakarta-tomcat/src/etc/jk/workers.properties
  
  Index: workers.properties
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/etc/jk/workers.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- workers.properties2001/03/02 18:29:58 1.2
  +++ workers.properties2001/03/16 20:50:19 1.3
  @@ -1,7 +1,7 @@
   #
  -# $Header: /home/cvs/jakarta-tomcat/src/etc/jk/workers.properties,v 1.2 2001/03/02 
18:29:58 larryi Exp $
  -# $Revision: 1.2 $
  -# $Date: 2001/03/02 18:29:58 $
  +# $Header: /home/cvs/jakarta-tomcat/src/etc/jk/workers.properties,v 1.3 2001/03/16 
20:50:19 larryi Exp $
  +# $Revision: 1.3 $
  +# $Date: 2001/03/16 20:50:19 $
   #
   #
   # workers.properties -
  @@ -177,7 +177,7 @@
   # Note: The cmd_line string may not contain spaces.
   #
   worker.inprocess.cmd_line=-config
  -worker.inprocess.cmd_line=$(workers.tomcat_home)/conf/jni_server.xml
  +worker.inprocess.cmd_line=$(workers.tomcat_home)$(ps)conf$(ps)jni_server.xml
   worker.inprocess.cmd_line=-home
   worker.inprocess.cmd_line=$(workers.tomcat_home)
   
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/util SimplePool.java

2001-03-16 Thread horwat

horwat  01/03/16 13:34:09

  Modified:jasper/src/share/org/apache/jasper/util SimplePool.java
  Log:
  Patch SimplePool race condition when tomcat is under load
  
  Bugzilla #747  #728
  
  Submitted by: [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.2   +22 -24
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/util/SimplePool.java
  
  Index: SimplePool.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/util/SimplePool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SimplePool.java   2000/08/12 00:52:15 1.1
  +++ SimplePool.java   2001/03/16 21:34:07 1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/util/SimplePool.java,v 
1.1 2000/08/12 00:52:15 pierred Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/08/12 00:52:15 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/util/SimplePool.java,v 
1.2 2001/03/16 21:34:07 horwat Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/03/16 21:34:07 $
*
* 
*
  @@ -63,11 +63,6 @@
   
   package org.apache.jasper.util;
   
  -import java.util.zip.*;
  -import java.net.*;
  -import java.util.*;
  -import java.io.*;
  -
   /**
* Simple object pool. Based on ThreadPool and few other classes
*
  @@ -83,12 +78,16 @@
   private Object pool[];
   
   private int max;
  -private int minSpare;
  -private int maxSpare;
  -
   private int current=-1;
   
   Object lock;
  +public static final int DEFAULT_SIZE=16;
  +
  +public SimplePool() {
  + this.max=DEFAULT_SIZE;
  + pool=new Object[max];
  + lock=new Object();
  +}
   
   public SimplePool(int max) {
this.max=max;
  @@ -103,33 +102,32 @@
* Add the object to the pool, silent nothing if the pool is full
*/
   public  void put(Object o) {
  - int idx=-1;
synchronized( lock ) {
  - if( current  max )
  - idx=++current;
  + if( current  (max-1) ) {
  + current += 1;
  + pool[current] = o;
  +}
}
  - if( idx  0 ) 
  - pool[idx]=o;
   }
   
   /**
* Get an object from the pool, null if the pool is empty.
*/
   public  Object get() {
  - int idx=-1;
  + Object item = null;
synchronized( lock ) {
  - if( current = 0 )
  - idx=current--;
  + if( current = 0 ) {
  + item = pool[current];
  + current -= 1;
  + }
}
  - if( idx = 0  ) 
  - return pool[idx];
  - return null;
  + return item;
   }
   
  -/** Return the size of the pool
  +/**
  + * Return the size of the pool
*/
   public int getMax() {
return max;
   }
  -
   }
  
  
  



Merging mod_jk/mod_webapp (was [VOTE] New Committer: Amy Roh)

2001-03-16 Thread Dan Milstein

It would be nice to have this dicussion on tomcat-dev.  I do think I have a
useful understanding of mod_jk to offer, but I'm not going to be in France
(and I'm not on the private thread)...

Not that we have to have that conversation now, but I would like to be
involved when/if it happens.

-Dan

"Pier P. Fumagalli" wrote:
 
 [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  I still think it would be a good idea to merge mod_jk and mod_webapp, even
  if Pier is not going to touch 3.x code. Some of the ideas are good, and
  getting them into mod_jk will be good for the users - and that's what
  matters.
 
 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...
 
 Pier (somewhere in Europe... Maybe London???)
 
 --
 
 Pier Fumagalli  http://www.betaversion.org/  mailto:[EMAIL PROTECTED]

-- 

Dan Milstein // [EMAIL PROTECTED]



Re: [PROPOSAL] The Commons - web connector

2001-03-16 Thread Dan Milstein

For those who don't read jakarta-general (myself included), a draft of  The
'Commons Proposal' can be found at:

http://husted.com/about/commons/

-Dan

GOMEZ Henri wrote:
 
 This can happen only if all of you agree ( and also Craig,
 Pier and Remy who are working on connectors too on the 4.0 side ).
 
 The goal of the proposal was to include all people involved on
 connectors from TC 3.1 up to 4.0.
 
 After reading the 'Commons Proposal' in jakarta-general I was
 thinking that web-connector could fall in that category of
 common/sharing project. I'm open to all proposition.
 
 Everything else ( list, cvs, integration with tomcat, etc ) is
 detail :-)
 
 Yep, administrative task.

-- 

Dan Milstein // [EMAIL PROTECTED]



RE: [VOTE] New Committer: Amy Roh

2001-03-16 Thread GOMEZ Henri

 
 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) ...

I must admit that even if I live in Savoie (French Alps) I'm
really a bad skier.

:-)



RE: [VOTE] New Committer: Amy Roh

2001-03-16 Thread GOMEZ Henri


 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...

Well, maybe a better place to meet would be tomcat-dev, isn't it ?

Sure.

I'm sure Dan Milstein would enjoy a French vacation ( I would ), but 
so far mod_jk was developed by a larger group on tomcat-dev. 
Dan and Henri are doing most of the work maintaining mod_jk, and Larry and 
Nacho ( and Marc on the 3.2 branch) are doing most of the work maintaining
tomcat -
but they are not the only people working on either mod_jk or the
container.

Be sure that there is nothing hidden :-)

Pier Parent's live not too long from Chambery and I just proposed him
that if he pass near my town to stop and have a diner at home where 
he could eat some 'Pasta Fresca con peperoni' prepared by my wife 
(which is italian). 

It's an invitation that all decent Italian couldn't refuse ;)

The discussion of mod_jk/mod_webapp will be open on tomcat-dev.

Regards



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core ApplicationContext.java

2001-03-16 Thread remm

remm01/03/16 15:31:01

  Modified:catalina/src/share/org/apache/catalina/core
ApplicationContext.java
  Log:
  - Add new servlet API call : getResourcePaths(String path) which can be used
to get an immutable Set listing the members of a collection.
  
  Revision  ChangesPath
  1.16  +55 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
  
  Index: ApplicationContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ApplicationContext.java   2001/02/05 05:41:57 1.15
  +++ ApplicationContext.java   2001/03/16 23:30:58 1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
 1.15 2001/02/05 05:41:57 remm Exp $
  - * $Revision: 1.15 $
  - * $Date: 2001/02/05 05:41:57 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
 1.16 2001/03/16 23:30:58 remm Exp $
  + * $Revision: 1.16 $
  + * $Date: 2001/03/16 23:30:58 $
*
* 
*
  @@ -111,7 +111,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.15 $ $Date: 2001/02/05 05:41:57 $
  + * @version $Revision: 1.16 $ $Date: 2001/03/16 23:30:58 $
*/
   
   public final class ApplicationContext
  @@ -574,6 +574,34 @@
   
   
   /**
  + * Return a Set containing the resource paths of resources member of the
  + * specified collection. Each path will be a String starting with
  + * a "/" character. The returned set is immutable.
  + * 
  + * @param path Collection path
  + */
  +public Set getResourcePaths(String path) {
  +
  +ResourceSet set = new ResourceSet();
  +DirContext resources = context.getResources();
  +if (resources == null) {
  +set.setLocked(true);
  +return (set);
  +}
  +
  +try {
  +listCollectionPaths(set, resources, path);
  +} catch (NamingException e) {
  +// Ignore
  +}
  +
  +set.setLocked(true);
  +return (set);
  +
  +}
  +
  +
  +/**
* Return the name and version of the servlet container.
*/
   public String getServerInfo() {
  @@ -828,6 +856,29 @@
   if (object instanceof DirContext) {
   listPaths(set, resources, childPath);
   }
  +}
  +
  +}
  +
  +
  +/**
  + * List resource paths (recursively), and store all of them in the given 
  + * Set.
  + */
  +private static void listCollectionPaths
  +(Set set, DirContext resources, String path) 
  +throws NamingException {
  +
  +Enumeration childPaths = resources.listBindings(path);
  +while (childPaths.hasMoreElements()) {
  +Binding binding = (Binding) childPaths.nextElement();
  +String name = binding.getName();
  +String childPath = path + "/" + name;
  +Object object = binding.getObject();
  +if (object instanceof DirContext) {
  +childPath = childPath + "/";
  +}
  +set.add(childPath);
   }
   
   }
  
  
  



cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/session StandardManager.java StandardSession.java

2001-03-16 Thread marcsaeg

marcsaeg01/03/16 16:08:46

  Modified:src/share/org/apache/tomcat/session Tag: tomcat_32
StandardManager.java StandardSession.java
  Log:
  HttpSession.getLastAccessedTime() returns the time the session was accessed
  prior to the current request.  Therefore two access times are maintained
  within the session (lastAccessedTime and thisAccessedTime).
  
  Session expiration should be based on the most recent accessed time, not
  the value returned by getLastAccessedTime(), otherewise its possible to
  expire a session prematurely.
  
  This fix adds method to StandardSession to expose the value of
  thisAccessedTime and change session expiration checking to use this method.
  
  PR:  570
  Submitted by: [EMAIL PROTECTED]
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.11.2.3  +5 -5  
jakarta-tomcat/src/share/org/apache/tomcat/session/Attic/StandardManager.java
  
  Index: StandardManager.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/session/Attic/StandardManager.java,v
  retrieving revision 1.11.2.2
  retrieving revision 1.11.2.3
  diff -u -r1.11.2.2 -r1.11.2.3
  --- StandardManager.java  2000/12/22 17:38:15 1.11.2.2
  +++ StandardManager.java  2001/03/17 00:08:40 1.11.2.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/session/Attic/StandardManager.java,v
 1.11.2.2 2000/12/22 17:38:15 marcsaeg Exp $
  - * $Revision: 1.11.2.2 $
  - * $Date: 2000/12/22 17:38:15 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/session/Attic/StandardManager.java,v
 1.11.2.3 2001/03/17 00:08:40 marcsaeg Exp $
  + * $Revision: 1.11.2.3 $
  + * $Date: 2001/03/17 00:08:40 $
*
* 
*
  @@ -103,7 +103,7 @@
* @author [EMAIL PROTECTED]
* @author a href="mailto:[EMAIL PROTECTED]"Jon S. Stevens/a
* @author Shai Fultheim [[EMAIL PROTECTED]]
  - * @version $Revision: 1.11.2.2 $ $Date: 2000/12/22 17:38:15 $
  + * @version $Revision: 1.11.2.3 $ $Date: 2001/03/17 00:08:40 $
*/
   public final class StandardManager implements Runnable  {
   // - Instance Variables
  @@ -478,7 +478,7 @@
if (maxInactiveInterval  0)
continue;
int timeIdle = // Truncate, do not round up
  - (int) ((timeNow - session.getLastAccessedTime()) / 1000L);
  + (int) ((timeNow - session.getLatestAccessedTime()) / 1000L);
if (timeIdle = maxInactiveInterval)
session.expire();
}
  
  
  
  1.15.2.1  +12 -4 
jakarta-tomcat/src/share/org/apache/tomcat/session/Attic/StandardSession.java
  
  Index: StandardSession.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/session/Attic/StandardSession.java,v
  retrieving revision 1.15
  retrieving revision 1.15.2.1
  diff -u -r1.15 -r1.15.2.1
  --- StandardSession.java  2000/06/18 22:21:49 1.15
  +++ StandardSession.java  2001/03/17 00:08:42 1.15.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/session/Attic/StandardSession.java,v
 1.15 2000/06/18 22:21:49 jon Exp $
  - * $Revision: 1.15 $
  - * $Date: 2000/06/18 22:21:49 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/session/Attic/StandardSession.java,v
 1.15.2.1 2001/03/17 00:08:42 marcsaeg Exp $
  + * $Revision: 1.15.2.1 $
  + * $Date: 2001/03/17 00:08:42 $
*
* 
*
  @@ -97,7 +97,7 @@
*
* @author Craig R. McClanahan
* @author a href="mailto:[EMAIL PROTECTED]"Jon S. Stevens/a
  - * @version $Revision: 1.15 $ $Date: 2000/06/18 22:21:49 $
  + * @version $Revision: 1.15.2.1 $ $Date: 2001/03/17 00:08:42 $
*/
   
   final class StandardSession
  @@ -269,6 +269,14 @@
   
   }
   
  +
  +/**
  + *
  + */
  +public long getLatestAccessedTime()
  +{
  +return this.thisAccessedTime;
  +}
   
   /**
* Return the Manager within which this Session is valid.
  
  
  



cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/context DefaultCMSetter.java

2001-03-16 Thread marcsaeg

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/DefaultCMSetter.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.java  2000/11/11 02:56:57 1.45.2.8
  +++ DefaultCMSetter.java  2001/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
  + 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( debug0) 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();
  
  
  



cvs commit: jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/listeners ContextListener.java SessionListener.java

2001-03-16 Thread craigmcc

craigmcc01/03/16 16:28:12

  Modified:catalina/src/share/org/apache/catalina/core
ApplicationContext.java
ApplicationFilterConfig.java
   catalina/src/share/org/apache/catalina/session
StandardSession.java
   webapps/examples/WEB-INF/classes/filters ExampleFilter.java
RequestDumperFilter.java
   webapps/examples/WEB-INF/classes/listeners
ContextListener.java SessionListener.java
  Log:
  Adapt to servlet API changes just checked in to "jakarta-servletapi-4".
  
  Revision  ChangesPath
  1.17  +11 -11
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
  
  Index: ApplicationContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ApplicationContext.java   2001/03/16 23:30:58 1.16
  +++ ApplicationContext.java   2001/03/17 00:28:01 1.17
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
 1.16 2001/03/16 23:30:58 remm Exp $
  - * $Revision: 1.16 $
  - * $Date: 2001/03/16 23:30:58 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
 1.17 2001/03/17 00:28:01 craigmcc Exp $
  + * $Revision: 1.17 $
  + * $Date: 2001/03/17 00:28:01 $
*
* 
*
  @@ -86,7 +86,7 @@
   import javax.servlet.Servlet;
   import javax.servlet.ServletContext;
   import javax.servlet.ServletContextAttributeEvent;
  -import javax.servlet.ServletContextAttributesListener;
  +import javax.servlet.ServletContextAttributeListener;
   import javax.servlet.http.HttpServletRequest;
   import org.apache.naming.resources.Resource;
   import org.apache.naming.resources.DirContextURLStreamHandler;
  @@ -111,7 +111,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.16 $ $Date: 2001/03/16 23:30:58 $
  + * @version $Revision: 1.17 $ $Date: 2001/03/17 00:28:01 $
*/
   
   public final class ApplicationContext
  @@ -727,10 +727,10 @@
  new ServletContextAttributeEvent(context.getServletContext(),
name, value);
for (int i = 0; i  listeners.length; i++) {
  - if (!(listeners[i] instanceof ServletContextAttributesListener))
  + if (!(listeners[i] instanceof ServletContextAttributeListener))
continue;
  -ServletContextAttributesListener listener =
  - (ServletContextAttributesListener) listeners[i];
  +ServletContextAttributeListener listener =
  + (ServletContextAttributeListener) listeners[i];
try {
   context.fireContainerEvent("beforeContextAttributeRemoved",
  listener);
  @@ -774,10 +774,10 @@
  new ServletContextAttributeEvent(context.getServletContext(),
name, value);
for (int i = 0; i  listeners.length; i++) {
  - if (!(listeners[i] instanceof ServletContextAttributesListener))
  + if (!(listeners[i] instanceof ServletContextAttributeListener))
continue;
  -ServletContextAttributesListener listener =
  - (ServletContextAttributesListener) listeners[i];
  +ServletContextAttributeListener listener =
  + (ServletContextAttributeListener) listeners[i];
try {
if (replaced) {
   context.fireContainerEvent("beforeContextAttributeReplaced",
  
  
  
  1.4   +7 -7  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java
  
  Index: ApplicationFilterConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ApplicationFilterConfig.java  2000/10/22 09:55:52 1.3
  +++ ApplicationFilterConfig.java  2001/03/17 00:28:02 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java,v
 1.3 2000/10/22 09:55:52 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/10/22 09:55:52 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java,v
 1.4 2001/03/17 00:28:02 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/03/17 00:28:02 $
*
   

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( debug0) 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)




cvs commit: jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/filters ExampleFilter.java RequestDumperFilter.java

2001-03-16 Thread craigmcc

craigmcc01/03/16 16:39:32

  Modified:catalina/src/share/org/apache/catalina/core
ApplicationFilterConfig.java
   webapps/examples/WEB-INF/classes/filters ExampleFilter.java
RequestDumperFilter.java
  Log:
  Filter.init() can now throw ServletException to indicate an initialization
  error, which will cause the filter instance to not be put into service.
  
  Revision  ChangesPath
  1.5   +9 -3  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java
  
  Index: ApplicationFilterConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ApplicationFilterConfig.java  2001/03/17 00:28:02 1.4
  +++ ApplicationFilterConfig.java  2001/03/17 00:39:28 1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java,v
 1.4 2001/03/17 00:28:02 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/03/17 00:28:02 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java,v
 1.5 2001/03/17 00:39:28 craigmcc Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/03/17 00:39:28 $
*
* 
*
  @@ -72,6 +72,7 @@
   import javax.servlet.Filter;
   import javax.servlet.FilterConfig;
   import javax.servlet.ServletContext;
  +import javax.servlet.ServletException;
   import org.apache.catalina.Context;
   import org.apache.catalina.deploy.FilterDef;
   import org.apache.catalina.util.Enumerator;
  @@ -83,7 +84,7 @@
* is first started.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2001/03/17 00:28:02 $
  + * @version $Revision: 1.5 $ $Date: 2001/03/17 00:39:28 $
*/
   
   final class ApplicationFilterConfig implements FilterConfig {
  @@ -107,10 +108,12 @@
*  publicly instantiated
* @exception InstantiationException if an exception occurs while
*  instantiating the filter object
  + * @exception ServletException if thrown by the filter's init() method
*/
   public ApplicationFilterConfig(Context context, FilterDef filterDef)
throws ClassCastException, ClassNotFoundException,
  -IllegalAccessException, InstantiationException {
  +IllegalAccessException, InstantiationException,
  +   ServletException {
   
super();
   this.context = context;
  @@ -225,9 +228,10 @@
*  publicly instantiated
* @exception InstantiationException if an exception occurs while
*  instantiating the filter object
  + * @exception ServletException if thrown by the filter's init() method
*/
   Filter getFilter() throws ClassCastException, ClassNotFoundException,
  -IllegalAccessException, InstantiationException {
  +IllegalAccessException, InstantiationException, ServletException {
   
   // Return the existing filter instance, if any
   if (this.filter != null)
  @@ -286,10 +290,12 @@
*  publicly instantiated
* @exception InstantiationException if an exception occurs while
*  instantiating the filter object
  + * @exception ServletException if thrown by the filter's init() method
*/
   void setFilterDef(FilterDef filterDef)
throws ClassCastException, ClassNotFoundException,
  -IllegalAccessException, InstantiationException {
  +IllegalAccessException, InstantiationException,
  +   ServletException {
   
this.filterDef = filterDef;
if (filterDef == null) {
  
  
  
  1.4   +1 -1  
jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/filters/ExampleFilter.java
  
  Index: ExampleFilter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/filters/ExampleFilter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ExampleFilter.java2001/03/17 00:28:07 1.3
  +++ ExampleFilter.java2001/03/17 00:39:30 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/filters/ExampleFilter.java,v
 1.3 2001/03/17 00:28:07 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/03/17 00:28:07 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/filters/ExampleFilter.java,v
 1.4 2001/03/17 00:39:30 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/03/17 00:39:30 $
*
* 
*
  @@ -89,7 +89,7 @@
* 

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardWrapperValve.java

2001-03-16 Thread craigmcc

craigmcc01/03/16 16:56:58

  Modified:catalina/src/share/org/apache/catalina Globals.java
   catalina/src/share/org/apache/catalina/core
StandardWrapperValve.java
  Log:
  Reflect corrections in the attribute names for cipher suite and key size.
  
  Pass the name of this servlet if we forward to an error page.
  
  Revision  ChangesPath
  1.19  +13 -6 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Globals.java
  
  Index: Globals.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Globals.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Globals.java  2001/01/23 04:45:10 1.18
  +++ Globals.java  2001/03/17 00:56:56 1.19
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Globals.java,v 
1.18 2001/01/23 04:45:10 remm Exp $
  - * $Revision: 1.18 $
  - * $Date: 2001/01/23 04:45:10 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Globals.java,v 
1.19 2001/03/17 00:56:56 craigmcc Exp $
  + * $Revision: 1.19 $
  + * $Date: 2001/03/17 00:56:56 $
*
* 
*
  @@ -69,7 +69,7 @@
* Global constants that are applicable to multiple packages within Catalina.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.18 $ $Date: 2001/01/23 04:45:10 $
  + * @version $Revision: 1.19 $ $Date: 2001/03/17 00:56:56 $
*/
   
   public final class Globals {
  @@ -90,7 +90,7 @@
* java.lang.String).
*/
   public static final String CIPHER_SUITE_ATTR =
  -"javax.servlet.request.cipher-suite";
  +"javax.servlet.request.cipher_suite";
   
   
   /**
  @@ -163,7 +163,7 @@
* this SSL connection (as an object of type java.lang.Integer).
*/
   public static final String KEY_SIZE_ATTR =
  -"javax.servlet.request.key-size";
  +"javax.servlet.request.key_size";
   
   
   /**
  @@ -203,6 +203,13 @@
*/
   public static final String SERVER_INFO = "Apache Tomcat/4.0-dev";
   
  +
  +/**
  + * The request attribute under which we forward a servlet name to
  + * an error page.
  + */
  +public static final String SERVLET_NAME_ATTR =
  +"javax.servlet.error.servlet_name";
   
   
   /**
  
  
  
  1.21  +10 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java
  
  Index: StandardWrapperValve.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- StandardWrapperValve.java 2001/03/09 05:03:51 1.20
  +++ StandardWrapperValve.java 2001/03/17 00:56:57 1.21
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java,v
 1.20 2001/03/09 05:03:51 remm Exp $
  - * $Revision: 1.20 $
  - * $Date: 2001/03/09 05:03:51 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java,v
 1.21 2001/03/17 00:56:57 craigmcc Exp $
  + * $Revision: 1.21 $
  + * $Date: 2001/03/17 00:56:57 $
*
* 
*
  @@ -102,7 +102,7 @@
* codeStandardWrapper/code container implementation.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.20 $ $Date: 2001/03/09 05:03:51 $
  + * @version $Revision: 1.21 $ $Date: 2001/03/17 00:56:57 $
*/
   
   final class StandardWrapperValve
  @@ -518,6 +518,9 @@
 realError.getMessage());
   sreq.setAttribute(Globals.EXCEPTION_ATTR,
 realError);
  +Wrapper wrapper = (Wrapper) getContainer();
  +sreq.setAttribute(Globals.SERVLET_NAME_ATTR,
  +  wrapper.getName());
   if (sreq instanceof HttpServletRequest)
   sreq.setAttribute(Globals.EXCEPTION_PAGE_ATTR,
 ((HttpServletRequest) sreq).getRequestURI());
  @@ -796,6 +799,9 @@
 new Integer(statusCode));
sreq.setAttribute(Globals.ERROR_MESSAGE_ATTR,
 message);
  +Wrapper wrapper = (Wrapper) getContainer();
  +sreq.setAttribute(Globals.SERVLET_NAME_ATTR,
  +  wrapper.getName());
   if (sreq instanceof HttpServletRequest)
   sreq.setAttribute(Globals.EXCEPTION_PAGE_ATTR,
 ((HttpServletRequest) 

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http HttpProcessor.java

2001-03-16 Thread remm

remm01/03/16 21:32:37

  Modified:catalina/src/share/org/apache/catalina/connector/http
HttpProcessor.java
  Log:
  - Don't log InterruptedIOExceptions anymore unless debug  1. They happen when a user
presses stop in his browser. In production environments, that will avoid filling
up the logs with stack traces which can safely be ignored.
  
  Revision  ChangesPath
  1.22  +15 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- HttpProcessor.java2001/03/06 05:06:40 1.21
  +++ HttpProcessor.java2001/03/17 05:32:37 1.22
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.21 2001/03/06 05:06:40 remm Exp $
  - * $Revision: 1.21 $
  - * $Date: 2001/03/06 05:06:40 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.22 2001/03/17 05:32:37 remm Exp $
  + * $Revision: 1.22 $
  + * $Date: 2001/03/17 05:32:37 $
*
* 
*
  @@ -107,7 +107,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.21 $ $Date: 2001/03/06 05:06:40 $
  + * @version $Revision: 1.22 $ $Date: 2001/03/17 05:32:37 $
*/
   
   final class HttpProcessor
  @@ -798,6 +798,15 @@
   } catch (EOFException e) {
   ok = false;
   } catch (InterruptedIOException e) {
  +if (debug  1) {
  +try {
  +log("process.parse", e);
  +((HttpServletResponse) response.getResponse())
  +.sendError(HttpServletResponse.SC_BAD_REQUEST);
  +} catch (Exception f) {
  +;
  +}
  +}
   ok = false;
   } catch (Exception e) {
   try {
  @@ -825,6 +834,8 @@
   } catch (Exception f) {
   ;
   }
  +ok = false;
  +} catch (InterruptedIOException e) {
   ok = false;
   } catch (Throwable e) {
   log("process.invoke", e);
  
  
  



[ANNOUNCEMENT] Tomcat 3.3 Milestone 2

2001-03-16 Thread Larry Isaacs

The second milestone release of Tomcat 3.3 is available for download
and testing.  As a Tomcat 3.x release, it remains an implementation
of the Servlet 2.2 and JSP 1.1 specifications.

The Milestone 2 release primarily offers bug fixes over Milestone 1.

In this milestone release, documentation still hasn't caught up with
some of the changes for Milestone 1 and this release. For this reason,
be sure to read the "README" file found in Tomcat's "doc" directory.
It contains documentation that covers some of the more important of
the changes to Tomcat 3.3. 

If you have did not try the Milestone 1 release, the following
additional information may help you make full use of the Milestone 2
release: 

1) The binary distribution has source for the connectors, but not for
   the Tomcat container.  The source for the full jakarta-tomcat CVS
   tree is available separately in the "v3.3-m2/src" directory. 

2) The internal directory structure contained in the binary and source
   archives differs from Tomcat 3.2.  The binary expands to a directory
   called "tomcat" and the source expands to "jakarta-tomcat".  This
   matches what you would get if you checked out CVS source and built
   Tomcat from that source.
   New for the Milestone 2 release is that building Tomcat 3.3 from
   source creates the "build" and "dist" directories under the
   "jakarta-tomcat" directory instead of at the same level as
   "jakarta-tomcat". Also, jakarta-servletapi is not required, so its
   source is not included in the "v3.3-m2/src" directory.

3) The new class loader scheme in this release ignores your CLASSPATH
   setting. Instead, you may add needed jars to Tomcat's "lib/apps",
   "lib/common", and "lib/container" directories. See the "README" file
   in Tomcat's "doc" directory for details.
   New for Milestone 2 are two System properties:
   org.apache.tomcat.apps.classpath
   org.apache.tomcat.common.classpath
   which add their listed classes and jars to the jars in "lib/apps"
   and "lib/common", respectively.

4) The "sanity-test" is not part of the binary distribution like it was
   with Tomcat 3.2.  However, it is available in "War" form, along with
   the Watchdog JSP and servlet tests.  These are found in the
   "v3.3-m2/apps" directory.  Place these War files in Tomcat's
   "webapps" directory before starting Tomcat. To simplify testing,
   these tests can be run from the Admin web application. See
   the "README" file in Tomcat's "doc" directory for details. 

5) On Windows, there have been instances where the watchdog-jsp.jsp test 
   fails to display successful tests. Running the watchdog-servlet.jsp
   first seems to avoid this. You can also restart Tomcat and re-run
   watchdog-jsp.jsp and it will display the successful tests.

6) The Admin web application's index.html file has an error in the
   commands it displays to change it to "trusted".  "run" should appear
   before "-enableAdmin" when using the ".sh" and ".bat" files.  This is
   documented correctly in the "README" in the "doc" directory.

Please download this release and give it a try in your environment.  The
source, rpms, and binaries may be found at: 

http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3-m2 

To log problems or bugs, as well as submit patches, please refer to: 

http://jakarta.apache.org/site/bugs.html 

When logging bugs to Bugzilla, please specify the Program as "Tomcat 3"
and the Version as "Nightly Build". 

Thanks, 
Larry Isaacs 

  



Tomcat 4.0 Changes for Servlet 2.3 API Refinements

2001-03-16 Thread Craig R. McClanahan

This message is an FYI to let you know that tonight's nightly build of
Tomcat 4.0 will reflect several minor changes in the servlet API that is
listed in the Servlet Specification 2.3 (Proposed Final Draft):
- In javax.servlet.Filter, remove getFilterConfig().
- In javax.servlet.Filter, replace setFilterConfig() with
  init(FilterConfig) and destroy() to be more like servlets.
- Change listener interface names to singular instead of plural
  (ServletContextAttributeListener, HttpSessionAttributeListener)
  for consistency with other APIs.
- Add a String argument to ServletContext.getResourcePaths() to let you
  specify the "directory" within the WAR for which you wish to acquire
  resources paths.  Entries that are themselves subdirectories will be
  returned with a trailing slash to indicate this.
- In javax.servlet.http.HttpServletRequest, fixed a typo in the String
  constant value for CLIENT_CERT_AUTH.
- Correct the punctuation of the request attribute names used to
  expose SSL cipher suite and key size information, to be consistent
  with the other attribute names.

These changes have been approved by the JSR-053 expert group, and will
appear in the next draft version of the 2.3 specification.

If you are building Tomcat 4.0 from source, you will want to pick up
tonight's version of the "jakarta-servletapi-4" distirbution as well, so
that your servlet classes reflect the changes.

Craig McClanahan