cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf ByteChunk.java

2003-12-05 Thread larryi
larryi  2003/12/05 16:50:08

  Modified:util/java/org/apache/tomcat/util/buf ByteChunk.java
  Log:
  Port optimization from CharChunk to prevent needless allocation of byte
  arrays.
  
  Revision  ChangesPath
  1.16  +9 -1  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/ByteChunk.java
  
  Index: ByteChunk.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/ByteChunk.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ByteChunk.java12 Sep 2003 12:58:53 -  1.15
  +++ ByteChunk.java6 Dec 2003 00:50:08 -   1.16
  @@ -324,6 +324,14 @@
return;
}
   
  +// Optimize on a common case.
  +// If the buffer is empty and the source is going to fill up all the
  +// space in buffer, may as well write it directly to the output,
  +// and avoid an extra copy
  +if ( len == limit && end == start) {
  +out.realWriteBytes( src, off, len );
  +return;
  +}
// if we have limit and we're below
if( len <= limit - end ) {
// makeSpace will grow the buffer to the limit,
  @@ -452,7 +460,7 @@

// limit < buf.length ( the buffer is already big )
// or we already have space XXX
  - if( desiredSize < buff.length ) {
  + if( desiredSize <= buff.length ) {
return;
}
// grow in larger chunks
  
  
  

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



DO NOT REPLY [Bug 25065] - Java and Jakarta Tomcat on FreeBSD

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25065

Java and Jakarta Tomcat on FreeBSD

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 20:51 ---
This can be added (by anyone, committers or non-committers) to the Wiki. 
http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Links

I just added it.

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



DO NOT REPLY [Bug 25241] - jsp:getProperty tag prints "null" if property is null.

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25241

jsp:getProperty  tag prints "null" if property is null.





--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 18:57 ---
Thanks Remy,
I'll submit a patch.

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



DO NOT REPLY [Bug 25241] - jsp:getProperty tag prints "null" if property is null.

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25241

jsp:getProperty  tag prints "null" if property is null.





--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 18:37 ---
I looked in the spec: paragraph 5.3 points to inserting "null", same as println
(= String.valueOf). Now, the same paragraph in the spec mentions it's also
equivalent to doing a toString on the Object. Maybe not ;-)

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



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

2003-12-05 Thread kinman
kinman  2003/12/05 10:33:19

  Modified:jasper2/src/share/org/apache/jasper/compiler
TagFileProcessor.java
  Log:
  - For tag files, don't issue error for multiple definition when both are for
dynamic-attributes.
  
  Revision  ChangesPath
  1.54  +3 -3  
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.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- TagFileProcessor.java 4 Dec 2003 19:37:58 -   1.53
  +++ TagFileProcessor.java 5 Dec 2003 18:33:19 -   1.54
  @@ -401,7 +401,7 @@
   HashMap table = (type == VAR_NAME_FROM)? nameFromTable: nameTable;
   NameEntry nameEntry = (NameEntry) table.get(name);
   if (nameEntry != null) {
  -if (type != TAG_DYNAMIC) {
  +if (type != TAG_DYNAMIC || nameEntry.getType() != TAG_DYNAMIC) {
   int line = nameEntry.getNode().getStart().getLineNumber();
   err.jspError(n, "jsp.error.tagfile.nameNotUnique",
type, nameEntry.getType(), Integer.toString(line));
  
  
  

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



DO NOT REPLY [Bug 25250] New: - JavaBean named Component cannot be used in JSP

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25250

JavaBean named Component cannot be used in JSP

   Summary: JavaBean named Component cannot be used in JSP
   Product: Tomcat 4
   Version: 4.1.29
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Jasper 2
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Using JavaBean named Component throws Jasper exception no matter what the full 
path of a JavaBean is.





Code above throws an exception from JspRuntimeLibrary.introspecthelper even 
though Component bean is fully functional JavaBean. Jasper cannot find the setId 
method from the bean.

My workaround was to rename the JavaBean.

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



DO NOT REPLY [Bug 25241] - jsp:getProperty tag prints "null" if property is null.

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25241

jsp:getProperty  tag prints "null" if property is null.





--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 18:08 ---
If I were to write a patch to make this configurable via the jsp servlet tag in
web.xml for backward compatibility, would I have a snowball's chance in hell of
getting it committed?

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



DO NOT REPLY [Bug 25241] - jsp:getProperty tag prints "null" if property is null.

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25241

jsp:getProperty  tag prints "null" if property is null.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 16:56 ---
Since this was the only change in a revision:
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java?rev=1.7&view=markup

Given that this was done by developer from Sun, this seems to be the correct
behavior. The spec says:
"The conversion to String is done as in the println() methods" which in the case
of nulls, does print the word "null".

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



DO NOT REPLY [Bug 18477] - JspC: unable to precompile linked jsp files

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=18477

JspC: unable to precompile linked jsp files





--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 16:22 ---
Created an attachment (id=9419)
Patch to allow not following symbolic links when reading JSPs and JARs.

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



DO NOT REPLY [Bug 18477] - JspC: unable to precompile linked jsp files

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=18477

JspC: unable to precompile linked jsp files





--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 16:21 ---
We have the same problem in our development environment. I wanted to precompile 
our JSPs (for performance), but our version control system creates all files in 
the workarea as symbolic links to another area of the disk hence our JSPs 
couldn't be compiled. (As an aside it also got thrown by the JARs in WEB-
INF/lib being symbolic links as well).

I remember there was an earlier bug (#12049) related to symbolic links and 
security seemed to be the problem (which I can understand, in a real webapp you 
wouldn't want symbolic links to other parts of the disk where files could be 
tampered with), but for standalone precompilation it shouldn't be a problem.
I would have thought that Tomcat (or whatever server you are using) should 
really handle the issue of symbolic links being allowed or not but I'm not that 
well up on it really.

I found 3 places in JspC.java that were using getCanonicalPath() that caused me 
problems -
initClassLoader() for the JARs,
locateUriRoot() only used if you don't specify -uriRoot,
execute() where the pathnames for the JSPs are converted to URIs relative to 
uriRoot.

I've patched our system locally to allow us to compile these links (security 
isn't a problem since its only for precompiling in our development area), I'll 
tidy that up a bit and submit it.

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



DO NOT REPLY [Bug 25241] - jsp:getProperty tag prints "null" if property is null.

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25241

jsp:getProperty  tag prints "null" if property is null.





--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 15:46 ---
Is there a reason why this change was made?

I searched bugzilla with keyword "getProperty" before writing the patch and
wasn't able to find anything.

When using <%=bean.getXXX()%> one would expect to see "null" printed but,
since the XML syntax tags coerce native types to their respective String values,
it made sense (IMHO) for nulls to be converted to empty strings.

My own app has hundreds of text fields that now have "null" for thier initial
value. I imagine this will be the case for many other applications.

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



DO NOT REPLY [Bug 25244] - Context with path="" works, path="/" doesn't

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25244

Context with path="" works, path="/" doesn't





--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 15:25 ---
i should add, that requests to http://host/ work, but requests to
http://host/test won't work when path="/"

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



DO NOT REPLY [Bug 25013] - Symbolic link related troubles should be logged as such.

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25013

Symbolic link related troubles should be logged as such.

[EMAIL PROTECTED] changed:

   What|Removed |Added

  Component|Native:Integration  |Catalina
Version|5.0.14  |5.0.16

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



DO NOT REPLY [Bug 25245] - [RFE] it should be possible to stop/start/reload web-apps

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25245

[RFE] it should be possible to stop/start/reload web-apps

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Normal  |Enhancement
Product|Tomcat 4|Tomcat 5
Version|4.1.29  |5.0.16

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



DO NOT REPLY [Bug 25241] - jsp:getProperty tag prints "null" if property is null.

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25241

jsp:getProperty  tag prints "null" if property is null.





--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 15:18 ---
Revision 1.7 of JspRuntimeLibrary seems to indicate this was done on purpose for
this Jasper release.

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



DO NOT REPLY [Bug 25245] New: - [RFE] it should be possible to stop/start/reload web-apps

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25245

[RFE] it should be possible to stop/start/reload web-apps

   Summary: [RFE] it should be possible to stop/start/reload web-
apps
   Product: Tomcat 4
   Version: 4.1.29
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Webapps:Administration
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Hi,

it should be possible to be abled to start/stop/reload web-apps from the
tomact-administrator.
the reason is simple: in order to start/stop/reload a web-app, you have to have
a context for the manager-app on every host. that's not what an admin wants. for
example if there needs to be a servlet that need to handle _every_ request on /.
the admin-app is usually accessible through a different http1.1-host.

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



DO NOT REPLY [Bug 25244] - Context with path="" works, path="/" doesn't

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25244

Context with path="" works, path="/" doesn't

[EMAIL PROTECTED] changed:

   What|Removed |Added

  Component|Unknown |Webapps:Administration

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



DO NOT REPLY [Bug 25244] New: - Context with path="" works, path="/" doesn't

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25244

Context with path="" works, path="/" doesn't

   Summary: Context with path="" works, path="/" doesn't
   Product: Tomcat 4
   Version: 4.1.29
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Hi,

when using the Tomcat-Administrator to create a Context, the Admin-App changes
an empty path to "/" which means that the server.xml contains an entry with
path="/". That doens't work. I get an error message like "there's no context
configured to handle this request".
If i manually change the entry in the server.xml from path="/" to path="" it works.

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



DO NOT REPLY [Bug 25241] New: - jsp:getProperty tag prints "null" if property is null.

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25241

jsp:getProperty  tag prints "null" if property is null.

   Summary: jsp:getProperty  tag prints "null" if property is null.
   Product: Tomcat 5
   Version: 5.0.16
  Platform: All
OS/Version: All
Status: NEW
  Severity: Minor
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


With versions prior to 5x a jsp:getProperty tag will print a zero length string
if the String (object) property being accessed is null.

With version 5x it prints "null".  

This will cause problems for developers moving applications from 4x to 5x.

I submitted a patch that fixes this to the Tomcat Developer list.
It is also available at the following URL:
http://www.souther.us/JspRuntimeLibrary.patch

Thank you,
Ben Souther

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



DO NOT REPLY [Bug 25238] - codebase in catalina.policy doesn't work

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25238

codebase in catalina.policy doesn't work





--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 12:03 ---
Created an attachment (id=9405)
web archive of test application. Contains test.jsp

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



DO NOT REPLY [Bug 25238] - codebase in catalina.policy doesn't work

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25238

codebase in catalina.policy doesn't work





--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 12:02 ---
Created an attachment (id=9404)
has grant statement for my test.jar

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



DO NOT REPLY [Bug 25238] New: - codebase in catalina.policy doesn't work

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25238

codebase in catalina.policy doesn't work

   Summary: codebase in catalina.policy doesn't work
   Product: Tomcat 4
   Version: 4.1.29
  Platform: PC
OS/Version: Windows 9x
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I start Tomcat 4.1.29 with 
startup -security

The testing page, /test/test.jsp,
invokes a method from a class in test.jar.
The method reads the "user.home" system property.

This works with a grant statement without codebase.
It does not work with a grant statement which specifies the test.jar file
as codebase.
I have tried several variants of writing the codebase. None worked.

I will attach my catalina.policy (my additions at the end of the file)
and test.war files

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



cvs commit: jakarta-tomcat-5 build.properties.default

2003-12-05 Thread remm
remm2003/12/05 01:56:50

  Modified:.build.properties.default
  Log:
  - Update to Xerces 2.6.0.
  
  Revision  ChangesPath
  1.113 +4 -4  jakarta-tomcat-5/build.properties.default
  
  Index: build.properties.default
  ===
  RCS file: /home/cvs/jakarta-tomcat-5/build.properties.default,v
  retrieving revision 1.112
  retrieving revision 1.113
  diff -u -r1.112 -r1.113
  --- build.properties.default  11 Nov 2003 10:59:26 -  1.112
  +++ build.properties.default  5 Dec 2003 09:56:50 -   1.113
  @@ -124,12 +124,12 @@
   regexp.loc=${base-jakarta.loc}/regexp/binaries/jakarta-regexp-1.3.tar.gz
   
   
  -# - Xerces XML Parser, version 2.5.0 -
  -xerces.home=${base.path}/xerces-2_5_0
  +# - Xerces XML Parser, version 2.6.0 -
  +xerces.home=${base.path}/xerces-2_6_0
   xerces.lib=${xerces.home}
   xercesImpl.jar=${xerces.lib}/xercesImpl.jar
   xmlParserAPIs.jar=${xerces.lib}/xmlParserAPIs.jar
  
-xerces.loc=http://archive.apache.org/dist/xml/xerces-j/binaries/Xerces-J-bin.2.5.0.tar.gz
  
+xerces.loc=http://archive.apache.org/dist/xml/xerces-j/binaries/Xerces-J-bin.2.6.0.tar.gz
   
   
   # --
  
  
  

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



DO NOT REPLY [Bug 25231] - cant't process charset

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25231

cant't process charset

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 09:44 ---
*** Bug 25235 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 25235] - The problem of the method "request.setCharacterEncoding"

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25235

The problem of  the  method "request.setCharacterEncoding"

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 09:44 ---
Don't file duplicates on purpose.

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

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



DO NOT REPLY [Bug 25235] New: - The problem of the method "request.setCharacterEncoding"

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25235

The problem of  the  method "request.setCharacterEncoding"

   Summary: The problem of  the  method
"request.setCharacterEncoding"
   Product: Tomcat 5
   Version: 5.0.16
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I'm from China,so I must use the character GB2312.

When I type the code on tomcat5:

request.setCharacterEncoding("gb2312");

It does not worked well,and the output is not Chinese character .

When I test the same code on tomcat4.12 today,it worked well,and the output is 
Chinese character.

I test these codes:

String user = request.getParameter("username");
String user2 = new String(user.getBytes("iso8859-1"));

on tomcat5,it workd well too.

Maybe this is not a bug,but request.setCharacterEncoding("gb2312") produced a 
different result,I think this is not up to snuff.

Thank you!

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



DO NOT REPLY [Bug 25234] - HttpSessionListener called twice on session expiration

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25234

HttpSessionListener called twice on session expiration

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Critical|Major
 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 09:29 ---
This sounds reasonable. The session expiration code hadn't been changed from
Tomcat 4.1, while isValid actually expires sessions when it is called (in TC
4.1, it didn't). This is obviously very easy to fix, and your fix seems logical.

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



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

2003-12-05 Thread remm
remm2003/12/05 01:28:55

  Modified:catalina/src/share/org/apache/catalina/session
StandardManager.java
  Log:
  - isValid already expires sessions, so backgroundProcess shouldn't call
expire again.
  - Bug 25234, submitted by Paul Harvey.
  
  Revision  ChangesPath
  1.16  +5 -11 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardManager.java
  
  Index: StandardManager.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardManager.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- StandardManager.java  29 Nov 2003 18:06:35 -  1.15
  +++ StandardManager.java  5 Dec 2003 09:28:55 -   1.16
  @@ -813,13 +813,7 @@
   for (int i = 0; i < sessions.length; i++) {
   StandardSession session = (StandardSession) sessions[i];
   if (!session.isValid()) {
  -try {
  -expiredSessions++;
  -session.expire();
  -} catch (Throwable t) {
  -log.error(sm.getString
  -  ("standardManager.expireException"), t);
  -}
  +expiredSessions++;
   }
   }
   long timeEnd = System.currentTimeMillis();
  
  
  

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



DO NOT REPLY [Bug 25234] - HttpSessionListener called twice on session expiration

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25234

HttpSessionListener called twice on session expiration





--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 09:23 ---
I've just commented out the call to session.expire() in 
processExpires() - the listeners are now only called once.  However this is 
pretty naive - I have not traced things through to see if this will have any 
other undesirable side effects.

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



DO NOT REPLY [Bug 25231] - cant't process charset

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25231

cant't process charset

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-12-05 09:15 ---
URI encoding handling is different now (more compliant with web standards). Look
in the documentation, and in particular at the uriEncoding attribute of the
connector. Posting on tomcat-user about these kind of problem, as this is new,
and public discussion can't hurt.

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



DO NOT REPLY [Bug 25234] New: - HttpSessionListener called twice on session expiration

2003-12-05 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=25234

HttpSessionListener called twice on session expiration

   Summary: HttpSessionListener called twice on session expiration
   Product: Tomcat 5
   Version: 5.0.16
  Platform: All
OS/Version: All
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


HttpSessionListener called twice on session expiration.

After a (quick!) look at the source it seems to be being caused as 
processExpires (StandardManager.java) loops through the sessions calling 
isValid (StandardSession.java) on each.  Then isValid itself looks for timed 
out sessions and calls expires (StandardSession.java) where relevant which 
calls the listeners.  However then isValid returns (false) back to 
processExpires which then itself calls expire and so the listeners are fired a 
second time.

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