DO NOT REPLY [Bug 25193] New: - Wrong Content-Length in POST could cause information leakage / misbehaviour

2003-12-04 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=25193.
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=25193

Wrong Content-Length in POST could cause information leakage / misbehaviour

   Summary: Wrong Content-Length in POST could cause information
leakage / misbehaviour
   Product: Tomcat 5
   Version: 5.0.16
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Major
  Priority: Other
 Component: Tester
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Hi, since we had some strange behaviour according to some parts of our software, 
we found something in Tomcat 4.1.18, 4.2.25 and 5.0.16 (guess so, also on lot of 
other versions..)
If a POST-request sends a wrong Content-length (too large), Tomcat does not send 
a HTTP 400 Code but continues to process the request. This is no really problem 
so far, since all parameters whith the POST-request are still read in a correct 
matter.

But if the client cuts the connection (presses the abort-button, goes offline, 
anyway..) Tomcat uses data from previous request to get the given 
content-length. (Seems the buffer is not cleared correctly). This could lead to 
some critical information leakage on client side, if paramters are bounced back 
to client (e.g. preview-functions in guestbooks, forums, ...) and can also some 
really strange behaviour if you use this information to generate and send an 
email. So content from other mails is taken and filled into a new mail.

Is there any workaround known?


Greetz

Christian

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



DO NOT REPLY [Bug 25194] - Filters are not matched to j_security_check

2003-12-04 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=25194.
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=25194

Filters are not matched to j_security_check

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Priority|Other   |High

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



DO NOT REPLY [Bug 25008] - Enable symbolic links: Release notes not clear about allowLinking flag.

2003-12-04 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=25008.
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=25008

Enable symbolic links: Release notes not clear about allowLinking flag.





--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 10:54 ---
See also
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=182566

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



DO NOT REPLY [Bug 25196] New: - jspc.bat should support precompiling jsp files located in any dir

2003-12-04 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=25196.
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=25196

jspc.bat should support precompiling jsp files located in any dir

   Summary: jspc.bat should support precompiling jsp files located
in any dir
   Product: Tomcat 4
   Version: 4.1.0
  Platform: All
OS/Version: All
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


jspc.bat checks to find a WEB-INF dir containg required TLD's. This WEB-INF dir 
has to be under the uriroot in current implementation. jspc.bat should support 
an additional option to specify the WEB-INF dir so that files in any dir can be 
precompiled.

javac can be invoked on any java file in any dir once class path is properly 
set. But jspc posts a severe restriction in requiring that all jsp files and 
WEB-INF has to be under the same uriroot.

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



DO NOT REPLY [Bug 25193] - Wrong Content-Length in POST could cause information leakage / misbehaviour

2003-12-04 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=25193.
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=25193

Wrong Content-Length in POST could cause information leakage / misbehaviour

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 10:50 ---
Have to correct me: Since this only occurs if the connection is closed, no 
information from other requests can leak to the client directly.

Here the steps to reproduce this behaviour:

whith this jsp the problem can be prepared, just fill in some values and call it 
a few times...
[code]
HTML
BODY
FORM action=showIt.jsp method=post
BRBR
%
  for (int i = 0; i  10; i++) {
%
  value %=i% input type=text name=%=i% length=30 br
%
  }
%
INPUT TYPE=SUBMIT NAME=Submit VALUE=Submit
/FORM
/BODY
/HTML
[/code]


showIt.jsp simply writes all parameter set in the request to System.out:
[code]
[EMAIL PROTECTED] import=java.util.Enumeration%
%
  Enumeration names = request.getParameterNames();
  String name;
  String value;
  System.out.println();
  while (names.hasMoreElements()) {
name = (String)names.nextElement();
value = request.getParameter(name);
System.out.println(showIt.jsp\t+name+=+value);
  }
  System.out.println();
%
[/code]



Finally the java-Class that has to be run to show the problem: Just call it 
several times and look at catalina.out.
[code]
import java.net.*;
import java.io.*;

public class DamagedPostRequest {

