DO NOT REPLY [Bug 14760] New: - Array overflow exception in InternalOutputBuffer
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=14760. 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=14760 Array overflow exception in InternalOutputBuffer Summary: Array overflow exception in InternalOutputBuffer Product: Tomcat 4 Version: 4.1.12 Platform: Sun OS/Version: Solaris Status: UNCONFIRMED Severity: Major Priority: Other Component: Connector:Coyote HTTP/1.1 AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Overview: Variable 'buf' in org.apache.coyote.http11.InternalOutputBuffer can overflow in the write method. Steps to Reproduce: Unsure, appears eventually under medium load on our web-app. Continually hitting tomcat with requests which produce a lot of output data will eventually trigger it. Notes: I added some extra logging into InternalOutputBuffer to see what the contents of the 'buf' array were and at the point it overflows it appears to have multiple sets of response headers as below: --- snip --- HTTP/1.1 200 OK Content-Type: text/html;charset=ISO-8859-1 Cache-Control: no-cache, post-check=0, pre-check=0 Pragma: no-cache Expires: Thu, 01 Dec 1994 16:00:00 GMT Transfer-Encoding: chunked Date: Thu, 21 Nov 2002 12:02:39 GMT Server: Apache Coyote/1.0 HTTP/1.1 200 OK Content-Type: text/html;charset=ISO-8859-1 Cache-Control: no-cache, post-check=0, pre-check=0 Pragma: no-cache Expires: Thu, 01 Dec 1994 16:00:00 GMT Transfer-Encoding: chunked Date: Thu, 21 Nov 2002 12:02:39 GMT Server: Apache Coyote/1.0 Transfer-Encoding: chunked Date: Thu, 21 Nov 2002 12:02:39 GMT Server: Apache Coyote/1.0 HTTP/1.1 200 OK Content-Type: text/html;charset=ISO-8859-1 Cache-Control: no-cache, post-check=0, pre-check=0 Pragma: no-cache Expires: Thu, 01 Dec 1994 16:00:00 GMT Transfer-Encoding: chunked Date: Thu, 21 Nov 2002 12:02:39 GMT Server: Apache Coyote/1.0 Transfer-Encoding: chunked Date: Thu, 21 Nov 2002 12:02:39 GMT --- snip --- The buffer contains 32k worth of this stuff repeated at the point at which it overflows. The exception occurs due to the array index 'pos' being incremented without a range check to ensure that it's not going past the end of 'buf' but I'm assuming that the root problem is the fact that it's filling up at all rather than the lack of range checking. Stack Trace: java.lang.ArrayIndexOutOfBoundsException at org.apache.coyote.http11.InternalOutputBuffer.write(InternalOutputBuffer.java:615) at org.apache.coyote.http11.InternalOutputBuffer.sendStatus(InternalOutputBuffer.java:407) at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:901) at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:471) at org.apache.coyote.Response.action(Response.java:214) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:516) at org.apache.coyote.Response.doWrite(Response.java:513) at org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:380) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:360) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:338) at org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.java:273) at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:334) at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:403) at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:407) at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:150) at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213) at org.apache.tomcat.util.buf.WriteConvertor.flush(C2BConverter.java:222) at org.apache.tomcat.util.buf.C2BConverter.flushBuffer(C2BConverter.java:165) at org.apache.coyote.tomcat4.OutputBuffer.realWriteChars(OutputBuffer.java:576) at org.apache.tomcat.util.buf.CharChunk.flushBuffer(CharChunk.java:388) at org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java:340) at java.io.PrintWriter.flush(PrintWriter.java:120) at org.apache.coyote.tomcat4.CoyoteWriter.flush(CoyoteWriter.java:97) at org.apache.catalina.valves.ErrorReportValve.report(ErrorReportValve.java:366) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:205) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at
Re: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeansMBeanUtils.java
[EMAIL PROTECTED] wrote: billbarker2002/11/21 20:44:10 Modified:catalina/src/share/org/apache/catalina/mbeans MBeanUtils.java Log: Relaxing the restrictions on creating Valve MBeans. There is no functional change for Catalina Valves. For custom Valves, they only need to implement 'Contained', not extend ValveBase. At the very least, throwing a checked-exception is much better then throwing the non-checked ClassCastException. I'd like to use that opportunity to remind that general patches should also be ported to 5.x. Thanks :) Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp_common.c
[EMAIL PROTECTED] wrote: costin 2002/11/21 09:53:48 Modified:jk/native/common jk_ajp_common.c Log: Do not send the initial chunk for chunked encoding ( only for regular POST ). Ajp13 servers ( tomcat x.y, etc ) expect this initial chunk only if a content-length is specified. ( this is just an initial fix - I still need to test various cases ) Revision ChangesPath 1.33 +10 -3 jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c Index: jk_ajp_common.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- jk_ajp_common.c 30 Oct 2002 22:12:20 - 1.32 +++ jk_ajp_common.c 21 Nov 2002 17:53:48 - 1.33 @@ -808,7 +808,7 @@ } if (!r-is_chunked) { -ae-left_bytes_to_send -= len; + ae-left_bytes_to_send -= len; } if (len 0) { @@ -905,7 +905,14 @@ * for resend if the remote Tomcat is down, a fact we will learn only * doing a read (not yet) */ -if (s-is_chunked || ae-left_bytes_to_send 0) { + /* || s-is_chunked - this can't be done here. The original protocol sends the first + chunk of post data ( based on Content-Length ), and that's what the java side expects. + Sending this data for chunked would break other ajp13 serers. + + Note that chunking will continue to work - using the normal read. + */ + +if (ae-left_bytes_to_send 0) { int len = ae-left_bytes_to_send; if (len AJP13_MAX_SEND_BODY_SZ) len = AJP13_MAX_SEND_BODY_SZ; Costin was faster than me ;) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14760] - Array overflow exception in InternalOutputBuffer
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=14760. 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=14760 Array overflow exception in InternalOutputBuffer --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 09:06 --- I'd like yuou to try to reproduce this problem with 4.1.15 (http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.15-alpha/). Otherwise, I'll consider it has been fixed or is an invalid report. The position on the buffer is reset to 0 after each request, so I don't see how you describe can actually happen. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tagging JK 1.2.1
I'll tag next week JK 1.2.1, after conducting tests to see if latest Costin path on chunked didn't break anything. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14760] - Array overflow exception in InternalOutputBuffer
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=14760. 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=14760 Array overflow exception in InternalOutputBuffer --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 09:45 --- Still happens in Tomcat 4.1.15 I will add additional logging in the 4.1.12 source (as I've already started with that and there is very little difference in the code for InternalOutputBuffer between 4.1.12 and 4.1.15 and see if I can get any more info. I'll check the pos value at various times and see if it's not getting reset sometimes? Here's the stacktrace: java.lang.ArrayIndexOutOfBoundsException at org.apache.coyote.http11.InternalOutputBuffer.write(InternalOutputBuffer.java:631) at org.apache.coyote.http11.InternalOutputBuffer.sendStatus(InternalOutputBuffer.java:407) at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:934) at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:479) at org.apache.coyote.Response.action(Response.java:214) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:516) at org.apache.coyote.Response.doWrite(Response.java:518) at org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:384) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:360) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:338) at org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.java:273) at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:334) at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:403) at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:407) at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:150) at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213) at org.apache.tomcat.util.buf.WriteConvertor.flush(C2BConverter.java:222) at org.apache.tomcat.util.buf.C2BConverter.flushBuffer(C2BConverter.java:165) at org.apache.coyote.tomcat4.OutputBuffer.realWriteChars(OutputBuffer.java:580) at org.apache.tomcat.util.buf.CharChunk.flushBuffer(CharChunk.java:388) at org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java:344) at java.io.PrintWriter.flush(PrintWriter.java:120) at org.apache.coyote.tomcat4.CoyoteWriter.flush(CoyoteWriter.java:97) at org.apache.catalina.valves.ErrorReportValve.report(ErrorReportValve.java:363) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:205) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:413) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:537) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:536) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JDBCRealm
I had a problem with Digest authorisation. And I looked at the sources to find the problem. And I saw this : /** * Return the password associated with the given principal's user name. */ protected String getPassword(String username) { return (null); } in the org.apache.catalina.realm.JDBCRealm why it returns null? This was the actual cause of my problems! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native/common jk_logger.h
jfclere 2002/11/22 04:23:22 Modified:jk/native/common jk_logger.h Log: Prevent warnings. Revision ChangesPath 1.4 +2 -2 jakarta-tomcat-connectors/jk/native/common/jk_logger.h Index: jk_logger.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_logger.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- jk_logger.h 21 Apr 2002 22:57:11 - 1.3 +++ jk_logger.h 22 Nov 2002 12:23:22 - 1.4 @@ -96,7 +96,7 @@ #define JK_LOG_INFO__FILE__,__LINE__,JK_LOG_INFO_LEVEL #define JK_LOG_ERROR __FILE__,__LINE__,JK_LOG_ERROR_LEVEL #define JK_LOG_EMERG __FILE__,__LINE__,JK_LOG_EMERG_LEVEL -#define JK_LOG_REQUEST __FILE__,NULL,JK_LOG_REQUEST_LEVEL +#define JK_LOG_REQUEST __FILE__,0,JK_LOG_REQUEST_LEVEL #ifdef __cplusplus } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11075] - [PATCH] AccessLogValue Request Header ${xxx}i support
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=11075. 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=11075 [PATCH] AccessLogValue Request Header ${xxx}i support [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 12:48 --- Unfortunately, despite numerous patches the current CVS still contains none of the patched solutions submitted. I am now marking this as a duplicate of 14724 as this patch (although taking a different approach) covers a subset of the issues dealt with by bug 14724. *** This bug has been marked as a duplicate of 14724 *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14724] - [PATCH] AccessLogValve - %{xxx}i implementation AND disable log rotation
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=14724. 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=14724 [PATCH] AccessLogValve - %{xxx}i implementation AND disable log rotation [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 12:48 --- *** Bug 11075 has been marked as a duplicate of this bug. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14724] - [PATCH] AccessLogValve - %{xxx}i implementation AND disable log rotation
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=14724. 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=14724 [PATCH] AccessLogValve - %{xxx}i implementation AND disable log rotation [EMAIL PROTECTED] changed: What|Removed |Added Priority|Other |Medium --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 12:57 --- I very much hope that someone with commit access will process this patch as there have been patches to fix this sitting in bugzilla for months and months. Amongst other things the log changes can be critical to analysing logs if serving multiple hosts from a single installation. I have marked bug 11075 as a duplicate of this bug, if you follow the 11075 track you will find at least 2 other patches dealing with the specific %{xxx}i implementation issue. It may be worth considering merging in the switch based (rather than if based) solution of my previous patch if this results in the code being compiled as tableswitch bytecode - with constant lookup time. [Shirazi, Jack, Java Performance Tuning, O'Reilly, 200, pp. 189-195]. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14766] New: - Redirect Vavle
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=14766. 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=14766 Redirect Vavle Summary: Redirect Vavle Product: Tomcat 4 Version: Unknown Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Catalina:Modules AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I think it would be nice to have a redirecct valve - like the one provided below ;-). import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.HttpRequest; import org.apache.catalina.HttpResponse; import org.apache.catalina.Logger; import org.apache.catalina.Request; import org.apache.catalina.Response; import org.apache.catalina.Valve; import org.apache.catalina.ValveContext; import org.apache.catalina.valves.ValveBase; import org.apache.catalina.util.StringManager; import org.apache.regexp.RE; import org.apache.regexp.RESyntaxException; /** * Implementation of a Valve that performs redirection based on comparing the * appropriate request property (selected based on which subclass you choose * to configure into your Container's pipeline) against a set of regular * expressions configured for this Valve. * p * This valve is configured by setting the codepattern/code and * codetarget/code properties. The codepattern/code is a * expressions (in the syntax supported by the jakarta-regexp library) to * which the appropriate request property will be compared. This Valve may * be attached to any Container. * * @author Jens Andersen (ja at it-practice.dk), Last edited by $Author$ * @version $Revision$ */ public class RedirectValve extends ValveBase implements Valve { //protected static StringManager sm = StringManager.getManager(dk.itp.catalina.valves); protected static StringManager sm = StringManager.getManager(org.apache.catalina.valves); /** * Info string containing information about the implementation. */ private static final String info = dk.itp.catalina.valves.RedirectValve/1.0; /** * The pattern compiled which makes it useable for the PatterMatcher */ private RE re; /** * The target represents the URI which the client is redirected to * if a match succed */ private String target; private boolean debug = true; /** * Constructor for RedirectValve. */ public RedirectValve() { super(); } /** * Set the pattern which must be tested against * @param pattern - the pattern conforming to the Perl 5.0 syntax * @exception IllegalArgumentException if the pattern has invalid syntax */ public void setPattern(String pattern){ try{ re = new RE(pattern); }catch(RESyntaxException rese){ throw new IllegalArgumentException(sm.getString(redirectValve.syntax, pattern)); } } /** * Set the target which the client request must be redirected to if the * incomming request and the pattern matches perfectly. * @param target - the redirect URI */ public void setTarget(String target){ this.target = target; } /** * Extract the desired request property, and pass it (along with the * specified request and response objects) to the protected * codeprocess()/code method to perform the actual filtering. * This method must be implemented by a concrete subclass. * * @param request The servlet request to be processed * @param response The servlet response to be created * @param context The valve context used to invoke the next valve * in the current processing pipeline * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ public void invoke(Request request, Response response, ValveContext context) throws IOException, ServletException { if(!(request instanceof HttpRequest) || !(response instanceof HttpResponse) || re == null){ context.invokeNext(request, response); return; } HttpRequest httprequest = (HttpRequest)request; HttpResponse httpresponse = (HttpResponse)response;
DO NOT REPLY [Bug 14760] - Array overflow exception in InternalOutputBuffer
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=14760. 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=14760 Array overflow exception in InternalOutputBuffer --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 13:52 --- Created an attachment (id=3919) Test case web app and source code -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14760] - Array overflow exception in InternalOutputBuffer
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=14760. 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=14760 Array overflow exception in InternalOutputBuffer --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 13:56 --- After further investigation I can now reproduce this at will with a small test webapp (see attachment). It appears to happen when a request is interrupted (for example by the user clicking on another app url after selecting an initial url which is taking some time to come back). The final request is served correctly but the InternalOutputBuffer associated with the interrupted request fills up with many calls to the write() method. If the originally requested page is big enough (as demonstrated in the web app attached to this report) the output buffer will overflow. To see this: Deploy the war file. Load the index.jsp file. Click on two of the links in quick succession. Check the log file - at some point you will see the out of bounds exception. I have also modified the InternalOutputBuffer code (source on request) to provide logging on the 'pos' variable and I can see that it is increasing with many calls to write(String) or write(MessageBytes) before the overflow occurs. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Javac memory leak
-Original Message- From: Holger Brozio [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 4:40 PM To: Tomcat Developers List Subject: Re: Javac memory leak is higher. If you wait a certain time frame and don't call any jsp page, the garbage collector should run and remove all unused instances of jsp classes. Just wondering if servlets (including JSP pages, since they are treated exactly as servlets) are ever garbage collected in the lifetime of the app server. As far as I know servlets are loaded only once in the jvm and stay there for ever (except for restart ofcourse). So the servlet (especially JSPs with lots of static content) will consume the memory of the heap in the old generation. If all the above are true I presume that moving big static content from JSPs into files will decrease the memory needs of a web app. (increasing I/O though) Panagiotis Konstantinidis Software Engineer Softways Hellas Internet Development S.A (http://www.softways.gr/) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
tomcat scripts
Where can I find the 'released' Startup scripts for Tomcat which lies under /etc/rc.d/, /etc/tomcat4/, etc ? Are they just for .rpm users? I'd also like to know if the config files into the /etc/tomcat4/ (server.xml, web.xml, jk.properties, etc) that comes with the rpm will override the ones inside the $CATALINA_HOME/conf and how to change this behaviour. Regards, miagi
cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c
jfclere 2002/11/22 06:43:01 Modified:jk/native/apache-1.3 mod_jk.c jk/native/apache-2.0 mod_jk.c Log: Arrange HEAD handling. That fixes 14293. Thanks to Martin Kraemer for his help. Revision ChangesPath 1.31 +8 -3 jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c Index: mod_jk.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- mod_jk.c 18 Oct 2002 10:23:15 - 1.30 +++ mod_jk.c 22 Nov 2002 14:43:00 - 1.31 @@ -354,6 +354,11 @@ } } +if (p-r-header_only) { +ap_bflush(bf); +return JK_TRUE; +} + while(len !p-r-connection-aborted) { w = ap_bwrite(p-r-connection-client, buf[r], len); if (w 0) { @@ -470,12 +475,12 @@ /* get server name */ /* s-server_name = (char *)(r-hostname ? r-hostname : r-server-server_hostname); */ /* XXX : à la jk2 */ - s-server_name = ap_get_server_name(r); +s-server_name = (char *) ap_get_server_name(r); /* get the real port (otherwise redirect failed) */ /* s-server_port = htons( r-connection-local_addr.sin_port ); */ /* XXX : à la jk2 */ - s-server_port = ap_get_server_port(r); +s-server_port = ap_get_server_port(r); s-server_software = (char *)ap_get_server_version(); 1.59 +7 -1 jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c Index: mod_jk.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- mod_jk.c 28 Oct 2002 14:38:07 - 1.58 +++ mod_jk.c 22 Nov 2002 14:43:00 - 1.59 @@ -364,6 +364,12 @@ return JK_FALSE; } } +if (p-r-header_only) { +#ifndef AS400 +ap_rflush(p-r); +#endif +return JK_TRUE; +} #ifdef AS400 rc = ap_change_response_body_xlate(p-r, 65535, 65535); /* turn off response body translation*/ if(rc){ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tagging JK 1.2.1
Henri Gomez wrote: I'll tag next week JK 1.2.1, after conducting tests to see if latest Costin path on chunked didn't break anything. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] For info the watchdog (4.0.0) gives the following with Apache-2.0 (head) and TC 4.1.12: +++ [java] [watchdog] FAILED GetRemoteHostTest [java] [watchdog] FAILED ServletRequestWrapperGetRemoteHostTest [java] [watchdog] FAILED GetHeadersTest [java] [watchdog] FAILED HttpServletRequestWrapperGetHeadersTest [java] [watchdog] FAILED HttpServletResponseWrapperSetStatusMsgTest +++ The 2 GetHeaders are due to a not up to date watchdog. (So forget them that is my fault) GetRemoteHost() returns null may this one needs fixing. The chuncking tests are acceptable. And I have committed the patches I had pending... Cheers Jean-frederic -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14293] - GetMethod_HEADTest test failed.
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=14293. 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=14293 GetMethod_HEADTest test failed. [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 14:50 --- Fixed by latest JFC commit -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tagging JK 1.2.1
jean-frederic clere wrote: Henri Gomez wrote: I'll tag next week JK 1.2.1, after conducting tests to see if latest Costin path on chunked didn't break anything. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] For info the watchdog (4.0.0) gives the following with Apache-2.0 (head) and TC 4.1.12: +++ [java] [watchdog] FAILED GetRemoteHostTest [java] [watchdog] FAILED ServletRequestWrapperGetRemoteHostTest [java] [watchdog] FAILED GetHeadersTest [java] [watchdog] FAILED HttpServletRequestWrapperGetHeadersTest [java] [watchdog] FAILED HttpServletResponseWrapperSetStatusMsgTest +++ The 2 GetHeaders are due to a not up to date watchdog. (So forget them that is my fault) GetRemoteHost() returns null may this one needs fixing. I take this one :) The chuncking tests are acceptable. Are you sure ? I still have problem while using the perl example code received in bugzilla #14282, but no problem with httpclient you provided. Of course the perl program didn't honor the Connection: close header returned ! And I have committed the patches I had pending... Ok, I closed bug #14293 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
strange problem with jasper on TC 4.1.x HEAD :
The generated JSP didn't have the import org.apache.jasper.runtime.* : . package jsp.snp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; public class _0002fjsp_0002fsnp_0002fsnoop_0002ejspsnoop_jsp_0 extends org.apache.jasper.runtime.HttpJspBase { static { } public _0002fjsp_0002fsnp_0002fsnoop_0002ejspsnoop_jsp_0( ) { } private boolean _jspx_inited = false; . What's the problem ? I'm using TC 4.1.x HEAD into my Eclipse IDE, and all the class / source are on the workspace -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11324] - forward() doesnt add parameters to query string
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=11324. 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=11324 forward() doesnt add parameters to query string [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE Summary|forward() doesnt add|forward() doesnt add |parameters to query string |parameters to query string --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 15:32 --- *** This bug has been marked as a duplicate of 14436 *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14436] - RequestDispatcher Drops Query String
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=14436. 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=14436 RequestDispatcher Drops Query String [EMAIL PROTECTED] changed: What|Removed |Added CC||james.sanderson@northgate- ||is.com --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 15:32 --- *** Bug 11324 has been marked as a duplicate of this bug. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[5.0] Is it working on 1.4.1 ?
Hi, Trying to use the nightly builds with 1.4.1 on WIN32, but without much luck. SEVERE: Parse Fatal Error at line 307 column 39: The string -- is not permitted within comments. org.xml.sax.SAXParseException: The string -- is not permitted within comments. Cleaning common/enorsed help a bit, but then I got. java.lang.NoClassDefFoundError: org/apache/xerces/xni/XMLString Any leads? MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 InternalOutputBuffer.java
remm2002/11/22 07:55:32 Modified:http11/src/java/org/apache/coyote/http11 InternalOutputBuffer.java Log: - If an IOE happens during the commit, the response is never flagged as committed (so would get generated multiple times in the OB depending on how much commit is used in the rest of the processing). - Fix bug 14760 (ok, there really was a bug, although it has almost zero actual impact). Revision ChangesPath 1.16 +4 -4 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalOutputBuffer.java Index: InternalOutputBuffer.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalOutputBuffer.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- InternalOutputBuffer.java 10 Oct 2002 13:14:55 - 1.15 +++ InternalOutputBuffer.java 22 Nov 2002 15:55:32 - 1.16 @@ -536,15 +536,15 @@ protected void commit() throws IOException { +// The response is now committed +committed = true; +response.setCommitted(true); + if (pos 0) { // Sending the response header buffer outputStream.write(buf, 0, pos); outputStream.flush(); // Is it really necessary ? } - -// The response is now committed -committed = true; -response.setCommitted(true); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_service_apache2.c
jfclere 2002/11/22 08:04:06 Modified:jk/native2/server/apache13 jk_service_apache13.c jk/native2/server/apache2 jk_service_apache2.c Log: Fix 14293 - Copied from mod_jk - Revision ChangesPath 1.9 +6 -4 jakarta-tomcat-connectors/jk/native2/server/apache13/jk_service_apache13.c Index: jk_service_apache13.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache13/jk_service_apache13.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- jk_service_apache13.c 27 Sep 2002 17:49:01 - 1.8 +++ jk_service_apache13.c 22 Nov 2002 16:04:05 - 1.9 @@ -215,8 +215,6 @@ return JK_ERR; { -/* BUFF *bf = p-r-connection-client; */ -/* size_t w = (size_t)l; */ size_t rd = 0; long ll=len; char *bb=(char *)b; @@ -232,11 +230,15 @@ return rc; } } +if (rr-header_only) { +ap_bflush(rr); +return JK_OK; +} /* Debug - try to get around rwrite */ while( ll 0 ) { unsigned long toSend=(llCHUNK_SIZE) ? CHUNK_SIZE : ll; -rd = ap_rwrite((const char *)bb, toSend, s-ws_private ); +rd = ap_rwrite((const char *)bb, toSend, rr ); if( s-uriEnv-mbean-debug 0 ) env-l-jkLog(env, env-l, JK_LOG_INFO, service.write() %ld (%ld) out of %ld \n,toSend, rd, ll ); @@ -252,7 +254,7 @@ /* * To allow server push. After writing full buffers */ -ap_bflush(s-ws_private); +ap_bflush(rr); } return JK_OK; } 1.32 +8 -3 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_service_apache2.c Index: jk_service_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_service_apache2.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- jk_service_apache2.c 26 Oct 2002 12:38:45 - 1.31 +++ jk_service_apache2.c 22 Nov 2002 16:04:06 - 1.32 @@ -282,11 +282,16 @@ } } } + +if (rr-header_only) { +ap_rflush(rr); +return JK_OK; +} /* Debug - try to get around rwrite */ while( ll 0 ) { unsigned long toSend=(llCHUNK_SIZE) ? CHUNK_SIZE : ll; -r = ap_rwrite((const char *)bb, toSend, s-ws_private ); +r = ap_rwrite((const char *)bb, toSend, rr ); /* env-l-jkLog(env, env-l, JK_LOG_INFO, */ /* service.write() %ld (%ld) out of %ld \n,toSend, r, ll ); */ ll-=CHUNK_SIZE; @@ -301,7 +306,7 @@ /* * To allow server push. After writing full buffers */ -if(ap_rflush(s-ws_private) != APR_SUCCESS) { +if(ap_rflush(rr) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, mod_jk: Error flushing \n ); return JK_ERR; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14760] - Array overflow exception in InternalOutputBuffer
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=14760. 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=14760 Array overflow exception in InternalOutputBuffer [EMAIL PROTECTED] changed: What|Removed |Added Severity|Major |Minor Status|UNCONFIRMED |RESOLVED Resolution||FIXED Version|4.1.12 |4.1.15 --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 16:07 --- I cannot really reproduce it using the test case (pos never got higher than 533, but is not constant, and that's higher than it should be). With the fix (will be in 4.1.16 and 5.0.1), the value stays low and constant. The bug has little impact except the trace ending up in the logs, and a small performance degradation. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c
jfclere 2002/11/22 08:09:27 Modified:jk/native2/common jk_channel_socket.c Log: Remove unsed code. Revision ChangesPath 1.46 +0 -14 jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c Index: jk_channel_socket.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- jk_channel_socket.c 21 Nov 2002 16:23:59 - 1.45 +++ jk_channel_socket.c 22 Nov 2002 16:09:27 - 1.46 @@ -308,20 +308,6 @@ * * XXX: How to check the timeouts effectively? */ -#if 0 -u_long zero = 0; -#ifdef WIN32 -if (ioctlsocket(sock, FIONBIO, zero) == SOCKET_ERROR) { -errno = WSAGetLastError() - WSABASEERR; -#else -if (ioctl(sock, FIONBIO, zero) != 0) { -#endif -env-l-jkLog(env, env-l, JK_LOG_ERROR, - channelSocket.open() ioctlcocket failed %s:%d %d %s \n, - socketInfo-host, socketInfo-port, errno, strerror( errno ) ); -return JK_ERR; -} -#endif setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (char *) set, sizeof(set)); setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, (char *) set, sizeof(set)); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tagging JK2_2_0_2
Mladen Turk wrote: -Original Message- I remember that a FIONBIO was causing me some problems it seems there is a #if 0 #endif So the code between is not used any more. Could we remove it? Yes... That was my invention after all (blocking blocked socket) ;-). /* When a socket is created, it operates in blocking mode * by default (nonblocking mode is disabled), so there is no need * to set it to the blocking mode prior timeout setting. * This is consistent with BSD sockets. ... MT. Ok. I have applied all the patches I have for the moment. Cheers Jean-frederic -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 13861] - Authentication / SSL conflict (web.xml security-constraint auth-constraint user-data-constraint)
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=13861. 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=13861 Authentication / SSL conflict (web.xml security-constraint auth-constraint user-data-constraint) --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 16:27 --- I'm experiencing the same thing, but when it times out, I get the url with a jsessionid attached to it. Also it changes http to https, but not the port number. Now if I keep the jsessionid and the rest of the url, and switch it back to http://localhost:8080, it will then magically redirect to https://localhost:8443 See my comments in this post to the tomcat-users list for more details... http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg74611.html -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tagging JK2_2_0_2
-Original Message- From: jean-frederic clere I have applied all the patches I have for the moment. Cheers Jean-frederic Cool, thx. MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2 CHANGES.txt
mturk 2002/11/22 08:32:48 Modified:jk/native2 CHANGES.txt Log: Some recent changes... Revision ChangesPath 1.4 +9 -1 jakarta-tomcat-connectors/jk/native2/CHANGES.txt Index: CHANGES.txt === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/CHANGES.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CHANGES.txt 22 Oct 2002 12:44:57 - 1.3 +++ CHANGES.txt 22 Nov 2002 16:32:48 - 1.4 @@ -2,6 +2,14 @@ Last modified at [$Date$] Changes with JK2 2.0.2: +* Fix the bug 14293. Thanks to Martin Kraemer for his help. + [Jean-Frederic Clere] +* Don't send initial chunk for chunked encoding + [Costin Manolache] +* Fix the POST data on JNI + [Mladen Turk] +* Remove the deprecated message for path + [Costin Manolache] * Add the regular expressions to uriMap. The regex uris are differentiated to normal one by starting with dollar ($) sign. [Mladen Turk] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JK2 module for AOLserver
Costin Manolache wrote: Are you using the jni channel ? Is that working too ? No, it is the default ajp13 channel. I think I told you about my doubts about jk_workerEnv.c hardcoding ajp13 as the type for all channel initialization. Anyway, this is how the code looks like now (let me know if I am missing the point here). Would the code I have commented out use jni channel? static int jk2_workerEnv_addChannel(jk_env_t *env, jk_workerEnv_t *wEnv, jk_channel_t *ch) { ... /* Automatically create the ajp13 worker to be used with this channel. */ jkb=env-createBean2(env, ch-mbean-pool, ajp13, ch-mbean-localName ); /* AL - attempt to change to different channel if (strcmp (ch-mbean-localName, jni) == 0) factype = worker.jni; else factype = ajp13; */ ... Regarding jsp - it uses ant to compile, so you may want to set a system property to specify the compiler ( you can do it in the worker config ). I use build.compiler=jikes :-) Not sure how the things are related to ant. Standalone Tomcat compiles JSP perfectly well, so I think this is related to runtime environment, some option missing from in-process environment. Isn't ant used strictly at build time, and JSP compile done by Tomcat translating things to Java and then calling JVM to compile into bytecode? You can have hooks for startup, init, or close - but the only one that matters ( in most cases ) is the one that loads main(). I think there is a 4th phase, shutdown. What does servlet spec say about shutdown, is there a way to register a shutdown servlet - loosing that capability may not be the best thing. I do see slightly different behavior now - there is a Service shutting down message from Tomcat, but AOLserver shutdown messages are missing. It could be bugs in my code, I know I forgot to initialize JVM in separate thread (has to do with AOLserver disabling signals in main thread, and JVM depending on them to do garbage collection). Thank you, Alex -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [5.0] Is it working on 1.4.1 ?
Yes , its works but you have a bug in Xerces 2.2.0 anmd 2.2.1 cause that problem. Download Xerces 2.1 or the current Xerces nightly build (where the bug have been fixed). -- Jeanfrancois Mladen Turk wrote: Hi, Trying to use the nightly builds with 1.4.1 on WIN32, but without much luck. SEVERE: Parse Fatal Error at line 307 column 39: The string -- is not permitted within comments. org.xml.sax.SAXParseException: The string -- is not permitted within comments. Cleaning common/enorsed help a bit, but then I got. java.lang.NoClassDefFoundError: org/apache/xerces/xni/XMLString Any leads? MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [5.0] Is it working on 1.4.1 ?
-Original Message- From: Jeanfrancois Arcand [mailto:[EMAIL PROTECTED]] Yes , its works but you have a bug in Xerces 2.2.0 anmd 2.2.1 cause that problem. Download Xerces 2.1 or the current Xerces nightly build (where the bug have been fixed). Will try, but why is it then in the TC's nightly build when it doesn't work? MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelSocket.java
mturk 2002/11/22 09:46:33 Modified:jk/java/org/apache/jk/common ChannelSocket.java Log: 1. Setting port to 0 will disble the channel socket. This is usefull for JNI where there is no need for channelSocket. Less wasted resources... 2. Allow address=x.x.x.x in the server.xml. This wil bind the specified IP address in case one have few on the box. Revision ChangesPath 1.28 +32 -21 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java Index: ChannelSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- ChannelSocket.java21 Nov 2002 09:32:17 - 1.27 +++ ChannelSocket.java22 Nov 2002 17:46:33 - 1.28 @@ -303,27 +303,35 @@ /** * @jmx:managed-operation */ -public void init() throws IOException { -// Find a port. -if( maxPortstartPort) maxPort=startPort; - -for( int i=startPort; i=maxPort; i++ ) { -try { -sSocket=new ServerSocket( i ); -port=i; -break; -} catch( IOException ex ) { -log.info(Port busy + i + + ex.toString()); -continue; -} -} - -if( sSocket==null ) { -log.error(Can't find free port + startPort + + maxPort ); -return; -} -log.info(JK2: ajp13 listening on tcp port + port ); - +public void init() throws IOException { +// Find a port. +if (startPort == 0) { +port = 0; +log.info(JK2: ajp13 disabling channelSocket); +running = true; +return; +} +if (maxPort startPort) +maxPort = startPort; +if (getAddress() == null) +setAddress(localhost); +for( int i=startPort; i=maxPort; i++ ) { +try { +sSocket=new ServerSocket( i, 0, inet ); +port=i; +break; +} catch( IOException ex ) { +log.info(Port busy + i + + ex.toString()); +continue; +} +} + +if( sSocket==null ) { +log.error(Can't find free port + startPort + + maxPort ); +return; +} +log.info(JK2: ajp13 listening on + getAddress() + : + port ); + // If this is not the base port and we are the 'main' channleSocket and // SHM didn't already set the localId - we'll set the instance id if( channelSocket.equals( name ) @@ -363,6 +371,9 @@ public void destroy() throws IOException { running = false; try { +/* If we disabled the channel return */ +if (port == 0) +return; tp.shutdown(); // Need to create a connection to unlock the accept(); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [5.0] Is it working on 1.4.1 ?
Today I will make the appropriate changes to the build.xml to pinpoint to the proper Xerces version. I've just have the confirmation from the Xerces folks that the bug was fixed. -- jeanfrancois Mladen Turk wrote: -Original Message- From: Jeanfrancois Arcand [mailto:[EMAIL PROTECTED]] Yes , its works but you have a bug in Xerces 2.2.0 anmd 2.2.1 cause that problem. Download Xerces 2.1 or the current Xerces nightly build (where the bug have been fixed). Will try, but why is it then in the TC's nightly build when it doesn't work? MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [5.0] Is it working on 1.4.1 ?
Remove xerces. It works fine with the crimson inside jdk1.4 Costin Mladen Turk wrote: Hi, Trying to use the nightly builds with 1.4.1 on WIN32, but without much luck. SEVERE: Parse Fatal Error at line 307 column 39: The string -- is not permitted within comments. org.xml.sax.SAXParseException: The string -- is not permitted within comments. Cleaning common/enorsed help a bit, but then I got. java.lang.NoClassDefFoundError: org/apache/xerces/xni/XMLString Any leads? MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JK2 module for AOLserver
Alexander Leyke wrote: Costin Manolache wrote: Are you using the jni channel ? Is that working too ? No, it is the default ajp13 channel. I think I told you about my doubts about jk_workerEnv.c hardcoding ajp13 as the type for all channel initialization. Anyway, this is how the code looks like now (let me know if I am missing the point here). Would the code I have commented out use jni channel? I don't think so. AFAIK jni uses the ajp13 protocol over jni channel. All you have to do is define the config: In workers2.properties: [channel.jni:jni] info=The jni channel, used if tomcat is started inprocess debug=10 [worker.jni:jniCmd1] info=Command to be executed by the VM. This one will start tomcat. class=org/apache/jk/apr/TomcatStarter ARG=start debug=10 [uri:/... ] worker=jni The moment you define the channel.jni stuff it'll create automatically a worker with the same name, and you can map to that worker. ( the worker will be of ajp13 type - but use the jni channel ). ( yes, I know - we need more documentation ). Regarding jsp - it uses ant to compile, so you may want to set a system property to specify the compiler ( you can do it in the worker config ). I use build.compiler=jikes :-) Not sure how the things are related to ant. Standalone Tomcat compiles JSP perfectly well, so I think this is related to runtime environment, some option missing from in-process environment. Isn't ant used strictly at build time, and JSP compile done by Tomcat translating things to Java and then calling JVM to compile into bytecode? Tomcat4.1 uses javac task from ant to compile. ( no build file - it embeds it ). That means any settings from ant would work. ( ant is pretty good at compiling - the idea was to avoid duplicating this ). I think there is a 4th phase, shutdown. What does servlet spec say about shutdown, is there a way to register a shutdown servlet - loosing that capability may not be the best thing. I do see slightly different behavior now - there is a Service shutting down message from Tomcat, but AOLserver shutdown messages are missing. It could be bugs in my code, I know I forgot to initialize JVM in separate thread (has to do with AOLserver disabling signals in main thread, and JVM depending on them to do garbage collection). Tomcat registeres a shutdown hook ( with JDK1.3+ I think ). I think Mladen added shutdown hooks - but I never tested this. Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/conf workers2.properties
mturk 2002/11/22 10:56:45 Modified:jk/conf workers2.properties Log: Add the description for JVM startup argument for TC 5.0 The accepted argument is 'startd' for Bootstrap class. That way it will behave like a daemon. Revision ChangesPath 1.19 +2 -0 jakarta-tomcat-connectors/jk/conf/workers2.properties Index: workers2.properties === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/conf/workers2.properties,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- workers2.properties 15 Oct 2002 14:02:08 - 1.18 +++ workers2.properties 22 Nov 2002 18:56:45 - 1.19 @@ -80,6 +80,8 @@ info=Command to be executed by the VM on startup. This one will start tomcat. class=org/apache/jk/apr/TomcatStarter ARG=start +# For Tomcat 5 use the 'stard' for startup argument +# ARG=stard disabled=1 stdout=${serverRoot}/logs/stdout.log stderr=${serverRoot}/logs/stderr.log -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[5.0] Bootstrap.java and main() arguments
Hi, Since new Bootstrap combines BootstrapService, we have some launch param differences from 4.x. Can we change the startup params as follows in main method: 1. rename startd to start 2. rename stopd to stop 3. rename start to run 4. rename stop to kill The latest two can be changed to some other names. The reason is JK2 and JNI where we have a start as a argument, so it can work with 5.0 only with startd as a argument. I've had to look into the Bootstrap.java source code to figure that out, so imagine an ordinary user. MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves AccessLogValve.java
amyroh 2002/11/22 12:27:13 Modified:catalina/src/share/org/apache/catalina/valves AccessLogValve.java Log: This patch allows for the following: %{xxx}i xxx is the name of the incoming header %{xxx}c xxx is the name of a specific cookie %{xxx}r xxx is an attribute in the ServletRequest %{xxx}s xxx is an attribute in the HttpSession For %A - uses InetAddress.getLocalHost() instead of hardcoded 127.0.0.1 Patch also allows access log not be rotated. This is done by adding a new attribute called rotatable. It defaults to true. If set to false - then the access log does not rotate. (Which will make a lot of tomcat-users happy) Submitted by Tim Funk [EMAIL PROTECTED] Revision ChangesPath 1.15 +174 -26 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java Index: AccessLogValve.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- AccessLogValve.java 9 Jun 2002 02:19:44 - 1.14 +++ AccessLogValve.java 22 Nov 2002 20:27:12 - 1.15 @@ -65,14 +65,17 @@ import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; +import java.net.InetAddress; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; +import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; import org.apache.catalina.HttpResponse; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; @@ -124,8 +127,17 @@ * code%h %l %u %t %r %s %b %{Referer}i %{User-Agent}i/code * /ul * - * pbFIXME/b - Improve the parsing so that things like - * code%{xxx}i/code can be implemented./p + * p + * There is also support to write information from the cookie, incoming + * header, the Session or something else in the ServletRequest.br + * It is modeled after the apache syntax: + * ul + * licode%{xxx}i/code for incoming headers + * licode%{xxx}c/code for a specific cookie + * licode%{xxx}r/code xxx is an attribute in the ServletRequest + * licode%{xxx}s/code xxx is an attribute in the HttpSession + * /ul + * /p * * @author Craig R. McClanahan * @author Jason Brittain @@ -217,6 +229,12 @@ /** + * Should we rotate our log file? Default is true (like old behavior) + */ +private boolean rotatable = true; + + +/** * The string manager for this package. */ private StringManager sm = @@ -400,6 +418,28 @@ this.prefix = prefix; } + + +/** + * Should we rotate the logs + */ +public boolean isRotatable() { + +return rotatable; + +} + + +/** + * Set the value is we should we rotate the logs + * + * @param rotatable true is we should rotate. + */ +public void setRotatable(boolean rotatable) { + +this.rotatable = rotatable; + +} /** @@ -557,7 +597,31 @@ for (int i = 0; i pattern.length(); i++) { char ch = pattern.charAt(i); if (replace) { -result.append(replace(ch, date, request, response)); +/* For code that processes {, the behavior will be ... if I + * do not enounter a closing } - then I ignore the { + */ +if ('{' == ch){ +StringBuffer name = new StringBuffer(); +int j = i + 1; +for(;j pattern.length() '}' != pattern.charAt(j); j++) { +name.append(pattern.charAt(j)); +} +if (j+1 pattern.length()) { +/* the +1 was to account for } which we increment now */ +j++; +result.append(replace(name.toString(), +pattern.charAt(j), +request, +response)); +i=j; /*Since we walked more than one character*/ +} else { +//D'oh - end of string - pretend we never did this +//and do processing the old way +
DO NOT REPLY [Bug 14724] - [PATCH] AccessLogValve - %{xxx}i implementation AND disable log rotation
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=14724. 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=14724 [PATCH] AccessLogValve - %{xxx}i implementation AND disable log rotation [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 20:44 --- Enhancement added. I didn't have time to merge the different patches. However, I'll commit the change again if someone sends a switch based rather than if based patch against the current cvs to make it more efficient. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14781] New: - CGI servlet depends on Java 1.4 for POST actions
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=14781. 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=14781 CGI servlet depends on Java 1.4 for POST actions Summary: CGI servlet depends on Java 1.4 for POST actions Product: Tomcat 4 Version: 4.1.12 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Servlets:CGI AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Problem: When trying to execute a mailing form that operates via a POST action, an exception is thrown: ... root cause: java.lang.NoSuchMethodError: java/lang/StringBuffer at org.apache.catalina.servlets.CGIServlet$CGIRunner.getPostInput (CGIServlet.java:1820) (pc 174) at org.apache.catalina.servlets.CGIServlet$CGIRunner.run (CGIServlet.java:1655) (pc 566) at org.apache.catalina.servlets.CGIServlet.doGet (CGIServlet.java:635) (pc 101) at org.apache.catalina.servlets.CGIServlet.doPost (CGIServlet.java:597) (pc 3) etc. Evaluation: In the last line of CGIServlet.java, it does the following: return qs.append(postInput).toString(); The problem is that a new method StringBuffer.append(StringBuffer b) was added in 1.4 that is preferred to the default StringBuffer.append(Object o) for this line. But when using a JDK 1.4 (1.3.1 in my case, which is the latest one available for Compaq Tru64 Unix), it doesn't find the method... Proposed Workaround: Use return qs.append(postInput.toString()).toString(); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/webapps/admin/valve accessLogValve.jsp
amyroh 2002/11/22 13:49:47 Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin ApplicationResources_en.properties ApplicationResources_es.properties webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve AccessLogValveForm.java AddValveAction.java EditValveAction.java SaveAccessLogValveAction.java webapps/admin/valve accessLogValve.jsp Log: Make new rotatable attribute of AccessLogValve visible from admin webapp. Revision ChangesPath 1.71 +1 -0 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties Index: ApplicationResources_en.properties === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- ApplicationResources_en.properties11 Sep 2002 14:20:00 - 1.70 +++ ApplicationResources_en.properties22 Nov 2002 21:49:46 - 1.71 @@ -244,6 +244,7 @@ valve.remotehost.properties=Remote Host Valve Properties valve.remoteaddress.properties=Remote Address Valve Properties valve.resolveHosts=Resolve Hosts +valve.rotatable=Rotatable valve.pattern=Pattern valve.allowHosts=Allow these Hosts valve.denyHosts=Deny these Hosts 1.60 +1 -0 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties Index: ApplicationResources_es.properties === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- ApplicationResources_es.properties11 Sep 2002 14:20:00 - 1.59 +++ ApplicationResources_es.properties22 Nov 2002 21:49:46 - 1.60 @@ -243,6 +243,7 @@ valve.remotehost.properties=Propiedades del Remote Host Valve valve.remoteaddress.properties=Propiedades del Remote Address Valve valve.resolveHosts=Resolve Hosts +valve.rotatable=Rotativo valve.pattern=Pattern valve.allowHosts=Permita estos Hosts valve.denyHosts=Niegue estos Hosts 1.3 +30 -4 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve/AccessLogValveForm.java Index: AccessLogValveForm.java === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve/AccessLogValveForm.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AccessLogValveForm.java 11 Apr 2002 14:47:47 - 1.2 +++ AccessLogValveForm.java 22 Nov 2002 21:49:46 - 1.3 @@ -112,6 +112,11 @@ * The text for the connection URL. */ private String resolveHosts = false; + +/** + * The text for the rotatable. + */ +private String rotatable = true; /** * Set of boolean values. @@ -263,7 +268,25 @@ this.resolveHosts = resolveHosts; } + +/** + * Return the rotatable. + */ +public String getRotatable() { + +return this.rotatable; + +} +/** + * Set the rotatable. + */ +public void setRotatable(String rotatable) { + +this.rotatable = rotatable; + +} + // - Public Methods /** @@ -282,6 +305,7 @@ this.suffix = null; this.pattern = null; this.resolveHosts = false; +this.rotatable = true; } @@ -304,6 +328,8 @@ sb.append(pattern); sb.append(,resolveHosts=); sb.append(resolveHosts); +sb.append(,rotatable=); +sb.append(rotatable); sb.append(',objectName='); sb.append(getObjectName()); sb.append(]); 1.2 +4 -3 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve/AddValveAction.java Index: AddValveAction.java === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve/AddValveAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AddValveAction.java 17 Apr 2002 19:53:27 - 1.1 +++ AddValveAction.java 22 Nov 2002 21:49:46 - 1.2
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans mbeans-descriptors.xml
amyroh 2002/11/22 13:50:18 Modified:catalina/src/share/org/apache/catalina/mbeans mbeans-descriptors.xml Log: Make new rotatable attribute of AccessLogValve visible from admin webapp. Revision ChangesPath 1.71 +18 -13 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- mbeans-descriptors.xml9 Sep 2002 23:39:03 - 1.70 +++ mbeans-descriptors.xml22 Nov 2002 21:50:18 - 1.71 @@ -44,7 +44,12 @@ description=Resolve hosts is=true type=boolean/ - + +attribute name=rotatable + description=Rotate log + is=true + type=boolean/ + attribute name=suffix description=The suffix that is added to log file filenames type=java.lang.String/ @@ -149,7 +154,7 @@ attribute name=override description=Does this environment entry allow overrides by the - application deployment descriptor + application deployment descriptor type=boolean/ attribute name=type @@ -279,7 +284,7 @@ attribute name=port description=The port number on which we listen for ajp13 requests - type=int/ +type=int/ attribute name=protocolHandlerClassName description=Coyote Protocol handler class name @@ -342,7 +347,7 @@ attribute name=swallowOutput description=Flag to set to cause the system.out and system.err - to be redirected to the logger when executing a servlet + to be redirected to the logger when executing a servlet type=boolean/ attribute name=useNaming @@ -1638,26 +1643,26 @@ mbean name=NamingResources className=org.apache.catalina.mbeans.NamingResourcesMBean description=Holds and manages the naming resources defined in the - J2EE Enterprise Naming Context and their associated JNDI context + J2EE Enterprise Naming Context and their associated JNDI context domain=Catalina group=Resources type=org.apache.catalina.deploy.NamingResources attribute name=environments description=MBean Names of the set of defined environment entries - for this web application + for this web application type=java.lang.String[] writeable=false/ attribute name=resources description=MBean Names of all the defined resource references - for this application. + for this application. type=java.lang.String[] writeable=false/ attribute name=resourceLinks description=MBean Names of all the defined resource link references - for this application. + for this application. type=java.lang.String[] writeable=false/ @@ -1794,7 +1799,7 @@ mbean name=NonLoginAuthenticator className=org.apache.catalina.mbeans.ClassNameMBean description=An Authenticator and Valve implementation that checks - only security constraints not involving user authentication +only security constraints not involving user authentication domain=Catalina group=Valve type=org.apache.catalina.authenticator.NonLoginAuthenticator @@ -1953,7 +1958,7 @@ attribute name=environments description=MBean Names of the set of defined environment entries - for this web application + for this web application type=java.lang.String[] writeable=false/ @@ -1976,13 +1981,13 @@ attribute name=resources description=MBean Names of all the defined resource references - for this application. + for this application. type=java.lang.String[] writeable=false/ attribute name=swallowOutput description=Flag to set to cause the system.out and system.err - to be redirected to the logger when executing a servlet + to be redirected to the logger when executing a servlet type=boolean/ attribute name=useNaming -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets CGIServlet.java
amyroh 2002/11/22 13:51:14 Modified:catalina/src/share/org/apache/catalina/servlets CGIServlet.java Log: Fix for bugzilla 14781 so that CGIServlet doesn't depend on 1.4 api. Revision ChangesPath 1.10 +9 -9 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Index: CGIServlet.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- CGIServlet.java 5 Sep 2002 21:46:54 - 1.9 +++ CGIServlet.java 22 Nov 2002 21:51:14 - 1.10 @@ -1817,7 +1817,7 @@ } } qs.append(lineSeparator); -return qs.append(postInput).toString(); +return qs.append(postInput.toString()).toString(); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14781] - CGI servlet depends on Java 1.4 for POST actions
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=14781. 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=14781 CGI servlet depends on Java 1.4 for POST actions [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2002-11-22 21:52 --- Fixed. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves AccessLogValve.java
amyroh 2002/11/22 14:23:44 Modified:catalina/src/share/org/apache/catalina/valves AccessLogValve.java Log: Port change to AccessLogValve. Revision ChangesPath 1.2 +174 -26 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java Index: AccessLogValve.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AccessLogValve.java 18 Jul 2002 16:47:43 - 1.1 +++ AccessLogValve.java 22 Nov 2002 22:23:44 - 1.2 @@ -65,14 +65,17 @@ import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; +import java.net.InetAddress; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; +import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; import org.apache.catalina.HttpResponse; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; @@ -124,8 +127,17 @@ * code%h %l %u %t %r %s %b %{Referer}i %{User-Agent}i/code * /ul * - * pbFIXME/b - Improve the parsing so that things like - * code%{xxx}i/code can be implemented./p + * p + * There is also support to write information from the cookie, incoming + * header, the Session or something else in the ServletRequest.br + * It is modeled after the apache syntax: + * ul + * licode%{xxx}i/code for incoming headers + * licode%{xxx}c/code for a specific cookie + * licode%{xxx}r/code xxx is an attribute in the ServletRequest + * licode%{xxx}s/code xxx is an attribute in the HttpSession + * /ul + * /p * * @author Craig R. McClanahan * @author Jason Brittain @@ -214,6 +226,12 @@ * The prefix that is added to log file filenames. */ private String prefix = access_log.; + + +/** + * Should we rotate our log file? Default is true (like old behavior) + */ +private boolean rotatable = true; /** @@ -403,6 +421,28 @@ /** + * Should we rotate the logs + */ +public boolean isRotatable() { + +return rotatable; + +} + + +/** + * Set the value is we should we rotate the logs + * + * @param rotatable true is we should rotate. + */ +public void setRotatable(boolean rotatable) { + +this.rotatable = rotatable; + +} + + +/** * Return the log file suffix. */ public String getSuffix() { @@ -557,7 +597,31 @@ for (int i = 0; i pattern.length(); i++) { char ch = pattern.charAt(i); if (replace) { -result.append(replace(ch, date, request, response)); +/* For code that processes {, the behavior will be ... if I + * do not enounter a closing } - then I ignore the { + */ +if ('{' == ch){ +StringBuffer name = new StringBuffer(); +int j = i + 1; +for(;j pattern.length() '}' != pattern.charAt(j); j++) { +name.append(pattern.charAt(j)); +} +if (j+1 pattern.length()) { +/* the +1 was to account for } which we increment now */ +j++; +result.append(replace(name.toString(), +pattern.charAt(j), +request, +response)); +i=j; /*Since we walked more than one character*/ +} else { +//D'oh - end of string - pretend we never did this +//and do processing the old way +result.append(replace(ch, date, request, response)); +} +} else { +result.append(replace(ch, date, request, response)); +} replace = false; } else if (ch == '%') { replace = true; @@ -599,28 +663,30 @@ */ public void log(String message, Date date) { -// Only do a logfile switch check once a second, max. -long
cvs commit: jakarta-tomcat-catalina/webapps/admin/valve accessLogValve.jsp
amyroh 2002/11/22 14:24:56 Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin ApplicationResources_en.properties ApplicationResources_es.properties webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve AccessLogValveForm.java AddValveAction.java EditValveAction.java SaveAccessLogValveAction.java webapps/admin/valve accessLogValve.jsp Log: Port rotatable addition to AccessLogValve in admin webapp. Revision ChangesPath 1.6 +1 -0 jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties Index: ApplicationResources_en.properties === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ApplicationResources_en.properties16 Sep 2002 04:46:18 - 1.5 +++ ApplicationResources_en.properties22 Nov 2002 22:24:56 - 1.6 @@ -244,6 +244,7 @@ valve.remotehost.properties=Remote Host Valve Properties valve.remoteaddress.properties=Remote Address Valve Properties valve.resolveHosts=Resolve Hosts +valve.rotatable=Rotatable valve.pattern=Pattern valve.allowHosts=Allow these Hosts valve.denyHosts=Deny these Hosts 1.6 +1 -0 jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties Index: ApplicationResources_es.properties === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ApplicationResources_es.properties16 Sep 2002 04:46:18 - 1.5 +++ ApplicationResources_es.properties22 Nov 2002 22:24:56 - 1.6 @@ -243,6 +243,7 @@ valve.remotehost.properties=Propiedades del Remote Host Valve valve.remoteaddress.properties=Propiedades del Remote Address Valve valve.resolveHosts=Resolve Hosts +valve.rotatable=Rotativo valve.pattern=Pattern valve.allowHosts=Permita estos Hosts valve.denyHosts=Niegue estos Hosts 1.2 +30 -4 jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve/AccessLogValveForm.java Index: AccessLogValveForm.java === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve/AccessLogValveForm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AccessLogValveForm.java 18 Jul 2002 16:48:27 - 1.1 +++ AccessLogValveForm.java 22 Nov 2002 22:24:56 - 1.2 @@ -112,6 +112,11 @@ * The text for the connection URL. */ private String resolveHosts = false; + +/** + * The text for the rotatable. + */ +private String rotatable = true; /** * Set of boolean values. @@ -262,6 +267,24 @@ this.resolveHosts = resolveHosts; +} + +/** + * Return the rotatable. + */ +public String getRotatable() { + +return this.rotatable; + +} + +/** + * Set the rotatable. + */ +public void setRotatable(String rotatable) { + +this.rotatable = rotatable; + } // - Public Methods @@ -282,6 +305,7 @@ this.suffix = null; this.pattern = null; this.resolveHosts = false; +this.rotatable = true; } @@ -304,6 +328,8 @@ sb.append(pattern); sb.append(,resolveHosts=); sb.append(resolveHosts); +sb.append(,rotatable=); +sb.append(rotatable); sb.append(',objectName='); sb.append(getObjectName()); sb.append(]); 1.2 +5 -4 jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve/AddValveAction.java Index: AddValveAction.java === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve/AddValveAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AddValveAction.java 18 Jul 2002 16:48:28 - 1.1 +++ AddValveAction.java 22 Nov 2002 22:24:56 - 1.2
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans mbeans-descriptors.xml
amyroh 2002/11/22 14:25:17 Modified:catalina/src/share/org/apache/catalina/mbeans mbeans-descriptors.xml Log: Port rotatable addition to AccessLogValve in admin webapp. Revision ChangesPath 1.10 +6 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- mbeans-descriptors.xml16 Sep 2002 05:27:57 - 1.9 +++ mbeans-descriptors.xml22 Nov 2002 22:25:17 - 1.10 @@ -43,6 +43,11 @@ description=Resolve hosts is=true type=boolean/ + +attribute name=rotatable + description=Rotate log + is=true + type=boolean/ attribute name=suffix description=The suffix that is added to log file filenames -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets CGIServlet.java
amyroh 2002/11/22 14:26:08 Modified:catalina/src/share/org/apache/catalina/servlets CGIServlet.java Log: Port change the dependency on 1.4 api. Revision ChangesPath 1.5 +8 -8 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Index: CGIServlet.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CGIServlet.java 23 Oct 2002 19:57:31 - 1.4 +++ CGIServlet.java 22 Nov 2002 22:26:08 - 1.5 @@ -1817,7 +1817,7 @@ } } qs.append(lineSeparator); -return qs.append(postInput).toString(); +return qs.append(postInput.toString()).toString(); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14784] New: - access log garbled
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=14784. 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=14784 access log garbled Summary: access log garbled Product: Tomcat 4 Version: 4.1.12 Platform: All OS/Version: Linux Status: NEW Severity: Major Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The access log for any virtual host is garbled. I have 12 virtual hosts defined and all of their access logs are of no real value. The other logs are fine. A sameple host configuration: Host name=www.myhostnamehere.com debug=100 appBase=/home/tomcat/sites/myhostnamehere.com unpackWARs=true Aliasmyhostnamehere.com/Alias Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=myhostnamehere.com_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=myhostnamehere.com_log. suffix=.txt timestamp=true/ Context path=/manager docBase=manager debug=0 privileged=true/ Context path= docBase= debug=100/ /Host Version info: Tomcat: Apache Tomcat/4.1.12 JDK: 1.4.1_01-b01 Sun Microsystems Inc. O/S: Linux 2.4.18-18.7.x i386 (RedHat 7.2) Tomcat is fronted by Apache HTTPD 1.3.27 with mod_jk 1.2.1-beta-1 I'm setting this to major as it is impossible to get anything useful from the access logs. On some of the sites that display the problem the only thing on the site is a single index.jsp that contains: % response.sendRedirect( response.encodeRedirectURL( http://www.therealsite.com/; ) ); % yet these sites still have an access file that looks like Tomcat/4.1. - - [22/Nov/2002:13:49:33 -0800] HEAD titleApa HTTP/1.1 302 - Tomcat/4.1.12 - - [22/Nov/2002:14:20:47 -0800] GET titleApa HTTP/1.1 302 - This is actually better than some. On some sites that contain alot of Tomcat served content I have logs like: 002/p/td - - [21/Nov/2002:10:06:50 -0800] GET /aboutus/index.jsp HTTP/1.1 200 - F t - - [21/Nov/2002:10:16:38 -0800] POST /index.jsp HTTP/1.1 200 - 002/p/td - - [21/Nov/2002:10:16:40 -0800] GET /aboutus/index.jsp HTTP/1.1 200 - e^M ^M!-- - - [21/Nov/2002:10:16:45 -0800] GET /aboutus/industrynews.jsp HTTP/1.1 200 - td t - - [21/Nov/2002:10:16:46 -0800] GET /aboutus/partners.jsp HTTP/1.1 200 - END: - - [21/Nov/2002:10:16:48 -0800] GET /aboutus/press.jsp HTTP/1.1 200 - ble^M ^M!-- - - [21/Nov/2002:10:16:50 -0800] GET /aboutus/whitepapers.jsp HTTP/1.1 200 - Basically just bits and pieces of requests and responses. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans MBeanUtils.java
amyroh 2002/11/22 14:36:52 Modified:catalina/src/share/org/apache/catalina/mbeans MBeanUtils.java Log: Port Bill's change. Revision ChangesPath 1.9 +14 -7 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java Index: MBeanUtils.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- MBeanUtils.java 14 Nov 2002 14:24:05 - 1.8 +++ MBeanUtils.java 22 Nov 2002 22:36:51 - 1.9 @@ -108,7 +108,6 @@ import org.apache.catalina.deploy.ContextResourceLink; import org.apache.catalina.deploy.NamingResources; import org.apache.catalina.deploy.ResourceParams; -import org.apache.catalina.valves.ValveBase; import org.apache.commons.beanutils.PropertyUtils; import org.apache.commons.modeler.ManagedBean; import org.apache.commons.modeler.Registry; @@ -1527,8 +1526,16 @@ throws MalformedObjectNameException { ObjectName name = null; -Container container = ((ValveBase)valve).getContainer(); - +Container container = null; +if( valve instanceof Contained ) { +container = ((Contained)valve).getContainer(); +} +if( container == null ) { +throw new MalformedObjectNameException( + Cannot create mbean for non-contained valve + + valve); +} + if (container instanceof Engine) { Service service = ((Engine)container).getService(); name = new ObjectName(domain + :type=Valve,sequence= + -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Why can I not use attributes lang and maxRows in a custom tag
Jim, Tomcat 4.1.12 does not accept a custom tag with attributes lang or maxRows. When I asked about this on the Tomcat users list I was informed that it also does not accept the attribute class. Specifically if I define those attributes then when the jsp is compiled I get an unable to find setter error. If I replace them with similar but meaningless attribute names the page compiles correctly. This can't be true. For example, JSTL defines an attribute named 'maxRows' for its sql:query action. I am not aware of any naming restrictions for custom tag attributes. Are you sure the tag handler for your custom action defines an approriate setter method for the attributes in question? Jan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans MBeanUtils.java
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 22, 2002 2:36 PM Subject: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans MBeanUtils.java amyroh 2002/11/22 14:36:52 Modified:catalina/src/share/org/apache/catalina/mbeans MBeanUtils.java Log: Port Bill's change. Thanks Amy. I'd have gotten to it, but I don't have j-t-catalina checked out here. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14699] - Scripting variables declared AT_END do not work when tag implements TryCatchFinally.
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=14699. 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=14699 Scripting variables declared AT_END do not work when tag implements TryCatchFinally. [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java
luehe 2002/11/22 15:47:15 Modified:jasper2/src/share/org/apache/jasper/compiler Generator.java Log: Fixed 14699: Scripting variables declared AT_END do not work when tag implements TryCatchFinally. Revision ChangesPath 1.129 +9 -8 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java Index: Generator.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.128 retrieving revision 1.129 diff -u -r1.128 -r1.129 --- Generator.java19 Nov 2002 00:49:42 - 1.128 +++ Generator.java22 Nov 2002 23:47:15 - 1.129 @@ -2023,10 +2023,6 @@ // Synchronize AT_BEGIN scripting variables syncScriptingVars(n, VariableInfo.AT_BEGIN); - // Declare and synchronize AT_END scripting variables - declareScriptingVars(n, VariableInfo.AT_END); - syncScriptingVars(n, VariableInfo.AT_END); - // TryCatchFinally if (n.implementsTryCatchFinally()) { out.popIndent(); // try @@ -2050,8 +2046,13 @@ if (n.implementsTryCatchFinally()) { out.popIndent(); -out.println(}); +out.printil(}); } + + // Declare and synchronize AT_END scripting variables (must do this + // outside the try/catch/finally block) + declareScriptingVars(n, VariableInfo.AT_END); + syncScriptingVars(n, VariableInfo.AT_END); restoreScriptingVars(n, VariableInfo.AT_BEGIN); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java
luehe 2002/11/22 15:47:32 Modified:jasper2/src/share/org/apache/jasper/compiler Tag: tomcat_4_branch Generator.java Log: Fixed 14699: Scripting variables declared AT_END do not work when tag implements TryCatchFinally. Revision ChangesPath No revision No revision 1.35.2.13 +9 -8 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java Index: Generator.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.35.2.12 retrieving revision 1.35.2.13 diff -u -r1.35.2.12 -r1.35.2.13 --- Generator.java19 Nov 2002 00:51:05 - 1.35.2.12 +++ Generator.java22 Nov 2002 23:47:31 - 1.35.2.13 @@ -1445,10 +1445,6 @@ // Synchronize AT_BEGIN scripting variables syncScriptingVars(n, VariableInfo.AT_BEGIN); - // Declare and synchronize AT_END scripting variables - declareScriptingVars(n, VariableInfo.AT_END); - syncScriptingVars(n, VariableInfo.AT_END); - // TryCatchFinally if (n.implementsTryCatchFinally()) { out.popIndent(); // try @@ -1472,8 +1468,13 @@ if (n.implementsTryCatchFinally()) { out.popIndent(); -out.println(}); +out.printil(}); } + + // Declare and synchronize AT_END scripting variables (must do this + // outside the try/catch/finally block) + declareScriptingVars(n, VariableInfo.AT_END); + syncScriptingVars(n, VariableInfo.AT_END); restoreScriptingVars(n, VariableInfo.AT_BEGIN); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14790] New: - getServletContext().getResource(file) returns invalid JNDI URL
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=14790. 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=14790 getServletContext().getResource(file) returns invalid JNDI URL Summary: getServletContext().getResource(file) returns invalid JNDI URL Product: Tomcat 4 Version: 4.1.10 Platform: PC OS/Version: Other Status: NEW Severity: Major Priority: Other Component: Servlet JSP API AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] getServletContext().getResource(file) returns invalid JNDI URL if the file in the top level of the webapplication. The file lacks a initial path '/' getServletContext().getResource(collection_opml.xml) returns this URI-- jndi:/localhost/mw_webclientcollection_opml.xml -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources messages.properties messages_fr.properties
luehe 2002/11/22 16:04:58 Modified:jasper2/src/share/org/apache/jasper/resources messages.properties messages_fr.properties Log: Applied patch supplied by Ryan Lubke Revision ChangesPath 1.61 +2 -2 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties Index: messages.properties === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- messages.properties 16 Nov 2002 04:20:10 - 1.60 +++ messages.properties 23 Nov 2002 00:04:58 - 1.61 @@ -266,7 +266,7 @@ jsp.error.empty.body.not.allowed=Empty body not allowed for {0} jsp.error.jspbody.required=Must use jsp:body to specify tag body for {0} if jsp:attribute is used. jsp.error.jspbody.emptybody.only=The {0} tag can only have jsp:attribute in its body. -jsp.error.no.scriptlets=Scripting elements ( %@, %!, %=, % ) are disallowed here. +jsp.error.no.scriptlets=Scripting elements ( %!, jsp:declaration, %=, jsp:expression, %, jsp:scriptlet ) are disallowed here. jsp.error.internal.unexpected_node_type=Internal Error: Unexpected node type encountered jsp.error.tld.fn.invalid.signature=Invalid syntax for function signature in TLD. Tag Library: {0}, Function: {1} jsp.error.tld.fn.duplicate.name=Duplicate function name {0} in tag library {1} 1.5 +2 -2 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_fr.properties Index: messages_fr.properties === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_fr.properties,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- messages_fr.properties11 Nov 2002 09:03:56 - 1.4 +++ messages_fr.properties23 Nov 2002 00:04:58 - 1.5 @@ -263,7 +263,7 @@ jsp.error.empty.body.not.allowed=Un corps vide n'est pas autorisé pour {0} jsp.error.jspbody.required=Doit utiliser jsp:body pour indiqué le corps de tag body de {0} si jsp:attribute est utilisé. jsp.error.jspbody.emptybody.only=Le tag {0} ne peut avoir que jsp:attribute dans son corps. -jsp.error.no.scriptlets=Les éléments de Scripting ( %@, %!, %=, % ) ne sont pas autorisés ici. +jsp.error.no.scriptlets=Les éléments de Scripting ( %!, jsp:declaration, %=, jsp:expression, %, jsp:scriptlet ) ne sont pas autorisés ici. jsp.error.internal.unexpected_node_type=Erreur Interne: Type de node inattendu rencontré jsp.error.tld.fn.invalid.signature=Synthaxe invalide pour la signature de fonction dans la TLD. Librairie de Tag : {0}, Fonction: {1} jsp.error.tld.fn.invalid.signature.classnotfound=Synthaxe invalide pour la signature de fonction dans la TLD. Classe introuvable: ${0}. Librairie de Tag: {1}, Fonction: {2}. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH][JASPER2] Simple patch for one of the resource error messages.
Ryan, I think that the following error message is incorrect: - Scripting elements ( %@, %!, %=, % ) are disallowed here. Since directives (%@) are not scripting elements. I've attached a patch to correct the messages.properties. Thanks for your patch! I've slightly modified it to also include the corresponding XML elements for scripting (jsp:declaration, jsp:expression, and jsp:scriptlet). Jan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[OT] Servlet Performance Benchmark Released
Interesting...I'm sure we can learn something from this article http://webperformanceinc.com/library/ServletReport/ -- Jeanfrancois -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] Servlet Performance Benchmark Released
Very interesting. Doesn't this indicate a pretty clear improvement for Tomcat from the past? At 07:20 PM 11/22/2002 -0500, you wrote: Interesting...I'm sure we can learn something from this article http://webperformanceinc.com/library/ServletReport/ -- Jeanfrancois -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Micael --- This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[Jasper2] framework for tag optimization
I am designing a framework in Jasper for enabling plugins that work closely with Jasper to generate Java codes instead of calls to tag handlers. The main idea is to take take JSTL tags, such as c:forEach var=i begin=1, end=100 ${i} /c:forEach and generates the Java codes for (int i = 0; i = 100; i++) { pageContext.setAttribute(i, String.valueOf(i)); out.print(evaluate(${i})); } or even for (int i = 0; i = 100; i++) { out.print(i); } The design is not to do the actual optimization in Jasper, but to provide a framework for taglib writers to develop plugins to Jasper that will do the actual optimization. Eventually, Jasper will be bundled with 1 or 2 plugins for JSTL, as test cases for the framework and as examples for writing the plugins. The plugins are specified in a xml file: tag-plugins tag-plugin tag-classthe name of the tag class/tag-class plugin-classthe name of the pkugin class/plugin-class /tag-plugin tag-plugins There are currently 3 interfaces: TagPluginFactory Used for creating a TagPlugin. TagPlugin Created at code generation time for a specific tag invokation. Used by Jasper to generate java codes. TagPlugContext Created by Japser and used by the plugin to query properties of the current tag, and to use resources in Jasper. This work is at the very early stage of the design, and is purely experimental. I'll be checking in sources for this work, and they should not affect the other part of Jasper, when plugins are not turned on. I welcome comments and suggestions. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/tagplugin - New directory
kinman 2002/11/22 17:26:13 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/tagplugin - New directory -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/tagplugin TagPlugin.java TagPluginContext.java TagPluginFactory.java
kinman 2002/11/22 17:36:49 Modified:jasper2/src/share/org/apache/jasper/compiler Generator.java Node.java Added: jasper2/src/share/org/apache/jasper/compiler TagPluginManager.java jasper2/src/share/org/apache/jasper/compiler/tagplugin TagPlugin.java TagPluginContext.java TagPluginFactory.java Log: - Define interfaces for tag plugins. - Modify Generator to prepare attributes that may be access from plugins. Revision ChangesPath 1.130 +83 -67 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java Index: Generator.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.129 retrieving revision 1.130 diff -u -r1.129 -r1.130 --- Generator.java22 Nov 2002 23:47:15 - 1.129 +++ Generator.java23 Nov 2002 01:36:49 - 1.130 @@ -1558,6 +1558,8 @@ generateLocalVariables( out, n ); } + prepareCustomAttributes(n, handlerInfo); + if (n.implementsSimpleTag()) { generateCustomDoTag(n, handlerInfo, tagHandlerVar); } else { @@ -1879,6 +1881,69 @@ } } + /** + * Preprocess the attributes for the custom tag, except fragment + * attributes. + */ + private void prepareCustomAttributes(Node.CustomTag n, + TagHandlerInfo handlerInfo) +throws JasperException { + +Node.JspAttribute[] attrs = n.getJspAttributes(); +for (int i=0; iattrs.length; i++) { +String attrValue = attrs[i].getValue(); +if (attrValue == null) { +if (attrs[i].isNamedAttribute() ) { +if (!n.checkIfAttributeIsJspFragment( + attrs[i].getName())) { +attrValue = generateNamedAttributeValue( +attrs[i].getNamedAttributeNode() ); +} +} +else { +continue; +} +} +String attrName = attrs[i].getName(); + +Method m = null; +Class[] c = null; +if (attrs[i].isDynamic()) { +c = OBJECT_CLASS; +} else { +m = handlerInfo.getSetterMethod(attrName); +if (m == null) { +err.jspError(n, jsp.error.unable.to_find_method, + attrName); +} +c = m.getParameterTypes(); +// XXX assert(c.length 0) +} + +if (attrs[i].isExpression()) { +// Do nothing +} else if (attrs[i].isNamedAttribute()) { +if (!n.checkIfAttributeIsJspFragment(attrs[i].getName()) + !attrs[i].isDynamic()) { +attrValue = convertString( +c[0], attrValue, attrName, +handlerInfo.getPropertyEditorClass(attrName), +false); +} +} else if (attrs[i].isELInterpreterInput()) { +// run attrValue through the expression interpreter +attrValue = JspUtil.interpreterCall(this.isTagFile, +attrValue, c[0], n.getPrefix(), _jspx_fnmap ); +} else { +attrValue = convertString( +c[0], attrValue, attrName, +handlerInfo.getPropertyEditorClass(attrName), +true); +} + attrs[i].setProcessedValue(attrValue); + } + } + private void generateCustomStart(Node.CustomTag n, TagHandlerInfo handlerInfo, String tagHandlerVar, @@ -2384,70 +2449,20 @@ out.println();); } - Node.JspAttribute[] attrs = n.getJspAttributes(); - for (int i=0; iattrs.length; i++) { - String attrValue = attrs[i].getValue(); - if (attrValue == null) { -if( attrs[i].isNamedAttribute() ) { -if( n.checkIfAttributeIsJspFragment( -attrs[i].getName() ) ) -{ -
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Parser.java
luehe 2002/11/22 17:49:40 Modified:jasper2/src/share/org/apache/jasper/compiler Parser.java Log: Fixed Bugtraq 4783771 (No error if custom action in body of jsp:attribute that does not accept rtexpr) Revision ChangesPath 1.40 +6 -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.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- Parser.java 13 Nov 2002 19:50:42 - 1.39 +++ Parser.java 23 Nov 2002 01:49:40 - 1.40 @@ -1544,6 +1544,9 @@ } else if (reader.matches(jsp:)) { err.jspError( reader.mark(), jsp.error.not.in.template, Standard actions ); + } else if (parseCustomTag(parent)) { +err.jspError( reader.mark(), jsp.error.not.in.template, + Custom actions ); } else { parseTemplateText(parent); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11592] - Starting apache sever
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=11592. 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=11592 Starting apache sever [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID | --- Additional Comments From [EMAIL PROTECTED] 2002-11-23 02:59 --- I can reproduce this problem. It's with the default Apache distribution from Redhat with 8.0, which seems to be 2.0.40. The unresolved symbol changes depending on which version of mod_webapp.so you install in the modules directory (/etc/https/modules - /usr/lib/httpd/modules out of the box). Neither 4.0.1 nor 4.0.2 works. Can't find a way to compile the .so myself without doing the whole compile, and I don't want to mess up the distro version. Thanks! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [Jasper2] framework for tag optimization
hey kin-man, that sounds great! I was actually thinking along those lines a while back, but thought it was impracticle because the project I was working one didn't have enough time to explore that approach. when I was doing performance analysis of jasper1 with jslt and saw how bad the performance was (due to the nested try/catch bug), I went through and manually wrote scriplet code to do the same exact logic. The performance compared to jasper1 + jstl was tremendous. I had full mockups of a 3 pages written in JSTL and pure scriplet. If memory serves me correctly, the difference was 5-8x. the JSTL version using jasper1 would take 900-1000ms+ to display 15 results. The same exact page using scriplet took about 100-150ms. I would definitely be interested in spending time on this and assisting. I may have some time opening up next year, so I hope to start contributing actively :) cross my fingers. peter lin Kin-Man Chung [EMAIL PROTECTED] wrote:I am designing a framework in Jasper for enabling plugins that work closely with Jasper to generate Java codes instead of calls to tag handlers. The main idea is to take take JSTL tags, such as ${i} and generates the Java codes for (int i = 0; i = 100; i++) { pageContext.setAttribute(i, String.valueOf(i)); out.print(evaluate(${i})); } or even for (int i = 0; i = 100; i++) { out.print(i); } The design is not to do the actual optimization in Jasper, but to provide a framework for taglib writers to develop plugins to Jasper that will do the actual optimization. Eventually, Jasper will be bundled with 1 or 2 plugins for JSTL, as test cases for the framework and as examples for writing the plugins. The plugins are specified in a xml file: the name of the tag class the name of the pkugin class There are currently 3 interfaces: TagPluginFactory Used for creating a TagPlugin. TagPlugin Created at code generation time for a specific tag invokation. Used by Jasper to generate java codes. TagPlugContext Created by Japser and used by the plugin to query properties of the current tag, and to use resources in Jasper. This work is at the very early stage of the design, and is purely experimental. I'll be checking in sources for this work, and they should not affect the other part of Jasper, when plugins are not turned on. I welcome comments and suggestions. -- To unsubscribe, e-mail: For additional commands, e-mail: - Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkCoyoteHandler.java
hgomez 2002/11/22 22:34:48 Modified:jk/java/org/apache/jk/common HandlerRequest.java jk/java/org/apache/jk/server JkCoyoteHandler.java Log: Fix null getRemoteHost. Lasy extraction of ssl certs to speed up jk/ajp13 when under SSL Revision ChangesPath 1.18 +6 -24 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java Index: HandlerRequest.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- HandlerRequest.java 4 Oct 2002 23:26:25 - 1.17 +++ HandlerRequest.java 23 Nov 2002 06:34:47 - 1.18 @@ -62,13 +62,12 @@ import java.io.*; import java.net.*; import java.util.*; -import java.security.*; -import java.security.cert.*; import org.apache.jk.core.*; import org.apache.tomcat.util.http.*; import org.apache.tomcat.util.buf.*; +import org.apache.tomcat.util.net.SSLSupport; import org.apache.coyote.Request; import org.apache.coyote.*; @@ -482,7 +481,7 @@ */ if( attributeCode == SC_A_SSL_KEY_SIZE ) { // Bug 1326: it's an Integer. - req.setAttribute(javax.servlet.request.key_size, + req.setAttribute(SSLSupport.KEY_SIZE_KEY, new Integer( msg.getInt())); //Integer.toString(msg.getInt())); } @@ -535,38 +534,21 @@ // Transform the string into certificate. msg.getBytes(tmpMB); String certString = tmpMB.toString(); -byte[] certData = certString.getBytes(); -ByteArrayInputStream bais = new ByteArrayInputStream(certData); - -// Fill the first element. -X509Certificate jsseCerts[] = null; -try { -CertificateFactory cf = -CertificateFactory.getInstance(X.509); -X509Certificate cert = (X509Certificate) -cf.generateCertificate(bais); -jsseCerts = new X509Certificate[1]; -jsseCerts[0] = cert; -} catch(java.security.cert.CertificateException e) { -log.error(Certificate convertion failed + e ); -e.printStackTrace(); -} - -req.setAttribute(javax.servlet.request.X509Certificate, - jsseCerts); + // SSL certificate extraction is costy, moved to JkCoyoteHandler +req.setAttribute(SSLSupport.CERTIFICATE_KEY, certString); break; case SC_A_SSL_CIPHER : req.scheme().setString( https ); msg.getBytes(tmpMB); - req.setAttribute(javax.servlet.request.cipher_suite, + req.setAttribute(SSLSupport.CIPHER_SUITE_KEY, tmpMB.toString()); break; case SC_A_SSL_SESSION : req.scheme().setString( https ); msg.getBytes(tmpMB); - req.setAttribute(javax.servlet.request.ssl_session, + req.setAttribute(SSLSupport.SESSION_ID_KEY, tmpMB.toString()); break; 1.31 +31 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkCoyoteHandler.java Index: JkCoyoteHandler.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkCoyoteHandler.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- JkCoyoteHandler.java 13 Nov 2002 00:18:16 - 1.30 +++ JkCoyoteHandler.java 23 Nov 2002 06:34:47 - 1.31 @@ -62,6 +62,8 @@ import java.io.*; import java.net.*; import java.util.*; +import java.security.*; +import java.security.cert.*; import org.apache.jk.core.*; import org.apache.jk.common.*; @@ -69,6 +71,7 @@ import org.apache.tomcat.util.buf.*; import org.apache.tomcat.util.log.*; import org.apache.tomcat.util.http.*; +import org.apache.tomcat.util.net.SSLSupport; import org.apache.coyote.*; @@ -376,9 +379,36 @@ if( logTime.isDebugEnabled() ) logTime(res.getRequest(), res); } else if( actionCode==ActionCode.ACTION_REQ_SSL_ATTRIBUTE ) { - +org.apache.coyote.Request req=(org.apache.coyote.Request)param; + + // Extract SSL
Re: cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkCoyoteHandler.java
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 22, 2002 10:34 PM Subject: cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkCoyoteHandler.java hgomez 2002/11/22 22:34:48 Modified:jk/java/org/apache/jk/common HandlerRequest.java jk/java/org/apache/jk/server JkCoyoteHandler.java Log: Fix null getRemoteHost. Lasy extraction of ssl certs to speed up jk/ajp13 when under SSL Revision ChangesPath 1.18 +6 -24 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java Index: HandlerRequest.java + // SSL certificate extraction is costy, moved to JkCoyoteHandler +req.setAttribute(SSLSupport.CERTIFICATE_KEY, certString); break; As much as I very much like the switch to constants, this is still wrong. As far back as the Servlet 2.2 spec (aka Tomat 3.3) this is required to be a java.security.cert.X509Certificate []. I'll have to -1 this section of the patch because of this, but the rest looks really good! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]