Re: mod_jk 1.2.0/1.1.0 vs ab
Bojan Smojver wrote: Bojan Smojver wrote: Since I can control the headers from my servlet, let my try with Content-length. Fingers crossed... If think this can actually qualify as a bug in ab - even when I set Content-Length header, it still says that that there are length failures. Since jsessionid can sometimes have 10 and sometimes 11 characters and I use it on the page to encode the URL, sometimes the pages are a byte longer... But ab still takes into the account only the length of the very fist page. Good news is that there is nothing wrong with TC. Bojan PS. What do you make of those stack traces? It looks as if mod_jk dropped the connection and TC then goes into Exception... --- 2001-10-05 17:03:57 - Ajp13Interceptor: Processing connection org.apache.tomcat.util.net.TcpConnection@5ec199 - java.net.SocketException: Connection reset by peer: Connection reset by peer at java.net.SocketInputStream.socketRead(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:86) at org.apache.tomcat.modules.server.Ajp13.readN(Ajp13.java:729) at org.apache.tomcat.modules.server.Ajp13.receive(Ajp13.java:763) at org.apache.tomcat.modules.server.Ajp13.receiveNextRequest(Ajp13.java:271) at org.apache.tomcat.modules.server.Ajp13Request.receiveNextRequest(Ajp13Interceptor.java:277) at org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Ajp13Interceptor.java:192) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:477) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:517) at java.lang.Thread.run(Thread.java:484 --- And in mod_jk.log file is there something?
Re: mod_jk 1.2.0/1.1.0 vs ab
jean-frederic clere wrote: And in mod_jk.log file is there something? Mostly something like this: - [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed - But those things show up even if there are no exceptions in TC. It seems you have to run -c above 3 to 4 and at least 1000 requests. If you run -c 10 and a 100 requests, there are no stack traces in tomcat_error. Bojan
DO NOT REPLY [Bug 3983] New: - uploading files
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=3983. 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=3983 uploading files Summary: uploading files Product: Tomcat 3 Version: 3.2.1 Final Platform: Other OS/Version: Windows NT/2K Status: NEW Severity: Major Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Sir, The problem i am facing with Tomcat3.2.1 is given in detail at the bottom and i have already sent a mail to jason hunter and his reply is also available for your reference.I need a solution at the earliest as i have recommended ur product for our clients ,so need ur help at the earliest.please mail me the reply to my mail id provided. rgds rabia You should talk with the Tomcat folks about this. As mentioned in my book, the behavior of the server when posts are too large depends on the server and client. -jh- [EMAIL PROTECTED] wrote: Sir, I am having a immediate requirement for which i need your help.My requirement is,i need to upload a file to the server and the limit of the file size is 5MB and if i try to upload a file greater than this then it should redirect me to a error page which is just another servlet(catches the error or exception and displays).I am using the latest com.orielly.servlet package,that is the MultipartRequest file which is provided by java servlet programming book.The server which i am using is Tomcat3.2.1.The problem i am facing is,when i uplaod a file less than 5MB then the file gets uplaoded very fast to the server,but when i try to upload a file greater than 5MB then it does not redirect to error page nor catches the exception but instead gives a popup Internet Explorer message as The connection with the server was terminated abnormally and i dont know how to proceed,i have tried all means but cannot find a solution,please help me to solve the problem at the earliest. rgds Rabia
DO NOT REPLY [Bug 3984] New: - Multiple ListBox is not working in JSP
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=3984. 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=3984 Multiple ListBox is not working in JSP Summary: Multiple ListBox is not working in JSP Product: Tomcat 3 Version: 3.2.3 Final Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Servlet AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] I am using Tomcat 2.3.3. I am trying to create a web page using a multiple select listbox. While I am retreiving the value using JSP it is displaying only the first value. But the same program I tried in JRun and Javawebserver it is working fine. Do I need to change any settings in the Tomcat. Please help immediately.
RE: DO NOT REPLY [Bug 3983] New: - uploading files
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, October 05, 2001 10:35 AM To: [EMAIL PROTECTED] Subject: DO NOT REPLY [Bug 3983] New: - uploading files 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=3983. 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=3983 uploading files Summary: uploading files Product: Tomcat 3 Version: 3.2.1 Final Platform: Other OS/Version: Windows NT/2K Status: NEW Severity: Major Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The problem seems how your proxy is configured. I had problem uploading files but when I decided to try without proxy, it becomes working great . So, problem is in proxy or how Catalina process traffic through proxies . Sir, The problem i am facing with Tomcat3.2.1 is given in detail at the bottom and i have already sent a mail to jason hunter and his reply is also available for your reference.I need a solution at the earliest as i have recommended ur product for our clients ,so need ur help at the earliest.please mail me the reply to my mail id provided. rgds rabia You should talk with the Tomcat folks about this. As mentioned in my book, the behavior of the server when posts are too large depends on the server and client. -jh- [EMAIL PROTECTED] wrote: Sir, I am having a immediate requirement for which i need your help.My requirement is,i need to upload a file to the server and the limit of the file size is 5MB and if i try to upload a file greater than this then it should redirect me to a error page which is just another servlet(catches the error or exception and displays).I am using the latest com.orielly.servlet package,that is the MultipartRequest file which is provided by java servlet programming book.The server which i am using is Tomcat3.2.1.The problem i am facing is,when i uplaod a file less than 5MB then the file gets uplaoded very fast to the server,but when i try to upload a file greater than 5MB then it does not redirect to error page nor catches the exception but instead gives a popup Internet Explorer message as The connection with the server was terminated abnormally and i dont know how to proceed,i have tried all means but cannot find a solution,please help me to solve the problem at the earliest. rgds Rabia
DO NOT REPLY [Bug 3985] New: - got NullPointerException
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=3985. 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=3985 got NullPointerException Summary: got NullPointerException Product: Tomcat 3 Version: 3.3 Release Candidate 1 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hello, I'm monitoring the error log while the web server is serving requests and I get a lot of these two errors: 1) this one on every JSP page: DecodeInterceptor: Charset from session ISO-8859-1 2) This one every 30-50 request or so: java.lang.NullPointerException at org.apache.tomcat.modules.generators.ErrorHandler.handleErrorImpl(ErrorHandler.java:284) at org.apache.tomcat.modules.generators.ErrorHandler.handleError(ErrorHandler.java:151) at org.apache.tomcat.core.ContextManager.handleError(ContextManager.java:1096) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:918) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:831) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:161) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:477) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:517) at java.lang.Thread.run(Thread.java:484) 2001-10-05 09:19:28 - Http10Interceptor: Error reading request, ignored - java.lang.NullPointerException at org.apache.tomcat.modules.generators.ErrorHandler.handleErrorImpl(ErrorHandler.java:284) at org.apache.tomcat.modules.generators.ErrorHandler.handleError(ErrorHandler.java:151) at org.apache.tomcat.core.ContextManager.handleError(ContextManager.java:1096) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:918) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:831) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:161) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:477) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:517) at java.lang.Thread.run(Thread.java:484) Do you have any clue? Thanks, Alex
Re: welcome files being forwarded to rather than redirected to?
On Thu, 4 Oct 2001 [EMAIL PROTECTED] wrote: On Thu, 4 Oct 2001, Remy Maucherat wrote: Also, not doing the redirect would create lots of problems with nested welcome pages (foo/index.html is a valid welcome page). Is it ? Yes. The spec talks about valid partial URIs without leading or trailing '/' characters, however... AFAIK no web server accepts this kind of welcome page. It's true the spec doesn't mention what values are valid ( Is ../index.html valid ?), No, because the spec says that you _append_ the partial URI to the partial request (not evaluate it as a relative URI) and as far as I can tell, http://foo/blah/../index.html is not guaranteed to give you the same thing as http://foo/index.html but giving what is common de facto 'standard' I wouldn't interpret it this way. That can be yet another incompatibility between web and servlets ( maybe Jon will read this - now, not after a year :-), and make even more difficult to serve static files with apache. I don't think you could escape upwards out of a web container using a welcome file for the reason above; descending into a nested contained webapp is possible, however, and the forward code should ensure that this is handled properly. -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287088 Fax +44 (0)117 9287112 RFC822 [EMAIL PROTECTED] I am now available for general use under a modified BSD licence.
Re: mod_jk 1.2.0/1.1.0 vs ab
Bojan Smojver wrote: jean-frederic clere wrote: And in mod_jk.log file is there something? Mostly something like this: - [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed [Fri Oct 05 17:07:55 2001] [jk_ajp_common.c (914)]: Error ajp_process_callback - write failed - But those things show up even if there are no exceptions in TC. It seems you have to run -c above 3 to 4 and at least 1000 requests. If you run -c 10 and a 100 requests, there are no stack traces in tomcat_error. I have run some tests I am not able to reproduce this but I have an other error: +++ [Fri Oct 05 11:02:37 2001] [jk_ajp_common.c (625)]: ajp_connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed [Fri Oct 05 11:02:37 2001] [jk_ajp_common.c (983)]: Error reading reply [Fri Oct 05 11:02:37 2001] [jk_ajp_common.c (1119)]: In jk_endpoint_t::service, ajp_get_reply failed in send loop 0 +++ Several times. (I am not using Velocity but a small test servlet). Bojan
DO NOT REPLY [Bug 3986] New: - Cannot support passing parameter as % in JSP: forward
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=3986. 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=3986 Cannot support passing parameter as % in JSP: forward Summary: Cannot support passing parameter as % in JSP: forward Product: Tomcat 3 Version: 3.3 Release Candidate 1 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Encoding AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have a JSP program which code as below jsp:forward page=jsppage001 jsp:param name=pagecond value=% / /jsp:forward TC3.3 b1,b2 and rc1 return the error message as below, it was working fine on 3.1 ,3.2 and 4.0 java.io.CharConversionException: EOF at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:157) at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.j ava:583) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa tcherImpl.java:251) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc herImpl.java:172) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.jav a:423) at ma0011_1._jspService(ma0011_1.java:508) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java :484) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4 32) at org.apache.tomcat.core.ContextManager.internalService(ContextManager. java:915) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:831 ) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection( Http10Interceptor.java:161) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java :477) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP ool.java:517) at java.lang.Thread.run(Thread.java:484)
DO NOT REPLY [Bug 3970] - Cannot send more that 1 MB using multipart/form-data
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=3970. 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=3970 Cannot send more that 1 MB using multipart/form-data [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID
DO NOT REPLY [Bug 3970] - Cannot send more that 1 MB using multipart/form-data
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=3970. 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=3970 Cannot send more that 1 MB using multipart/form-data --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 03:00 --- It was the problems with squid settings ( request_body_max_size parameter )
DO NOT REPLY [Bug 3970] - Cannot send more that 1 MB using multipart/form-data
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=3970. 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=3970 Cannot send more that 1 MB using multipart/form-data [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|CLOSED
DO NOT REPLY [Bug 3988] New: - NullPointerException in TC 3.3-b1
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=3988. 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=3988 NullPointerException in TC 3.3-b1 Summary: NullPointerException in TC 3.3-b1 Product: Tomcat 3 Version: 3.3 Beta 1 Platform: Sun OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Servlet AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, This is TC 3.3b1 running on Sun JDK 1.3.1 on Solaris: I get a weird NPE in Tomcat probably caused by a NPE somewhere in our Servlets. Since there seem to be just Tomcat classes involved, i wnat to know if this is is known. this Message form SimpleMapper1 is especially strange (why is it looking for /scripts/root.exe??) If you need anything else to reproduce this problem, please let me know. Thanks very much, Hans java.lang.NullPointerException at org.apache.tomcat.modules.generators.ErrorHandler.handleErrorImpl (ErrorHandler.java:280) at org.apache.tomcat.modules.generators.ErrorHandler.handleError (ErrorHandler.java:151) at org.apache.tomcat.core.ContextManager.handleError (ContextManager.java:1087) at org.apache.tomcat.core.ContextManager.internalService (ContextManager.java:914) at org.apache.tomcat.core.ContextManager.service (ContextManager.java:824) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection (Http10Interceptor.java:152) at org.apache.tomcat.util.net.TcpWorkerThread.runIt (PoolTcpEndpoint.java:438) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (ThreadPool.java:505) at java.lang.Thread.run(Thread.java:484) 2001-10-04 11:46:41 - SimpleMapper1: Mapping R( /scripts/root.exe) - java.lang.RuntimeException: Assertion failed: container==n ull at org.apache.tomcat.modules.mappers.SimpleMapper1.contextMap (SimpleMapper1.java:276) at org.apache.tomcat.core.ContextManager.processRequest (ContextManager.java:940) at org.apache.tomcat.core.ContextManager.internalService (ContextManager.java:866) at org.apache.tomcat.core.ContextManager.service (ContextManager.java:824) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection (Http10Interceptor.java:152) at org.apache.tomcat.util.net.TcpWorkerThread.runIt (PoolTcpEndpoint.java:438) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (ThreadPool.java:505) at java.lang.Thread.run(Thread.java:484) Hans Schmid einsurance Agency AG Information Technology Bayerstraße 33 80335 München Tel: +49-89-55292- 860 Fax: +49-89-55292- 855 eMail: [EMAIL PROTECTED] http://www.einsurance.de
RE: [PATCH] SimplePool.java
I'll make the change to the tomcat_32 branch. Marc Saegesser -Original Message- From: Renato Weiner [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 2:51 PM To: [EMAIL PROTECTED] Subject: Re: [PATCH] SimplePool.java What about Tomcat 3.2.3 ? There are the same lines of code... --- Schreibman, David [EMAIL PROTECTED] wrote: Here's a simple tweak that clears out references to objects that are removed from the pool. The current code can delay garbage collection for objects that are removed from the pool but not returned. The diff is against 3.3-rc1 -David --- SimplePool.java.orig Thu Oct 4 10:14:51 2001 +++ SimplePool.java Thu Oct 4 10:54:08 2001 @@ -132,6 +132,7 @@ synchronized( lock ) { if( current = 0 ) { item = pool[current]; + pool[current] = null; current -= 1; } if( debug 0 ) __ Do You Yahoo!? NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1
DO NOT REPLY [Bug 3990] New: - JNDI/LDAP Realm password authentication process
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=3990. 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=3990 JNDI/LDAP Realm password authentication process Summary: JNDI/LDAP Realm password authentication process Product: Tomcat 4 Version: 4.0 Final Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Blocker Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] It seems that the JNDI Realm (based upon the SUN/LDAP implementation) is not able to authenticate users with digested passwords (using SHA for instance). If I use a clear text password, everything goes well. I use the IPlanet LDAP 5.0 server with SHA encryption activated for user passwords (I also tried with OpenLDAP and the result is the same).
DO NOT REPLY [Bug 3990] - JNDI/LDAP Realm password authentication process
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=3990. 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=3990 JNDI/LDAP Realm password authentication process --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 06:49 --- Here is an extract of my server.xml config file : Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionName=cn=Directory Manager connectionPassword=liseanne connectionURL=ldap://localhost:400; roleBase=ou=Roles, dc=linkvest,dc=com roleName=cn roleSearch=(uniqueMember={0}) roleSubtree=false digest=SHA userPassword=userPassword userPattern=uid={0},ou=People,dc=linkvest,dc=com / And an LDIF extraction of my LDAP : dn: ou=People, dc=linkvest,dc=com ou: People objectClass: top objectClass: organizationalUnit dn: uid=system,ou=People, dc=linkvest,dc=com manager: test userPassword:: e1NIQX1xVXFQNWN5eG02WWNUQWh6MDVIcGg1Z3Z1OU09 uid: system objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson sn: System cn: System dn: ou=Roles, dc=linkvest,dc=com ou: Role ou: Roles objectClass: top objectClass: organizationalUnit dn: cn=manager,ou=Roles, dc=linkvest,dc=com objectClass: groupofuniquenames objectClass: top description: Manager group uniqueMember: uid=system,ou=People,dc=linkvest,dc=com cn: manager
DO NOT REPLY [Bug 3986] - Cannot support passing parameter as % in JSP: forward
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=3986. 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=3986 Cannot support passing parameter as % in JSP: forward --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 08:08 --- Tomcat assumes the parameters you pass are encoded, and tries to decode. Need to check the spec, it's not hard to fix.
DO NOT REPLY [Bug 3985] - got NullPointerException
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=3985. 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=3985 got NullPointerException [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 08:09 --- *** This bug has been marked as a duplicate of 3988 ***
DO NOT REPLY [Bug 3988] - NullPointerException in TC 3.3-b1
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=3988. 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=3988 NullPointerException in TC 3.3-b1 [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 08:09 --- *** Bug 3985 has been marked as a duplicate of this bug. ***
DO NOT REPLY [Bug 3984] - Multiple ListBox is not working in JSP
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=3984. 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=3984 Multiple ListBox is not working in JSP [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 08:10 --- Not enough data - how do you read params, the form, etc.
DO NOT REPLY [Bug 3932] - JspC leaks memory
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=3932. 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=3932 JspC leaks memory [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||LATER --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 08:11 --- Try compiling smaller subsets as a workaround. Jasper needs a major refactoring, and a lot will probably change, including jspc
DO NOT REPLY [Bug 3993] New: - j_security_check gives 403 error
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=3993. 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=3993 j_security_check gives 403 error Summary: j_security_check gives 403 error Product: Tomcat 4 Version: 4.0 Final Platform: All OS/Version: Windows NT/2K Status: NEW Severity: Major Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have a form base authentication web application running in JBoss 2.4.3 and Tomcat 4.0 using JAAS based authentication. When submitting to the j_security_check (under my context /ned/sample) I get a default browser 403 error page with no exceptions thrown. The error occurs when the j_security_check is not included in a url-pattern within a web-resource-collection within a security-constraint. The same application works on Tomcat 3.2.3 and Jetty with no problems. Thanks, Paul
DO NOT REPLY [Bug 3961] - FactoryConfigurationError on Servlet+JSP+taglib
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=3961. 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=3961 FactoryConfigurationError on Servlet+JSP+taglib [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||REMIND --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 08:28 --- I can't reproduce this - it just works fine for me. Could you try again with a nightly build ?
DO NOT REPLY [Bug 3988] - NullPointerException in TC 3.3-b1
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=3988. 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=3988 NullPointerException in TC 3.3-b1 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 08:30 --- I think this has been fixed, please check a recent nightly build. If not, please include more details on how to reproduce it - on what requests/pages it happens, etc.
Re: welcome files being forwarded to rather than redirected to?
On Fri, 5 Oct 2001, Jan Grant wrote: On Thu, 4 Oct 2001 [EMAIL PROTECTED] wrote: On Thu, 4 Oct 2001, Remy Maucherat wrote: Also, not doing the redirect would create lots of problems with nested welcome pages (foo/index.html is a valid welcome page). Is it ? Yes. The spec talks about valid partial URIs without leading or trailing '/' characters, however... You are right, my mistake. This is a new feature in 2.3 ( 2.2 doesn't seem to have this ). The good news - at least Apache can deal with that without problems, and for other servers we could implement it in mod_jk. Costin
DO NOT REPLY [Bug 3986] - Cannot support passing parameter as % in JSP: forward
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=3986. 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=3986 Cannot support passing parameter as % in JSP: forward [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 08:18 --- My understanding is that jsp:forward should behave similarly with RequestDispather.forward ( in the servlet spec ). The params should be equivalent with what you would pass in the query string ( ?a=b ). That means they should be encoded ( and % replaced with %xx - I don't know the exact code ). Tomcat would throw the same exception if the original request will have only a '%' in the param ( or anywhere else ) - it's an invalid URI. Previous versions of tomcat didn't decode the param.
Configuring TOMCAT to serve up WAP pages
Hello everyone. I'm wondering if anyone has configured TOMCAT to serve up WAP pages? I'm currently running Tomcat with JBoss and I'd like to serve wml content. I added the respective MIME types to the web.xml file, but I still get the no wml content error from my WAP browswer. Any ideas would be greatly appreciated. Thanks again, Anish Acharya Software Developer Amdocs
RE: Configuring TOMCAT to serve up WAP pages
Shoot sorry I just noticed this is the dev mailing list .. I'll forward my message to the appropriate list .. my appologies .. -Anish -Original Message- From: Anish Acharya Sent: Friday, October 05, 2001 1:01 PM To: '[EMAIL PROTECTED]' Subject: Configuring TOMCAT to serve up WAP pages Hello everyone. I'm wondering if anyone has configured TOMCAT to serve up WAP pages? I'm currently running Tomcat with JBoss and I'd like to serve wml content. I added the respective MIME types to the web.xml file, but I still get the no wml content error from my WAP browswer. Any ideas would be greatly appreciated. Thanks again, Anish Acharya Software Developer Amdocs
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources ProxyDirContext.java
remm01/10/05 10:07:17 Modified:catalina/src/share/org/apache/naming/resources Tag: tomcat_40_branch ProxyDirContext.java Log: - Also use the content length to revalidate. Revision ChangesPath No revision No revision 1.6.2.2 +8 -5 jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java Index: ProxyDirContext.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -u -r1.6.2.1 -r1.6.2.2 --- ProxyDirContext.java 2001/10/04 19:29:12 1.6.2.1 +++ ProxyDirContext.java 2001/10/05 17:07:17 1.6.2.2 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v 1.6.2.1 2001/10/04 19:29:12 remm Exp $ - * $Revision: 1.6.2.1 $ - * $Date: 2001/10/04 19:29:12 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v 1.6.2.2 2001/10/05 17:07:17 remm Exp $ + * $Revision: 1.6.2.2 $ + * $Date: 2001/10/05 17:07:17 $ * * * @@ -85,7 +85,7 @@ * Proxy Directory Context implementation. * * @author Remy Maucherat - * @version $Revision: 1.6.2.1 $ $Date: 2001/10/04 19:29:12 $ + * @version $Revision: 1.6.2.2 $ $Date: 2001/10/05 17:07:17 $ */ public class ProxyDirContext implements DirContext { @@ -1379,6 +1379,7 @@ if (entry.attributes == null) return false; long lastModified = entry.attributes.getLastModified(); +long contentLength = entry.attributes.getContentLength(); if (lastModified = 0) return false; try { @@ -1390,7 +1391,9 @@ attributes = (ResourceAttributes) tempAttributes; } long lastModified2 = attributes.getLastModified(); -return (lastModified == lastModified2); +long contentLength2 = attributes.getContentLength(); +return (lastModified == lastModified2) + (contentLength == contentLength2); } catch (NamingException e) { return false; }
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets DefaultServlet.java
remm01/10/05 10:09:28 Modified:catalina/src/share/org/apache/catalina/servlets Tag: tomcat_40_branch DefaultServlet.java Log: - Don't set last-modified when displaying a directory browsing page. - Don't check if headers when resource is a collection. Revision ChangesPath No revision No revision 1.39.2.2 +21 -18 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java Index: DefaultServlet.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v retrieving revision 1.39.2.1 retrieving revision 1.39.2.2 diff -u -r1.39.2.1 -r1.39.2.2 --- DefaultServlet.java 2001/10/04 19:28:56 1.39.2.1 +++ DefaultServlet.java 2001/10/05 17:09:28 1.39.2.2 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v 1.39.2.1 2001/10/04 19:28:56 remm Exp $ - * $Revision: 1.39.2.1 $ - * $Date: 2001/10/04 19:28:56 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v 1.39.2.2 2001/10/05 17:09:28 remm Exp $ + * $Revision: 1.39.2.2 $ + * $Date: 2001/10/05 17:09:28 $ * * * @@ -122,7 +122,7 @@ * * @author Craig R. McClanahan * @author Remy Maucherat - * @version $Revision: 1.39.2.1 $ $Date: 2001/10/04 19:28:56 $ + * @version $Revision: 1.39.2.2 $ $Date: 2001/10/05 17:09:28 $ */ public class DefaultServlet @@ -1089,18 +1089,23 @@ return; } -} +} else { -// Checking If headers -if ( !checkIfHeaders(request, response, resourceInfo) ) { -return; +// Checking If headers +if ( !checkIfHeaders(request, response, resourceInfo) ) { +return; +} + } // Find content type. String contentType = getServletContext().getMimeType(resourceInfo.path); +Vector ranges = null; + if (resourceInfo.collection) { + // Skip directory listings if we have been configured to // suppress them if (!listings) { @@ -1109,25 +1114,23 @@ return; } contentType = text/html;charset=UTF-8; -} +} else { -// Parse range specifier -Vector ranges = null; -if (!resourceInfo.collection) { +// Parse range specifier ranges = parseRange(request, response, resourceInfo); // ETag header response.setHeader(ETag, getETag(resourceInfo, true)); -} +// Last-Modified header +if (debug 0) +log(DefaultServlet.serveFile: lastModified=' + +(new Timestamp(resourceInfo.date)).toString() + '); +response.setDateHeader(Last-Modified, resourceInfo.date); -// Last-Modified header -if (debug 0) -log(DefaultServlet.serveFile: lastModified=' + -(new Timestamp(resourceInfo.date)).toString() + '); -response.setDateHeader(Last-Modified, resourceInfo.date); +} ServletOutputStream ostream = null; PrintWriter writer = null;
cvs commit: jakarta-tomcat-4.0 RELEASE-PLAN-4.0.1.txt
remm01/10/05 10:31:03 Modified:.Tag: tomcat_40_branch RELEASE-PLAN-4.0.1.txt Log: - Update bug status. Revision ChangesPath No revision No revision 1.1.2.5 +8 -7 jakarta-tomcat-4.0/Attic/RELEASE-PLAN-4.0.1.txt Index: RELEASE-PLAN-4.0.1.txt === RCS file: /home/cvs/jakarta-tomcat-4.0/Attic/RELEASE-PLAN-4.0.1.txt,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- RELEASE-PLAN-4.0.1.txt2001/10/04 19:51:23 1.1.2.4 +++ RELEASE-PLAN-4.0.1.txt2001/10/05 17:31:03 1.1.2.5 @@ -1,4 +1,4 @@ -$Id: RELEASE-PLAN-4.0.1.txt,v 1.1.2.4 2001/10/04 19:51:23 remm Exp $ +$Id: RELEASE-PLAN-4.0.1.txt,v 1.1.2.5 2001/10/05 17:31:03 remm Exp $ Release Plan for Apache Tomcat 4.0.1 @@ -44,8 +44,8 @@ - Static resource content caching. -Enhacements +Enhancements + - Enhanced error reporting mechanism. - Enhance implementation of the filesystem access. @@ -92,7 +92,7 @@ incorrect. 3892Can't compile 2092.jsp. 3910Web.xml mime type incorrect for jnlp. -3936GetResources does not work. +3936ClassLoader.getResources does not work. 3949Document with content-length of 0 results in resend headers. @@ -113,19 +113,20 @@ Catalina3888WebappClassLoader: Lifecycle error : CL stopped (bug confirmed, but conditions to reproduce it still unclear). -Catalina3973Session.getAttribute() locks-up in -HttpSessionListener.sessionDestroyed(). +Catalina3993j_security_check gives 403 error. Nice To Have Fixes Before Final Release: --- +Jasper 3668Validation error reporting. + Jasper 3704Forward errors not reported when response is committed. Jasper 3770HttpSessionListener.sessionCreated() called twice for each session. -Jasper 3668Validation error reporting. +Catalina3990JNDI/LDAP Realm password authentication process. Unconfirmed Bugs (Awaiting Reproducible Failure Case):
BugRat Report #406 - you can get the source code of jsp files
Report #406 Details Project: Tomcat Category: Bug Report SubCategory: New Bug Report Class: swbug State: closed Priority: high Severity: critical Confidence: public Environment: Release: 3.1 JVM Release: Sun 1.3.0 Operating System: Windows OS Release: 2000 SP 1 Platform: P3 450Mhz 256MB Synopsis: you can get the source code of jsp files Description: I dont know if this bug is known but... The jsp file extension is case sensitive (on MS) so if you request a .jsp file with extension .jSp forexample you get the source code. This is valid only for the tomcat web server. not with external web server.
DO NOT REPLY [Bug 3993] - j_security_check gives 403 error
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=3993. 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=3993 j_security_check gives 403 error --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 11:05 --- Could you please provide a small webapp that illustrates this problem? As background information, Tomcat's authenticator sends SC_FORBIDDEN (403) only under the following circumstances: * Request URI is protected by a security constraint that has an auth-constraint with no roles listed (i.e. no access at all is allowed to anyone) * Request URI is protected by a security constraint that has an auth-constraint with one or more roles listed, and the authenticated user does not have one of those roles * Request URI is protected by a security constraint that has a user-data-constraint requiring SSL, but redirection to the corresponding SSL port has been disabled. Also, please ensure that your form login page is submitting *exactly* to j_security_check, as required by the Servlet Specification, version 2.3, section 12.5.3.1. Any other pattern will not be recognized by the logic that makes this work even if the form login page is inside the area protected by a security constraint.
Re: [PATCH] SingleThreadModel Pool for TC 3.3
I've looked at it, and will check it in after 3.3 goes final. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 04, 2001 6:07 PM Subject: Re: [PATCH] SingleThreadModel Pool for TC 3.3 Thanks David. I don't like STM, but since it's part of the spec we need to support it. And since you spent the time to write it, I think we have the duty to check it and find a way to check it in:-). Unfortunately, not for 3.3, it's too late. But 3.3.1 can include it. Costin On Thu, 4 Oct 2001, Schreibman, David wrote: I'm submitting this with mixed feelings since the recent discussion has shown strong opinions about the utility of the SingleThreadModel. I was already in the middle of doing the work when all that came about so I went ahead and finished it. After reaping the benefits of Tomcat for a couple of years I've been wanting to give something back. So after a recent post about how to help, I went into bugzilla and found this issue. I don't even use STM, but was somewhat familiar with the ServletHandler and figured I could contribute here. At a minimum, I had fun doing the work and was able to learn a bit more about the code base. Maybe it will be of some use to others. Looking forward to more good stuff from this project!! -David ** This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail.
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util RequestUtil.java
marcsaeg01/10/05 11:12:33 Modified:src/share/org/apache/tomcat/core Tag: tomcat_32 ContextManager.java src/share/org/apache/tomcat/util Tag: tomcat_32 RequestUtil.java Log: This change addresses a side effect of a change done in Tomcat 3.2.3 to close a security hole. In Tomcat 3.2.3 we disallowed any URI that contained encoded special characters like %, /, ., \. While this did help close the security hole, it caused other problems. First, it violates the URL specification (see RFC1630 and RFC1738) and second it prevents some useful URLs from working. To address this I've modified the behavior of RequestUtil.URLDecode(). It used to check for some encoded special characters and if it found them it would throw and InvalidArgumentException. I've added checks for the rest of the special characters. Also, instead of throwing an exception the encoded character is left in the resulting string. Thus a URI like /fu%2fba%72 will decode to /fu%2fbar. Leaving the encoded characters in the result will preclude them from matching against prefixes or security constraints but the data will be available to servlets and JSP pages that want the information, but they will have to decode these strings on their own. There is still an issue regarding the value returned by getPathInfo(). The specification states (in the 4/27/2000 errata) that getPathInfo() should return a decoded value. The value currently returned by getPathInfo() does not decode any of the special characters listed above. It is not clear to me now if we should take the extra step of completely decoding the path info or not, so for now I'm leaving it alone. Revision ChangesPath No revision No revision 1.100.2.27 +2 -8 jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java Index: ContextManager.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java,v retrieving revision 1.100.2.26 retrieving revision 1.100.2.27 diff -u -r1.100.2.26 -r1.100.2.27 --- ContextManager.java 2001/07/17 04:25:54 1.100.2.26 +++ ContextManager.java 2001/10/05 18:12:33 1.100.2.27 @@ -742,18 +742,12 @@ public void service( Request req, Response res ) { /** - * XXX Normalize and validate the request URI. This is important + * XXX Normalize the request URI. This is important * to prevent non-normalized URIs from causing security constraints * from being bypassed. For example, /examples/jsp/../jsp/security/protected/index.jsp - * would not trigger the AccessInterceptor. Also, encoded special chars - * ., /, \ and % are forbidden in URIs to prevent additional security problems. + * would not trigger the AccessInterceptor. */ req.setRequestURI(URLUtil.normalizeURI(req.getRequestURI())); -String ucURI = req.getRequestURI().toUpperCase(); -if(ucURI.indexOf(%25) = 0 || ucURI.indexOf(%2E) = 0 || - ucURI.indexOf(%2F) = 0 || ucURI.indexOf(%5C) =0){ -res.setStatus(404); -} internalService( req, res ); // clean up No revision No revision 1.14.2.7 +4 -4 jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/RequestUtil.java Index: RequestUtil.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/RequestUtil.java,v retrieving revision 1.14.2.6 retrieving revision 1.14.2.7 diff -u -r1.14.2.6 -r1.14.2.7 --- RequestUtil.java 2001/08/12 23:26:57 1.14.2.6 +++ RequestUtil.java 2001/10/05 18:12:33 1.14.2.7 @@ -326,10 +326,10 @@ continue; } else if (metaChar == '%') { char c = (char) Integer.parseInt(str.substring(strPos + 1, strPos + 3), 16); -if(c == '/' || c == '\0') -throw new IllegalArgumentException(URL contains encoded special chars.); - -dec.append(c); +if(c == '/' || c == '%' || c=='.' || c == '\\' || c == '\0') +dec.append(str.substring(strPos, strPos+3)); +else +dec.append(c); strPos += 3; } }
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util SimplePool.java
marcsaeg01/10/05 11:23:43 Modified:src/share/org/apache/tomcat/util Tag: tomcat_32 SimplePool.java Log: When an object is removed from the pool the pool's reference should be removed to expedite garbage collection. Submitted by: David Schreibman [EMAIL PROTECTED] Revision ChangesPath No revision No revision 1.3.2.2 +4 -3 jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/SimplePool.java Index: SimplePool.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/SimplePool.java,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -u -r1.3.2.1 -r1.3.2.2 --- SimplePool.java 2001/02/28 19:21:22 1.3.2.1 +++ SimplePool.java 2001/10/05 18:23:43 1.3.2.2 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/SimplePool.java,v 1.3.2.1 2001/02/28 19:21:22 larryi Exp $ - * $Revision: 1.3.2.1 $ - * $Date: 2001/02/28 19:21:22 $ + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/SimplePool.java,v 1.3.2.2 2001/10/05 18:23:43 marcsaeg Exp $ + * $Revision: 1.3.2.2 $ + * $Date: 2001/10/05 18:23:43 $ * * * @@ -118,6 +118,7 @@ synchronized( lock ) { if( current = 0 ) { item = pool[current]; +pool[current] = null; current -= 1; } }
cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet JspCServletContext.java
kinman 01/10/05 11:48:04 Modified:jasper/src/share/org/apache/jasper/compiler TagLibraryInfoImpl.java jasper/src/share/org/apache/jasper/servlet JspCServletContext.java Log: PR: 3640 Submitted by: Peter Rossbach ([EMAIL PROTECTED]) Jspc now works when taglibs are in a .jar Revision ChangesPath 1.24 +10 -8 jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java Index: TagLibraryInfoImpl.java === RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- TagLibraryInfoImpl.java 2001/07/10 23:50:24 1.23 +++ TagLibraryInfoImpl.java 2001/10/05 18:48:04 1.24 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v 1.23 2001/07/10 23:50:24 horwat Exp $ - * $Revision: 1.23 $ - * $Date: 2001/07/10 23:50:24 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v 1.24 2001/10/05 18:48:04 kinman Exp $ + * $Revision: 1.24 $ + * $Date: 2001/10/05 18:48:04 $ * * The Apache Software License, Version 1.1 * @@ -224,8 +224,13 @@ ZipEntry jarEntry = null; InputStream stream = null; try { - url = ctxt.getResource(location[0]); - if (url == null) return; +String path = location[0] ; +if(ctxt.getClassLoader() != null + java.net.URLClassLoader.class.equals(ctxt.getClassLoader().getClass()) +path.startsWith(/)) + path = path.substring(1,path.length()) ; +url = ctxt.getResource(path); +if (url == null) return; url = new URL(jar: + url.toString() + !/); JarURLConnection conn = (JarURLConnection) url.openConnection(); @@ -359,9 +364,6 @@ description.equals(tname)) info = element.getBody(); else if (variable.equals(tname)) { -if (teiclass != null) -throw new JasperException -(Constants.getString(tld.error.variableNotAllowed)); variableVector.addElement(createVariable(element)); } else if (attribute.equals(tname)) attributeVector.addElement(createAttribute(element)); 1.2 +3 -3 jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspCServletContext.java Index: JspCServletContext.java === RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspCServletContext.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JspCServletContext.java 2001/09/14 05:21:33 1.1 +++ JspCServletContext.java 2001/10/05 18:48:04 1.2 @@ -80,7 +80,7 @@ * Simple codeServletContext/code implementation without * HTTP-specific methods. * - * @author Peter Robbach ([EMAIL PROTECTED]) + * @author Peter Rossbach ([EMAIL PROTECTED]) */ public class JspCServletContext implements ServletContext { @@ -320,9 +320,9 @@ for (int i = 0; i theFiles.length; i++) { File testFile = new File(basePath + File.separator + theFiles[i]); if (testFile.isFile()) -thePaths.add(/ + theFiles[i]); +thePaths.add(path + theFiles[i]); else if (testFile.isDirectory()) -thePaths.add(/ + theFiles[i] + /); +thePaths.add(path + theFiles[i] + /); } return (thePaths);
cvs commit: jakarta-tomcat/src/native/jk jk_lb_worker.c
marcsaeg01/10/05 11:49:42 Modified:src/native/jk Tag: tomcat_32 jk_lb_worker.c Log: Use a zero byte, not a NULL pointer to terminate the string. Submitted by: Mathias Herberts [[EMAIL PROTECTED]] Revision ChangesPath No revision No revision 1.2.2.2 +2 -2 jakarta-tomcat/src/native/jk/Attic/jk_lb_worker.c Index: jk_lb_worker.c === RCS file: /home/cvs/jakarta-tomcat/src/native/jk/Attic/jk_lb_worker.c,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -u -r1.2.2.1 -r1.2.2.2 --- jk_lb_worker.c2001/01/11 03:07:11 1.2.2.1 +++ jk_lb_worker.c2001/10/05 18:49:42 1.2.2.2 @@ -58,7 +58,7 @@ * several workers. * * Author: Gal Shachor [EMAIL PROTECTED] * * Based on: * - * Version: $Revision: 1.2.2.1 $ * + * Version: $Revision: 1.2.2.2 $ * ***/ #include jk_pool.h @@ -133,7 +133,7 @@ * string if appended... */ if(id_end = strchr(id_start, '?')) { -id_end = NULL; +id_end = '\0'; } return id_start; }
cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet JspCServletContext.java
kinman 01/10/05 11:49:53 Modified:jasper/src/share/org/apache/jasper/compiler Tag: tomcat_40_branch TagLibraryInfoImpl.java jasper/src/share/org/apache/jasper/servlet Tag: tomcat_40_branch JspCServletContext.java Log: PR: 3640 Submitted by: Peter Rossbach ([EMAIL PROTECTED]) Jspc now works when taglibs are in a .jar Revision ChangesPath No revision No revision 1.23.2.1 +10 -8 jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java Index: TagLibraryInfoImpl.java === RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v retrieving revision 1.23 retrieving revision 1.23.2.1 diff -u -r1.23 -r1.23.2.1 --- TagLibraryInfoImpl.java 2001/07/10 23:50:24 1.23 +++ TagLibraryInfoImpl.java 2001/10/05 18:49:53 1.23.2.1 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v 1.23 2001/07/10 23:50:24 horwat Exp $ - * $Revision: 1.23 $ - * $Date: 2001/07/10 23:50:24 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v 1.23.2.1 2001/10/05 18:49:53 kinman Exp $ + * $Revision: 1.23.2.1 $ + * $Date: 2001/10/05 18:49:53 $ * * The Apache Software License, Version 1.1 * @@ -224,8 +224,13 @@ ZipEntry jarEntry = null; InputStream stream = null; try { - url = ctxt.getResource(location[0]); - if (url == null) return; +String path = location[0] ; +if(ctxt.getClassLoader() != null + java.net.URLClassLoader.class.equals(ctxt.getClassLoader().getClass()) +path.startsWith(/)) + path = path.substring(1,path.length()) ; +url = ctxt.getResource(path); +if (url == null) return; url = new URL(jar: + url.toString() + !/); JarURLConnection conn = (JarURLConnection) url.openConnection(); @@ -359,9 +364,6 @@ description.equals(tname)) info = element.getBody(); else if (variable.equals(tname)) { -if (teiclass != null) -throw new JasperException -(Constants.getString(tld.error.variableNotAllowed)); variableVector.addElement(createVariable(element)); } else if (attribute.equals(tname)) attributeVector.addElement(createAttribute(element)); No revision No revision 1.1.2.1 +3 -3 jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspCServletContext.java Index: JspCServletContext.java === RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspCServletContext.java,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -r1.1 -r1.1.2.1 --- JspCServletContext.java 2001/09/14 05:21:33 1.1 +++ JspCServletContext.java 2001/10/05 18:49:53 1.1.2.1 @@ -80,7 +80,7 @@ * Simple codeServletContext/code implementation without * HTTP-specific methods. * - * @author Peter Robbach ([EMAIL PROTECTED]) + * @author Peter Rossbach ([EMAIL PROTECTED]) */ public class JspCServletContext implements ServletContext { @@ -320,9 +320,9 @@ for (int i = 0; i theFiles.length; i++) { File testFile = new File(basePath + File.separator + theFiles[i]); if (testFile.isFile()) -thePaths.add(/ + theFiles[i]); +thePaths.add(path + theFiles[i]); else if (testFile.isDirectory()) -thePaths.add(/ + theFiles[i] + /); +thePaths.add(path + theFiles[i] + /); } return (thePaths);
DO NOT REPLY [Bug 3640] - Fix JSPC taglib support when taglib is included at jar
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=3640. 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=3640 Fix JSPC taglib support when taglib is included at jar [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 11:54 --- Fixed with nightly build 20011005. Thanks for the patch.
cvs commit: jakarta-tomcat-4.0 RELEASE-PLAN-4.0.1.txt
remm01/10/05 13:40:37 Modified:.Tag: tomcat_40_branch RELEASE-PLAN-4.0.1.txt Log: - Bug status update. Revision ChangesPath No revision No revision 1.1.2.6 +2 -4 jakarta-tomcat-4.0/Attic/RELEASE-PLAN-4.0.1.txt Index: RELEASE-PLAN-4.0.1.txt === RCS file: /home/cvs/jakarta-tomcat-4.0/Attic/RELEASE-PLAN-4.0.1.txt,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- RELEASE-PLAN-4.0.1.txt2001/10/05 17:31:03 1.1.2.5 +++ RELEASE-PLAN-4.0.1.txt2001/10/05 20:40:37 1.1.2.6 @@ -1,4 +1,4 @@ -$Id: RELEASE-PLAN-4.0.1.txt,v 1.1.2.5 2001/10/05 17:31:03 remm Exp $ +$Id: RELEASE-PLAN-4.0.1.txt,v 1.1.2.6 2001/10/05 20:40:37 remm Exp $ Release Plan for Apache Tomcat 4.0.1 @@ -67,6 +67,7 @@ -- 2693Syntax errors in JSP source generate NumberFormatException. +3640Fix for JSPC handling of tag libraries in a JAR. 3669Improve Jasper error reporting (stack traces). 3695Do not add ldap.jar to class path on JDK 1.3 or later. 3699A recursive function call in org.apache.naming.NamingContext. @@ -104,9 +105,6 @@ Connectors 3534File Upload doesn't work with Apache, mod_webapp, Tomcat 4, and WebDAV. - -Jasper 3640Fix for JSPC handling of tag libraries in a JAR -(probably related to 3529). Jasper 3779The value of jsp:param should be URL encoded.
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/collections SimplePool.java
nacho 01/10/05 13:55:25 Modified:src/share/org/apache/tomcat/util/collections SimplePool.java Log: The current code can delay garbage collection for objects that are removed from the pool but not returned. Submiitted by David Schreibman [DSchreibman at eTranslate.com] Revision ChangesPath 1.7 +1 -0 jakarta-tomcat/src/share/org/apache/tomcat/util/collections/SimplePool.java Index: SimplePool.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/collections/SimplePool.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- SimplePool.java 2001/07/19 05:50:46 1.6 +++ SimplePool.java 2001/10/05 20:55:25 1.7 @@ -131,6 +131,7 @@ synchronized( lock ) { if( current = 0 ) { item = pool[current]; + pool[current] = null; current -= 1; } if( debug 0 )
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util RequestUtil.java
marcsaeg01/10/05 14:03:54 Modified:src/share/org/apache/tomcat/util Tag: tomcat_32 RequestUtil.java Log: Updated comments for URLDecode(). Revision ChangesPath No revision No revision 1.14.2.8 +5 -1 jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/RequestUtil.java Index: RequestUtil.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/RequestUtil.java,v retrieving revision 1.14.2.7 retrieving revision 1.14.2.8 diff -u -r1.14.2.7 -r1.14.2.8 --- RequestUtil.java 2001/10/05 18:12:33 1.14.2.7 +++ RequestUtil.java 2001/10/05 21:03:54 1.14.2.8 @@ -277,7 +277,11 @@ } /** - * This method decodes the given urlencoded string. + * This method decodes the given urlencoded string. Note that 'special' characters + * /, \, %, . and \0 are *NOT* decoded. The /, % and . characters are reserved by the + * URL specification and may only be used in URLs for their reserved purpose in their + * unencoded form. The \ and \0 characters are prohibited to avoide security problems + * some platforms. * * @param str the url-encoded string * @return the decoded string
Tomcat - encodeURL does not encode https links on an HTTP requestOR any links on an HTTPS
Hello, Noone seems to be able to answer this question (posted by other people) on the user's list, so I'm hoping eomeone on the dev list will be able to. I am running Apache 1.3.20 (w/ open ssl), JDK 1.3, J2EE1.2.1 and Tomcat 3.2.3. Session management works great with cookies, both across HTTP and HTTPS. However, as soon as I turn cookies off, and use URL rewriting instead... URL rewriting ceases to work for HTTPS links (but still works fine on HTTP links) when I view the page under HTTP. Also, NOTHING is URL rewritten when the request was under HTTPS. I created a test page that displays request.getRequestedSessionId(), request.isRequestedSessionIdFromURL() and request.isRequestedSessionIdValid(). After clicking on a link on this test page that is a URL encoded link back to itself, I have an appended ;jsessionid on my HTTP request. All URL encoded HTTP links ARE URL encoded with the same session id, BUT none of the same (but in HTTPS) links are. getRequestedSessionId() shows the correct session id, isRequestedSessionIdFromURL() shows True, and isRequestedSessionIdValid() is True. Now, when I manually change the URL (WITH appended session ID) to HTTPS, NONE of the links are URL Encoded (http OR https). However, getRequestedSessionId() STILL shows the correct session id, isRequestedSessionIdFromURL() STILL shows True, and isRequestedSessionIdValid() STILL is True. So I seem to be having two problems. #1) REGARDLESS of protocol, HTTPS links are NEVER URL Encoded. #2) Though HTTP links ARE URL Encoded when my request is in HTTP, they ARE NOT URL Encoded when my request is in HTTPS. Can someone shed some light on what is going on here? I know (because of displaying getRequestedSessionId(), isRequestedSessionIdFromURL() and isRequestedSessionIDValid()) that my JSP page is getting all of the session information back, but it seems as if Tomcat doesn't know how to URL Encode properly for HTTPS links OR HTTPS requests. Thanks in advance!! Raiden Johnson p.s. I just upgraded to Tomcat 3.2.3, because I was having the same problem in 3.2.2
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa JDBCRealm.java
nacho 01/10/05 14:41:20 Modified:src/share/org/apache/tomcat/modules/aaa JDBCRealm.java Log: Was not initting or stopping the JDBC connection at Tomcat init or shutdown Revision ChangesPath 1.8 +5 -5 jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/JDBCRealm.java Index: JDBCRealm.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/JDBCRealm.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- JDBCRealm.java2001/07/14 03:20:37 1.7 +++ JDBCRealm.java2001/10/05 21:41:20 1.8 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/JDBCRealm.java,v 1.7 2001/07/14 03:20:37 nacho Exp $ - * $Revision: 1.7 $ - * $Date: 2001/07/14 03:20:37 $ + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/JDBCRealm.java,v 1.8 2001/10/05 21:41:20 nacho Exp $ + * $Revision: 1.8 $ + * $Date: 2001/10/05 21:41:20 $ * * The Apache Software License, Version 1.1 * @@ -371,11 +371,11 @@ } } -protected void ContextShutdown(Context ctx) throws TomcatException { +public void contextShutdown(Context ctx) throws TomcatException { if (started JDBCStarted) close(); } -protected void ContextInit(Context ctx) throws TomcatException { +public void contextInit(Context ctx) throws TomcatException { if (!started) { if (connectOnInit !checkConnection()) { throw new RuntimeException(JDBCRealm cannot be started);
cvs commit: jakarta-tomcat/src/native/jk jk_ajp12_worker.c
marcsaeg01/10/05 14:50:14 Modified:src/native/apache1.3 Tag: tomcat_32 mod_jk.c src/native/apache2.0 Tag: tomcat_32 mod_jk.c src/native/jk Tag: tomcat_32 jk_ajp12_worker.c Log: Fixes Bugzilla 2333. Instead of the proposed patch, which did its own memory allocation, I used jk_pool_strdup(), but the end result is the same. In the process of fixing this one I noticed that the jk_pool created in mod_jk was not being closed. This usually doesn't leak because the pool's buffer is allocated on the stack in jk_handler(), but it would leak any dynamically allocated memory. I'll commit the same changes to the jakarta-tomcat-connectors repository. PR: 2333 Submitted by: [EMAIL PROTECTED] Revision ChangesPath No revision No revision 1.7.2.7 +2 -0 jakarta-tomcat/src/native/apache1.3/Attic/mod_jk.c Index: mod_jk.c === RCS file: /home/cvs/jakarta-tomcat/src/native/apache1.3/Attic/mod_jk.c,v retrieving revision 1.7.2.6 retrieving revision 1.7.2.7 diff -u -r1.7.2.6 -r1.7.2.7 --- mod_jk.c 2001/09/17 23:53:21 1.7.2.6 +++ mod_jk.c 2001/10/05 21:50:14 1.7.2.7 @@ -703,6 +703,8 @@ } } +jk_close_pool(private_data.p); + if(rc) { return OK; /* NOT r-status, even if it has changed. */ } No revision No revision 1.6.2.2 +2 -0 jakarta-tomcat/src/native/apache2.0/Attic/mod_jk.c Index: mod_jk.c === RCS file: /home/cvs/jakarta-tomcat/src/native/apache2.0/Attic/mod_jk.c,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -u -r1.6.2.1 -r1.6.2.2 --- mod_jk.c 2001/05/19 04:23:43 1.6.2.1 +++ mod_jk.c 2001/10/05 21:50:14 1.6.2.2 @@ -523,6 +523,8 @@ } } +jk_close_pool(private_data.p); + if(rc) { return OK; /* NOT r-status, even if it has changed. */ } No revision No revision 1.2.2.2 +3 -3 jakarta-tomcat/src/native/jk/Attic/jk_ajp12_worker.c Index: jk_ajp12_worker.c === RCS file: /home/cvs/jakarta-tomcat/src/native/jk/Attic/jk_ajp12_worker.c,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -u -r1.2.2.1 -r1.2.2.2 --- jk_ajp12_worker.c 2001/02/01 22:50:09 1.2.2.1 +++ jk_ajp12_worker.c 2001/10/05 21:50:14 1.2.2.2 @@ -57,7 +57,7 @@ * Description: ajpv1.2 worker, used to call local or remote jserv hosts * * Author: Gal Shachor [EMAIL PROTECTED] * * Based on:jserv_ajpv12.c from Jserv * - * Version: $Revision: 1.2.2.1 $ * + * Version: $Revision: 1.2.2.2 $ * ***/ #include jk_ajp12_worker.h @@ -534,14 +534,14 @@ jk_log(l, JK_LOG_DEBUG, ajpv12_handle_response, read %s=%s\n, name, value); if(0 == strcmp(Status, name)) { -char *numeric = strtok(value, \t); + char *numeric = strtok(value, \t); status = atoi(numeric); if(status 100 || status 999) { jk_log(l, JK_LOG_ERROR, ajpv12_handle_response, invalid status code\n); return JK_FALSE; } -reason = strtok(NULL, \t); + reason = jk_pool_strdup(s-pool, strtok(NULL, \t)); } else { if(headers_capacity == headers_len) { jk_log(l, JK_LOG_DEBUG, ajpv12_handle_response, allocating header arrays\n);
cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp12_worker.c
marcsaeg01/10/05 14:52:08 Modified:jk/native/apache-1.3 mod_jk.c jk/native/apache-2.0 mod_jk.c jk/native/common jk_ajp12_worker.c Log: Porting change from tomcat_32. Fixes Bugzilla 2333. Instead of the proposed patch, which did its own memory allocation, I used jk_pool_strdup(), but the end result is the same. In the process of fixing this one I noticed that the jk_pool created in mod_jk was not being closed. This usually doesn't leak because the pool's buffer is allocated on the stack in jk_handler(), but it would leak any dynamically allocated memory. Revision ChangesPath 1.19 +3 -1 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.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- mod_jk.c 2001/10/01 21:30:49 1.18 +++ mod_jk.c 2001/10/05 21:52:08 1.19 @@ -61,7 +61,7 @@ * Author: Gal Shachor [EMAIL PROTECTED] * * Dan Milstein [EMAIL PROTECTED]* * Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.18 $ * + * Version: $Revision: 1.19 $ * ***/ /* @@ -1132,6 +1132,8 @@ end-done(end, l); } } + +jk_close_pool(private_data.p); if(rc) { return OK; /* NOT r-status, even if it has changed. */ 1.29 +3 -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.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- mod_jk.c 2001/10/04 13:09:42 1.28 +++ mod_jk.c 2001/10/05 21:52:08 1.29 @@ -60,7 +60,7 @@ * Description: Apache 2 plugin for Jakarta/Tomcat * * Author: Gal Shachor [EMAIL PROTECTED] * * Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.28 $ * + * Version: $Revision: 1.29 $ * ***/ /* @@ -1235,6 +1235,8 @@ #endif } } + +jk_close_pool(private_data.p); if(rc) { return OK;/* NOT r-status, even if it has changed. */ 1.4 +2 -2 jakarta-tomcat-connectors/jk/native/common/jk_ajp12_worker.c Index: jk_ajp12_worker.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp12_worker.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- jk_ajp12_worker.c 2001/06/18 14:15:11 1.3 +++ jk_ajp12_worker.c 2001/10/05 21:52:08 1.4 @@ -59,7 +59,7 @@ * Description: ajpv1.2 worker, used to call local or remote jserv hosts * * Author: Gal Shachor [EMAIL PROTECTED] * * Based on:jserv_ajpv12.c from Jserv * - * Version: $Revision: 1.3 $ * + * Version: $Revision: 1.4 $ * ***/ #include jk_ajp12_worker.h @@ -545,7 +545,7 @@ jk_log(l, JK_LOG_ERROR, ajpv12_handle_response, invalid status code\n); return JK_FALSE; } -reason = strtok(NULL, \t); +reason = jk_pool_strdup(s-pool, strtok(NULL, \t)); } else { if(headers_capacity == headers_len) { jk_log(l, JK_LOG_DEBUG, ajpv12_handle_response, allocating header arrays\n);
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardContextValve.java
remm01/10/05 15:01:44 Modified:catalina/src/share/org/apache/catalina/core Tag: tomcat_40_branch StandardContextValve.java Log: - Forgot to remove a finishResponse. - Use sendError instead of setStatus (which was probably a hack to avoid committing the response). - Thanks to Patrick Luby for showing me the bug. Revision ChangesPath No revision No revision 1.12.2.2 +10 -11 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextValve.java Index: StandardContextValve.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextValve.java,v retrieving revision 1.12.2.1 retrieving revision 1.12.2.2 diff -u -r1.12.2.1 -r1.12.2.2 --- StandardContextValve.java 2001/10/04 19:27:58 1.12.2.1 +++ StandardContextValve.java 2001/10/05 22:01:44 1.12.2.2 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextValve.java,v 1.12.2.1 2001/10/04 19:27:58 remm Exp $ - * $Revision: 1.12.2.1 $ - * $Date: 2001/10/04 19:27:58 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextValve.java,v 1.12.2.2 2001/10/05 22:01:44 remm Exp $ + * $Revision: 1.12.2.2 $ + * $Date: 2001/10/05 22:01:44 $ * * * @@ -93,7 +93,7 @@ * when processing HTTP requests. * * @author Craig R. McClanahan - * @version $Revision: 1.12.2.1 $ $Date: 2001/10/04 19:27:58 $ + * @version $Revision: 1.12.2.2 $ $Date: 2001/10/05 22:01:44 $ */ final class StandardContextValve @@ -166,11 +166,6 @@ relativeURI.startsWith(/META-INF/) || relativeURI.startsWith(/WEB-INF/)) { notFound(requestURI, (HttpServletResponse) response.getResponse()); -try { -response.finishResponse(); -} catch (IOException e) { -; -} return; } @@ -223,9 +218,11 @@ private void badRequest(String requestURI, HttpServletResponse response) { try { -response.setStatus(HttpServletResponse.SC_BAD_REQUEST, requestURI); +response.sendError(HttpServletResponse.SC_BAD_REQUEST, requestURI); } catch (IllegalStateException e) { ; +} catch (IOException e) { +; } } @@ -242,8 +239,10 @@ private void notFound(String requestURI, HttpServletResponse response) { try { -response.setStatus(HttpServletResponse.SC_NOT_FOUND, requestURI); +response.sendError(HttpServletResponse.SC_NOT_FOUND, requestURI); } catch (IllegalStateException e) { +; +} catch (IOException e) { ; }
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardContextValve.java
remm01/10/05 15:03:53 Modified:catalina/src/share/org/apache/catalina/core StandardContextValve.java Log: - Forgot to remove a finishResponse. - Use sendError instead of setStatus (which was probably a hack to avoid committing the response). - Thanks to Patrick Luby for showing me the bug. Revision ChangesPath 1.14 +10 -11 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextValve.java Index: StandardContextValve.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextValve.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- StandardContextValve.java 2001/09/26 17:51:07 1.13 +++ StandardContextValve.java 2001/10/05 22:03:53 1.14 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextValve.java,v 1.13 2001/09/26 17:51:07 remm Exp $ - * $Revision: 1.13 $ - * $Date: 2001/09/26 17:51:07 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextValve.java,v 1.14 2001/10/05 22:03:53 remm Exp $ + * $Revision: 1.14 $ + * $Date: 2001/10/05 22:03:53 $ * * * @@ -93,7 +93,7 @@ * when processing HTTP requests. * * @author Craig R. McClanahan - * @version $Revision: 1.13 $ $Date: 2001/09/26 17:51:07 $ + * @version $Revision: 1.14 $ $Date: 2001/10/05 22:03:53 $ */ final class StandardContextValve @@ -166,11 +166,6 @@ relativeURI.startsWith(/META-INF/) || relativeURI.startsWith(/WEB-INF/)) { notFound(requestURI, (HttpServletResponse) response.getResponse()); -try { -response.finishResponse(); -} catch (IOException e) { -; -} return; } @@ -223,9 +218,11 @@ private void badRequest(String requestURI, HttpServletResponse response) { try { -response.setStatus(HttpServletResponse.SC_BAD_REQUEST, requestURI); +response.sendError(HttpServletResponse.SC_BAD_REQUEST, requestURI); } catch (IllegalStateException e) { ; +} catch (IOException e) { +; } } @@ -242,8 +239,10 @@ private void notFound(String requestURI, HttpServletResponse response) { try { -response.setStatus(HttpServletResponse.SC_NOT_FOUND, requestURI); +response.sendError(HttpServletResponse.SC_NOT_FOUND, requestURI); } catch (IllegalStateException e) { +; +} catch (IOException e) { ; }
cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler ForwardGenerator.java
kinman 01/10/05 15:17:33 Modified:jasper/src/share/org/apache/jasper/compiler ForwardGenerator.java Log: PR: 3779 - Did some code cleanup. - Values of jsp:param are URL encoded. Revision ChangesPath 1.5 +13 -26 jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ForwardGenerator.java Index: ForwardGenerator.java === RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ForwardGenerator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ForwardGenerator.java 2000/11/30 21:47:52 1.4 +++ ForwardGenerator.java 2001/10/05 22:17:33 1.5 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ForwardGenerator.java,v 1.4 2000/11/30 21:47:52 pierred Exp $ - * $Revision: 1.4 $ - * $Date: 2000/11/30 21:47:52 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ForwardGenerator.java,v 1.5 2001/10/05 22:17:33 kinman Exp $ + * $Revision: 1.5 $ + * $Date: 2001/10/05 22:17:33 $ * * * @@ -63,6 +63,7 @@ import java.util.Hashtable; import java.util.Enumeration; +import java.net.URLEncoder; import org.apache.jasper.JasperException; import org.apache.jasper.Constants; @@ -101,8 +102,7 @@ } public void generate(ServletWriter writer, Class phase) { - boolean initial = true; - String sep = ?; + char sep = '?'; writer.println(if (true) {); writer.pushIndent(); writer.println(out.clear();); @@ -113,29 +113,16 @@ while (en.hasMoreElements()) { String key = (String) en.nextElement(); String []value = (String []) params.get(key); - if (initial == true) { - sep = ?; - initial = false; - } else sep = ; - if (value.length == 1 JspUtil.isExpression(value[0], isXml)) + for (int i = 0; i value.length; i++) { + String v; + if (JspUtil.isExpression(value[i], isXml)) + v = JspUtil.getExpr(value[i], isXml); + else + v = \ + URLEncoder.encode(value[i]) + \; writer.println(_jspx_qfStr = _jspx_qfStr + \ + sep + -key + =\ + + JspUtil.getExpr(value[0], isXml) + ;); - else { - if (value.length == 1) - writer.println(_jspx_qfStr = _jspx_qfStr + \ + sep + -key + =\ + \ + value[0] + \;); - else { - for (int i = 0; i value.length; i++) { - if (!JspUtil.isExpression(value[i], isXml)) - writer.println(_jspx_qfStr = _jspx_qfStr + \ + sep + -key + =\ + \ + value[i] + \;); - else - writer.println(_jspx_qfStr = _jspx_qfStr + \ + sep + -key + =\ + + JspUtil.getExpr(value[i], isXml)+ ;); - if (sep.equals(?)) sep = ; - } - } +key + =\ + + v + ;); + sep = ''; } } }
cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler ForwardGenerator.java
kinman 01/10/05 15:21:09 Modified:jasper/src/share/org/apache/jasper/compiler Tag: tomcat_40_branch ForwardGenerator.java Log: PR: 3779 - Did some code cleanup. - Values of jsp:param are URL encoded. Revision ChangesPath No revision No revision 1.4.4.1 +13 -26 jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ForwardGenerator.java Index: ForwardGenerator.java === RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ForwardGenerator.java,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -u -r1.4 -r1.4.4.1 --- ForwardGenerator.java 2000/11/30 21:47:52 1.4 +++ ForwardGenerator.java 2001/10/05 22:21:09 1.4.4.1 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ForwardGenerator.java,v 1.4 2000/11/30 21:47:52 pierred Exp $ - * $Revision: 1.4 $ - * $Date: 2000/11/30 21:47:52 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ForwardGenerator.java,v 1.4.4.1 2001/10/05 22:21:09 kinman Exp $ + * $Revision: 1.4.4.1 $ + * $Date: 2001/10/05 22:21:09 $ * * * @@ -63,6 +63,7 @@ import java.util.Hashtable; import java.util.Enumeration; +import java.net.URLEncoder; import org.apache.jasper.JasperException; import org.apache.jasper.Constants; @@ -101,8 +102,7 @@ } public void generate(ServletWriter writer, Class phase) { - boolean initial = true; - String sep = ?; + char sep = '?'; writer.println(if (true) {); writer.pushIndent(); writer.println(out.clear();); @@ -113,29 +113,16 @@ while (en.hasMoreElements()) { String key = (String) en.nextElement(); String []value = (String []) params.get(key); - if (initial == true) { - sep = ?; - initial = false; - } else sep = ; - if (value.length == 1 JspUtil.isExpression(value[0], isXml)) + for (int i = 0; i value.length; i++) { + String v; + if (JspUtil.isExpression(value[i], isXml)) + v = JspUtil.getExpr(value[i], isXml); + else + v = \ + URLEncoder.encode(value[i]) + \; writer.println(_jspx_qfStr = _jspx_qfStr + \ + sep + -key + =\ + + JspUtil.getExpr(value[0], isXml) + ;); - else { - if (value.length == 1) - writer.println(_jspx_qfStr = _jspx_qfStr + \ + sep + -key + =\ + \ + value[0] + \;); - else { - for (int i = 0; i value.length; i++) { - if (!JspUtil.isExpression(value[i], isXml)) - writer.println(_jspx_qfStr = _jspx_qfStr + \ + sep + -key + =\ + \ + value[i] + \;); - else - writer.println(_jspx_qfStr = _jspx_qfStr + \ + sep + -key + =\ + + JspUtil.getExpr(value[i], isXml)+ ;); - if (sep.equals(?)) sep = ; - } - } +key + =\ + + v + ;); + sep = ''; } } }
DO NOT REPLY [Bug 3779] - the value of jsp:param should be URL encoded
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=3779. 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=3779 the value of jsp:param should be URL encoded [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 15:25 --- Fixed with the nightly build 21101005
cvs commit: jakarta-tomcat-4.0 RELEASE-PLAN-4.0.1.txt
remm01/10/05 16:25:19 Modified:.Tag: tomcat_40_branch RELEASE-PLAN-4.0.1.txt Log: - Bug status update. Revision ChangesPath No revision No revision 1.1.2.7 +4 -5 jakarta-tomcat-4.0/Attic/RELEASE-PLAN-4.0.1.txt Index: RELEASE-PLAN-4.0.1.txt === RCS file: /home/cvs/jakarta-tomcat-4.0/Attic/RELEASE-PLAN-4.0.1.txt,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -r1.1.2.6 -r1.1.2.7 --- RELEASE-PLAN-4.0.1.txt2001/10/05 20:40:37 1.1.2.6 +++ RELEASE-PLAN-4.0.1.txt2001/10/05 23:25:19 1.1.2.7 @@ -1,4 +1,4 @@ -$Id: RELEASE-PLAN-4.0.1.txt,v 1.1.2.6 2001/10/05 20:40:37 remm Exp $ +$Id: RELEASE-PLAN-4.0.1.txt,v 1.1.2.7 2001/10/05 23:25:19 remm Exp $ Release Plan for Apache Tomcat 4.0.1 @@ -81,6 +81,7 @@ 3736Incorrect PathInfo on first invocation of servlet chain. 3739Custom tag support error. 3759Conversion from String to Object doesn't work. +3779The value of jsp:param should be URL encoded. 3780Documentation notes. 3796XML Classloader problem has crept back in. 3809Jar files in the wrong directories. @@ -106,7 +107,8 @@ Connectors 3534File Upload doesn't work with Apache, mod_webapp, Tomcat 4, and WebDAV. -Jasper 3779The value of jsp:param should be URL encoded. +Catalina3770HttpSessionListener.sessionCreated() called twice for each +session. Catalina3888WebappClassLoader: Lifecycle error : CL stopped (bug confirmed, but conditions to reproduce it still unclear). @@ -120,9 +122,6 @@ Jasper 3668Validation error reporting. Jasper 3704Forward errors not reported when response is committed. - -Jasper 3770HttpSessionListener.sessionCreated() called twice for each -session. Catalina3990JNDI/LDAP Realm password authentication process.
[FAQ] jGuru FAQ Update
jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as many other Java topics). Here is an automated update on recent postings to Tomcat-related FAQs. Please direct flames and feedback to [EMAIL PROTECTED] . - Alex SPONSORED BY developerWorks need it? get it. tools, code and tutorials for open-standards based development. Stay informed with dW's weekly email newsletter http://www.jguru.com/misc/register_devworks.jsp?src=notify - Hi. You asked to be notified weekly when certain jGuru.com items get new entries. You can shut email notification off at the FAQ home page(s) or: http://www.jguru.com/guru/notifyprefs.jsp ++ JavaServer Pages (JSP) FAQ: http://www.jguru.com/faq/JSP I have an error page that is handling my exceptions. Is it possible to access session data from within the error page when the request is forwarded to it upon an exception? I am getting a null when I do a session.getAttribute(). http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=512162 Can 2 web applications share the same session object? http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=511752 ++ Servlets FAQ: http://www.jguru.com/faq/Servlets Can 2 web applications share the same session object? http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=511752 How do I retrieve parameters in the exact order in which they appeared on the HTML form? The method getParameterNames() does not preserve the order. http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=508859 How can I get quotes in my servlet output so the string will be quoted for JavaScript? http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=507420
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers SimpleMapper1.java
billbarker01/10/05 19:31:10 Modified:src/share/org/apache/tomcat/modules/generators ErrorHandler.java src/share/org/apache/tomcat/modules/mappers SimpleMapper1.java Log: Impove error handling when the user has choosen not to define a ROOT context. A better solution is to force the definition of DEFAULT@ROOT, but that creates too many problems this close to release. I'm the first to vote to role this back once someInterceptor takes responsibilty for DEFAULT@ROOT. It is very easy (and, it seems common) to setup Tomcat without a ROOT context. This caused Tomcat to generate useless exception reports in the log. With this patch, you get the expected 404 response to an un-mappable request. This fixes Bug #3988 Reported by: Alex Polverini [EMAIL PROTECTED] Reported by: Hans Schmid [EMAIL PROTECTED] Revision ChangesPath 1.20 +20 -0 jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/ErrorHandler.java Index: ErrorHandler.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/ErrorHandler.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- ErrorHandler.java 2001/09/23 18:17:48 1.19 +++ ErrorHandler.java 2001/10/06 02:31:10 1.20 @@ -90,6 +90,26 @@ public void engineInit(ContextManager cm ) { } + +/** Check that we are in a stable state. + */ +public void engineStart(ContextManager cm ) + throws TomcatException +{ + /* It is very possible to configure Tomcat without a rootContext. +We make certain here that the rootContext is set. Note that we +can't add the context, since we don't have a docRoot. This one is +only used for error handling. If somebody subsequently adds a +default context, then this one just harmlessly goes to gc +(since it's not part of the app, we don't have to follow Life Cycle) + */ + if(rootContext == null){ + rootContext = cm.createContext(); + rootContext.setContextManager(cm); + rootContext.setPath(); + contextInit(rootContext); + } +} /** Add default error handlers */ 1.12 +9 -3 jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/SimpleMapper1.java Index: SimpleMapper1.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/SimpleMapper1.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- SimpleMapper1.java2001/09/18 06:48:26 1.11 +++ SimpleMapper1.java2001/10/06 02:31:10 1.12 @@ -294,9 +294,15 @@ Container container =(Container)map. getLongestPrefixMatch( hostMB, pathMB); - if( container == null ) - throw new RuntimeException( Assertion failed: + - container==null); + if( container == null ) { + // It is too easy to configure Tomcat w/o a default context + // Add this back in when we do better checking + //throw new RuntimeException( Assertion failed: + + // container==null); + cm.log(Assertion failed: + +container==null (no Default Context?)); + return 404; + } if(debug0) cm.log(SM: Prefix match + pathMB.toString() + - +
DO NOT REPLY [Bug 3988] - NullPointerException in TC 3.3-b1
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=3988. 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=3988 NullPointerException in TC 3.3-b1 --- Additional Comments From [EMAIL PROTECTED] 2001-10-05 19:41 --- This has now been fixed in the CVS. The problem was that Tomcat wasn't very happy when there was no ROOT context configured. This caused it to generate the NPE when trying to report the error. Now it will generate the expected 404 response. With RC1, you can fix this by defining a ROOT context (corresponding to http://tomcat.mycompany.com/). Or you can just wait for RC2.