  public DamagedPostRequest(String servername, int port, String webapps, int 
length) throws Exception {
String request = POST +webapps+showIt.jsp HTTP/1.1\n
+Host: +servername, +n
+Content-type: application/x-www-form-urlencoded\n
+Content-length: +length+\n
+\n;

Socket s = new Socket(InetAddress.getByName(servername), port);
OutputStream out = s.getOutputStream();
out.write(request.getBytes());
out.close();
  }

  public static void main(String[] args) throws Exception  {
DamagedPostRequest damagedPostRequest2 = new DamagedPostRequest(localhost, 
8080, /, 1000);
  }
}
[/code]

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



DO NOT REPLY [Bug 23914] - NullPointerException in Coyote Adapter

2003-12-04 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=23914.
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=23914

NullPointerException in Coyote Adapter





--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 11:37 ---
Forgot to mention that this happens with Tomcat 4.1.29, too.

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



DO NOT REPLY [Bug 23914] - NullPointerException in Coyote Adapter

2003-12-04 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=23914.
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=23914

NullPointerException in Coyote Adapter





--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 11:30 ---
We have a very similar problem here (same version of Tomcat, same stack trace), 
although these items differ:

- The problem occurs *only* if tomcat is accessed via Apache mod_jk2.
- Apache reports this:

bond.webwasher.com - - [04/Dec/2003:12:01:32 
+0100] GET /servlets/SWMSAPI/login?user=testpass= HTTP/1.1 200 0

i.e. status 200, empty response.  No entry in Apache error log.

- Tomcat need *not* be restarted to recover.  Repeated resending the request 
succeeds usually after n5 resends.

Versions:

Linux extranet2.webwasher.com 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 
i686 i386 GNU/Linux

Apache 2.0.40

java version 1.4.2_01
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)

Apparently getContainer() does sometimes return null.  Could it be that this is 
a threading issue?

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



DO NOT REPLY [Bug 25193] - Wrong Content-Length in POST could cause information leakage / misbehaviour

2003-12-04 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=25193.
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=25193

Wrong Content-Length in POST could cause information leakage / misbehaviour

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 10:10 ---
I don't agree with this report. All the fields will be properly cleared at the
end of the request processing, including the content length. There's also now a
limitation on the content length which is accepted by Tomcat when parsing
parameters using getParameter.
If you want to reopen this, please submit a sequence of requests producing the
bug (using za telnet).

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



DO NOT REPLY [Bug 25194] - Filters are not matched to j_security_check

2003-12-04 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=25194.
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=25194

Filters are not matched to j_security_check

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 12:21 ---
A filter cannot be imposed on j_security_check.

*** This bug has been marked as a duplicate of 21795 ***

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



DO NOT REPLY [Bug 21795] - j_security_check isn't fed through filters

2003-12-04 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=21795.
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=21795

j_security_check isn't fed through filters

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 12:21 ---
*** Bug 25194 has been marked as a duplicate of this bug. ***

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



DO NOT REPLY [Bug 25199] New: - Mapper throws NullPointerException, if no DefaultServlet is defined

2003-12-04 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=25199.
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=25199

Mapper throws NullPointerException, if no DefaultServlet is defined

   Summary: Mapper throws NullPointerException, if no DefaultServlet
is defined
   Product: Tomcat 5
   Version: Nightly Build
  Platform: All
OS/Version: All
Status: UNCONFIRMED
  Severity: Major
  Priority: Other
 Component: Connector:HTTP/1.1
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


TestCase:
 1. remove DefaultServlet from conf/web.xml 
 2. create/deploy a context with welcome-resources
 3. try to access this context


