cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache13 jk_service_apache13.c

2002-06-20 Thread cks

cks 2002/06/20 09:16:00

  Modified:jk/native2/server/apache13 jk_service_apache13.c
  Log:
  ensure port set correctly so redirects work, use code from original mod_jk
  
  Revision  ChangesPath
  1.7   +2 -7  
jakarta-tomcat-connectors/jk/native2/server/apache13/jk_service_apache13.c
  
  Index: jk_service_apache13.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache13/jk_service_apache13.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jk_service_apache13.c 23 May 2002 23:33:50 -  1.6
  +++ jk_service_apache13.c 20 Jun 2002 16:16:00 -  1.7
  @@ -2,7 +2,7 @@
*   *
* The Apache Software License,  Version 1.1 *
*   *
  - *  Copyright (c) 1999-2001 The Apache Software Foundation.  *
  + *  Copyright (c) 1999-2002 The Apache Software Foundation.  *
*   All rights reserved.*
*   *
* = *
  @@ -282,7 +282,6 @@
   static int JK_METHOD jk2_init_ws_service(jk_env_t *env, jk_ws_service_t *s,
  jk_worker_t *worker, void *serverObj)
   {
  -/* ap_port_t port; */
   char *ssl_temp  = NULL;
   jk_workerEnv_t *workerEnv=worker-workerEnv;
   request_rec *r=serverObj;
  @@ -313,11 +312,7 @@
   /* get server name */
   s-server_name= (char *)(r-hostname ? r-hostname :
r-server-server_hostname);
  -
  -/* get the real port (otherwise redirect failed) */
  -/* apr_sockaddr_port_get(port,r-connection-local_addr); */
  -/* s-server_port = port; */
  -
  +s-server_port = htons(r-connection-local_addr.sin_port);
   s-server_software = (char *)ap_get_server_version();
   
   s-method = (char *)r-method;
  
  
  

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




Re: New warp connector 4.0.4 does not work

2002-06-20 Thread Pier Fumagalli

[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hello all,
 
 We have Apache 2.0.39 and tomcat 4.0.4 running using the old 4.0.2-01 warp
 connector.
 
 I have tried to build and use the new connector without success. Although it
 builds fine and Apache seems not to complain about it, I cannot access any
 pages and keep getting 302 temporarily moved error. The log files do not
 provide any useful information either.
 
 Is this a bug or am I missing something?
 
 Also, does anyone know if there is any decent documentation on this?

I haven't yet tried on this environment... What MPM are you using? What OS?
Did you recompile it from the sources?

Pier


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




DO NOT REPLY [Bug 10068] New: - Basic authentication not working

2002-06-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10068.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10068

Basic authentication not working

   Summary: Basic authentication not working
   Product: Tomcat 4
   Version: 4.0.4 Final
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Connector:Webapp
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Hi, I'm using tomcat4.0.4 with its webapp connector I compiled from source
and I have two problems that are shown only when I try to access my JSP
pages using apache:
1) Basic authentication is not working, whenever I require basic
authentication I get: HTTP Status 401 - Unauthorized with no previous
dialog box.
2) HTTP sessions seem to stay open for a very long time.

None of these problems are present when I access the same JSP pages
directly using tomcat http1.1 or coyote connector.

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




mod_jk 1.2.0 workers pool

2002-06-20 Thread Mladen Turk


Can we make a worker to be per request created if none available is 
found, that way we will theoretically end up with MaxThreadsPerChild 
workers but reuse one if the done() was finished?

May be ...

We should speak about that in tomcat-dev where Costin
and others could give us some precious advices

So,
After spending with Henri two days of something that look like chasing a
ghosts, we came up wit some ideas and would like to hear second
opinions.

What we have now is single ajp worker that is called from multiple
threads. Now there is almost no problems when the single client
connection, but multiple are causing problems.

My proposal is to create a new copy of the worker if
wc_get_worker_for_name returned worker is busy, and save that worker for
future use.

Something like wc_get_worker_for_name returning the list of workers, or
do that inside the wc_get_worker_for_name (IMO preferably).


Comments? 


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




DO NOT REPLY [Bug 10033] - Tomcat 4.0.3 as an NT Service

2002-06-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10033.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10033

Tomcat 4.0.3 as an NT Service





--- Additional Comments From [EMAIL PROTECTED]  2002-06-20 16:58 ---
Remy,
Thanks for u r quick reply.
Is the new version Tomcat 4.1.x is already released or is it coming in the 
future?

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




Re: mod_jk 1.2.0 workers pool

2002-06-20 Thread costinm

On Thu, 20 Jun 2002, Mladen Turk wrote:

 After spending with Henri two days of something that look like chasing a
 ghosts, we came up wit some ideas and would like to hear second
 opinions.
 
 What we have now is single ajp worker that is called from multiple
 threads. Now there is almost no problems when the single client
 connection, but multiple are causing problems.
 
 My proposal is to create a new copy of the worker if
 wc_get_worker_for_name returned worker is busy, and save that worker for
 future use.
 
 Something like wc_get_worker_for_name returning the list of workers, or
 do that inside the wc_get_worker_for_name (IMO preferably).

+1.

I think in jk2 we should keep one worker, and make sure there is no state
( i.e. it is thread safe ). All state should be in the endpoint.

But I agree for jk1 it may be easier this way.

I'm curious what is creating the conflict - the worker is supposed to be
singleton and have the state in endpoint, and it seems to work fine in
IIS/iPlanet ( both multithreaded ).


Costin


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




DO NOT REPLY [Bug 10036] - Unable to resolve a class name without a package definition

2002-06-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10036.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10036

Unable to resolve a class name without a package definition

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-06-20 18:10 ---
The servlet generated by jasper is in package org.apache.jsp.  As such, it won't
be able to reference any class that is not in a package.  This is a Java
language rule.

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




RE: mod_jk 1.2.0 workers pool

2002-06-20 Thread Mladen Turk


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: 20. lipanj 2002 19:17
 To: Mladen Turk
 Cc: List Tomcat-Dev
 Subject: Re: mod_jk 1.2.0 workers pool
 
 
 I'm curious what is creating the conflict - the worker is 
 supposed to be singleton and have the state in endpoint, and 
 it seems to work fine in IIS/iPlanet ( both multithreaded ).
 

Are you sure ???

Server Software:Microsoft-IIS/5.1
Server Hostname:localhost
Server Port:80

Document Path:  /examples/jsp/dates/date.jsp
Document Length:455 bytes

Concurrency Level:  200
Time taken for tests:   56.651461 seconds
Complete requests:  1
Failed requests:1351
   (Connect: 0, Length: 1351, Exceptions: 0)
