DO NOT REPLY [Bug 29905] New: - the session id is always change

2004-07-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

the session id is always change

   Summary: the session id is always change
   Product: Tomcat 5
   Version: 5.0.25
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


if I use the character "~" in the server.xml 


and in the test folder ,has two jsp file.

session.jsp
Click
<%=session.getId()%>

response.jsp
<%response.sendRedirect(response.encodeRedirectURL("session.jsp"));%>

http://localhost/~test/session.jsp
http://localhost/test/session.jsp

the former one session id can't get the same one!
I think this is the bug,so let you know it

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



DO NOT REPLY [Bug 29900] - request params in utf-8 corrupted

2004-07-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

request params in utf-8 corrupted





--- Additional Comments From [EMAIL PROTECTED]  2004-07-03 20:25 ---
thanks for reply, but...
i edited the server.xml, so that now the coyote settings are these:

 

i don't see any changes, the problem still exists. by default  i send the request by 
POST. i refectored the code to work with GET to see if URIEncoding makes any 
difference. it doesn't. i'll appriciate your advice.

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



RE: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread Mark Thomas
Sorry about the comment - finger trouble on my part ;)

Mark 

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, July 03, 2004 8:52 PM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: 
> jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/load
> er WebappClassLoader.java
> 
> markt   2004/07/03 12:52:07
> 
>   Modified:catalina/src/share/org/apache/catalina/loader
> WebappClassLoader.java
>   Log:
>   CVS: 
> --
>   CVS: PR:
>   CVS:   If this change addresses a PR in the problem report tracking
>   CVS:   database, then enter the PR number(s) here.
>   CVS: Obtained from:
>   CVS:   If this change has been taken from another system, 
> such as NCSA,
>   CVS:   then name the system in this line, otherwise delete it.
>   CVS: Submitted by:
>   CVS:   If this code has been contributed to Apache by 
> someone else; i.e.,
>   CVS:   they sent us a patch or a new module, then include 
> their name/email
>   CVS:   address here. If this is your work then delete this line.
>   CVS: Reviewed by:
>   CVS:   If we are doing pre-commit code reviews and someone else has
>   CVS:   reviewed your changes, include their name(s) here.
>   CVS:   If you have not had it reviewed then delete this line.
>   
>   Revision  ChangesPath
>   1.53  +6 -10 
> jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/load
> er/WebappClassLoader.java
>   
>   Index: WebappClassLoader.java
>   ===
>   RCS file: 
> /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/cat
> alina/loader/WebappClassLoader.java,v
>   retrieving revision 1.52
>   retrieving revision 1.53
>   diff -u -r1.52 -r1.53
>   --- WebappClassLoader.java  3 Jul 2004 18:47:28 -   1.52
>   +++ WebappClassLoader.java  3 Jul 2004 19:52:06 -   1.53
>   @@ -1895,12 +1895,8 @@
> */
>protected boolean isPackageSealed(String name, Manifest man) {
>
>   -StringBuffer buf = new StringBuffer(name); 
>   -for (int i=0;i   -if (buf.charAt(i)=='.') buf.setCharAt(i,'/'); 
>   -} 
>   -buf.append('/'); 
>   -Attributes attr = man.getAttributes(buf.toString()); 
>   +String path = name.replace('.', '/') + '/';
>   +Attributes attr = man.getAttributes(path); 
>String sealed = null;
>if (attr != null) {
>sealed = attr.getValue(Name.SEALED);
>   
>   
>   
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



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



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread markt
markt   2004/07/03 12:52:07

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  CVS: --
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  ChangesPath
  1.53  +6 -10 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- WebappClassLoader.java3 Jul 2004 18:47:28 -   1.52
  +++ WebappClassLoader.java3 Jul 2004 19:52:06 -   1.53
  @@ -1895,12 +1895,8 @@
*/
   protected boolean isPackageSealed(String name, Manifest man) {
   
  -StringBuffer buf = new StringBuffer(name); 
  -for (int i=0;i

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread markt
markt   2004/07/03 12:51:14

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Improve previous patch - thanks to Bill Barker
  
  Revision  ChangesPath
  1.38  +3 -7  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- WebappClassLoader.java3 Jul 2004 18:50:10 -   1.37
  +++ WebappClassLoader.java3 Jul 2004 19:51:14 -   1.38
  @@ -1886,12 +1886,8 @@
*/
   protected boolean isPackageSealed(String name, Manifest man) {
   
  -StringBuffer buf = new StringBuffer(name); 
  -for (int i=0;i

RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread Mark Thomas
From: Bill Barker [mailto:[EMAIL PROTECTED] 
> From: <[EMAIL PROTECTED]>
> 
> ===
> >   RCS file:
> /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apach
e/catalina/loa
> der/WebappClassLoader.java,v
> >   retrieving revision 1.36
> >   retrieving revision 1.37
> >   diff -u -r1.36 -r1.37
> >   --- WebappClassLoader.java 25 Jun 2004 23:56:25 - 1.36
> >   +++ WebappClassLoader.java 3 Jul 2004 18:50:10 - 1.37
> >   @@ -1886,8 +1886,12 @@
> > */
> >protected boolean isPackageSealed(String name, 
> Manifest man) {
> >
> >   -String path = name + "/";
> >   -Attributes attr = man.getAttributes(path);
> >   +StringBuffer buf = new StringBuffer(name);
> >   +for (int i=0;i >   +if (buf.charAt(i)=='.') buf.setCharAt(i,'/');
> >   +}
> >   +buf.append('/');
> >   +Attributes attr = man.getAttributes(buf.toString());
> >String sealed = null;
> >if (attr != null) {
> >sealed = attr.getValue(Name.SEALED);
> 
> It's not a big deal, but wouldn't it be cleaner to do:
> String path = name.replace('.', '/') + "/";

Fair point. I'll make the change.



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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread Bill Barker

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 03, 2004 11:50 AM
Subject: cvs commit:
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java


===
>   RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loa
der/WebappClassLoader.java,v
>   retrieving revision 1.36
>   retrieving revision 1.37
>   diff -u -r1.36 -r1.37
>   --- WebappClassLoader.java 25 Jun 2004 23:56:25 - 1.36
>   +++ WebappClassLoader.java 3 Jul 2004 18:50:10 - 1.37
>   @@ -1886,8 +1886,12 @@
> */
>protected boolean isPackageSealed(String name, Manifest man) {
>
>   -String path = name + "/";
>   -Attributes attr = man.getAttributes(path);
>   +StringBuffer buf = new StringBuffer(name);
>   +for (int i=0;i   +if (buf.charAt(i)=='.') buf.setCharAt(i,'/');
>   +}
>   +buf.append('/');
>   +Attributes attr = man.getAttributes(buf.toString());
>String sealed = null;
>if (attr != null) {
>sealed = attr.getValue(Name.SEALED);
>
>

It's not a big deal, but wouldn't it be cleaner to do:
String path = name.replace('.', '/') + "/";


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


This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication in 
error, please notify us immediately by e-mail and then delete all copies of this 
message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through the 
Internet is not secure. Do not send confidential or sensitive information, such as 
social security numbers, account numbers, personal identification numbers and 
passwords, to us via ordinary (unencrypted) e-mail.

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

DO NOT REPLY [Bug 26375] - Determining whether a package is sealed fails with partially-sealed jars

2004-07-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Determining whether a package is sealed fails with partially-sealed jars

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2004-07-03 18:52 ---
This has been fixed in TC4 and TC5. Many thanks for providing the patch.

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread markt
markt   2004/07/03 11:50:10

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Fix bug26375. Fix package sealing test for partially sealed jars.
- Patch provided by Mike Bremford
- Ported from TC4
  
  Revision  ChangesPath
  1.37  +7 -3  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- WebappClassLoader.java25 Jun 2004 23:56:25 -  1.36
  +++ WebappClassLoader.java3 Jul 2004 18:50:10 -   1.37
  @@ -1886,8 +1886,12 @@
*/
   protected boolean isPackageSealed(String name, Manifest man) {
   
  -String path = name + "/";
  -Attributes attr = man.getAttributes(path);
  +StringBuffer buf = new StringBuffer(name); 
  +for (int i=0;i

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2004-07-03 Thread markt
markt   2004/07/03 11:47:29

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Fix bug26375. Fix package sealing test for partially sealed jars.
- Patch provided by Mike Bremford
  
  Revision  ChangesPath
  1.52  +10 -6 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- WebappClassLoader.java28 Jun 2004 22:25:24 -  1.51
  +++ WebappClassLoader.java3 Jul 2004 18:47:28 -   1.52
  @@ -1895,8 +1895,12 @@
*/
   protected boolean isPackageSealed(String name, Manifest man) {
   
  -String path = name + "/";
  -Attributes attr = man.getAttributes(path);
  +StringBuffer buf = new StringBuffer(name); 
  +for (int i=0;i

DO NOT REPLY [Bug 15084] - preloaded jsp's have their init method called again on first hit

2004-07-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

preloaded jsp's have their init method called again on first hit

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2004-07-03 15:55 ---
There is nothing I can see in the JSP spec about pre-loading. You are relying 
on functionality outside of the spec to achieve wat you want. This is why you 
see different behaviour in different containers. A safer approach would be to 
pre-compile your JSPs before deployment (this is a sensible thing to do in 
production systems anyway) and then specify the pre-loading for your servlets.

I am therefore going to close this bug as invalid. If you disagree with this 
assessment please feel free to re-open this bug but I would ask that you 
include a reference to the part of the JSP spec that you believe tomcat is not 
conforming to.

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



DO NOT REPLY [Bug 29900] - request params in utf-8 corrupted

2004-07-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

request params in utf-8 corrupted

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2004-07-03 15:28 ---
TC5 no longer defaults to using the body encoding for parameters as this is 
not spec compliant. See my standard text on encoding (attached below) for more 
info.


REQUESTS


There are a number of situations where there may be a requirement to use non-
US ASCII characters in a URI. These include:
- Parameters in the query string
- Servlet paths

There is a standard for encoding URIs (http://www.w3.org/International/O-URL-
code.html) but this standard is not consistently followed by clients. This 
causes a number of problems.

The functionality provided by Tomcat (4 and 5) to handle this less than ideal 
situation is described below.

1. The Coyote HTTP/1.1 connector has a useBodyEncodingForURI attribute which 
if set to true will use the request body encoding to decode the URI query 
parameters.
  - The default value is true for TC4 (breaks spec but gives consistent 
behaviour across TC4 versions)
  - The default value is false for TC5 (spec compliant but there may be 
migration issues for some apps)
2. The Coyote HTTP/1.1 connector has a URIEncoding attribute which defaults to 
ISO-8859-1.
3. The parameters class (o.a.t.u.http.Parameters) has a QueryStringEncoding 
field which defaults to the URIEncoding. It must be set before the parameters 
are parsed to have an effect.

Things to note regarding the servlet API:
1. HttpServletRequest.setCharacterEncoding() normally only applies to the 
request body NOT the URI.
2. HttpServletRequest.getPathInfo() is decoded by the web container.
3. HttpServletRequest.getRequestURI() is not decoded by container.

Other tips:
1. Use POST with forms to return parameters as the parameters are then part of 
the request body.


RESPONSES
=

HTML META
 tags are ignored by Tomcat. You may use <%@ page pagEncoding="..." %> for 
JSPs.

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



DO NOT REPLY [Bug 29900] New: - request params in utf-8 corrupted

2004-07-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

request params in utf-8 corrupted

   Summary: request params in utf-8 corrupted
   Product: Tomcat 5
   Version: 5.0.25
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: Blocker
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


a parameter sent in request in utf-8 encoding arrives as if it would be sent in
another encoding (iso-xxx, windows-xxx or whatever). works fine with tomcat 4.0.
doesn't work on tomcat 5.0.xx

a jsp code example:






 





 
<%
request.setCharacterEncoding("UTF-8");

if(request.getParameter("source")!=null)
{ 
  out.println(request.getParameter("source").length()+"");
 
  out.println(request.getParameter("source"));
 
  StringBuffer sb = new StringBuffer();
  for(int i=0; i"+ sb.toString());
}
%>
 



as you see, this code block gets a utf-8 encoded parameter from
a request, outputs its length, the parameter itself, and its html
utf-8 codes.
to test it i send a hebrew letter ALEF. on tomcat 4.xx everything
works perfect and i get the following response:

7
א
א

(in case you don't see it here, it's 7 , alef as utf-8 code and alef's utf-8
code parsed to be visible in browser)

with tomcat 5.0.xx i get:

1
?
?

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



DO NOT REPLY [Bug 29899] New: - Tomcat server crashes while connecting to MySQL.

2004-07-03 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Tomcat server crashes while connecting to MySQL.

   Summary: Tomcat server crashes while connecting to MySQL.
   Product: Tomcat 4
   Version: 4.1.18
  Platform: All
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I have tomcat server and mysql-3.23.52 server on the same machine (RedHat Linux 8)
In my webapps/application/WEB_INF/lib/ folder, I have 2 .jar files. One is
myapplication .jar and other is JConnector(downloaded from mysql.com).
One of the files in my application contains the following lines:

Class.forName("com.mysql.jdbc.Driver").newInstance();

Connection conn =
DriverManager.getConnection("jdbc:mysql://localhost/?user=username&password=password");

But whenever I try to open my .jsp page, the Connection fails to the Tomcat
Server and after that no other page opens. The tomcat server itself crashes and
I have to restart it.

I tried the following change:
Connection conn =
DriverManager.getConnection("jdbc:mysql://192.168.100.38:3306/?user=username&password=password");
But the problem remains.

The above application runs perfectly if I run it on terminal without using jsp.

The other applications which do not use mysql run perfectly.

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



Dennis Arizin/Towers Perrin is out of the office.

2004-07-03 Thread Dennis Arizin




I will be out of the office starting  07/02/2004 and will not return until
07/12/2004.

I will be on vacation for the week , and checking email messages at least
every other day   . If you need immediate attention , please forward a copy
of your correspondance to Pat Shannon , Raj Gulatti or Stacy Paris , and
they will respond promptly ,
 .


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