Index: Mapper.java
===
RCS file:
/home/cvspublic/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java,v
retrieving revision 1.30
diff -u -w -b -r1.30 Mapper.java
--- Mapper.java 21 Aug 2003 01:20:39 -  1.30
+++ Mapper.java 4 Dec 2003 13:22:03 -
@@ -708,7 +708,7 @@
 if (file != null  !(file instanceof DirContext) ) {
 internalMapExtensionWrapper(extensionWrappers,
 path, mappingData);
-if (mappingData.wrapper == null) {
+if (mappingData.wrapper == null 
context.defaultWrapper != null) {
 mappingData.wrapper =
 context.defaultWrapper.object;
 mappingData.requestPath.setChars

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



DO NOT REPLY [Bug 25199] - Mapper throws NullPointerException, if no DefaultServlet is defined

2003-12-04 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=25199.
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=25199

Mapper throws NullPointerException, if no DefaultServlet is defined

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Major   |Minor
 Status|UNCONFIRMED |NEW
  everconfirmed|0   |1
   Priority|Other   |Low



--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 13:39 ---
You should never remove the default servlet: it has the lowest priority, so
whether it is there or not should not have any impact on your application. A
default servlet defined in your application will also override Tomcat's default
servlet.
I am willing to apply your fix for cosmetic reasons.

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteRequest.java

2003-12-04 Thread remm
remm2003/12/04 05:49:28

  Modified:catalina/src/share/org/apache/coyote/tomcat5
CoyoteRequest.java
  Log:
  - Don't attempt to parse the parameters if the request body wasn't fully read.
  - Should fix bug 25193.
  
  Revision  ChangesPath
  1.26  +8 -6  
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- CoyoteRequest.java2 Dec 2003 23:01:01 -   1.25
  +++ CoyoteRequest.java4 Dec 2003 13:49:28 -   1.26
  @@ -2368,8 +2368,10 @@
   } else {
   formData = new byte[len];
   }
  -readPostBody(formData, len);
  -parameters.processParameters(formData, 0, len);
  +int actualLen = readPostBody(formData, len);
  +if (actualLen == len) {
  +parameters.processParameters(formData, 0, len);
  +}
   } catch (Throwable t) {
   ; // Ignore
   }
  
  
  

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



cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper Mapper.java

2003-12-04 Thread remm
remm2003/12/04 06:07:08

  Modified:util/java/org/apache/tomcat/util/http/mapper Mapper.java
  Log:
  - Fix NPE when there's no default servlet.
  - Bug 25199. Submitted by Torsten Fohrer.
  
  Revision  ChangesPath
  1.31  +5 -3  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java
  
  Index: Mapper.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Mapper.java   21 Aug 2003 01:20:39 -  1.30
  +++ Mapper.java   4 Dec 2003 14:07:08 -   1.31
  @@ -697,7 +697,7 @@
   // Rule 4c -- Welcome resources processing
   //for physical folder
   if (mappingData.wrapper == null
  - context.resources != null) {
  + context.resources != null) {
   Object file = null;
   String pathStr = path.toString();
   try {
  @@ -708,7 +708,8 @@
   if (file != null  !(file instanceof DirContext) ) {
   internalMapExtensionWrapper(extensionWrappers,
   path, mappingData);
  -if (mappingData.wrapper == null) {
  +if (mappingData.wrapper == null
  + context.defaultWrapper != null) {
   mappingData.wrapper =
   context.defaultWrapper.object;
   mappingData.requestPath.setChars
  @@ -738,6 +739,7 @@
   mappingData.wrapperPath.setChars
   (path.getBuffer(), path.getStart(), path.getLength());
   }
  +// Redirection to a folder
   char[] buf = path.getBuffer();
   if (context.resources != null  buf[pathEnd -1 ] != '/') {
   Object file = null;
  @@ -747,7 +749,7 @@
   } catch(NamingException nex) {
   // Swallow, since someone else handles the 404
   }
  -if (file != null  file instanceof DirContext ) {
  +if (file != null  file instanceof DirContext) {
   // Note: this mutates the path: do not do any processing 
   // after this (since we set the redirectPath, there 
   // shouldn't be any)
  
  
  

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



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

2003-12-04 Thread remm
remm2003/12/04 05:55:54

  Modified:coyote/src/java/org/apache/coyote/tomcat4 CoyoteRequest.java
  Log:
  - Port patch.
  - Don't attempt to parse the parameters if the request body wasn't fully read.
  - Should fix bug 25193.
  
  Revision  ChangesPath
  1.33  +8 -6  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- CoyoteRequest.java20 Nov 2003 21:13:40 -  1.32
  +++ CoyoteRequest.java4 Dec 2003 13:55:53 -   1.33
  @@ -1956,8 +1956,10 @@
   } else {
   formData = new byte[len];
   }
  -readPostBody(formData, len);
  -parameters.processParameters(formData, 0, len);
  +int actualLen = readPostBody(formData, len);
  +if (actualLen == len) {
  +parameters.processParameters(formData, 0, len);
  +}
   } catch (Throwable t) {
   ; // Ignore
   }
  
  
  

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



DO NOT REPLY [Bug 25193] - Wrong Content-Length in POST could cause information leakage / misbehaviour

2003-12-04 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=25193.
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=25193

Wrong Content-Length in POST could cause information leakage / misbehaviour

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 13:56 ---
There's a basic defect in the code which reads the request body. If there's a
disconnect, then the full array could be parsed, although some of its data is
bad. This will occur only for small posts ( 8KB).
I suggest trying out this patch for a possible fix (if a bad read occurs, no
parameters will be parsed, which is the most reliable behavior; I think the
asumption of the alg is that there would be an IOE being thrown if there's a
client disconnect):

RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java,v
retrieving revision 1.25
diff -r1.25 CoyoteRequest.java
2371,2372c2371,2374
 readPostBody(formData, len);
 parameters.processParameters(formData, 0, len);
---
 int actualLen = readPostBody(formData, len);
 if (actualLen == len) {
 parameters.processParameters(formData, 0, len);
 }

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



DO NOT REPLY [Bug 23379] - CoyoteAdapter An exception or error occurred in the container during the request processing

2003-12-04 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=23379.
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=23379

CoyoteAdapter An exception or error occurred in the container during the request 
processing





--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 14:35 ---
May be realted to bug 23914.

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



DO NOT REPLY [Bug 25199] - Mapper throws NullPointerException, if no DefaultServlet is defined

2003-12-04 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=25199.
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=25199

Mapper throws NullPointerException, if no DefaultServlet is defined

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 14:38 ---
Fixed.

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



DO NOT REPLY [Bug 23379] - CoyoteAdapter An exception or error occurred in the container during the request processing

2003-12-04 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=23379.
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=23379

CoyoteAdapter An exception or error occurred in the container during the request 
processing





--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 14:32 ---
May be related to a href=?id=23914#23914/a.

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



DO NOT REPLY [Bug 21795] - j_security_check isn't fed through filters

2003-12-04 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=21795.
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=21795

j_security_check isn't fed through filters





--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 14:54 ---
I have just sent the following to [EMAIL PROTECTED]:

Now I know the meaning of the JSR-154 Expert Group but I have still some open
questions:

- Why is the clarification missing in the spec 2.4?
- What does this citation mean:

SRV.6.1.1 Examples of Filtering Components
• Authentication filters

Should such a Authentication filter completely reimplement the Authentication?

Another citation:

Step 7: When the last filter in the chain has been invoked, the next entity
accessed is the target servlet or resource at the end of the chain.

- Is j_security_check not a resource? If not why can the browser send a post to 
it?

- How should applications deal with such issues to allow a smart migration to 
the features of Spec 2.5
  which should address these issues?

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



re: problem with permissions on ftp site?

2003-12-04 Thread James Black
Hello,
 On 
http://www.oss.redundant.com/pub/apache/jakarta/tomcat-connectors/jk2 I 
don't have permission to read either the .zip or .tar.gz  version of the 
source code.

 I don't know how to let the maintainers of that site know.

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


DO NOT REPLY [Bug 25015] - CoyoteAdapter is breaking path info

2003-12-04 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=25015.
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=25015

CoyoteAdapter is breaking path info





--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 16:05 ---
Remy, 

I am trying to make a patch for this and have a question I hope you can answer.

in the CoyoteAdapter the MessageBytes class is used.  This class holds 2 
arrays, one of char and one of byte.  The CoyoteAdapter class modifies the byte 
array and not the char array so the data in the MessageBytes class is out of 
sync.  Is this desired effect or should these arrays hold the same data.

Looking at the comment on line 297 of CoyoteAdapter (rev. 1.14) it thinks that 
the jsessionid has been removed but it has only been removed from the byte[] 
not the char[] (from the methods MessageBytes.getByteChunk() and 
MessageBytes.getByteChunk())

I think the char[] and byte[] inside MessageBytes should be the same.

any help would be great.

also according the the spec requestURI = contextPath + servletPath + pathInfo

so if the requestURI has the path parms the pathInfo HAS to

john

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



DO NOT REPLY [Bug 25015] - CoyoteAdapter is breaking path info

2003-12-04 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=25015.
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=25015

CoyoteAdapter is breaking path info





--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 17:28 ---
I don't agree, they simply didn't think about path parameters (I didn't know you
could put them in the middle of the path). Since path parameters won't be
mapped, what if there are parameters in the servlet path ?
I'd like to point out also that the session id parameter, if present, is always
removed from the request URI. That could possibly imply that other parameters
should also be removed everywhere.
So I don't really agree with handling parameters at this time, because it's a mess.

As for your question, at this time of the processing, the URI has been converted
to chars, so use the CharChunk, as the current algorithm is doing.

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



DO NOT REPLY [Bug 25194] New: - Filters are not matched to j_security_check

2003-12-04 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=25194.
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=25194

Filters are not matched to j_security_check

   Summary: Filters are not matched to j_security_check
   Product: Tomcat 4
   Version: 4.1.29
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Blocker
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Dear all,

the servlet spec 2.3 doesn't provide a direct hook for a user is authenticated 
event. The only possible way (which is also proposed by some postings in the 
web) seems to be to map a filter to the Resource j_security_check and do the 
necessary things when the filterchain.doFilter() method returns and before the 
server sends the redirect to the original Resource to the client. We have tried 
this way with a form based login but the filter isn't called.

Best regards

Thomas

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



DO NOT REPLY [Bug 25015] - CoyoteAdapter is breaking path info

2003-12-04 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=25015.
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=25015

CoyoteAdapter is breaking path info





--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 17:45 ---
Do you not want a patch for this at all, or do you want one that just rips out 
the parms and returns only the path?

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



DO NOT REPLY [Bug 25015] - CoyoteAdapter is breaking path info

2003-12-04 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=25015.
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=25015

CoyoteAdapter is breaking path info





--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 17:49 ---
 As for your question, at this time of the processing, the URI has been 
 converted to chars, so use the CharChunk, as the current algorithm is doing.

Well as it is now the jsessionid is only being remove from the byte array 
(ByteChunk) the only reason you do not see the jsessionid in the path is the 
code finds the first ';' and drops it and everything after it.

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



DO NOT REPLY [Bug 25015] - CoyoteAdapter is breaking path info

2003-12-04 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=25015.
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=25015

CoyoteAdapter is breaking path info

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Minor   |Normal
 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 17:54 ---
At this point, removing path parameters seems to me the way to go, but I don't
know ... I'll mark this as remind.

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



DO NOT REPLY [Bug 25015] - CoyoteAdapter is breaking path info

2003-12-04 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=25015.
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=25015

CoyoteAdapter is breaking path info

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||REMIND

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



DO NOT REPLY [Bug 25015] - CoyoteAdapter is breaking path info

2003-12-04 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=25015.
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=25015

CoyoteAdapter is breaking path info





--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 17:55 ---
One last thing, as for you question about context and servlet path, having 
parms in them does not work at all.  (it either does not find the context, or 
it does not find the servlet).  How do you get clarification on the spec for 
these type of things (trust me when I say I dont know why anyone would use 
these either, but I inherited this code that does)

John

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



DO NOT REPLY [Bug 25217] New: - Catalina ContextConfig Exception

2003-12-04 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=25217.
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=25217

Catalina ContextConfig Exception

   Summary: Catalina ContextConfig Exception
   Product: Tomcat 4
   Version: 4.1.29
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: Blocker
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When starting the server, it does not start /admin application. The log shows 
the following error:

2003-12-04 10:01:16 ContextConfig[/admin] Exception processing JAR at resource 
path /WEB-INF/lib/struts.jar
javax.servlet.ServletException: Exception processing JAR at resource path /WEB-
INF/lib/struts.jar
at org.apache.catalina.startup.ContextConfig.tldScanJar
(ContextConfig.java:930)
at org.apache.catalina.startup.ContextConfig.tldScan
(ContextConfig.java:868)
...
.

..
.

This occurres with majority (but not all) of the *.jar files included in a WEB-
INF/lib directory. I have problems running AXIS1.1, some of custom made taglibs.

I have two XP machines and no matter I try it produces the same result.

Identical installattion (Tomcat version and Sun j2sdk 1.4.2._01) on Win 2000 
Pro and Linux Mandarake 9 works like a charm. 

I have tried to unpack the jar files and include the *.class files (and the 
directory structure) into WEB-INF/classes directory and it appears to be 
working all right (kind of slower than usual), but this is not the way it was 
intended to be.

I have tried Tomcat version 4.1.12 and it produces the same result like 4.1.29

Tomcat 5.0.16 works well, so I strongly believe this is not a Java problem.

I run Tomcat in stand alone mode.

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



DO NOT REPLY [Bug 25146] - Use setCharacterEncoding() does not change parameters encoding

2003-12-04 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=25146.
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=25146

Use setCharacterEncoding() does not change parameters encoding

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 19:23 ---


*** This bug has been marked as a duplicate of 25017 ***

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



DO NOT REPLY [Bug 25017] - charset GBK in url encode/decode fault

2003-12-04 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=25017.
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=25017

charset GBK in url encode/decode fault

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2003-12-04 19:23 ---
*** Bug 25146 has been marked as a duplicate of this bug. ***

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



cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources messages.properties messages_es.properties messages_fr.properties messages_ja.properties

2003-12-04 Thread kinman
kinman  2003/12/04 11:37:58

  Modified:jasper2/src/share/org/apache/jasper/compiler Parser.java
TagFileProcessor.java
   jasper2/src/share/org/apache/jasper/resources
messages.properties messages_es.properties
messages_fr.properties messages_ja.properties
  Log:
  - Rewrite error checking when processing tag files to conform with the
lastest JSP spec.  Check that names declared in any of the following
in a translation unit is unique.
* name attribute in attribute directive
* name-given attribute in variable directive
* alias attribute in variable directive
* dynamic-attributes attribute in tag directive
  
except that dynamic-attributes attribute of the tag directive can be declared
more than once with the same value.
  
Also check that name-from-attribute attributes of variable directives are
unique, and that they refer to attribte directives declared in the same
translation unit, with the correct attribute values.
  
  Revision  ChangesPath
  1.85  +4 -3  
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.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- Parser.java   29 Oct 2003 21:53:43 -  1.84
  +++ Parser.java   4 Dec 2003 19:37:58 -   1.85
  @@ -1942,6 +1942,7 @@
reader.setSingleFile(true);
reader.skipUntil();
   while (reader.hasMoreInput()) {
  +start = reader.mark();
   if (reader.matches(%--)) {
   parseComment(parent);
   } else if (reader.matches(%@)) {
  
  
  
  1.53  +114 -93   
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagFileProcessor.java
  
  Index: TagFileProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagFileProcessor.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- TagFileProcessor.java 2 Sep 2003 21:39:59 -   1.52
  +++ TagFileProcessor.java 4 Dec 2003 19:37:58 -   1.53
  @@ -68,6 +68,7 @@
   import java.net.URLClassLoader;
   import java.util.Iterator;
   import java.util.Vector;
  +import java.util.HashMap;
   
   import javax.servlet.jsp.tagext.TagAttributeInfo;
   import javax.servlet.jsp.tagext.TagExtraInfo;
  @@ -145,6 +146,19 @@
   private Vector attributeVector;
   private Vector variableVector;
   
  +private static final String ATTR_NAME =
  +the name attribute of the attribute directive;
  +private static final String VAR_NAME_GIVEN =
  +the name-given attribute of the variable directive;
  +private static final String VAR_NAME_FROM =
  +the name-from-attribute attribute of the variable directive;
  +private static final String VAR_ALIAS =
  +the alias attribute of the variable directive;
  +private static final String TAG_DYNAMIC =
  +the dynamic-attributes attribute of the tag directive;
  +private HashMap nameTable = new HashMap();
  +private HashMap nameFromTable = new HashMap();
  +
   public TagFileDirectiveVisitor(Compiler compiler,
  TagLibraryInfo tagLibInfo,
  String name,
  @@ -171,6 +185,9 @@
bodycontent);
   }
   dynamicAttrsMapName = n.getAttributeValue(dynamic-attributes);
  +if (dynamicAttrsMapName != null) {
  +checkUniqueName(dynamicAttrsMapName, TAG_DYNAMIC, n);
  +}
   smallIcon = n.getAttributeValue(small-icon);
   largeIcon = n.getAttributeValue(large-icon);
   description = n.getAttributeValue(description);
  @@ -210,9 +227,11 @@
   type = java.lang.String;
   }
   
  -attributeVector.addElement(
  +TagAttributeInfo tagAttributeInfo =
   new TagAttributeInfo(attrName, required, type, rtexprvalue,
  - fragment));
  + fragment);
  +attributeVector.addElement(tagAttributeInfo);
  +checkUniqueName(attrName, ATTR_NAME, n, tagAttributeInfo);
   }
   
   public void visit(Node.VariableDirective n) throws JasperException {
  @@ -265,6 +284,12 @@
 * denotes the name of the variable that is being aliased
 */
   nameGiven = alias;
  +

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

2003-12-04 Thread kinman
kinman  2003/12/04 14:57:45

  Modified:jasper2/src/share/org/apache/jasper/compiler
ParserController.java
  Log:
  - When a tag file include a file, make sure the included file environment
maintains the isTag and directiveOnly properties.
  
  Revision  ChangesPath
  1.48  +8 -2  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- ParserController.java 1 Dec 2003 19:31:37 -   1.47
  +++ ParserController.java 4 Dec 2003 22:57:45 -   1.48
  @@ -103,6 +103,8 @@
   private String sourceEnc;
   
   private boolean isDefaultPageEncoding;
  +private boolean isTagFile;
  +private boolean directiveOnly;
   
   /*
* Constructor
  @@ -132,7 +134,8 @@
// (using an include directive), ctxt.getTagFileJar() returns the 
// JAR file from which to read the tag file or included resource,
// respectively.
  - return parse(inFileName, null, ctxt.getTagFileJarUrl());
  + return parse(inFileName, null, ctxt.isTagFile(), false,
  + ctxt.getTagFileJarUrl());
   }
   
   /**
  @@ -146,7 +149,8 @@
   public Node.Nodes parse(String inFileName, Node parent,
URL jarFileUrl)
throws FileNotFoundException, JasperException, IOException {
  - return parse(inFileName, parent, ctxt.isTagFile(), false, jarFileUrl);
  +// For files statically included, keep isTagfile and directiveOnly
  + return parse(inFileName, parent, isTagFile, directiveOnly, jarFileUrl);
   }
   
   /**
  @@ -187,6 +191,8 @@
Node.Nodes parsedPage = null;
isEncodingSpecifiedInProlog = false;
isDefaultPageEncoding = false;
  +this.isTagFile = isTagFile;
  +this.directiveOnly = directiveOnly;
   
JarFile jarFile = getJarFile(jarFileUrl);
String absFileName = resolveFileName(inFileName);
  
  
  

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



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

2003-12-04 Thread luehe
luehe   2003/12/04 18:29:47

  Modified:jasper2/src/share/org/apache/jasper JspC.java
  Log:
  Have JspC.execute() propagate its exceptions.
  
  In some cases, there used to be no way for a caller to determine
  whether an exception occurred, because some exceptions would be
  swallowed, and others would cause JspC.processFile() to return FALSE,
  but that return value could not be communicated to the callers of
  JspC.execute() (which is declared as void)
  
  Revision  ChangesPath
  1.62  +30 -57
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- JspC.java 10 Nov 2003 22:26:20 -  1.61
  +++ JspC.java 5 Dec 2003 02:29:47 -   1.62
  @@ -182,7 +182,6 @@
   private String uriBase;
   private String uriRoot;
   private int dieLevel;
  -private boolean dieOnExit = false;
   private boolean helpNeeded = false;
   private boolean compile = false;
   private String compiler = null;
  @@ -599,8 +598,7 @@
   /**
* Include the generated web.xml inside the webapp's web.xml.
*/
  -protected void mergeIntoWebXml()
  -throws Exception {
  +protected void mergeIntoWebXml() throws IOException {
   
   File webappBase = new File(uriRoot);
   File webXml = new File(webappBase, WEB-INF/web.xml);
  @@ -701,7 +699,7 @@
   
   }
   
  -public boolean processFile(String file)
  +private void processFile(String file)
   throws JasperException
   {
   try {
  @@ -748,42 +746,24 @@
   if ( showSuccess ) {
   log.info( Built File:  + file );
   }
  -return true;
  -} catch (FileNotFoundException fne) {
  - if (log.isWarnEnabled()) {
  - log.warn(Localizer.getMessage(jspc.error.fileDoesNotExist,
  -   fne.getMessage()));
  - }
  -throw new JasperException( fne );
  -} catch (ServletException e) {
  -Throwable rootCause = e;
  -Throwable rootCauseCheck = null;
  -// Extra aggressive rootCause finding
  -do {
  -if (rootCause instanceof ServletException) {
  -rootCauseCheck = 
  -((ServletException) rootCause).getRootCause();
  -if (rootCauseCheck != null) {
  -rootCause = rootCauseCheck;
  -rootCauseCheck = null;
  -}
  -}
  -} while (rootCauseCheck != null);
  +
  +} catch (JasperException je) {
  +Throwable rootCause = je;
  +while (rootCause instanceof JasperException
  + ((JasperException) rootCause).getRootCause() != null) {
  +rootCause = ((JasperException) rootCause).getRootCause();
  +}
   log.error(Localizer.getMessage(jspc.error.generalException,
   file),
  rootCause);
  -return false;
  +throw je;
  +
   } catch (Exception e) {
  -log.error(Localizer.getMessage(jspc.error.generalException,
  -file),
  -   e);
  -if ( listErrors ) {
  - log.warn( Error in File:  + file, e );
  - return true;
  -} else if (dieLevel != NO_DIE_LEVEL) {
  -dieOnExit = true;
  -}
  -throw new JasperException( Error compiling  + file, e );
  + if ((e instanceof FileNotFoundException)  log.isWarnEnabled()) {
  + log.warn(Localizer.getMessage(jspc.error.fileDoesNotExist,
  +   e.getMessage()));
  + }
  +throw new JasperException(e);
   }
   }
   
  @@ -830,7 +810,7 @@
   }
   }
   
  -public void execute()  throws JasperException {
  +public void execute() throws JasperException {
   
   try {
if (uriRoot == null) {
  @@ -902,23 +882,17 @@
   mergeIntoWebXml();
   }
   
  -} catch (ServletException e) {
  -Throwable rootCause = e;
  -Throwable rootCauseCheck = null;
  -// Extra aggressive rootCause finding
  -do {
  -if (rootCause instanceof ServletException) {
  -rootCauseCheck = 
  -((ServletException) rootCause).getRootCause();
  -if (rootCauseCheck != null) {
  -rootCause = rootCauseCheck;
  - 

[patch] jsp:getProperty tag prints null to page when object is null.

2003-12-04 Thread Ben Souther
In version 4x and earlier, a jsp:getProperty tag will print a zero length 
string to the page if the bean's property value is null.

In version 5x it prints the string null.

I don't know if this is a bug or an intentional change but I know it will 
cause headaches for developers moving existing apps to version 5.

The attached patch applies to 
org.apache.jasper.runtime.JspRuntimeLibrary.java  

Thank you,
Ben Souther

--- JspRuntimeLibrary.java	Thu Dec  4 20:51:54 2003
+++ JspRuntimeLibrary.java.fixed	Thu Dec  4 20:19:01 2003
@@ -426,6 +426,7 @@
 //---
 // __begin toStringMethod
 public static String toString(Object o) {
+if(o == null) return ;
 return String.valueOf(o);
 }
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]