Write errors:   0
Non-2xx responses:  5
Keep-Alive requests:0
Total transferred:  5736794 bytes
HTML transferred:   4566659 bytes
Requests per second:176.52 [#/sec] (mean)
Time per request:   1133.029 [ms] (mean)
Time per request:   5.665 [ms] (mean, across all concurrent
requests)
Transfer rate:  98.89 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:00   6.5  0 440
Processing:20 1112 6372.3340   56090
Waiting:0  934 6393.0180   56070
Total: 20 1112 6372.7340   56090



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




RE: mod_jk 1.2.0 workers pool

2002-06-20 Thread costinm

Nacho ?


Costin

On Thu, 20 Jun 2002, Mladen Turk wrote:

 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
  Sent: 20. lipanj 2002 19:17
  To: Mladen Turk
  Cc: List Tomcat-Dev
  Subject: Re: mod_jk 1.2.0 workers pool
  
  
  I'm curious what is creating the conflict - the worker is 
  supposed to be singleton and have the state in endpoint, and 
  it seems to work fine in IIS/iPlanet ( both multithreaded ).
  
 
 Are you sure ???
 
 Server Software:Microsoft-IIS/5.1
 Server Hostname:localhost
 Server Port:80
 
 Document Path:  /examples/jsp/dates/date.jsp
 Document Length:455 bytes
 
 Concurrency Level:  200
 Time taken for tests:   56.651461 seconds
 Complete requests:  1
 Failed requests:1351
(Connect: 0, Length: 1351, Exceptions: 0)
 Write errors:   0
 Non-2xx responses:  5
 Keep-Alive requests:0
 Total transferred:  5736794 bytes
 HTML transferred:   4566659 bytes
 Requests per second:176.52 [#/sec] (mean)
 Time per request:   1133.029 [ms] (mean)
 Time per request:   5.665 [ms] (mean, across all concurrent
 requests)
 Transfer rate:  98.89 [Kbytes/sec] received
 
 Connection Times (ms)
   min  mean[+/-sd] median   max
 Connect:00   6.5  0 440
 Processing:20 1112 6372.3340   56090
 Waiting:0  934 6393.0180   56070
 Total: 20 1112 6372.7340   56090
 
 
 


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




DO NOT REPLY [Bug 10068] - Basic authentication not working

2002-06-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10068.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10068

Basic authentication not working

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-06-20 18:39 ---
I just downloaded the latest webapp module from CVS
and it works fine, I guess both problems had something
to do with problem with disappearing HTTP response status code

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




Apache 1.3/jk2, redirects, redux

2002-06-20 Thread Christopher K. St. John


 jk/java/org/apache/jk/JkCoyoteHandler ACTION_CLOSE is getting
called with no call to ACTION_COMMIT when:

 - jk2 is being using with Apache 1.3 and
 - there's a redirect (like with a welcome page)

 Quick fix is to have JkCoyoteHandler CLOSE commit if the
response hasn't already been committed:


  } else if( actionCode==ActionCode.ACTION_CLOSE ) {
org.apache.coyote.Response res=(org.apache.coyote.Response)param;
if (!res.isCommitted())
  this.action(ActionCode.ACTION_COMMIT, param);

 But the code is (presumably, I haven't checked) working fine
for non-Apache 1.3 setups, and I hate to make a change without
understanding where the real root of the problem is. Hints
appreciated.

-- 
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

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




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 CoyoteAdapter.java

2002-06-20 Thread costin

costin  2002/06/20 11:53:44

  Modified:coyote/src/java/org/apache/coyote ActionCode.java
   coyote/src/java/org/apache/coyote/tomcat3
CoyoteInterceptor2.java
   coyote/src/java/org/apache/coyote/tomcat4 CoyoteAdapter.java
  Log:
  Added a new ActionCode, to be called after the request.
  
  Added the calls to the POST_REQUEST action code.
  
  It can be used for cleanup and logging ( and timings )
  
  This is called _before_ the request is recycled, so both req and res
  should be valid ( and you can get the uri and lengths )
  
  Revision  ChangesPath
  1.8   +8 -1  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionCode.java
  
  Index: ActionCode.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionCode.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ActionCode.java   17 May 2002 19:49:03 -  1.7
  +++ ActionCode.java   20 Jun 2002 18:53:44 -  1.8
  @@ -79,7 +79,8 @@
   public static final ActionCode ACTION_COMMIT = new ActionCode();
   
   
  -/* A flush() operation originated by the client
  +/* A flush() operation originated by the client ( i.e. a flush() on
  +   the servlet output stream or writer, called by a servlet ).
*/
   public static final ActionCode ACTION_CLIENT_FLUSH = new ActionCode();
   
  @@ -97,6 +98,12 @@
   
   
   public static final ActionCode ACTION_WEBAPP = new ActionCode();
  +
  +/** Hook called after request, but before recycling. Can be used
  +for logging, to update counters, custom cleanup - the request
  +is still visible
  +*/
  +public static final ActionCode ACTION_POST_REQUEST = new ActionCode();
   
   /**
* Callback for lazy evaluation - extract the remote host address.
  
  
  
  1.12  +13 -0 
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor2.java
  
  Index: CoyoteInterceptor2.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor2.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- CoyoteInterceptor2.java   1 Jun 2002 05:14:02 -   1.11
  +++ CoyoteInterceptor2.java   20 Jun 2002 18:53:44 -  1.12
  @@ -205,6 +205,19 @@
return 0;
   }
   
  +public int postRequest(org.apache.tomcat.core.Request request,
  +   org.apache.tomcat.core.Response response) {
  + if(request instanceof Tomcat3Request) {
  + try {
  +Tomcat3Request httpReq=(Tomcat3Request)request;
  +org.apache.coyote.Request cReq = httpReq.getCoyoteRequest();
  +cReq.action( ActionCode.ACTION_POST_REQUEST , null);
  + } catch(Exception ex) {
  + log(Can't send ACK, ex);
  + }
  + }
  +return 0;
  +}
   
   /**
  getInfo calls for SSL data
  
  
  
  1.8   +6 -4  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java
  
  Index: CoyoteAdapter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CoyoteAdapter.java28 May 2002 14:24:31 -  1.7
  +++ CoyoteAdapter.java20 Jun 2002 18:53:44 -  1.8
  @@ -222,6 +222,8 @@
   // Calling the container
   connector.getContainer().invoke(request, response);
   response.finishResponse();
  +
  +req.action( ActionCode.ACTION_POST_REQUEST , null);
   } catch (IOException e) {
   ;
   } catch (Throwable t) {
  
  
  

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




DO NOT REPLY [Bug 10036] - Unable to resolve a class name without a package definition

2002-06-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10036.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10036

Unable to resolve a class name without a package definition





--- Additional Comments From [EMAIL PROTECTED]  2002-06-20 19:21 ---
Kin-Man wrote:The servlet generated by jasper is in package org.apache.jsp.  As such, 
it won't be able to reference any class that is not in a package. I first thought 
Kin-Man was wrong on this, but he's right.You used to be able to do this up to 1.3, 
but in 1.4 they have tightened upthe compiler. According to 
http://java.sun.com/j2se/1.4/compatibility.html:The compiler now rejects import 
statements that import a type from the unnamed namespace. Previous versions of the 
compiler would accept such import declarations, even though they were arguably not 
allowed by the language (because the type name appearing in the import clause is not 
in scope). The specification is being clarified to state clearly that you cannot have 
a simple name in an import statement, nor can you import from the unnamed namespace. 
To summarize, the syntax import SimpleName;is no longer legal. Nor is the syntax 
import ClassInUnnamedNamespace.Nested;which would import a nested class from the 
unnamed namespace. To fix such problems in your code, move all of the classes from 
the unnamed namespace into a named namespace.

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




cvs commit: jakarta-tomcat-connectors/jk/xdocs index.xml menu.idx style.xsl.in

2002-06-20 Thread jfclere

jfclere 2002/06/20 12:33:10

  Modified:jk/xdocs menu.idx style.xsl.in
  Added:   jk/xdocs index.xml
  Log:
  Add index.xml and arrange the indexes in the left part of pages.
  
  Revision  ChangesPath
  1.2   +3 -0  jakarta-tomcat-connectors/jk/xdocs/menu.idx
  
  Index: menu.idx
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/menu.idx,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- menu.idx  26 May 2002 21:41:20 -  1.1
  +++ menu.idx  20 Jun 2002 19:33:10 -  1.2
  @@ -1,5 +1,8 @@
   ?xml version=1.0?
   
   index
  +  document href=index.xml/
 document href=AJPv13.xml/
  +  document href=configtc.xml/
  +  document href=configweb.xml/
   /index
  
  
  
  1.2   +1 -1  jakarta-tomcat-connectors/jk/xdocs/style.xsl.in
  
  Index: style.xsl.in
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/style.xsl.in,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- style.xsl.in  1 Jun 2002 21:28:41 -   1.1
  +++ style.xsl.in  20 Jun 2002 19:33:10 -  1.2
  @@ -518,7 +518,7 @@
 xsl:value-of select=$file/
   /xsl:when
   xsl:otherwise
  -  xsl:value-of select=document($file)/document/@title/
  +  xsl:value-of select=document($file)/document/properties/title/
   /xsl:otherwise
 /xsl:choose
   /xsl:if
  
  
  
  1.1  jakarta-tomcat-connectors/jk/xdocs/index.xml
  
  Index: index.xml
  ===
  ?xml version=1.0?
  
  document title=Introduction
properties
  titleThe mod_jk Module for the Apache Web Server/title
  author email=[EMAIL PROTECTED]Jean-Frederic Clere/author
/properties
  
section name=What is the mod_jk Module
  
  p
bmod_jk2/b is originated back to the old bmod_jserv/b.
bmod_jk2/b is a rewrite of bmod_jk/b.
The native part has been completly
restructured and the configuration has been simplified a lot.
  /p
  
/section
  
section name=Why should I use the mod_jk2 Module?
  
  p
Because it offers a lot of different and flexible communications
between a Web Server and the Tomcat Servlet Engine. 
  /p
  
  !-- Pier's mod_webapp text we need our building.xml
  p
If instead you're an adventurous geek who's up for a challenge, skip
the rest of this document and go to the a href=building.xml/
section, there's where the fun starts.
  /p
   --
  
/section
  
  
section name=Are there alternative ways to connect Apache and Tomcat?
  
  p
The alternative ways are better described in bmod_webapp/b
documentation.
Check there for it and then decide if you want to go on reading. 
The big advantage of bmod_webapp/b is that is very easy to configure,
has a well defined protocol named bWARP/b, does not care about the old
crappy protocols used in Tomcat-3.x and so.
But it would be possible to implement the bWARP/b protocol in
bmod_jk2/b ;-))
  /p
  
/section
  
  /document
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/xdocs index.xml

2002-06-20 Thread jfclere

jfclere 2002/06/20 12:34:32

  Modified:jk/xdocs index.xml
  Log:
  Typo - Sorry I remember it just after committing -
  
  Revision  ChangesPath
  1.2   +1 -1  jakarta-tomcat-connectors/jk/xdocs/index.xml
  
  Index: index.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/index.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.xml 20 Jun 2002 19:33:10 -  1.1
  +++ index.xml 20 Jun 2002 19:34:32 -  1.2
  @@ -1,6 +1,6 @@
   ?xml version=1.0?
   
  -document title=Introduction
  +document
 properties
   titleThe mod_jk Module for the Apache Web Server/title
   author email=[EMAIL PROTECTED]Jean-Frederic Clere/author
  
  
  

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




[PATCH] StandardSession.java

2002-06-20 Thread bob


When cruising the session code I noticed that Sessions are never
recycled because of a small boo boo.  Without this patch the
recycled ArrayList is always empty.

Can someone verify and patch this in ?

Cheers
-bob


Index: StandardSession.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
retrieving revision 1.28
diff -u -r1.28 StandardSession.java
--- StandardSession.java1 Mar 2002 19:37:45 -   1.28
+++ StandardSession.java20 Jun 2002 19:22:50 -
@@ -768,6 +768,7 @@
 expiring = false;
 id = null;
 lastAccessedTime = 0L;
+   Manager oldManager = manager;
 manager = null;
 maxInactiveInterval = -1;
 notes.clear();
@@ -776,8 +777,8 @@
 isValid = false;
 
 // Tell our Manager that this Session has been recycled
-if ((manager != null)  (manager instanceof ManagerBase))
-((ManagerBase) manager).recycle(this);
+if ((oldManager != null)  (oldManager instanceof ManagerBase))
+((ManagerBase) oldManager).recycle(this);
 
 }
 


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




Re: mod_jk apache process 1 to 1 mapping with Tomcat AjpConnector thread

2002-06-20 Thread Glenn Nielsen



GOMEZ Henri wrote:

Yet Tomcat may only be handling 10-20 requests at the same time.
This seems like a big waste of resources in Tomcat.

 
From my test with ab, tomcat could handle much more request by
 seconds. 
 
 from my yesterday bench, you'll see that TC 3.3.1 and 4.0.4
 could handle up to 330 req/seconds :
 


The issue is not how many requests mod_jk/Tomcat can handle.

The issue is that you end up over time with as many AjpConnector
threads being created by Tomcat as you have apache httpd processes
regardless of how many requests are forward on to Tomcat to process.
For example, I have apache running on a server which hosts about 40
websites and handles 10 million page views per month. This requires
at times up to 350 httpd processes to handle peak load. Only one of
those websites uses Tomcat, yet Tomcat ends up spawning 350 AjpConnector
threads.  But the load from the one site which forwards some requests
to Tomcat is only 10-15 simultaneous requests.  So Tomcat ends up having
350 AjpConnector threads when it only really needs 10-20 threads for
handling the requests which get forwarded to it.


Regards,


Glenn


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


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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java Parser.java

2002-06-20 Thread kinman

kinman  2002/06/20 13:12:26

  Modified:jasper2/src/share/org/apache/jasper/compiler Generator.java
Parser.java
  Log:
  - Fixed 10035: jsp:params in jsp:plugin rejected.
  - Also fixed a potential problem in Generator for plugins.
  
  Revision  ChangesPath
  1.31  +9 -5  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
  
  Index: Generator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Generator.java13 Jun 2002 22:56:11 -  1.30
  +++ Generator.java20 Jun 2002 20:12:26 -  1.31
  @@ -944,7 +944,7 @@
// First compose the runtime output string 
String s0 = OBJECT classid=\ + ctxt.getOptions().getIeClassId()+
\ + makeAttr(name, name);
  - String s1=, s2=;
  + String s1, s2;
if (width != null) {
if (width.isExpression()) {
s1 = quote(s0 +  width=\) +  +  + width.getValue() +
  @@ -952,6 +952,8 @@
} else {
s1 = quote(s0 + makeAttr(width, width.getValue()));
}
  + } else {
  + s1 = quote(s0);
}
if (height != null) {
if (height.isExpression()) {
  @@ -960,6 +962,8 @@
} else {
s2 = quote(makeAttr(height, height.getValue()));
}
  + } else {
  + s2 = \\;
}
String s3 = quote(makeAttr(hspace, hspace) +
makeAttr(vspace, vspace) +
  @@ -1029,7 +1033,7 @@
s2 = quote(makeAttr(height, height.getValue()));
}
} else {
  - s2 = ;
  + s2 = \\;
}
   
s3 = quote(makeAttr(hspace, hspace) +
  
  
  
  1.6   +5 -4  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java
  
  Index: Parser.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Parser.java   13 Jun 2002 18:56:18 -  1.5
  +++ Parser.java   20 Jun 2002 20:12:26 -  1.6
  @@ -586,7 +586,7 @@
   }
   
   /*
  - * JspParams ::=  S? '' Params+ /jsp:params' S? ''
  + * JspParams ::=  S? '' S? Params+ /jsp:params' S? ''
*/
   private void parseJspParams(Node parent) throws JasperException {
   
  @@ -595,6 +595,7 @@
err.jspError(reader.mark(), jsp.error.params.notclosed);
}
   
  + reader.skipSpaces();
Node jspParamsNode = new Node.ParamsAction(start, parent);
parseParams(jspParamsNode, jsp:params);
   }
  
  
  

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




RE: mod_jk 1.2.0 workers pool

2002-06-20 Thread Ignacio J. Ortega

 -Mensaje original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Enviado el: 20 de junio de 2002 20:29

I need time to prepare a machine that can handle this level of
concurrency, Mladen used  -c 200, i need to switch to one of the
servers, :(, Thanks to microsoft, W2k professional only can handle 10
simultaneus connections :..

I think Mlanden uses XP, right? which version ? Home, Professional? do
you know the exact number of concurrent connections the XP version you
use can handle?


Saludos ,
Ignacio J. Ortega

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




cvs commit: jakarta-tomcat-connectors/jk/xdocs configweb.xml

2002-06-20 Thread jfclere

jfclere 2002/06/20 13:38:41

  Modified:jk/xdocs configweb.xml
  Log:
  Remove the lines of normal socket that were in the AF_UNIX socket example.
  
  Revision  ChangesPath
  1.2   +0 -4  jakarta-tomcat-connectors/jk/xdocs/configweb.xml
  
  Index: configweb.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/configweb.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- configweb.xml 20 Jun 2002 10:02:19 -  1.1
  +++ configweb.xml 20 Jun 2002 20:38:41 -  1.2
  @@ -299,10 +299,6 @@
   [channel.un:unixsocket]
   file=/home1/jakarta/jakarta-tomcat-4.1/dist/work/jk2.socket
   
  -[channel.socket:localhost:8019]
  -port=8019
  -host=127.0.0.1
  -
   # define the worker
   [ajp13:unixsocket]
   channel=channel.un:unixsocket
  
  
  

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




DO NOT REPLY [Bug 9961] - JSTL core tag forEach does not work for List

2002-06-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9961.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9961

JSTL core tag forEach does not work for List





--- Additional Comments From [EMAIL PROTECTED]  2002-06-20 22:11 ---
I was not able to download the jar file with the given url.  Can you attach it
in bugzilla?

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




pageContext null from JSP method -- Jasper bug?

2002-06-20 Thread Jones, Stephen

Hey Jasper gurus-- is this a bug?

I have this JSP example (note the exclamation point):

%! /*  This method returns null-- Jasper should probably give a
compiler
error, since this is a dangerous pitfall for JSP developers.
*/
private PageContext getPageContext() {
return pageContext;
}
%
html
body
pre%= getPageContext() %/pre
/body
/html

Should this example page compile properly? 'pageContext' is null (from the
method only) when I run it-- I thought it would be nice for

a) Jasper to give a compiler error when it sees such a dangerous reference.
-OR-
b) pageContext to not be null from the JSP method

It seems the member is inherited from 'protected PageContext pageContext' at
org/apache/jasper/runtime/HttpJspBase.java:81

I am reporting against Tomcat 4.0.3 Final binaries and source.

Please let me know if I should file a report on nagoya.apache.org/bugzilla,
and if so, what component to file it against. (Jasper? Jasper 2?)

Thanks,
Steve

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser ParserUtils.java

2002-06-20 Thread costin

costin  2002/06/20 15:31:23

  Modified:jasper2/src/share/org/apache/jasper/xmlparser
ParserUtils.java
  Log:
  Remove some code that doesn't seem to be used.
  
  Added some printlns for special cases ( which shouldn't happen - but
  shouldn't be ignored either ).
  
  Added a 'validating' hack, to allow disabling the validation ( there is
  no point in validating the same .tld or web.xml over and over again - web.xml
  is anyway validated once by tomcat ).
  
  Revision  ChangesPath
  1.3   +22 -43
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser/ParserUtils.java
  
  Index: ParserUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser/ParserUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ParserUtils.java  20 May 2002 18:02:56 -  1.2
  +++ ParserUtils.java  20 Jun 2002 22:31:23 -  1.3
  @@ -100,40 +100,8 @@
*/
   
   public class ParserUtils {
  -
  -
  -// -- Unit Test Program
  -
  -/**
  - * Usage:  java org.apache.jasper.xmlparser.ParserUtils {pathname}
  - */
  -public static void main(String args[])  {
  -
  -if (args.length  1) {
  -System.out.println(usage: java ParserUtils {filename});
  -System.exit(1);
  -}
  -
  -try {
  -ParserUtils pu = new ParserUtils();
  -System.out.println(Opening  + args[0]);
  -java.io.FileInputStream fis =
  -new java.io.FileInputStream(args[0]);
  -System.out.println(Execute the parse);
  -TreeNode tree = pu.parseXMLDocument(args[0], fis);
  -System.out.println(Dump results);
  -System.out.println(tree);
  -} catch (Throwable t) {
  -System.out.println(Exception:  + t.toString());
  -t.printStackTrace(System.out);
  -}
  -
  -}
  -
  -
   // - Instance Variables
   
  -
   /**
* The class loader to use for accessing our XML parser.
*/
  @@ -143,14 +111,15 @@
   /**
* An error handler for use when parsing XML documents.
*/
  -protected ErrorHandler errorHandler = new MyErrorHandler();
  +static ErrorHandler errorHandler = new MyErrorHandler();
   
   
   /**
* An entity resolver for use when parsing XML documents.
*/
  -protected EntityResolver entityResolver = new MyEntityResolver();
  +static EntityResolver entityResolver = new MyEntityResolver();
   
  +public static boolean validating=true;
   
   // - Public Methods
   
  @@ -158,11 +127,11 @@
   /**
* Return the class loader used to access our XML parser.
*/
  -public ClassLoader getClassLoader() {
  +// public ClassLoader getClassLoader() {
   
  -return (this.classLoader);
  +// return (this.classLoader);
   
  -}
  +// }
   
   
   /**
  @@ -194,11 +163,12 @@
   method.invoke(null, new Object[0]);
   */
   factory.setNamespaceAware(true);
  -factory.setValidating(true);
  +factory.setValidating(validating);
   DocumentBuilder builder = factory.newDocumentBuilder();
   builder.setEntityResolver(entityResolver);
   builder.setErrorHandler(errorHandler);
   document = builder.parse(is);
  +//System.out.println(Parsing  + uri );
   /*
   } catch (ClassNotFoundException ex) {
   throw new JasperException(CNFE:  + ex); // FIXME
  @@ -266,6 +236,7 @@
   
   // Construct a new TreeNode for this node
   TreeNode treeNode = new TreeNode(node.getNodeName(), parent);
  +// System.out.println(PU:  + node.getNodeName());
   
   // Convert all attributes of this node
   NamedNodeMap attributes = node.getAttributes();
  @@ -275,6 +246,9 @@
   Node attribute = attributes.item(i);
   treeNode.addAttribute(attribute.getNodeName(),
 attribute.getNodeValue());
  +// System.out.println(PU:  + 
  +//attribute.getNodeName() + = 
+ 
  +//attribute.getNodeValue());
   }
   }
   
  @@ -298,7 +272,7 @@
   }
   }
   }
  -
  +
   // Return the completed TreeNode graph
   return (treeNode);
   
  @@ -313,7 +287,7 @@
* keyed by the web application class loader instance.  FIXME - this
* probably 

cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper JspCompilationContext.java JspEngineContext.java

2002-06-20 Thread costin

costin  2002/06/20 15:33:57

  Modified:jasper2/src/share/org/apache/jasper
JspCompilationContext.java
  Removed: jasper2/src/share/org/apache/jasper JspEngineContext.java
  Log:
  Moved the remaining methods to JspCompilationContext, remove the
  JspEngineContext. That will make sure that JSPC and the servlet will
  be in sync, at least for paths / class loader operations.
  
  JspCompilationContext deals with all the resources and paths needed
  during translation / compilation.
  
  Revision  ChangesPath
  1.6   +80 -8 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java
  
  Index: JspCompilationContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JspCompilationContext.java14 Jun 2002 20:39:12 -  1.5
  +++ JspCompilationContext.java20 Jun 2002 22:33:57 -  1.6
  @@ -75,6 +75,7 @@
   import java.net.MalformedURLException;
   import org.apache.jasper.compiler.Compiler;
   import org.apache.jasper.servlet.JspServletWrapper;
  +import org.apache.jasper.servlet.JasperLoader;
   import javax.servlet.ServletContext;
   import org.apache.jasper.compiler.JspRuntimeContext;
   
  @@ -118,10 +119,14 @@
   protected int removed = 0;
   protected boolean reload = true;
   
  +protected URLClassLoader jspLoader;
  +protected URL [] outUrls = new URL[1];
  +protected Class servletClass;
  +
   // jspURI _must_ be relative to the context
  -protected JspCompilationContext(String jspUri, boolean isErrPage, Options 
options,
  -ServletContext context, JspServletWrapper jsw,
  -JspRuntimeContext rctxt) {
  +public JspCompilationContext(String jspUri, boolean isErrPage, Options options,
  + ServletContext context, JspServletWrapper jsw,
  + JspRuntimeContext rctxt) {
   this.jspUri = jspUri;
   this.isErrPage = isErrPage;
   this.options=options;
  @@ -151,7 +156,9 @@
* The classpath that is passed off to the Java compiler. 
*/
   public String getClassPath() {
  -return classPath;
  +if( classPath != null )
  +return classPath;
  +return rctxt.getClassPath();
   }
   
   /**
  @@ -166,7 +173,9 @@
* this JSP?
*/
   public ClassLoader getClassLoader() {
  -return loader;
  +if( loader != null )
  +return loader;
  +return rctxt.getParentClassLoader();
   }
   
   public void setClassLoader(URLClassLoader loader) {
  @@ -475,10 +484,73 @@
   }
   }
   
  +/** True if the servlet needs loading
  + */
   public boolean isReload() {
   return reload;
   }
   
  +//  Manipulating the class 
  +
  +public Class load() 
  +throws JasperException, FileNotFoundException
  +{
  +try {
  +if (servletClass == null  !options.getDevelopment()) {
  +compile();
  +}
  +jspLoader = new JasperLoader
  +(outUrls,
  + getServletPackageName() + . + getServletClassName(),
  + rctxt.getParentClassLoader(),
  + rctxt.getPermissionCollection(),
  + rctxt.getCodeSource());
  +
  +servletClass = jspLoader.loadClass(
  + getServletPackageName() + . + getServletClassName());
  +} catch (FileNotFoundException ex) {
  +jspCompiler.removeGeneratedFiles();
  +throw ex;
  +} catch (ClassNotFoundException cex) {
  +throw new JasperException(
  +Constants.getString(jsp.error.unable.load),cex);
  +} catch (JasperException ex) {
  +throw ex;
  +} catch (Exception ex) {
  +throw new JasperException
  +(Constants.getString(jsp.error.unable.compile), ex);
  +}
  +removed = 0;
  +reload = false;
  +return servletClass;
  +}
  +
  +public void createOutdir() {
  +File outDirF = null;
  +try {
  +URL outURL = options.getScratchDir().toURL();
  +String outURI = outURL.toString();
  +if (outURI.endsWith(/)) {
  +outURI = outURI 
  ++ jspUri.substring(1,jspUri.lastIndexOf(/)+1);
  +} else {
  +outURI = outURI 
  ++ jspUri.substring(0,jspUri.lastIndexOf(/)+1);
  +}
  +outURL = new URL(outURI);
  +outDirF = new 

cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler TldLocationsCache.java

2002-06-20 Thread costin

costin  2002/06/20 16:00:43

  Modified:jasper2/src/share/org/apache/jasper/compiler
TldLocationsCache.java
  Log:
  Added some code to allow the caching of the TldLibraryInfo. On apps with many
  pages and many taglibs it is a waste of time to read/parse the same tld
  on every page.
  
  Revision  ChangesPath
  1.4   +25 -2 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TldLocationsCache.java
  
  Index: TldLocationsCache.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TldLocationsCache.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TldLocationsCache.java5 Jun 2002 23:18:33 -   1.3
  +++ TldLocationsCache.java20 Jun 2002 23:00:43 -  1.4
  @@ -130,20 +130,30 @@
*/
   private Hashtable mappings = new Hashtable();
   
  +private Hashtable tlds = new Hashtable();
  +
  +private boolean initialized=false;
  +ServletContext ctxt;
   //*
   // Constructor and Initilizations
  -
  +
   public TldLocationsCache(ServletContext ctxt) {
  +this.ctxt=ctxt;
  +}
  +
  +private void init() {
  +if( initialized ) return;
   try {
   processWebDotXml(ctxt);
   processJars(ctxt);
  +initialized=true;
   } catch (JasperException ex) {
   Constants.message(jsp.error.internal.tldinit,
 new Object[] { ex.getMessage() },
 Logger.ERROR);
   }
   }
  -
  +
   private void processWebDotXml(ServletContext ctxt)
   throws JasperException
   {
  @@ -305,6 +315,7 @@
   public String[] getLocation(String uri) 
   throws JasperException
   {
  +if( ! initialized ) init();
   return (String[])mappings.get(uri);
   }
   
  @@ -327,6 +338,18 @@
   }
   }
   
  +public TagLibraryInfo getTagLibraryInfo( String uri ) {
  +if( ! initialized ) init();
  +Object o=tlds.get( uri );
  +if( o==null ) return null;
  +return (TagLibraryInfo)o;
  +}
  +
  +public void addTagLibraryInfo( String uri, TagLibraryInfo tld ) {
  +if( ! initialized ) init();
  +tlds.put( uri, tld);
  +}
  +
   private void p(String s) {
   System.out.println([TldLocationsCache]  + s);
   }
  
  
  

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JspDocumentParser.java

2002-06-20 Thread costin

costin  2002/06/20 16:02:16

  Modified:jasper2/src/share/org/apache/jasper/compiler
JspDocumentParser.java
  Log:
  Use the cached TLDLibraryInfo.
  
  This is not perfect - we may look at the file timestamp and re-read it
  if modified. If you have problems with cached TLDLibInfo - you can comment
  this part out.
  ( I can add a flag to turn on caching )
  
  Revision  ChangesPath
  1.3   +12 -8 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java
  
  Index: JspDocumentParser.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JspDocumentParser.java13 Jun 2002 18:56:18 -  1.2
  +++ JspDocumentParser.java20 Jun 2002 23:02:16 -  1.3
  @@ -439,11 +439,15 @@
uri = uri.substring(URN_JSPTLD.length());
}
   
  - // get the location
  - String[] location = ctxt.getTldLocation(uri);
  -
  - TagLibraryInfo tl = new TagLibraryInfoImpl(ctxt, prefix, uri,
  -location, err);
  +TldLocationsCache cache=ctxt.getOptions().getTldLocationsCache();
  +TagLibraryInfo tl=cache.getTagLibraryInfo( uri );
  +if( tl==null ) {
  +// get the location
  +String[] location = ctxt.getTldLocation(uri);
  +
  +tl = new TagLibraryInfoImpl(ctxt, prefix, uri,
  +location, err);
  +}
taglibs.put(prefix, tl);
}
   }
  
  
  

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




