cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime JspWriterImpl.java PageContextImpl.java
remm02/03/31 01:02:52 Modified:jasper2/src/share/org/apache/jasper/runtime JspWriterImpl.java PageContextImpl.java Log: - Writer recycling seems to be working after a few minor tweaks. If it causes problems, the out = null; line can be uncommented. Revision ChangesPath 1.2 +11 -8 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspWriterImpl.java Index: JspWriterImpl.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspWriterImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JspWriterImpl.java28 Mar 2002 18:46:19 - 1.1 +++ JspWriterImpl.java31 Mar 2002 09:02:52 - 1.2 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspWriterImpl.java,v 1.1 2002/03/28 18:46:19 kinman Exp $ - * $Revision: 1.1 $ - * $Date: 2002/03/28 18:46:19 $ + * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspWriterImpl.java,v 1.2 2002/03/31 09:02:52 remm Exp $ + * $Revision: 1.2 $ + * $Date: 2002/03/31 09:02:52 $ * * * @@ -142,6 +142,15 @@ this.bufferSize=sz; } +/** Package-level access + */ +void recycle() { + flushed = false; +closed = false; +out = null; + nextChar = 0; +} + /** * Flush the output buffer to the underlying character stream, without * flushing the stream itself. This method is non-private only so that it @@ -647,10 +656,4 @@ } } -/** Package-level access - */ -void recycle() { - flushed = false; - nextChar = 0; -} } 1.2 +6 -6 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java Index: PageContextImpl.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- PageContextImpl.java 28 Mar 2002 18:46:20 - 1.1 +++ PageContextImpl.java 31 Mar 2002 09:02:52 - 1.2 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v 1.1 2002/03/28 18:46:20 kinman Exp $ - * $Revision: 1.1 $ - * $Date: 2002/03/28 18:46:20 $ + * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v 1.2 2002/03/31 09:02:52 remm Exp $ + * $Revision: 1.2 $ + * $Date: 2002/03/31 09:02:52 $ * * * @@ -144,8 +144,9 @@ // System.out.println(Initialize PageContextImpl + out ); if( out == null ) { out = _createOut(bufferSize, autoFlush); // throws - } else - ((JspWriterImpl)out).init(response, bufferSize, autoFlush ); + } else { +((JspWriterImpl)out).init(response, bufferSize, autoFlush ); +} if (this.out == null) throw new IllegalStateException(failed initialize JspWriter); @@ -188,8 +189,7 @@ autoFlush= true; request = null; response = null; - // Reuse // XXX problems - need to fix them first!! - out = null; // out is closed elsewhere +//out = null; if( out instanceof JspWriterImpl ) ((JspWriterImpl)out).recycle(); session = null; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
EJB + Tomcat?
Hello all! I searched tomcat-users and tomcat-dev archives and didn't find an answer to the question are there any plans to provide direct and full support of EJB in Tomcat?. Sorry if this post is out of topic. Sincerely, -- Lev AssinovskyPeterlink Web ProgrammerSt. Petersburg, Russia Tel/Fax: +7 812 3275343 197022 ul.Chapigina 7Á E-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Bug report for Tomcat 3 [2002/03/31]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=CriticalMAJ=Major | | | | MIN=Minor NOR=Normal ENH=Enhancement | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | | 258|Unc|Nor|2000-11-27|response.SendRedirect() resets/destroys Cookies th| | 2478|Opn|Cri|2001-07-06|Passing Session variables between JSP's and Servle| | 4380|New|Enh|2001-10-23|Multiple ISAPI redirectors on single IIS website | | 4551|Opn|Nor|2001-10-31|Ctx( /tt01 ): IOException in: R( /tt01 + /com/abc/| | 4893|Unc|Blk|2001-11-15|Tomcat dies with following error..| | 4915|New|Blk|2001-11-16|Relocation error while loading mod_jk when startin| | 4980|New|Min|2001-11-20|Startup message indicates incorrect log file | | 4994|New|Nor|2001-11-21|Tomcat needs a mechanism for clean and certain shu| | 5064|New|Cri|2001-11-25|Socket write error when include files is more than| | 5108|New|Maj|2001-11-26|Docs for Tomcat 3.2.x appear to be for Tomcat 3.3 | | 5137|New|Nor|2001-11-27|Null pointer in class loader after attempting to r| | 5160|Unc|Maj|2001-11-28|'IllegalStateException' | | 5231|New|Nor|2001-12-02|Tomcat 3.2.4 does not start due to error in classp| | 5261|New|Cri|2001-12-04|Directory Listing in Tomcat 3.2.4 | | 5331|New|Nor|2001-12-09|getPathInfo vs URL normalization | | 5411|Opn|Nor|2001-12-13|JSP session does not work with IE/IIS5/Tomcat 3.3 | | 5510|New|Blk|2001-12-19|How to call ejb deployed in JBoss from Tomcat serv| | 5511|New|Nor|2001-12-19|Error upload files| | 5581|New|Cri|2001-12-24|java.lang.ArrayIndexOutOfBoundsException | | 5756|New|Nor|2002-01-08|jspc.bat exits with wrong ERRORLEVEL | | 5797|New|Nor|2002-01-10|UnCatched ? StringIndexOutOfBoundsException: Strin| | 5925|New|Cri|2002-01-19|Apache server hangs up and consumes 100% CPU resou| | 6027|New|Maj|2002-01-25|Tomcat Automatically shuts down as service | | 6168|New|Blk|2002-02-01|double execution of java code in JSP | | 6324|New|Nor|2002-02-08|Invalid POST requests through ajp13 cause 'garbage| | 6451|New|Cri|2002-02-14|Stackoverflow | | 6478|New|Enh|2002-02-14|Default Tomcat Encoding | | 6488|Ver|Maj|2002-02-15|Error: 304. Apparent bug in default ErrorHandler c| | 6648|New|Nor|2002-02-25|jakarta-servletapi build with java 1.4 javadoc err| | 6702|New|Cri|2002-02-27|jk_nt_service.exe -i cannot work | | 6796|New|Cri|2002-03-01|Tomcat dies periodically | | 6989|New|Maj|2002-03-08|Unable to read tld file during parallel JSP compil| | 7013|New|Cri|2002-03-10|Entering a servlet path with non-ISO8859-1 charact| | 7227|New|Nor|2002-03-19|error-code directive don't work | | 7236|New|Blk|2002-03-19|Permission denied to do thread.stop | | 7520|New|Min|2002-03-27|Tomcat starts with title 3.3 instead of 3.3.1 | | 7626|New|Nor|2002-03-29|classloader not working properly | | 7637|New|Cri|2002-03-30|Tomcat terminates after connecting to a database | +-+---+---+--+--+ | Total 38 bugs | +---+ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Bug report for Tomcat 4 [2002/03/31]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=CriticalMAJ=Major | | | | MIN=Minor NOR=Normal ENH=Enhancement | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | | 2820|Opn|Enh|2001-07-26|Implement GZIPOutput on HTTP 1.1 Connector| | 3509|Ass|Blk|2001-09-07|Apache 1.3.20 mod_webapp Tomcat 4b7 HANGS unde| | 3515|Opn|Cri|2001-09-10|Processes hanging after stopping Tomcat | | 3643|Ass|Enh|2001-09-16|Enable static-linking within Apache for WebApp mod| | 4042|Ass|Enh|2001-10-09|webapp component requires Port directive versus Li| | 4139|Ass|Enh|2001-10-12|mod_webapp build files for Win32 | | 4212|Ass|Enh|2001-10-16|How to configure Apache to serve static contents? | | 4350|Ass|Nor|2001-10-22|SSLAuthenticator did not associate SSO session| | 4352|Ass|Nor|2001-10-22|JDBCRealm does not work with CLIENT-CERT auth-meth| | 4371|Unc|Nor|2001-10-23|No responses on browsing root when using WarpConne| | 4386|Ass|Nor|2001-10-24|webapp1.0 will not install on Redhat 7.1 | | 4500|New|Nor|2001-10-29|isapi_redirect.dll does not pass Client certificat| | 4793|New|Blk|2001-11-11|mod_webapp connector doesn´t work | | 4829|Opn|Enh|2001-11-13|Automatic deployment of war files does not work pr| | 4930|New|Maj|2001-11-16|java.io.StreamCorruptedException: Type code out of| | 4961|New|Nor|2001-11-19|JDBCStore problems with Oracle, others(?) | | 4964|New|Maj|2001-11-20|popBody() is called before doEndTag() is called in| | 5040|New|Nor|2001-11-23|EOFException when talking from applet to servlet v| | 5143|New|Enh|2001-11-27|Please allow to specify the cipher set for HTTPS c| | 5166|New|Min|2001-11-28|CATALINA_BASE config issues for RUNNING.txt | | 5199|New|Nor|2001-11-30|jsp:param in jsp:include section not correct | | 5229|New|Blk|2001-12-02|Session cannot unbind if using DistributedManager | | 5329|New|Nor|2001-12-08|NT Service exits startup before Tomcat is finished| | 5383|New|Nor|2001-12-12|/etc/rc.d/init.d/tomcat4 on RedHat 6.1 fails | | 5402|New|Nor|2001-12-12|WarpConnection raise IOException | | 5405|New|Enh|2001-12-13|Powered by Tomcat | | 5446|Opn|Min|2001-12-16|Can't change webapp class loader (bug #5391 revisi| | 5471|New|Maj|2001-12-17|jspc -webapp option is broken due to namespace col| | 5488|New|Nor|2001-12-18|Parser error with language encoding Cp1252| | 5507|New|Cri|2001-12-19|Swapping sessions causes exceptions and it doesn't| | 5547|New|Nor|2001-12-20|isapi_redirect.dll not work with ajp1.3? | | 5551|New|Enh|2001-12-21|MANAGER: add system information query | | 5585|Opn|Nor|2001-12-24|Error page not displayed | | 5603|New|Min|2001-12-28|ServletContext.getResourcePaths() returns extra sl| | 5647|Opn|Blk|2002-01-01|AJP13 connector will not pass authentication reque| | 5666|New|Min|2002-01-02|Implicit object _value on jsp pages | | 5704|Ass|Maj|2002-01-05|CgiServlet corrupting images? | | 5709|New|Nor|2002-01-06|HttpServletRequest.getHost returns web server addr| | 5758|New|Nor|2002-01-08|Server-side includes do not work properly | | 5759|Opn|Maj|2002-01-09|CGI servlet mapping by extension *.cgi does not wo| | 5762|Opn|Maj|2002-01-09|CGI servlet misses to include port number in HTTP_| | 5764|New|Enh|2002-01-09|Key Information Missing--Automatic Application Dep| | 5784|New|Min|2002-01-10|org.apache.catalina.WELCOME_FILES attribute replac| | 5793|New|Nor|2002-01-10|variable element in tld with TagExtraInfo class | | 5795|New|Enh|2002-01-10|Catalina Shutdown relies on localhost causing prob| | 5826|Opn|Min|2002-01-12|JSPC not recompiling modified files | | 5829|New|Nor|2002-01-13|StandardManager needs to cope with sessions throwi| | 5853|New|Maj|2002-01-14|Unable to get request parameters in the Error page| | 5858|New|Enh|2002-01-15|Add tomcat dir to java.library.path | | 5877|New|Min|2002-01-16|Facade of facade. | | 5895|New|Nor|2002-01-17|Not all sessions receives HttpSessionListener.sess| |
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime JspWriterImpl.java
remm02/03/31 11:27:08 Modified:jasper2/src/share/org/apache/jasper/runtime JspWriterImpl.java Log: - Synchronization of the writer doesn't seem to be useful (for the same reason the response writer isn't synced). Revision ChangesPath 1.3 +119 -154 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspWriterImpl.java Index: JspWriterImpl.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspWriterImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JspWriterImpl.java31 Mar 2002 09:02:52 - 1.2 +++ JspWriterImpl.java31 Mar 2002 19:27:08 - 1.3 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspWriterImpl.java,v 1.2 2002/03/31 09:02:52 remm Exp $ - * $Revision: 1.2 $ - * $Date: 2002/03/31 09:02:52 $ + * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspWriterImpl.java,v 1.3 2002/03/31 19:27:08 remm Exp $ + * $Revision: 1.3 $ + * $Date: 2002/03/31 19:27:08 $ * * * @@ -157,17 +157,15 @@ * may be invoked by PrintStream. */ protected final void flushBuffer() throws IOException { - synchronized (lock) { -if (bufferSize == 0) -return; -flushed = true; - ensureOpen(); - if (nextChar == 0) - return; - initOut(); -out.write(cb, 0, nextChar); - nextChar = 0; - } +if (bufferSize == 0) +return; +flushed = true; +ensureOpen(); +if (nextChar == 0) +return; +initOut(); +out.write(cb, 0, nextChar); +nextChar = 0; } protected void initOut() throws IOException { @@ -182,23 +180,19 @@ * Discard the output buffer. */ public final void clear() throws IOException { - synchronized (lock) { -if (bufferSize == 0) -throw new IllegalStateException(Constants.getString(jsp.error.ise_on_clear)); -if (flushed) -throw new IOException(Constants.getString(jsp.error.attempt_to_clear_flushed_buffer)); -ensureOpen(); - nextChar = 0; - } +if (bufferSize == 0) +throw new IllegalStateException(Constants.getString(jsp.error.ise_on_clear)); +if (flushed) +throw new IOException(Constants.getString(jsp.error.attempt_to_clear_flushed_buffer)); +ensureOpen(); +nextChar = 0; } public void clearBuffer() throws IOException { - synchronized (lock) { -if (bufferSize == 0) -throw new IllegalStateException(Constants.getString(jsp.error.ise_on_clear)); -ensureOpen(); - nextChar = 0; - } +if (bufferSize == 0) +throw new IllegalStateException(Constants.getString(jsp.error.ise_on_clear)); +ensureOpen(); +nextChar = 0; } private final void bufferOverflow() throws IOException { @@ -210,13 +204,11 @@ * */ public void flush() throws IOException { -synchronized (lock) { -flushBuffer(); -if (out != null) { -out.flush(); - // Also flush the response buffer. - response.flushBuffer(); - } +flushBuffer(); +if (out != null) { +out.flush(); +// Also flush the response buffer. +response.flushBuffer(); } } @@ -225,17 +217,15 @@ * */ public void close() throws IOException { -synchronized (lock) { -if (response == null || closed) - // multiple calls to close is OK -return; -flush(); -if (out != null) -out.close(); -out = null; - closed = true; - //cb = null; -} +if (response == null || closed) +// multiple calls to close is OK +return; +flush(); +if (out != null) +out.close(); +out = null; +closed = true; +//cb = null; } /** @@ -257,20 +247,18 @@ * */ public void write(int c) throws IOException { -synchronized (lock) { -ensureOpen(); -if (bufferSize == 0) { -initOut(); -out.write(c); -} -
DO NOT REPLY [Bug 5762] - CGI servlet misses to include port number in HTTP_HOST environment variable
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=5762. 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=5762 CGI servlet misses to include port number in HTTP_HOST environment variable --- Additional Comments From [EMAIL PROTECTED] 2002-03-31 20:51 --- Created an attachment (id=1452) atch to handle HTTP_HOST with the general rule for other HTTP_* variables -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 5762] - CGI servlet misses to include port number in HTTP_HOST environment variable
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=5762. 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=5762 CGI servlet misses to include port number in HTTP_HOST environment variable --- Additional Comments From [EMAIL PROTECTED] 2002-03-31 20:52 --- Lines 1100 - 1105 seem to actively strip out the port number. Not sure why this is done...if there are no objections I'll submit the attached patch to handle HTTP_HOST with the general rule for other HTTP_* variables. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
APJ port
A question on the APJ connector.. how does Apache know that APJ is listening on port 8009? For WARP, ist quite clear.. we have a WebAppConnection directive... __ Do You Yahoo!? Yahoo! Greetings - send holiday greetings for Easter, Passover http://greetings.yahoo.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: APJ port
Hi, it's defined in a properties file (workers.properties) pointed to by the JkWorkersFile directive of mod_jk. The content of mine is: workers.tomcat_home=/JBoss-2.4.4_Tomcat-4.0.1/catalina workers.java_home=/jdk ps=/ worker.list=ajp13 # Definition for Ajp13 worker # worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 Cheers, Janos | -Original Message- | From: Sam Ewing [mailto:[EMAIL PROTECTED]] | Sent: Sunday, March 31, 2002 11:51 PM | To: Tomcat Developers List | Subject: APJ port | | | A question on the APJ connector.. how does Apache know | that APJ is listening on port 8009? | | For WARP, ist quite clear.. we have a WebAppConnection | directive... | | | | __ | Do You Yahoo!? | Yahoo! Greetings - send holiday greetings for Easter, Passover | http://greetings.yahoo.com/ | | -- | 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]
cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 CoyoteProcessor.java
remm02/03/31 15:37:37 Modified:coyote/src/java/org/apache/coyote/tomcat4 CoyoteProcessor.java Log: - Optimize host header parsing. Revision ChangesPath 1.18 +54 -29 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java Index: CoyoteProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- CoyoteProcessor.java 19 Mar 2002 20:34:41 - 1.17 +++ CoyoteProcessor.java 31 Mar 2002 23:37:37 - 1.18 @@ -1,6 +1,6 @@ -/* * $Header: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java,v 1.17 2002/03/19 20:34:41 remm Exp $ - * $Revision: 1.17 $ - * $Date: 2002/03/19 20:34:41 $ +/* * $Header: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java,v 1.18 2002/03/31 23:37:37 remm Exp $ + * $Revision: 1.18 $ + * $Date: 2002/03/31 23:37:37 $ * * * @@ -84,6 +84,7 @@ import javax.servlet.http.HttpServletResponse; import org.apache.tomcat.util.buf.ByteChunk; +import org.apache.tomcat.util.buf.HexUtils; import org.apache.tomcat.util.buf.MessageBytes; import org.apache.tomcat.util.http.Cookies; import org.apache.tomcat.util.http.ServerCookie; @@ -119,7 +120,7 @@ * * @author Craig R. McClanahan * @author Remy Maucherat - * @version $Revision: 1.17 $ $Date: 2002/03/19 20:34:41 $ + * @version $Revision: 1.18 $ $Date: 2002/03/31 23:37:37 $ */ final class CoyoteProcessor @@ -292,6 +293,12 @@ private int status = Constants.PROCESSOR_IDLE; +/** + * Host name. + */ +private char[] hostName = new char[128]; + + // Adapter Methods @@ -416,7 +423,7 @@ } } -parseHost(); +parseHost(req); parseCookies(req); } @@ -425,38 +432,59 @@ /** * Parse host. */ -protected void parseHost() +protected void parseHost(Request req) throws IOException { -String value = request.getHeader(host); -if (value != null) { -int n = value.indexOf(':'); -if (n 0) { +MessageBytes valueMB = req.getMimeHeaders().getValue(host); +ByteChunk valueBC = null; +if (valueMB != null) { +valueBC = valueMB.getByteChunk(); +byte[] valueB = valueBC.getBytes(); +int valueL = valueBC.getLength(); +int valueS = valueBC.getStart(); +int colonPos = -1; +if (valueL hostName.length) { +hostName = new char[valueL]; +} +for (int i = 0; i valueL; i++) { +char b = (char) valueB[i + valueS]; +if (b == ':') { +colonPos = i; +break; +} +hostName[i] = b; +} +if (colonPos 0) { if (connector.getScheme().equals(http)) { request.setServerPort(80); } else if (connector.getScheme().equals(https)) { request.setServerPort(443); } -if (proxyName != null) +if (proxyName != null) { request.setServerName(proxyName); -else -request.setServerName(value); +} else { +request.setServerName(new String(hostName, 0, valueL)); +} } else { -if (proxyName != null) +if (proxyName != null) { request.setServerName(proxyName); -else -request.setServerName(value.substring(0, n).trim()); -if (proxyPort != 0) +} else { +request.setServerName(new String(hostName, 0, colonPos)); +} +if (proxyPort != 0) { request.setServerPort(proxyPort); -else { -int port = 80; -try { -port = -Integer.parseInt(value.substring(n + 1).trim()); -} catch (Exception e) { -throw new IOException -(sm.getString - (coyoteProcessor.parseHeaders.portNumber)); +
cvs commit: jakarta-tomcat-4.0/jasper/src/bin jasper.bat jasper.sh
patrickl02/03/31 16:13:23 Modified:catalina/src/bin catalina.bat catalina.sh setclasspath.bat setclasspath.sh tool-wrapper.bat tool-wrapper.sh catalina/src/share/org/apache/catalina/startup Bootstrap.java Tool.java jasper/src/bin jasper.bat jasper.sh Log: Put jar files installed in the JDK's jre/lib/ext directory after the jar files and classes bundled with Tomcat. This is done by setting the java.ext.dirs property to a zero length string and by put the JDK's jre/lib/ext directory in Tomcat's class loader. This also fixes the problem that used to happen when you had the JSSE jars installed as a system extension and you had JSSE_HOME set. Revision ChangesPath 1.28 +9 -9 jakarta-tomcat-4.0/catalina/src/bin/catalina.bat Index: catalina.bat === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/catalina.bat,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- catalina.bat 19 Mar 2002 18:10:56 - 1.27 +++ catalina.bat 1 Apr 2002 00:13:23 - 1.28 @@ -28,12 +28,12 @@ rem system class path used to start Tomcat. rem rem JPDA_TRANSPORT (Optional) JPDA transport used when the jpda start -rem command is executed. The default is dt_shmem. +rem command is executed. The default is dt_socket. rem rem JPDA_ADDRESS(Optional) Java runtime options used when the jpda start -rem command is executed. The default is jdbconn. +rem command is executed. The default is 8000. rem -rem $Id: catalina.bat,v 1.27 2002/03/19 18:10:56 patrickl Exp $ +rem $Id: catalina.bat,v 1.28 2002/04/01 00:13:23 patrickl Exp $ rem --- rem Guess CATALINA_HOME if not defined @@ -91,10 +91,10 @@ if not %1 == jpda goto noJpda set JPDA=jpda if not %JPDA_TRANSPORT% == goto gotJpdaTransport -set JPDA_TRANSPORT=dt_shmem +set JPDA_TRANSPORT=dt_socket :gotJpdaTransport if not %JPDA_ADDRESS% == goto gotJpdaAddress -set JPDA_ADDRESS=jdbconn +set JPDA_ADDRESS=8000 :gotJpdaAddress shift :noJpda @@ -173,17 +173,17 @@ rem Execute Java with the applicable properties if not %JPDA% == goto doJpda if not %SECURITY_POLICY_FILE% == goto doSecurity -%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED_DIRS% -classpath %CLASSPATH% -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Djava.io.tmpdir=%CATALINA_TMPDIR% %MAINCLASS% %CMD_LINE_ARGS% %ACTION% +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED_DIRS% -Djava.ext.dirs=%JAVA_EXT_DIRS% -classpath %CLASSPATH% -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Djava.io.tmpdir=%CATALINA_TMPDIR% %MAINCLASS% %CMD_LINE_ARGS% %ACTION% goto end :doSecurity -%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED_DIRS% -classpath %CLASSPATH% -Djava.security.manager -Djava.security.policy==%SECURITY_POLICY_FILE% -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Djava.io.tmpdir=%CATALINA_TMPDIR% %MAINCLASS% %CMD_LINE_ARGS% %ACTION% +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED_DIRS% -Djava.ext.dirs=%JAVA_EXT_DIRS% -classpath %CLASSPATH% -Djava.security.manager -Djava.security.policy==%SECURITY_POLICY_FILE% -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Djava.io.tmpdir=%CATALINA_TMPDIR% %MAINCLASS% %CMD_LINE_ARGS% %ACTION% goto end :doJpda if not %SECURITY_POLICY_FILE% == goto doSecurityJpda -%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED_DIRS% -classpath %CLASSPATH% -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Djava.io.tmpdir=%CATALINA_TMPDIR% %MAINCLASS% %CMD_LINE_ARGS% %ACTION% +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED_DIRS% -Djava.ext.dirs=%JAVA_EXT_DIRS% -classpath %CLASSPATH% -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Djava.io.tmpdir=%CATALINA_TMPDIR% %MAINCLASS% %CMD_LINE_ARGS% %ACTION% goto end :doSecurityJpda -%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED_DIRS% -classpath %CLASSPATH% -Djava.security.manager -Djava.security.policy==%SECURITY_POLICY_FILE% -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME%
Re: servlet.jar, /ext, MANIFEST.MF
Christopher, I just committed the changes to the jakarta-tomcat-4.0 HEAD branch. Can you give it a try? With these changes, Tomcat should load its own bundled jar and class files before any of the jar files in the JDK's installed extensions are loaded. I tested this by putting servlet.jar in my JDK's jre/lib/ext directory and then inserted a broken version of the javax.servlet.http.HttpServlet class (my broken version extended Object and had no methods) into the jar so that if the servlet.jar in the JDK's jre/lib/ext directory is used, Tomcat will throw tons of exceptions. Let me know if you find any problems with my changes. Thanks, Patrick Christopher K. St. John wrote: Patrick Luby wrote: I can't help but think that there might be a way to point Tomcat to its bundled jars without losing access to any non-conflicting extensions. That would be better. (but the servletapi still should have the appropriate version info :-) ... have the class loaders in Bootstrap.java add the jars in the JVM's jre/lib/ext directory to the end of its search list. Hmm. To match the spec, I think there would need to be a new classloader on top of all of those. Something like: ExtClassLoader (pithed) | AppClassLoader (as normal) | Catalina /ext (new: loads /ext classes) | Common(as normal) ... Which means that stuff loaded from the classpath won't have access to extensions, so that's still not quite right. Since Tomcat closely controls what's on the classpath I'm not sure how much of an issues that is, but it's definitely a bit different than normal. I'd settle for just having Tomcat print an error message if there was a conflict, but if the classloader hacks can be made to work that would obviously be better. -- Patrick Luby Email: [EMAIL PROTECTED] Sun Microsystems Phone: 408-276-7471 901 San Antonio Road, USCA14-303 Palo Alto, CA 94303-4900 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 7652] New: - Tomcat stalls periodically
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=7652. 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=7652 Tomcat stalls periodically Summary: Tomcat stalls periodically Product: Tomcat 3 Version: 3.2.3 Final Platform: All OS/Version: Linux Status: NEW Severity: Critical Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I compiled and tested 5 servlets each of which uses a connection pool of inital size 5 (connecting to MySQL). They all worked fine. When I added the sixth one, the response was very slow and the request eventually timed out. Now, none of the servlets load. This happend recently and I had to restart tomcat. But I can't keep doing that. MySQL has max_connections set to 100, so I dont think thats the problem. Thanks Luanne -- 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/core StandardPipeline.java
remm02/03/31 20:19:55 Modified:catalina/src/share/org/apache/catalina/core StandardPipeline.java Log: - Use a note in the request instead of a ThreadLocal to keep track of the pipeline stage. Note: This could cause problems with a valve that would wrap the request, and not delegate the getNote method to the wrapped request. Revision ChangesPath 1.5 +25 -17 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardPipeline.java Index: StandardPipeline.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardPipeline.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- StandardPipeline.java 3 Jan 2002 01:52:14 - 1.4 +++ StandardPipeline.java 1 Apr 2002 04:19:54 - 1.5 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardPipeline.java,v 1.4 2002/01/03 01:52:14 craigmcc Exp $ - * $Revision: 1.4 $ - * $Date: 2002/01/03 01:52:14 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardPipeline.java,v 1.5 2002/04/01 04:19:54 remm Exp $ + * $Revision: 1.5 $ + * $Date: 2002/04/01 04:19:54 $ * * * @@ -100,6 +100,12 @@ implements Pipeline, Contained, Lifecycle, ValveContext { +// -- Constants + + +protected static final String STATE = pipelineState; + + // --- Constructors @@ -174,16 +180,6 @@ /** - * The per-thread execution state for processing through this pipeline. - * The actual value is a java.lang.Integer object containing the subscript - * into the codevalves/code array, or a subscript equal to - * codevalves.length/code if the basic Valve is currently being - * processed. - */ -protected ThreadLocal state = new ThreadLocal(); - - -/** * The set of Valves (not including the Basic one, if any) associated with * this Pipeline. */ @@ -477,7 +473,7 @@ throws IOException, ServletException { // Initialize the per-thread state for this thread -state.set(new Integer(0)); +request.setNote(STATE, new PipelineState()); // Invoke the first Valve in this pipeline for this request invokeNext(request, response); @@ -566,9 +562,9 @@ throws IOException, ServletException { // Identify the current subscript for the current request thread -Integer current = (Integer) state.get(); -int subscript = current.intValue(); -state.set(new Integer(subscript + 1)); +PipelineState pipelineState = (PipelineState) request.getNote(STATE); +int subscript = pipelineState.stage; +pipelineState.stage = pipelineState.stage + 1; // Invoke the requested Valve for the current request thread if (subscript valves.length) { @@ -625,6 +621,18 @@ ]: + message); throwable.printStackTrace(System.out); } + +} + + +// -- PipelineState Inner Class + + +protected class PipelineState { + + +int stage = 0; + } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3 CoyoteRequest.java
billbarker02/03/31 20:48:42 Modified:coyote/src/java/org/apache/coyote/tomcat3 CoyoteRequest.java Log: Port the optimized Host header parsing from tomcat4. Revision ChangesPath 1.8 +33 -10 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteRequest.java Index: CoyoteRequest.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteRequest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- CoyoteRequest.java17 Mar 2002 05:26:20 - 1.7 +++ CoyoteRequest.java1 Apr 2002 04:48:42 - 1.8 @@ -204,18 +204,41 @@ MessageBytes hH=getMimeHeaders().getValue(host); serverPort = socket.getLocalPort(); if (hH != null) { - // XXX use MessageBytes - String hostHeader = hH.toString(); - int i = hostHeader.indexOf(':'); - if (i -1) { - serverNameMB.setString( hostHeader.substring(0,i)); -hostHeader = hostHeader.substring(i+1); -try{ -serverPort=Integer.parseInt(hostHeader); + ByteChunk valueBC = hH.getByteChunk(); + byte [] valueB = valueBC.getBytes(); + int valueL = valueBC.getLength(); + int valueS = valueBC.getStart(); + int colonPos = -1; + for( int i = 0; i valueL; i++) { + byte b = valueB[i+valueS]; + if(b == ':') { + colonPos = i; + break; + } + } + if (colonPos -1) { + serverNameMB.setBytes( valueB, valueS, colonPos); + int port = 0; + int mult = 1; + try { + for(int i = colonPos+1; i valueL; i++) { + int charValue = HexUtils.DEC[(int)valueB[i+valueS]]; + if(charValue == -1) { + throw new NumberFormatException( + Invalid port number: + + valueB[i+valueS]); + } + port *= 10; + port += charValue; + } + serverPort = port; }catch(NumberFormatException nfe){ + contextM.log(Port Parsing error, nfe); } - }else serverNameMB.setString( hostHeader); -return; + }else { + serverNameMB.setBytes(valueB, valueS, valueL); + } + return; } if( localHost != null ) { serverNameMB.setString( localHost ); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/catalina/src/bin digest.sh
patrickl02/03/31 21:50:57 Modified:catalina/src/bin digest.sh Log: Correct typo in comment Revision ChangesPath 1.7 +2 -2 jakarta-tomcat-4.0/catalina/src/bin/digest.sh Index: digest.sh === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/digest.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- digest.sh 15 Jan 2002 02:55:38 - 1.6 +++ digest.sh 1 Apr 2002 05:50:57 - 1.7 @@ -1,8 +1,8 @@ #!/bin/sh # - -# Script to digest password using the algorithm specificied +# Script to digest password using the algorithm specified # -# $Id: digest.sh,v 1.6 2002/01/15 02:55:38 patrickl Exp $ +# $Id: digest.sh,v 1.7 2002/04/01 05:50:57 patrickl Exp $ # - # resolve links - $0 may be a softlink -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3 CoyoteInterceptor.java
billbarker02/03/31 21:53:20 Modified:coyote/src/java/org/apache/coyote/tomcat3 CoyoteInterceptor.java Log: Allow the Processor to be set by the server.xml. This is currently useless, since o.a.c.http11.Http11Processor is the only class that qualifies. But it allows for future developement of e.g. Ajp13Processor that can re-use this code (at least for initial testing). Revision ChangesPath 1.7 +6 -0 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor.java Index: CoyoteInterceptor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- CoyoteInterceptor.java20 Mar 2002 05:35:53 - 1.6 +++ CoyoteInterceptor.java1 Apr 2002 05:53:19 - 1.7 @@ -147,6 +147,12 @@ maxKeepAliveRequests = mkar; } +/** Set the class of the processor to use. + */ +public void setProcessorClassName(String pcn) { + processorClassName = pcn; +} + public void setSocketCloseDelay( int d ) { socketCloseDelay=d; } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: servlet.jar, /ext, MANIFEST.MF
Christopher, I just committed the changes to the jakarta-tomcat-4.0 HEAD branch. Can you give it a try? With these changes, Tomcat should load its own bundled jar and class files before any of the jar files in the JDK's installed extensions are loaded. I tested this by putting servlet.jar in my JDK's jre/lib/ext directory and then inserted a broken version of the javax.servlet.http.HttpServlet class (my broken version extended Object and had no methods) into the jar so that if the servlet.jar in the JDK's jre/lib/ext directory is used, Tomcat will throw tons of exceptions. I get a classcast on JAXP with those changes on JDK 1.4 (fixed by removing Xerces from endorsed). Getting the CL to work right is tricky, and I'm not terribly interested in supporting playing with the system extensions. So unless it is easy to fix, I'm not sure it's a good idea to go through the whole debugging process for the CL *again*. Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Question: does Tomcat4 manage jsp/servlet threads?
Hi, everyone, I need some help on Tomcat 4 architecture. Does Tomcat 4 manage jsp/servlet threads? For example, can it report condition of those threads, stop dead thread and release resource, etc? And, does it use thread pool? Thanks. I have to know this before I have time to read its source code. :-( Regards, Hugh __ Do You Yahoo!? Yahoo! Greetings - send holiday greetings for Easter, Passover http://greetings.yahoo.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]