RE: proposed minor change to WebdavServlet

2002-06-20 Thread Jones, Stephen

Now you've got a 'get' method doing a 'give' operation ;) Not that I know
anything about WebDAV.

-Steve

-Original Message-
From: Russ Trotter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 4:19 PM
To: [EMAIL PROTECTED]
Subject: proposed minor change to WebdavServlet


Hello,

   I'm proposing a minor change to WebdavServlet.  In my application, I need

the actually docBase of the inner-most DirContext to be dynamic dependent on

request/session data.  I was thinking of the following:  

Create a method like this in WebdavServlet:

protected DirContext getResources(HttpServletRequest req)
{
   return super.getResources();
}

and replacing all calls to getResources()  in the doXX() methods with calls
to 
getResources(request).

  Now, my app-specifc servlet can just override the above 
getResources(HttpServletRequest) method to do it's specific stuff and things

hum merrily along.

  I'd like to submit a patch to WebdavServlet to do this ASAP, but wanted to

get developer opinion on this before I do it? (specifically, Remy :-) )

Thanks,
russ

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

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet JspServletWrapper.java

2002-06-20 Thread costin

costin  2002/06/20 16:05:27

  Modified:jasper2/src/share/org/apache/jasper/servlet
JspServletWrapper.java
  Log:
  Update to JspCompilationContext.
  
  Move the code to load the servlet in a method - that can also be called
  before service(), allowing us to load the class which in turns allow
  to detect the dependencies.
  
  Revision  ChangesPath
  1.5   +38 -22
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java
  
  Index: JspServletWrapper.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JspServletWrapper.java11 May 2002 05:00:22 -  1.4
  +++ JspServletWrapper.java20 Jun 2002 23:05:27 -  1.5
  @@ -78,7 +78,7 @@
   import org.apache.jasper.JasperException;
   import org.apache.jasper.Constants;
   import org.apache.jasper.Options;
  -import org.apache.jasper.JspEngineContext;
  +import org.apache.jasper.JspCompilationContext;
   import org.apache.jasper.compiler.JspRuntimeContext;
   import org.apache.jasper.runtime.HttpJspBase;
   
  @@ -106,7 +106,7 @@
   private Servlet theServlet;
   private String jspUri;
   private Class servletClass;
  -private JspEngineContext ctxt;
  +private JspCompilationContext ctxt;
   private long available = 0L;
   private ServletConfig config;
   private Options options;
  @@ -118,16 +118,42 @@
   this.config = config;
   this.options = options;
   this.jspUri = jspUri;
  -ctxt = new JspEngineContext
  -(rctxt, config.getServletContext(), jspUri,
  - this, isErrorPage, options);
  +ctxt = new JspCompilationContext( jspUri, isErrorPage,
  +  options,
  +  config.getServletContext(),
  +  this, rctxt);
  +ctxt.createOutdir();
   }
   
  -public JspEngineContext getJspEngineContext() {
  +public JspCompilationContext getJspEngineContext() {
   return ctxt;
   }
   
  -public HttpJspBase getServlet() {
  +public HttpJspBase getServlet()
  +throws ServletException, IOException, FileNotFoundException
  +{
  +if (ctxt.isReload()) {
  +synchronized (this) {
  +// Synchronizing on jsw enables simultaneous loading
  +// of different pages, but not the same page.
  +if (ctxt.isReload()) {
  +System.out.println(JspServletWrapper - isReload );
  +// This is to maintain the original protocol.
  +destroy();
  +
  +try {
  +servletClass = ctxt.load();
  +theServlet = (Servlet) servletClass.newInstance();
  +} catch( IllegalAccessException ex1 ) {
  +throw new JasperException( ex1 );
  +} catch( InstantiationException ex ) {
  +throw new JasperException( ex );
  +}
  +
  +theServlet.init(config);
  +}
  +}
  +}
   return (HttpJspBase)theServlet;
   }
   
  @@ -154,23 +180,13 @@
   
   if (options.getDevelopment()) {
   synchronized (this) {
  +System.out.println(JspServletWrapper - development compile );
   ctxt.compile();
   }
   }
   
   if (ctxt.isReload()) {
  -synchronized (this) {
  -
  -// Synchronizing on jsw enables simultaneous loading
  -// of different pages, but not the same page.
  -if (ctxt.isReload()) {
  -servletClass = ctxt.load();
  -// This is to maintain the original protocol.
  -destroy();
  -theServlet = (Servlet) servletClass.newInstance();
  -theServlet.init(config);
  -}
  -}
  +getServlet();
   }
   
   // If a page is to only to be precompiled return.
  
  
  

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Validator.java

2002-06-20 Thread kinman

kinman  2002/06/20 16:48:23

  Modified:jasper2/src/share/org/apache/jasper/compiler Validator.java
  Log:
  - Fixed 9996, and possibly 9993: set the default charset from the
pageEncoding if contentType specified does not include a charset.
  
  Revision  ChangesPath
  1.10  +12 -6 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java
  
  Index: Validator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Validator.java5 Jun 2002 22:01:33 -   1.9
  +++ Validator.java20 Jun 2002 23:48:23 -  1.10
  @@ -583,13 +583,19 @@
// Determine the default output content type, per errata_a
// 
http://jcp.org/aboutJava/communityprocess/maintenance/jsr053/errata_1_2_a_20020321.html
PageInfo pageInfo = compiler.getPageInfo();
  - if (pageInfo.getContentType() == null) {
  + String contentType = pageInfo.getContentType();
  + if (contentType == null || contentType.indexOf(charset=)  0) {
boolean isXml = page.getRoot().isXmlSyntax();
  - String defaultType = isXml? text/xml;: text/html;;
  + String defaultType;
  + if (contentType == null) {
  + defaultType = isXml? text/xml: text/html;
  + } else {
  + defaultType = contentType;
  + }
String charset = pageInfo.getPageEncoding();
if (charset == null)
charset = isXml? UTF-8: ISO-8859-1;
  - pageInfo.setContentType(defaultType + charset);
  + pageInfo.setContentType(defaultType + ; + charset);
}
   
/*
  
  
  

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




DO NOT REPLY [Bug 10094] New: - Apparent problem with all tags in a TLD if one of the tags has an invalid configuration

2002-06-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10094.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10094

Apparent problem with all tags in a TLD if one of the tags has an invalid configuration

   Summary: Apparent problem with all tags in a TLD if one of the
tags has an invalid configuration
   Product: Tomcat 4
   Version: 4.1.3
  Platform: All
OS/Version: All
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Jasper 2
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Here is a case :
in a TLD - MyTLD.tld we have two tags:
tag
 tag-classfoo/tag-class
 tei-classfooTagExtraInfo/tei-class

  variable  /variable
/tag

tag
 tag-classbar/variable
 

  variable... /variable
/tag

In case tag bar is accesed in a JSP , then a comilation error is thrown , that 
says:

org.apache.jasper.JasperException: Unable to compile class for JSP
at org.apache.jasper.JspEngineContext.compile(JspEngineContext.java:388)
at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:157)
at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:260)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:646)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:483)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:646)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:483)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2349)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:646)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:644)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:171)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:644)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:483)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:646)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:483)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service
(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:405)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:376)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:518)
at java.lang.Thread.run(Thread.java:536)


root cause 

org.apache.jasper.JasperException: null(-1,-1) variable subelement defined in 
tld when TagExtraInfo class tlelementvar.TagWithVarExtraInfo is non-null
at org.apache.jasper.compiler.DefaultErrorHandler.jspError
(DefaultErrorHandler.java:94)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch
(ErrorDispatcher.java:417)
at org.apache.jasper.compiler.ErrorDispatcher.jspError
(ErrorDispatcher.java:154)
at org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo
(TagLibraryInfoImpl.java:386)
at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD

DO NOT REPLY [Bug 9996] - @%include breaks when the included page contains non-ascii encoding

2002-06-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9996.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9996

@%include breaks when the included page contains non-ascii encoding

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-06-20 23:55 ---
The problem is not in the @%include% directive, but in the setting of default
charset.  The rules are specified in the errata a:

http://jcp.org/aboutJava/communityprocess/maintenance/jsr053/errata_1
_2_a_20020321.html

In particular, if a contentType is specified but it does not contain a charset,
then the charset should use pageEncoding, if specified.

Fixed in jasper 2.

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




DO NOT REPLY [Bug 10035] - jsp:params not allowed as a sub-elemnt for jsp:plugin

2002-06-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10035.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10035

jsp:params not allowed as a sub-elemnt for jsp:plugin

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-06-20 23:57 ---
Fixed in jasper 2

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




DO NOT REPLY [Bug 10037] - Jasper2 throws NPE in with jsp:plugin id applet not found

2002-06-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10037.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10037

Jasper2 throws NPE in with jsp:plugin id applet not found

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-06-20 23:58 ---
Could not reproduced after fixing 10035.  Assumed fixed.

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




DO NOT REPLY [Bug 9993] - jsp:include does not handle non-ascii encoding correctly

2002-06-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9993.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9993

jsp:include does not handle non-ascii encoding correctly

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-06-21 00:36 ---
You are specifying an output charset of Big5 without specifying the same for
the input pageEncoding, wouldn't you have problem?

If you have a pageEncoding on the including page, make sure you also have the
same pageEncoding on the included page.  However, charset can only be specified
on the including page, and not the included page.  This only applies to
jsp:include, not %@ include

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




cvs commit: jakarta-tomcat-4.0/webapps/admin/images DefaultContext.gif Mailsession.gif

2002-06-20 Thread amyroh

amyroh  2002/06/20 17:40:59

  Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin
TomcatTreeBuilder.java
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources
ResourcesTreeBuilder.java
  Added:   webapps/admin/images DefaultContext.gif Mailsession.gif
  Log:
  Add JavaMail Sessions icon to admin.  Minor typo fix.
  
  Revision  ChangesPath
  1.33  +5 -5  
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java
  
  Index: TomcatTreeBuilder.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- TomcatTreeBuilder.java20 Jun 2002 02:31:05 -  1.32
  +++ TomcatTreeBuilder.java21 Jun 2002 00:40:59 -  1.33
  @@ -482,7 +482,7 @@
   false);
   TreeControlNode mailsessions = new TreeControlNode
   (Context Mail Sessions  + containerName,
  -Datasource.gif,
  +Mailsession.gif,
   resources.getMessage(resources.treeBuilder.mailsessions),
   resources/listMailSessions.do?resourcetype= + 
   URLEncoder.encode(type) + path= +
  
  
  
  1.10  +5 -5  
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ResourcesTreeBuilder.java
  
  Index: ResourcesTreeBuilder.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ResourcesTreeBuilder.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ResourcesTreeBuilder.java 20 Jun 2002 02:31:06 -  1.9
  +++ ResourcesTreeBuilder.java 21 Jun 2002 00:40:59 -  1.10
  @@ -139,7 +139,7 @@
false);
   TreeControlNode mailsessions = new TreeControlNode
   (Globally Administer Mail Sessions ,
  -Datasource.gif,
  +Mailsession.gif,
   resources.getMessage(resources.treeBuilder.mailsessions),
   resources/listMailSessions.do?resourcetype=Globalforward= +
   URLEncoder.encode(MailSessions List Setup),
  
  
  
  1.1  jakarta-tomcat-4.0/webapps/admin/images/DefaultContext.gif
  
Binary file
  
  
  1.1  jakarta-tomcat-4.0/webapps/admin/images/Mailsession.gif
  
Binary file
  
  

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java Node.java

2002-06-20 Thread kinman

kinman  2002/06/20 17:59:56

  Modified:jasper2/src/share/org/apache/jasper/compiler Generator.java
Node.java
  Log:
  - Fixed the last bug in nested tags costin discovered.  :-)
Patch supplied by Jan Luehe.
  
  Revision  ChangesPath
  1.32  +68 -31
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
  
  Index: Generator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- Generator.java20 Jun 2002 20:12:26 -  1.31
  +++ Generator.java21 Jun 2002 00:59:56 -  1.32
  @@ -1471,14 +1471,21 @@
/*
 * Declares any NESTED scripting variables of the given custom tag,
 * if the given custom tag is not nested inside itself (i.e, has a
  -  * nesting level of zero). In addition, a NESTED scripting variable is 
  -  * declared only if it has not already been declared in the same scope
  -  * in the generated code, that is, if this custom tag's parent is
  +  * nesting level of zero). If the custom tag does have a custom nesting
  +  * level greater than 0, this method declares a scripting variable
  +  * derived from the tag's id attribute (if present), only if its
  +  * scope is NESTED and it does not match the id attribute of any of
  +  * the enclosing tags of the same (custom) type.
  +  *
  +  * Additionally, a NESTED scripting variable is declared only if it
  +  * has not already been declared in the same Java
  +  * scope of the generated code, that is, if this custom tag's parent is
 * different from the parent of the custom tag that may already have
 * declared this variable.
 */
private void declareNestedScriptingVariables(Node.CustomTag n) {
  - if (n.getCustomNestingLevel()  0) {
  +
  + if (n.getCustomNestingLevel()  0  !n.hasUnnestedIdAttribute()) {
return;
}
   
  @@ -1489,17 +1496,42 @@
}
   
if (varInfos != null) {
  - for (int i=0; ivarInfos.length; i++) {
  - if ((varInfos[i].getScope() == VariableInfo.NESTED)
  -  varInfos[i].getDeclare()) {
  - String name = varInfos[i].getVarName();
  - Node parent = (Node) nestedVars.get(name);
  - if ((parent == null) || (parent != n.getParent())) {
  - out.printin(varInfos[i].getClassName());
  - out.print( );
  - out.print(name);
  - out.println(;);
  - nestedVars.put(name, n.getParent());
  + if (n.getCustomNestingLevel() == 0) {
  + // Declare *any* scripting variables with NESTED scope
  + for (int i=0; ivarInfos.length; i++) {
  + if ((varInfos[i].getScope() == VariableInfo.NESTED)
  +  varInfos[i].getDeclare()) {
  + String name = varInfos[i].getVarName();
  + Node parent = (Node) nestedVars.get(name);
  + if (parent == null || parent != n.getParent()) {
  + out.printin(varInfos[i].getClassName());
  + out.print( );
  + out.print(name);
  + out.println(;);
  + nestedVars.put(name, n.getParent());
  + }
  + }
  + }
  + } else {
  + /*
  +  * Declare only scripting variable (with NESTED scope)
  +  * derived from unnested id attribute
  +  */
  + String idAttr = n.getAttributeValue(id);
  + for (int i=0; ivarInfos.length; i++) {
  + if ((varInfos[i].getScope() == VariableInfo.NESTED)
  +  varInfos[i].getDeclare()) {
  + String name = varInfos[i].getVarName();
  + Node parent = (Node) nestedVars.get(name);
  + if ((parent == null || parent != n.getParent())
  +  idAttr.equals(name)) {
  + out.printin(varInfos[i].getClassName());
  + out.print( );
  + out.print(name);
  + out.println( = null;);
  + nestedVars.put(name, n.getParent());
  + break;
  + }
}
}
}
  @@ -1526,10 +1558,12 

RE: Jasper2: serious problem with tag declarations

2002-06-20 Thread Jan Luehe

Hi Costin,

 More info:
 
 The page is:
 
  %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
 
   logic:iterate id=id1 name=name1 property=prop1
 logic:iterate id=id2 name=name2 property=prop2
   Foo
 /logic:iterate
   /logic:iterate
 
 I get:
 
 a$jsp.java:75:25:75:25: Error: No entity named id2 was found in this 
 environment.
 
 And the generated code is:
   .
   /*   logic:iterate  */
   java.lang.Object _jspx_id2_1;
   _jspx_id2_1 = id2;
   org.apache.struts.taglib.logic.IterateTag 
 _jspx_th_logic_iterate_1 = (org.apache.struts.taglib.logic.IterateTag) 
 
_jspx_tagPool_logic_iterate_property_name_id.get(org.apache.struts.taglib.logic.
 IterateTag.class);
 
  
 
 No 'id2' is ever declared.

I was unable to reproduce the problem where a scripting variable is being
declared multiple times. That used to be a bug with Jasper, which we
fixed in Jasper2.

However, I was able to reproduce the above problem with nested
logic:iterate tags where 'id2' is never declared.

The nested logic:iterate did not declare any of its NESTED scripting
variables, since it assumed that those had already been declared by the 
encapsulating logic:iterate. This approach did not take into account
the case where a tag's TEI determines the name of a scripting
variable from the tag's id attribute.

Attached is a patch that fixes the problem. Kin-Man has volunteered
to apply it. I still don't seem to have commit privileges for tomcat.

Let me know if you still run into any problems.

Thanks,


Jan









Executing ssh-askpass to query the password...
Warning: Remote host denied X11 forwarding, perhaps xauth program could not be run on 
the server side.
? build
? build.properties
cvs server: Diffing .
cvs server: Diffing doc
cvs server: Diffing src
cvs server: Diffing src/bin
cvs server: Diffing src/share
cvs server: Diffing src/share/org
cvs server: Diffing src/share/org/apache
cvs server: Diffing src/share/org/apache/jasper
cvs server: Diffing src/share/org/apache/jasper/compiler
Index: src/share/org/apache/jasper/compiler/Generator.java
===
RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
retrieving revision 1.30
diff -u -r1.30 Generator.java
--- src/share/org/apache/jasper/compiler/Generator.java 13 Jun 2002 22:56:11 - 
 1.30
+++ src/share/org/apache/jasper/compiler/Generator.java 21 Jun 2002 00:20:17 -
@@ -1467,14 +1467,21 @@
/*
 * Declares any NESTED scripting variables of the given custom tag,
 * if the given custom tag is not nested inside itself (i.e, has a
-* nesting level of zero). In addition, a NESTED scripting variable is 
-* declared only if it has not already been declared in the same scope
-* in the generated code, that is, if this custom tag's parent is
+* nesting level of zero). If the custom tag does have a custom nesting
+* level greater than 0, this method declares a scripting variable
+* derived from the tag's id attribute (if present), only if its
+* scope is NESTED and it does not match the id attribute of any of
+* the enclosing tags of the same (custom) type.
+*
+* Additionally, a NESTED scripting variable is declared only if it
+* has not already been declared in the same Java
+* scope of the generated code, that is, if this custom tag's parent is
 * different from the parent of the custom tag that may already have
 * declared this variable.
 */
private void declareNestedScriptingVariables(Node.CustomTag n) {
-   if (n.getCustomNestingLevel()  0) {
+
+   if (n.getCustomNestingLevel()  0  !n.hasUnnestedIdAttribute()) {
return;
}
 
@@ -1485,17 +1492,42 @@
}
 
if (varInfos != null) {
-   for (int i=0; ivarInfos.length; i++) {
-   if ((varInfos[i].getScope() == VariableInfo.NESTED)
-varInfos[i].getDeclare()) {
-   String name = varInfos[i].getVarName();
-   Node parent = (Node) nestedVars.get(name);
-   if ((parent == null) || (parent != n.getParent())) {
-   out.printin(varInfos[i].getClassName());
-   out.print( );
-   out.print(name);
-   out.println(;);
-   nestedVars.put(name, n.getParent());
+   if (n.getCustomNestingLevel() == 0) {
+   // Declare *any* scripting variables with NESTED scope
+   for (int i=0; ivarInfos.length; i++) {
+   if ((varInfos[i].getScope() == VariableInfo.NESTED)
+varInfos[i].getDeclare()) {
+   

cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Compiler.java

2002-06-20 Thread costin

costin  2002/06/20 19:28:47

  Modified:jasper2/src/share/org/apache/jasper/compiler Compiler.java
  Log:
  Remove debug statements.
  
  Revision  ChangesPath
  1.18  +5 -5  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Compiler.java 20 Jun 2002 22:55:12 -  1.17
  +++ Compiler.java 21 Jun 2002 02:28:47 -  1.18
  @@ -397,12 +397,12 @@
   try {
   URL includeUrl = ctxt.getResource(include);
   if (includeUrl == null) {
  -System.out.println(Compiler: outdated, no includeUri  + 
include );
  +//System.out.println(Compiler: outdated, no includeUri  + 
include );
   return true;
   }
   if (includeUrl.openConnection().getLastModified() 
   targetLastModified) {
  -System.out.println(Compiler: outdated, include old  + include 
);
  +//System.out.println(Compiler: outdated, include old  + 
include );
   return true;
   }
   } catch (Exception e) {
  
  
  

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




DO NOT REPLY [Bug 10097] New: - ERROR [Engine] [org.apache.catalina.connector.warp.WarpConfigurationHandler] Filter mappings (2)

2002-06-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10097.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10097

ERROR [Engine] [org.apache.catalina.connector.warp.WarpConfigurationHandler] Filter 
mappings (2)

   Summary: ERROR [Engine]
[org.apache.catalina.connector.warp.WarpConfigurationHan
dler] Filter mappings (2)
   Product: Tomcat 4
   Version: 4.0.3 Final
  Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
  Severity: Normal
  Priority: Other
 Component: Connector:Webapp
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I run Apache 2.0.36, Tomcat 4.0.3 and JBoss 3.0 on my testing server.

The error messge is displayed on JBoss Server as followings 

ERROR [Engine] [org.apache.catalina.connector.warp.WarpConfigurationHandler] 
Filter mappings (2)

At the same time the webapp can run properly.

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




RE: Jasper2: serious problem with tag declarations

2002-06-20 Thread costinm

Many thanks Jan and Kin-Man.

But there is still a problem - now if you have:
  logic:iterate id='i'  
  /logic:iterate

  logic:iterate id='i' 
  /logic:iterate

( i.e. the same variable name ), it will fail with duplicated declaration, 
the code will be: 
   Object i;
   ...
   Object i;

( id is nested ).

As I mentioned, the 4.1.4 milestone doesn't have this problem ( it has 
others, but easier to get around ).

Costin

On Thu, 20 Jun 2002, Jan Luehe wrote:

 Hi Costin,
 
  More info:
  
  The page is:
  
   %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
  
logic:iterate id=id1 name=name1 property=prop1
  logic:iterate id=id2 name=name2 property=prop2
Foo
  /logic:iterate
/logic:iterate
  
  I get:
  
  a$jsp.java:75:25:75:25: Error: No entity named id2 was found in this 
  environment.
  
  And the generated code is:
.
/*   logic:iterate  */
java.lang.Object _jspx_id2_1;
_jspx_id2_1 = id2;
org.apache.struts.taglib.logic.IterateTag 
  _jspx_th_logic_iterate_1 = (org.apache.struts.taglib.logic.IterateTag) 
  
 _jspx_tagPool_logic_iterate_property_name_id.get(org.apache.struts.taglib.logic.
  IterateTag.class);
  
   
  
  No 'id2' is ever declared.
 
 I was unable to reproduce the problem where a scripting variable is being
 declared multiple times. That used to be a bug with Jasper, which we
 fixed in Jasper2.
 
 However, I was able to reproduce the above problem with nested
 logic:iterate tags where 'id2' is never declared.
 
 The nested logic:iterate did not declare any of its NESTED scripting
 variables, since it assumed that those had already been declared by the 
 encapsulating logic:iterate. This approach did not take into account
 the case where a tag's TEI determines the name of a scripting
 variable from the tag's id attribute.
 
 Attached is a patch that fixes the problem. Kin-Man has volunteered
 to apply it. I still don't seem to have commit privileges for tomcat.
 
 Let me know if you still run into any problems.
 
 Thanks,
 
 
 Jan
 
 
 
 
 
 
 
 


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