Re: Database connections aren't being released...
Richard Road Runner wrote: I am not sure that this is a Tomcat issue, but we are not sure what exactly is causing our problem. We are running Tomcat 5.0.27. We are using the most recent jconn2.jar driver to connect to a Sybase SQL Anywhere Studio 7 database via JDBC. Over a period of time, the number of connections to the database continues to increase far beyond the possible number of users. The only way to close the connections is to restart the database server. Again, we are not sure if we should be looking at Tomcat, the JDBC driver, or Sybase to solve this problem. Your web app is not properly closing connections (resources, in general). Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with tomcat configuration
Hi all, I manged to configure https on tomcat 5.5.9 with a passord different than changeit. It's working.But i tried to configure https on port 80 (i am running tomcat as root user). but when i point the browser to the system like https://localhost/ I am getting an error indicating that connection refused by the https server, but if we pint the browser like https://localhost:80/ it's working fine. but i want it in the former way. How can i do that? regards vineesh
Re: Problem with tomcat configuration
https is port 443. You need to to uncomment the HTTP 1.1 connector for 8443 and change the port to 443. Uncomment the following connector in server.xml: !-- Define a SSL HTTP/1.1 Connector on port 8443 -- !-- Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS / -- Change the port to 443. Read the documentation concerning the attributes (especially the sslProtocol and clientAuth). /mde/ --- vineesh kumar [EMAIL PROTECTED] wrote: Hi all, I manged to configure https on tomcat 5.5.9 with a passord different than changeit. It's working.But i tried to configure https on port 80 (i am running tomcat as root user). but when i point the browser to the system like https://localhost/ I am getting an error indicating that connection refused by the https server, but if we pint the browser like https://localhost:80/ it's working fine. but i want it in the former way. How can i do that? regards vineesh __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to disable jk2 and enable jk1 on Tomcat5 with Apache 1.3
On Tomcat startup there is info message that indicates that tomcat starts using jk2. As I understand, that cames from that line in server.xml: Connector port=8009 enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 / How to disable jk2 and prevent tomcat to use jk1.2 ?
Re: sharing session information across tomcats on different machines
Use session replication with Tomcat Clustering and mod_jk loadbalancing http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html Peter Mark schrieb: Is there any possibility for tomcats on separate machines to share session information. I am looking into load balancing a few tomcats with an apache in front of them. In other words, the setup will be internet - Apache(s) - Tomcats Is it possible for this type of scenario to exist, and sesion information be shared? Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: custom session manager
-Ursprüngliche Nachricht- Von: Leon Rosenberg [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 6. Oktober 2005 07:43 An: Tomcat Users List; Mark Betreff: Re: custom session manager On 10/6/05, Mark [EMAIL PROTECTED] wrote: basically, I want to prevent users from logging in and creating a second session if a valid session for that user already exists. For instance. 1. Log in to my web app, session is created 2. browse around in my web app 3. close browser, do not logout 4. Start browser up again 5. try and log in 6. Do not allow login, have user 'reconnect' to the old session created in step 1. I have written quite a few web based apps, and I know of no way to kill the session at step 3. pretty easy, set session timeout to 1 minute and integrate a hidden frame or javascript-loaded-image in your application that reloads all 30 seconds. 60-99 seconds after the user closed his browser the session would be killed. Or, cou could add a static hashmap to your Servlet (or a bean if using JSPs) where you simply add the sessions with every request. You would have to put an attribute implementing javax.servlet.http.HttpSessionActivationListener in each session though, that removes the session from your hashmap when the session is expired or you will end up with having many invalid entries in your hashmap. (And I don't even know what happens if you keep the references to those Session objects when they are recycled by tomcat) We do this to keep track of our sessions within the application. A quick google revealed http://www.jguru.com/faq/view.jsp?EID=12141 with example code. Once you have the list of sessions, it should be easy to expire the old ones for the same user... Though this will allow you to have only one session per user, it will not kill the session immediately after step 3. Using the reload as described above will do that, but prevents you from having a security-logout if the user just has his browser open all day (without actually doing anything). Hth, Tobias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wish: add a header in mail subject
It would be nice if this mailing-list could add a header to mails, something like [TC-user]. The announcement has the [ANN] header, so I think it won't be a problem for this to have a header. Regards, Seak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why is 5.5.12 alpha?
Hello, I searched the mail archives for the voting of 5.5.12 alpha to see the reason why it is marked as alpha but I couldn't find the mails. Can somebody tell me why it is alpha? It contains some bugfixes which might help me in my clustered application, but I'm afraid of other known bugs, because it is called alpha. Ronald.
Re: Why is 5.5.12 alpha?
Am Donnerstag, 6. Oktober 2005 11:00 schrieb Ronald Klop: I searched the mail archives for the voting of 5.5.12 alpha to see the reason why it is marked as alpha but I couldn't find the mails. Can somebody tell me why it is alpha? It contains some bugfixes which might help me in my clustered application, but I'm afraid of other known bugs, because it is called alpha. On the Tomcat Developers list there is at the moment a voting in progress wether 5.5.12 should be considered stable. All the votes I've seen were stable - no major issues. So chances are 5.5.12 will become the official stable release of the 5.5.x branch in the next few days. BTW: I have found 5.5.12 pretty stable myself. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wish: add a header in mail subject
If what you are after is a way to filter messages then use a good email client and filter on the message header List-Id. For this list it is set to: List-Id: Tomcat Users List tomcat-user.jakarta.apache.org Seak, Teng-Fong wrote: It would be nice if this mailing-list could add a header to mails, something like [TC-user]. The announcement has the [ANN] header, so I think it won't be a problem for this to have a header. Regards, Seak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cannot setup JNDI with MySQL
Hello I've been trying to setup a mysql connection pool using JNDI as shown in http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html But no luck. I never get to see the datasource registered Tomcat Administration Tool. I've included in server.xml the following lines somewhere inside the Host .. /Host DefaultContext Resource name=jdbc/DBTest auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/dea?autoReconnect=true/value /parameter parameter nameusername/name valuemyusername/value /parameter parameter namepassword/name valuemypassword/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value40/value /parameter /ResourceParams /DefaultContext I have Tomcat/5.0.28 And the following files in common\lib mysql-connector-java-3.1.10-bin.jar commons-collections-3.1.jar commons-dbcp-1.2.1.jar commons-pool-1.2.jar * *What I get in tomcat\logs\stdout.log is: NotifyUtil::java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148) at java.net.Socket.connect(Socket.java:425) at java.net.Socket.connect(Socket.java:375) at sun.net.NetworkClient.doConnect(NetworkClient.java:139) at sun.net.www.http.HttpClient.openServer(HttpClient.java:366) at sun.net.www.http.HttpClient.openServer(HttpClient.java:582) at sun.net.www.http.HttpClient.init(HttpClient.java:292) at sun.net.www.http.HttpClient.init(HttpClient.java:253) at sun.net.www.http.HttpClient.New(HttpClient.java:321) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:301) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:469) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:460) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:516) at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:237) What did I miss? I've even tried setting up the JNDI in the conf\Catalina\localhost\myapp.xml And also tried Context path=/myapp docBase=app instead of DefaultContext I also tried all that with the org.gjt.mm.mysql.Driver Regards, I. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: custom session manager
On 10/6/05, Tobias Meyer [EMAIL PROTECTED] wrote: Or, cou could add a static hashmap to your Servlet (or a bean if using JSPs) where you simply add the sessions with every request. You would have to put an attribute implementing javax.servlet.http.HttpSessionActivationListener in each session though, that removes the session from your hashmap when the session is expired or you will end up with having many invalid entries in your hashmap. (And I don't even know what happens if you keep the references to those Session objects when they are recycled by tomcat) We do this to keep track of our sessions within the application. If you keep your sessions in a hashmap forever they will never be freed by the garbage collector and you will end with an outofmemory error one day. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot setup JNDI with MySQL
John, Possibly the following will help as it is listed in the 5.5 JDBC DataSource html page in the User guide: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html Please note that JNDI resource configuration has changed somewhat between Tomcat 5.0.x and Tomcat 5.5.x. You will most likely need to modify your JNDI resource configurations to match the syntax in the example below in order to make them work in Tomcat 5.5.x With that said you can replace your specified parameters with the following from the mysql section of that page. Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=javauser password=javadude driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/javatest?autoReconnect=true/ Hope this helps - andy John Cherouvim [EMAIL PROTECTED] wrote: Hello I've been trying to setup a mysql connection pool using JNDI as shown in http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html But no luck. I never get to see the datasource registered Tomcat Administration Tool. I've included in server.xml the following lines somewhere inside the .. factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName com.mysql.jdbc.Driver url jdbc:mysql://localhost:3306/dea?autoReconnect=true username myusername password mypassword maxActive 20 maxIdle 10 maxWait 40 I have Tomcat/5.0.28 And the following files in common\lib mysql-connector-java-3.1.10-bin.jar commons-collections-3.1.jar commons-dbcp-1.2.1.jar commons-pool-1.2.jar * *What I get in tomcat\logs\stdout.log is: NotifyUtil::java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148) at java.net.Socket.connect(Socket.java:425) at java.net.Socket.connect(Socket.java:375) at sun.net.NetworkClient.doConnect(NetworkClient.java:139) at sun.net.www.http.HttpClient.openServer(HttpClient.java:366) at sun.net.www.http.HttpClient.openServer(HttpClient.java:582) at sun.net.www.http.HttpClient.(HttpClient.java:292) at sun.net.www.http.HttpClient.(HttpClient.java:253) at sun.net.www.http.HttpClient.New(HttpClient.java:321) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:301) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:469) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:460) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:516) at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:237) What did I miss? I've even tried setting up the JNDI in the conf\Catalina\localhost\myapp.xml And also tried instead of I also tried all that with the org.gjt.mm.mysql.Driver Regards, I. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort.
Re: cannot setup JNDI with MySQL
One more thing and i may have missed it in your note: Did you say you placed mysql's jar file in the common\lib directory ? John Cherouvim [EMAIL PROTECTED] wrote:Hello I've been trying to setup a mysql connection pool using JNDI as shown in http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html But no luck. I never get to see the datasource registered Tomcat Administration Tool. I've included in server.xml the following lines somewhere inside the .. factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName com.mysql.jdbc.Driver url jdbc:mysql://localhost:3306/dea?autoReconnect=true username myusername password mypassword maxActive 20 maxIdle 10 maxWait 40 I have Tomcat/5.0.28 And the following files in common\lib mysql-connector-java-3.1.10-bin.jar commons-collections-3.1.jar commons-dbcp-1.2.1.jar commons-pool-1.2.jar * *What I get in tomcat\logs\stdout.log is: NotifyUtil::java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148) at java.net.Socket.connect(Socket.java:425) at java.net.Socket.connect(Socket.java:375) at sun.net.NetworkClient.doConnect(NetworkClient.java:139) at sun.net.www.http.HttpClient.openServer(HttpClient.java:366) at sun.net.www.http.HttpClient.openServer(HttpClient.java:582) at sun.net.www.http.HttpClient.(HttpClient.java:292) at sun.net.www.http.HttpClient.(HttpClient.java:253) at sun.net.www.http.HttpClient.New(HttpClient.java:321) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:301) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:469) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:460) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:516) at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:237) What did I miss? I've even tried setting up the JNDI in the conf\Catalina\localhost\myapp.xml And also tried instead of I also tried all that with the org.gjt.mm.mysql.Driver Regards, I. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort.
Re: Problem with tomcat configuration
On Thu, Oct 06, 2005 at 12:14:58AM -0700, Mark Eggers wrote: https is port 443. You need to to uncomment the HTTP 1.1 connector for 8443 and change the port to 443. Uncomment the following connector in server.xml: !-- Define a SSL HTTP/1.1 Connector on port 8443 -- !-- Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS / -- Change the port to 443. Read the documentation concerning the attributes (especially the sslProtocol and clientAuth). Maybe, but https ins predefined in your browser to use port 443, so if you use https://localhost/ you must ensure, that you have tomcat running on this special machine. Other question if I use apache with mod_jk and ajp13 connector like that: Connector port=8009 enableLookups=false redirectPort=8443 debug=9 minProcessors=50 maxProcessors=500 protocol=AJP/1.3 / then all https requests would be inside the tomcat service redirected to port 8443? browser-apache-via ajp13-tomcat(8009)-redirect-tomcat(8443) right? Marcus --- vineesh kumar [EMAIL PROTECTED] wrote: Hi all, I manged to configure https on tomcat 5.5.9 with a passord different than changeit. It's working.But i tried to configure https on port 80 (i am running tomcat as root user). but when i point the browser to the system like https://localhost/ I am getting an error indicating that connection refused by the https server, but if we pint the browser like https://localhost:80/ it's working fine. but i want it in the former way. How can i do that? regards vineesh __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Those who hate and fight must stop themselves -- otherwise it is not stopped. -- Spock, Day of the Dove, stardate unknown - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mysql connection with JSP
Hi everybody I want to connect a mysql database with jsp code. Can anybody help me to write a connection string. Thx. Cengiz YAZGAN Sistem Mühendisi/System Engineer DorukNet Tel / Phone : +90 212 326 92 00 / 447 Fax : +90 212 227 28 11 E-mail : [EMAIL PROTECTED] http://www.doruk.net.tr http://www.doruk.net.tr/english.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot setup JNDI with MySQL
John Cherouvim wrote: I've been trying to setup a mysql connection pool using JNDI as shown in http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html But no luck. *What I get in tomcat\logs\stdout.log is: NotifyUtil::java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) A Connection refused sounds like your driver config is fine but either MySQL isn't running, it's configured with skip-networking, or you've got a firewall/iptables/whatever issue. Can you connect (`telnet localhost 3306`) from the command line? -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot setup JNDI with MySQL
The problem is not JDNI. The problem is you can't connect to MySQL. Probably it's you have to check your MySQL access permissions... Can you connect to MySQL using the same parameters with another tool like MySQL Control Center? - Original Message - From: John Cherouvim [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Thursday, October 06, 2005 11:17 AM Subject: cannot setup JNDI with MySQL Hello I've been trying to setup a mysql connection pool using JNDI as shown in http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html But no luck. I never get to see the datasource registered Tomcat Administration Tool. I've included in server.xml the following lines somewhere inside the Host .. /Host DefaultContext Resource name=jdbc/DBTest auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/dea?autoReconnect=true/value /parameter parameter nameusername/name valuemyusername/value /parameter parameter namepassword/name valuemypassword/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value40/value /parameter /ResourceParams /DefaultContext I have Tomcat/5.0.28 And the following files in common\lib mysql-connector-java-3.1.10-bin.jar commons-collections-3.1.jar commons-dbcp-1.2.1.jar commons-pool-1.2.jar * *What I get in tomcat\logs\stdout.log is: NotifyUtil::java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148) at java.net.Socket.connect(Socket.java:425) at java.net.Socket.connect(Socket.java:375) at sun.net.NetworkClient.doConnect(NetworkClient.java:139) at sun.net.www.http.HttpClient.openServer(HttpClient.java:366) at sun.net.www.http.HttpClient.openServer(HttpClient.java:582) at sun.net.www.http.HttpClient.init(HttpClient.java:292) at sun.net.www.http.HttpClient.init(HttpClient.java:253) at sun.net.www.http.HttpClient.New(HttpClient.java:321) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:301) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:469) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:460) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:516) at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:237) What did I miss? I've even tried setting up the JNDI in the conf\Catalina\localhost\myapp.xml And also tried Context path=/myapp docBase=app instead of DefaultContext I also tried all that with the org.gjt.mm.mysql.Driver Regards, I. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Modjk and Tomcat 5.5.4 problem
On Wed, Oct 05, 2005 at 04:24:08PM -0700, Rick wrote: We had an issue where it seemed like it would crash using mod_jk, the trouble was the connections were not letting go. By default, I think the timeout is infinite, so after setting the property: connectionTimeout, in the server.xml's connector descriptor as follows, Connector port= protocol=AJP/1.3 connectionTimeout=6 .../ The old connections would get cleaned up and we stopped having problems, however, I'm not sure this was the correct way to do this, seems to work. Hi, but concerning to the documentation connectionTimeout is the amount of time between opening the session and receiving the URI to process. So your connector would wait 60 seconds for an empty request before it would cut off the connection. I for example have the interesting behaviour that I have idle connections running for hours and hours which I would like to end but do not know how. Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot setup JNDI with MySQL
Thanks for your answers. I can connect to MySQL using any mysql tool and even with telnet localhost 3306 from the command line. I even tried connecting to another mysql server running on another pc in my LAN but nothing. @andy: yes I have placed mysql-connector-java-3.1.10-bin.jar in common\lib and I also tried with different (older) versions. I've been leaving only one of them of course each time I tried. I finally managed to solve the problem. I needed to place: Resource name=jdbc/TestDB type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter nameurl/name valuejdbc:mysql://localhost:3306/dea?autoReconnect=true/value /parameter parameter namepassword/name valuejohn/value /parameter parameter namemaxActive/name value4/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name valuejohn/value /parameter /ResourceParams somewhere in the GlobalNamingResources element of my server.xml. The tutorial at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html says: Add this in between the |/Context| tag of the examples context and the |/Host| tag closing the localhost definition. Which I cannot understand where exctly it means. I was always trying to place it somewhere inside the Host element which was not working for me. I solved the problem by adding the DataSource from the administration tool of tomcat and then I went to server.xml to see how it did it. Regards, J. Hassan Schroeder wrote: John Cherouvim wrote: I've been trying to setup a mysql connection pool using JNDI as shown in http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html But no luck. *What I get in tomcat\logs\stdout.log is: NotifyUtil::java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) A Connection refused sounds like your driver config is fine but either MySQL isn't running, it's configured with skip-networking, or you've got a firewall/iptables/whatever issue. Can you connect (`telnet localhost 3306`) from the command line? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: custom session manager
-Ursprüngliche Nachricht- Von: Leon Rosenberg [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 6. Oktober 2005 11:20 An: Tomcat Users List Betreff: Re: custom session manager On 10/6/05, Tobias Meyer [EMAIL PROTECTED] wrote: Or, cou could add a static hashmap to your Servlet (or a bean if using JSPs) where you simply add the sessions with every request. You would have to put an attribute implementing javax.servlet.http.HttpSessionActivationListener in each session though, that removes the session from your hashmap when the session is expired or you will end up with having many invalid entries in your hashmap. (And I don't even know what happens if you keep the references to those Session objects when they are recycled by tomcat) We do this to keep track of our sessions within the application. If you keep your sessions in a hashmap forever they will never be freed by the garbage collector and you will end with an outofmemory error one day. That's why I said you need one Attribute that implements the HttpSessionActivationListener, which, on second thought , was wrong - you need to implement HttpSessionBindingListener. The Method public void valueUnbound(HttpSessionBindingEvent event) will get called automatically when the session expires, and you can add code that removes the session from the hashmap. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why Tomcat return me a OLD version of my doc.jar ?
Hi all, ¿Can anyone explain it , please? I use Tomcat 5.5 as server pages html with an 'Applet' that uses a 'doc.jar' I have placed two connector tags in 'server.xml' file to use ports :80 y :8080 in the same way I Have fixed bugs from mi 'doc.jar' (v1) to a new version with the same name 'doc.jar' (v2) and now, (using IExplorer): OK: _http://expresiongrafica.caminos.upm.es:8080/PAU/PAU-Septiembre2005-C2.html return de rigth 'doc.jar' (v2) BUT: _http://expresiongrafica.caminos.upm.es:80/PAU/PAU-Septiembre2005-C2.html o _http://expresiongrafica.caminos.upm.es/PAU/PAU-Septiembre2005-C2.html return me the OLD VERSION of 'doc.jar' (v1) with the old bugs, as I deduct from the 'Java Console' OK also _http://localhost /PAU/AppletDoc.html (or 127.0.0.1) _http://localhost:80/PAU/AppletDoc.html _http://localhost:8080/PAU/AppletDoc.html _http://localhost:8080/PAU/AppletDoc.html BUT _http://138.100.67.143:8080/PAU/AppletDoc.html OK _http://138.100.67.143 /PAU/AppletDoc.html (o :80) BAD, v1 How can I destroy the old version? where is it? What is it happening? regards amadeo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot setup JNDI with MySQL
Hmmm... I haven't read that tutorial in a while but if that's what it says, it's wrong. The Resource and ResourceParams elements should be placed between Context and /Context tags of your context xml file. That would make the resource only available to that one application as opposed to being available to all webapps in that Tomcat instance. --David John Cherouvim wrote: Thanks for your answers. I can connect to MySQL using any mysql tool and even with telnet localhost 3306 from the command line. I even tried connecting to another mysql server running on another pc in my LAN but nothing. @andy: yes I have placed mysql-connector-java-3.1.10-bin.jar in common\lib and I also tried with different (older) versions. I've been leaving only one of them of course each time I tried. I finally managed to solve the problem. I needed to place: Resource name=jdbc/TestDB type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter nameurl/name valuejdbc:mysql://localhost:3306/dea?autoReconnect=true/value /parameter parameter namepassword/name valuejohn/value /parameter parameter namemaxActive/name value4/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name valuejohn/value /parameter /ResourceParams somewhere in the GlobalNamingResources element of my server.xml. The tutorial at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html says: Add this in between the |/Context| tag of the examples context and the |/Host| tag closing the localhost definition. Which I cannot understand where exctly it means. I was always trying to place it somewhere inside the Host element which was not working for me. I solved the problem by adding the DataSource from the administration tool of tomcat and then I went to server.xml to see how it did it. Regards, J. Hassan Schroeder wrote: John Cherouvim wrote: I've been trying to setup a mysql connection pool using JNDI as shown in http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html But no luck. *What I get in tomcat\logs\stdout.log is: NotifyUtil::java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) A Connection refused sounds like your driver config is fine but either MySQL isn't running, it's configured with skip-networking, or you've got a firewall/iptables/whatever issue. Can you connect (`telnet localhost 3306`) from the command line? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === David Smith Network Operations Supervisor Department of Entomology College of Agriculture Life Sciences Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: 607.255.9571 Fax: 607.255.0939 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Tomcat sources moved to Subversion
Just a quick reminder: if you want to track HEAD, then you would checkout trunk. For example: svn co https://svn.apache.org/repos/asf/tomcat/connectors/trunk/ tomcat-connectors would create a tomcat-connectors directory that stores the development HEAD. If you skip appending the '/trunk/' to the URL, you get a LARGE tree, with HEAD, all branches and tags. For those new to SVN, this may be confusing. On Oct 5, 2005, at 9:27 PM, Yoav Shapira wrote: Hi, FYI, the Tomcat source code has been moved to Apache's Subversion (SVN) repository. The old CVS repositories are now locked down: they can still be used for checking out code, but no further work will be done in them. For details on how to work with SVN, please see http://www.apache.org/dev/version-control.html. Please note that we are still verifying some of the build scripts to make sure they work in the new structure. Thanks, Yoav --- Henri Yandell [EMAIL PROTECTED] wrote: Date: Wed, 5 Oct 2005 21:17:10 -0400 From: Henri Yandell [EMAIL PROTECTED] To: Tomcat Developers List tomcat-dev@jakarta.apache.org Subject: Re: CVS-SVN Schedule On 10/2/05, Mark Thomas [EMAIL PROTECTED] wrote: Mark Thomas wrote: Mladen Turk wrote: Can somebody make a firm statement on the timings? 1. Until when (Date:Hour:Minute) commits could be done 2. Wen the CVS will be locked for commit (same format) This is now set for Wednesday 5th October 2005 at 8pm US Eastern time. It should be completed by 11pm US Eastern time. All done :) http://svn.apache.org/repos/asf/tomcat/connectors/ http://svn.apache.org/repos/asf/tomcat/jasper/ http://svn.apache.org/repos/asf/tomcat/container/catalina/ http://svn.apache.org/repos/asf/tomcat/container/tc5/ svn co https://svn.apache.org/repos/asf/tomcat/connectors/ jakarta-tomcat-connectors svn co https://svn.apache.org/repos/asf/tomcat/jasper/ jakarta- tomcat-jasper svn co https://svn.apache.org/repos/asf/tomcat/container/catalina/ jakarta-tomcat-catalina svn co https://svn.apache.org/repos/asf/tomcat/container/tc5/ jakarta-tomcat-5 I'll keep checking email and the jira entry on and off tonight in case there are problems. CVS is locked down, all commits should goto tomcat-dev, Mark's modification scripts are all successfully run and read/write is set to anyone in tomcat (in the asf-authorization file that Remy can edit). Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Context path changes in context.xml not working
I did a bunch of googling before posting my question, but never came across that post; thanks for listing it; it appears to be exactly what I need. Dave Caldarale, Charles R wrote: From: David Kerber [EMAIL PROTECTED] Subject: Re: Context path changes in context.xml not working Nobody has any suggestions about setting up a 2-level context path *without* putting it in the server.xml (it works fine in there)? I thought I remembered something about this, and went googling for the issue. Take a look at: http://marc.theaimsgroup.com/?l=tomcat-userm=110989168604231w=2 If you put your Context fragment in conf/[enginename]/[hostname]/dir1#dir2#appname.xml you can access the webapp via http://[hostname]/dir1/dir2/appname, which I think is what you want. Haven't been able to find this in the Tomcat doc yet, but I did test it successfully on 5.5.9. Have no idea if this trick with the # would work on the name of a .war file. - Chuck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: precompiling JSPs -- how to resolve references normally resolved by apache?
Unless you have a directory ${TOP}/web/html/jsp/jsp your uribase/uriroot probably aren't right. [EMAIL PROTECTED] wrote: Hi, I am trying to get our JSPs to be precompiled as part of our ant build process to catch all syntax errors at compile time. The problem I have run into is that we are using apache + tomcat and we have set the following rules in apache httpd. conf: JkMount /servlets/* ajp13 JkMount /jsp/* ajp13 JkMount /controller/* cont JkMount /cgi-bin/java-rmi.cgi ajp13 Inside some of our servlets and JSPs, they refer to other jsps using the absolute URL /jsp/ which works in deployed environment because apache redirects it. For example, in one JSP we have %@ include file=/jsp/Header.jsp % I setup the tomcat-4.1.30 ant jspc task and it was giving a NPE. Then I tried the Ant Jspc optional task, and it gave me an error message: the file '\Status.jsp' generated the following general exceptionn: org.apache.jasper.JasperExeption: /Status.jsp(3,0) File /jsp/Header.jsp not found Is there any quick and dirty way to get the JspC to resolve the /jsp/*.jsp urls to *.jsp or is there no way? My alternative is to try to change all the /jsp/*.jsp references to *.jsp everywhere we do an %@ include % or jsp:include/ or jsp:forward/. I think that would be ok since those directices are handled on the tomcat side. Changing it would be kind of messy since we have a ton of JSPs in a large directory hierarchy, so some of those /jsp/Header.jsp references would have to be changed to ../../Header.jsp, etc. I know I can't get away from the /jsp mapping completely because we have URLs and HTTP redirects which depend on it. Here is the quick and dirty jspc ant target I created: jspc srcdir=${TOP}/web/html/jsp uribase=${TOP}/web/html/jsp uriroot=${TOP}/web/html/jsp destdir=${TMP_DIR}/WEB-INF/src compiler=jasper41 verbose=9 include name=*.jsp/ classpath !--todo: including all the tomcat jars, overkill i know...-- fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\bin include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\common\endorsed include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\common\lib include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\shared\lib include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\server\lib include name=*.jar/ /fileset !-- project classes and external 3rd party jar files -- pathelement path=${CLASS_DIR}/ filelist refid=active.external.jar.filelist/ /classpath /jspc Thanks for any advice, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SQL Server 2000: JDBC
Hi, Generally this error occurs when the connection between tomcat and the database is down, or the connection object is using a connection that is poor. For instance, if your tomcat is running, and for some reason, the database goes down and then restart, you will receive this error. So, before sending a sql command, you should test if the connection is good. If it isn't, kill it and start another one. I'm not sure, but if you use dbcp it will do it for you. Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mysql connection with JSP
jdbc:mysql://hostname:3306/database?user=usernamepassword=password However on a design front I would never personally look up a database connection in a JSP. Others may disagree. -Original Message- From: Cengiz Yazgan [mailto:[EMAIL PROTECTED] Sent: 06 October 2005 11:46 To: 'Tomcat Users List'; 'Tomcat Users List' Subject: mysql connection with JSP Hi everybody I want to connect a mysql database with jsp code. Can anybody help me to write a connection string. Thx. Cengiz YAZGAN Sistem Mühendisi/System Engineer DorukNet Tel / Phone : +90 212 326 92 00 / 447 Fax : +90 212 227 28 11 E-mail : [EMAIL PROTECTED] http://www.doruk.net.tr http://www.doruk.net.tr/english.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
can one app check another is available?
I've split an app into two: one contains many GB of static images (rarely changes), the other all the session stuff (this one is updated frequently). No matter where it is deployed, the real app can refer to images e.g. src=/maps/. but I want the real app to check that the data app is responding whenever it restarts. I can do this if I know the full URL, but is there any way I can check with just the server-relative URL? Currently I do something like (new java.net.URL(...)).openConnection() (hmm, sorry but I guess this isn't Tomcat-specific...) Paul Singleton -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.11.10/120 - Release Date: 5/Oct/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
exception in session handling
Hello, Is it normal that the session is invalidated before the valueUnbound handlers are called? Ronald. java.lang.IllegalStateException: getId: Session already invalidated at org.apache.catalina.cluster.session.DeltaSession.getId(DeltaSession.java:335) at org.apache.catalina.cluster.session.DeltaSessionFacade.getId(DeltaSessionFacade.java:79) at nl.base.servlets.util.SessionList.removeSession(SessionList.java:53) at nl.base.progs.LoginHandler.valueUnbound(LoginHandler.java:202) at org.apache.catalina.cluster.session.DeltaSession.removeAttributeInternal(DeltaSession.java:1607) at org.apache.catalina.cluster.session.DeltaSession.expire(DeltaSession.java:744) at org.apache.catalina.cluster.session.DeltaSession.expire(DeltaSession.java:674) at org.apache.catalina.cluster.session.DeltaSession.expire(DeltaSession.java:662) at org.apache.catalina.cluster.session.DeltaSession.invalidate(DeltaSession.java:1068) at org.apache.catalina.cluster.session.DeltaSessionFacade.invalidate(DeltaSessionFacade.java:150) at jspc.login.logout_jsp._jspService(logout_jsp.java:59) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
Production Settings
Does anyone know where I can find documentation on recommended production setting for Windows environment? I tried googling for some information but I did not come back with much. Thanks in advance Russ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Modjk and Tomcat 5.5.4 problem
Hi Marcus, idle connections running for hours and hours That was our problem as well, with those idle connections just sitting there, as I said, I wasn't sure if my solution was the correct one.. Just telling you, it seemed to work for us. I would say give it a try, the only issue we have, is a large amount of log messages in catalina.out about the timeouts. For some reason I can't get the default java.util.logging to catch them. -Rick -Original Message- From: Marcus Franke [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 4:11 AM On Wed, Oct 05, 2005 at 04:24:08PM -0700, Rick wrote: We had an issue where it seemed like it would crash using mod_jk, the trouble was the connections were not letting go. By default, I think the timeout is infinite, so after setting the property: connectionTimeout, in the server.xml's connector descriptor as follows, Connector port= protocol=AJP/1.3 connectionTimeout=6 .../ The old connections would get cleaned up and we stopped having problems, however, I'm not sure this was the correct way to do this, seems to work. Hi, but concerning to the documentation connectionTimeout is the amount of time between opening the session and receiving the URI to process. So your connector would wait 60 seconds for an empty request before it would cut off the connection. I for example have the interesting behaviour that I have idle connections running for hours and hours which I would like to end but do not know how. Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache Tomcat Virtual Host question
Hi, I asked this question yesterday and got no hints from anyone. Since then, I have been able to accomplish what I want using multiple instances of Tomcat. However, I would much rather use one instance and serve requests on different Apache port. Does anyone have ANY comments regarding my issue? Thanks in advance. Aria. On Wed, 05 Oct 05 13:25:38 -0400 Aria Bamdad said: Hi, Sorry if this has been asked before but I can't find any such example.. I have Apache talking to Tomcat and everything works fine. My situation is as follows: I am using Apache VirtualHost directive to set different document roots depending on the PORT number the request comes in. So, I am not really interested in the host name part of the URL, I am more interested in the port number. I have 3 different document roots depending on the port. One for port 80 http requests, one for port 443 https requests and another for port 88 http. Each document root has it's set of subdirectories. The subdirectories contain static and jsp content and you **CAN** have the same directory name under each of the three different document roots. For example: I can have /www/port80/project1 and /www/port443/project1 but they contain different information. How do I configure Apache and Tomcat so that when Apache receives a request on a specific port, it will pass that along to Tomcat, AND, how do I configure Tomcat so that it servs the correct 'project1' application under the correct document root? Thanks inadvance. Aria. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Production Settings
This is vague!! Recommended production settings for what exactly...? I would think it varies from application to application. -Original Message- From: Pitre, Russell [mailto:[EMAIL PROTECTED] Sent: 06 October 2005 14:21 To: tomcat-user@jakarta.apache.org Subject: Production Settings Does anyone know where I can find documentation on recommended production setting for Windows environment? I tried googling for some information but I did not come back with much. Thanks in advance Russ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: exception in session handling (extra info)
I'm testing 5.5.12 here on java 1.5 on linux 2.6. My SessionList is a list of session id's which I keep to count the sessions. Ronald. On Thu Oct 06 15:19:00 CEST 2005 Tomcat Users List tomcat-user@jakarta.apache.org wrote: Hello, Is it normal that the session is invalidated before the valueUnbound handlers are called? Ronald. java.lang.IllegalStateException: getId: Session already invalidated at org.apache.catalina.cluster.session.DeltaSession.getId(DeltaSession.java:335) at org.apache.catalina.cluster.session.DeltaSessionFacade.getId(DeltaSessionFacade.java:79) at nl.base.servlets.util.SessionList.removeSession(SessionList.java:53) at nl.base.progs.LoginHandler.valueUnbound(LoginHandler.java:202) at org.apache.catalina.cluster.session.DeltaSession.removeAttributeInternal(DeltaSession.java:1607) at org.apache.catalina.cluster.session.DeltaSession.expire(DeltaSession.java:744) at org.apache.catalina.cluster.session.DeltaSession.expire(DeltaSession.java:674) at org.apache.catalina.cluster.session.DeltaSession.expire(DeltaSession.java:662) at org.apache.catalina.cluster.session.DeltaSession.invalidate(DeltaSession.java:1068) at org.apache.catalina.cluster.session.DeltaSessionFacade.invalidate(DeltaSessionFacade.java:150) at jspc.login.logout_jsp._jspService(logout_jsp.java:59) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
Re: Apache Tomcat Virtual Host question
Aria Bamdad wrote: Hi, I asked this question yesterday and got no hints from anyone. Since then, I have been able to accomplish what I want using multiple instances of Tomcat. However, I would much rather use one instance and serve requests on different Apache port. Does anyone have ANY comments regarding my issue? Well, having different presentations by using different port numbers is not a common practice these days, since Apache has Name-based VHosts. Similarely, Tomcat supports Name-based VHosts only (unless I am greatly mistaken). So, it would appear that your solution is the only applicable one. The best choice is, of course, to go for name based VHosts, since it integrates very well and makes your URLs look nice. BTW, 443 is HTTPS port, which is different story. So, save yourself a lot of trouble and go for unified VHosts. One observation, though - with multiple instances of TC you have greater robustness. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached
I got rid of this message when I realized that my AJP connector's configuration (in server.xml) had a connectionTimeout set. Try setting it bigger or simply removing it, which will default to 'no timeout'. Cheers, Jean-Marc -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 18:19 To: 'Tomcat Users List' Subject: [5.5.9] Excessive jk INFO log msgs connection timeout reached Anyone know the proper way to handle these messages? I get piles of them in catalina.out Oct 5, 2005 3:00:23 PM org.apache.jk.common.ChannelSocket processConnection INFO: connection timeout reached Tried adding the following line to the default catalina_home/common/classes/logging.properties org.apache.jk.common.ChannelSocket.level=WARN Has no effect. The only thing I have been able to find is people using Log4j instead of the default java.util.logging that came setup with Tomcat 5.5. Was wondering, is that the only way? If so, why does it work w/ Log4j and not the default java.util.logging? Looking at the source for 'org.apache.jk.common.ChannelSocket', the line reads... log.info( connection timeout reached); Should it not instead read... if(log.isInfoEnabled()) log.info( connection timeout reached); Anyway, thanks for any help to this. -Rick Gavin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.12 and user-agent header
I tested out my application on 5.5.12 yesterday and noticed one small anomally. I had a JSP in my sitemesh decorator default.jsp that ends up wrapping the login page for container managed authentication. This page had a statement String _userAgent = request.getHeader(user-agent).toLowerCase(); It gets a null-pointer exception in 5.5.12, but under 5.5.9 it runs fine. In 5.5.12, after the login succeeds then the user-agent headers appear to be there just fine, but not on the initial login page. Is this a known issue? Thank you - Richard
Re: Apache Tomcat Virtual Host question
Nikola, Thank you very much for you good comments. I agree that port based servers are not common. The reason we use them is for separating for example internal web sites and external public web sites. Using host name based virtual hosting, you have to give a different host name to each port. For example if you were serving http and https on the same host www.company.com, you now have to use secure.company.com for your port 443 and www.company.com for your port 80. I just wanted to see if there is a way to just use www.company.com and have Tomcat see the port too. Thanks again. Aria On Thu, 06 Oct 2005 15:33:15 +0200 you said: Aria Bamdad wrote: Hi, I asked this question yesterday and got no hints from anyone. Since then, I have been able to accomplish what I want using multiple instances of Tomcat. However, I would much rather use one instance and serve requests on different Apache port. Does anyone have ANY comments regarding my issue? Well, having different presentations by using different port numbers is not a common practice these days, since Apache has Name-based VHosts. Similarely, Tomcat supports Name-based VHosts only (unless I am greatly mistaken). So, it would appear that your solution is the only applicable one. The best choice is, of course, to go for name based VHosts, since it integrates very well and makes your URLs look nice. BTW, 443 is HTTPS port, which is different story. So, save yourself a lot of trouble and go for unified VHosts. One observation, though - with multiple instances of TC you have greater robustness. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Production Settings
From: Pitre, Russell [mailto:[EMAIL PROTECTED] Subject: Production Settings Does anyone know where I can find documentation on recommended production setting for Windows environment? If you follow the Resources link from the Tomcat home page, you'll see a section named Articles. The one titled Tomcat Performance has some good info. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached
Jean-Marc, Actually, without the connectionTimeout set, jk seems to hold on to its connections indefinitely and after a while, the apache to tomcat connection hangs (pages quit serving). Could you tell me which combo of versions you use for apache, jk, and tomcat. I'm trying to figure out what is the correct configuration. Or if you have a link to a guide, I have yet to find a best practices. Thanks, Rick -Original Message- From: Jean-Marc Marchand [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 6:36 AM Posted To: Tomcat Dev Conversation: [5.5.9] Excessive jk INFO log msgs connection timeout reached Subject: RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached I got rid of this message when I realized that my AJP connector's configuration (in server.xml) had a connectionTimeout set. Try setting it bigger or simply removing it, which will default to 'no timeout'. Cheers, Jean-Marc -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 18:19 To: 'Tomcat Users List' Subject: [5.5.9] Excessive jk INFO log msgs connection timeout reached Anyone know the proper way to handle these messages? I get piles of them in catalina.out Oct 5, 2005 3:00:23 PM org.apache.jk.common.ChannelSocket processConnection INFO: connection timeout reached Tried adding the following line to the default catalina_home/common/classes/logging.properties org.apache.jk.common.ChannelSocket.level=WARN Has no effect. The only thing I have been able to find is people using Log4j instead of the default java.util.logging that came setup with Tomcat 5.5. Was wondering, is that the only way? If so, why does it work w/ Log4j and not the default java.util.logging? Looking at the source for 'org.apache.jk.common.ChannelSocket', the line reads... log.info( connection timeout reached); Should it not instead read... if(log.isInfoEnabled()) log.info( connection timeout reached); Anyway, thanks for any help to this. -Rick Gavin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Production Settings
Yup!! That was vague, sorry about that. I am particularly interested in recommended production settings for server.xml and TOMCAT_HOME/conf/web.xml such as the fork setting for jsp compilation. Russ -Original Message- From: Arup Vidyerthy [mailto:[EMAIL PROTECTED] Sent: Thursday, October 06, 2005 9:24 AM To: 'Tomcat Users List' Subject: RE: Production Settings This is vague!! Recommended production settings for what exactly...? I would think it varies from application to application. -Original Message- From: Pitre, Russell [mailto:[EMAIL PROTECTED] Sent: 06 October 2005 14:21 To: tomcat-user@jakarta.apache.org Subject: Production Settings Does anyone know where I can find documentation on recommended production setting for Windows environment? I tried googling for some information but I did not come back with much. Thanks in advance Russ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Non-servlet class cannot access jar file in ./WEB-INF/lib when a Servlet does
Hi, all classes of a webapp which do not come from tomcat server itself do share a common classloader which is an aggregation of the various classes in all WEB-INF/lib/*.jar and in WEB-INF/classes/**/*.class If you get a NoClassDefFoundException, that probably mean you asked some class in server classloader to load some other class (probably by reflection) which is located in WEB-INF/lib. That simply impossible to do because classloaders use a child to parent classloading delegation model, not a parent (server) to child (webapp). Regards David Delbecq Jose Maria Ramirez Martinez a écrit : Hi, everybody I have the next problem: A servlet calls a non-servlet class, and this non-servlet class imports classes from a jar file, but the classloader does not find the class from the jar file (so when I call the servlet from an internet browser, I get a NoClassDefFoundException) But if a servlet class imports the same classes from the jar, the class loader does find them... I've tried some ways to solve this problem, like: a) unpacking the classes from the jar (this works, but I had the problem that 2 different jars contained a file with the same name stored in the same directory, so one would replace the other, and the class fails) b) I thought it would be a security problem so I ran tomcat with a SecurityManager, but it didn't solve the problem.. does somebody has any idea why this is happening??? can somebody help me to solve this... thanks in advance Jose Maria ___ $0 Web Hosting with up to 200MB web space, 1000 MB Transfer 10 Personalized POP and Web E-mail Accounts, and much more. Signup at www.doteasy.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: custom session manager
Sorry, aber how exactly does it solves the problem of having one session per user? :-) On 10/6/05, Tobias Meyer [EMAIL PROTECTED] wrote: -Ursprüngliche Nachricht- Von: Leon Rosenberg [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 6. Oktober 2005 11:20 An: Tomcat Users List Betreff: Re: custom session manager On 10/6/05, Tobias Meyer [EMAIL PROTECTED] wrote: Or, cou could add a static hashmap to your Servlet (or a bean if using JSPs) where you simply add the sessions with every request. You would have to put an attribute implementing javax.servlet.http.HttpSessionActivationListener in each session though, that removes the session from your hashmap when the session is expired or you will end up with having many invalid entries in your hashmap. (And I don't even know what happens if you keep the references to those Session objects when they are recycled by tomcat) We do this to keep track of our sessions within the application. If you keep your sessions in a hashmap forever they will never be freed by the garbage collector and you will end with an outofmemory error one day. That's why I said you need one Attribute that implements the HttpSessionActivationListener, which, on second thought , was wrong - you need to implement HttpSessionBindingListener. The Method public void valueUnbound(HttpSessionBindingEvent event) will get called automatically when the session expires, and you can add code that removes the session from the hashmap. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Issuing HTTP requests from inside JSP under Tomcat
Folks: I'm relatively new to the world of Tomcat, but ... Have locally 'made' (make) Apache 2.0.54. Binary Tomcat 4.1.29. Locally built mod_jk (1.2.14). Platform is Solaris 9. Have a vendor supplied JSP application. Runs beautifully under Tomcat 'standalone'. Need to add to an existing server already running Apache on 443. Added 'my' Apache, Tomcat connector (mod_jk - ajp13). Got that all working. However, the application, in web.xml and 2 'properties' files, has references such as: http://localhost/path/update.jsp for example. As stated, under Tomcat standalone, this causes no problems. But I find that with Apache - mod_jk (ajp13) - Tomcat - that these references 'do not function'. From a Tomcat (vhost) log file ... Error making connection to: http://marketplace.montgomerycollege.edu/marketplace/web/admin/buyer_updater.jsp?STATUS_CHECK=true TAPP_SERVLET: Redirecting to http://marketplace.montgomerycollege.edu/marketplace/web/admin/home.jsp (TAPP_SERVLET - the 'vendor supplied app' ... and this 'redirect' DOES work ...???) So, I've tried: localhost; 127.0.0.1; and numerous other permutations including pointing at the ajp13 port (8009). I see NOTHING in the Apache logs, the above messages are from a logger in Tomcat. So, it appears to me that since Tomcat is already 'servicing' this application (via ajp13) - that there is some problem with issuing an HTTP request from inside the JSP in Tomcat? I have JkLogLevel set to debug, and I think I see it 'processing' this request, but then can't quite figure out what's happening ... the above error comes after a long period of 'sitting at the hourglass' (browser) ... so gather some timeout is coming into play ... Any thoughts? Suggestions? Need more info? Trying not to send 'too much' info ... Many thanks ... /Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Non-servlet class cannot access jar file in ./WEB-INF/lib when a Servlet does
Jose, I have a similar servlet which initializes a singleton class to load the Tomcat resources for AXIS web service. The servlet is loaded at startup. This singleton class uses classes from a jar file located in WEB-INF/lib. MY servlet and singleton and other classes are in WEB-INF/classes. In production environment, servlet and all other classes are in jar under WEB-INF/lib and these classes use other classes in another jar in WEB-INF/lib. It works fine. Probably having two classes with same name is the problem, but how is that possible to have two classes with same name in the same package? If they are in two different packages, you need to refer that class with complete package structure, eg : package.className = new package.className(); -Sabitha Jose Maria Ramirez Martinez a écrit : Hi, everybody I have the next problem: A servlet calls a non-servlet class, and this non-servlet class imports classes from a jar file, but the classloader does not find the class from the jar file (so when I call the servlet from an internet browser, I get a NoClassDefFoundException) But if a servlet class imports the same classes from the jar, the class loader does find them... I've tried some ways to solve this problem, like: a) unpacking the classes from the jar (this works, but I had the problem that 2 different jars contained a file with the same name stored in the same directory, so one would replace the other, and the class fails) b) I thought it would be a security problem so I ran tomcat with a SecurityManager, but it didn't solve the problem.. does somebody has any idea why this is happening??? can somebody help me to solve this... thanks in advance Jose Maria ___ $0 Web Hosting with up to 200MB web space, 1000 MB Transfer 10 Personalized POP and Web E-mail Accounts, and much more. Signup at www.doteasy.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Non-servlet class cannot access jar file in ./WEB-INF/lib whena Servlet does
Hi David, thank you very much for the time you took to answer this do you (or anybody in the mail-list) think there's a way to solve this problem? a solution is the one I've mentioned before: unpacking the jar classes and add them to the /WEB-INF/classes directory, and there is no problem when loading classes, but do you think there might be another solution, without unpacking jars?? thanks again. Jose Maria. -- Original Message -- From: David Delbecq [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org Date: Thu, 06 Oct 2005 16:06:49 +0200 Hi, all classes of a webapp which do not come from tomcat server itself do share a common classloader which is an aggregation of the various classes in all WEB-INF/lib/*.jar and in WEB-INF/classes/**/*.class If you get a NoClassDefFoundException, that probably mean you asked some class in server classloader to load some other class (probably by reflection) which is located in WEB-INF/lib. That simply impossible to do because classloaders use a child to parent classloading delegation model, not a parent (server) to child (webapp). Regards David Delbecq Jose Maria Ramirez Martinez a écrit : Hi, everybody I have the next problem: A servlet calls a non-servlet class, and this non-servlet class imports classes from a jar file, but the classloader does not find the class from the jar file (so when I call the servlet from an internet browser, I get a NoClassDefFoundException) But if a servlet class imports the same classes from the jar, the class loader does find them... I've tried some ways to solve this problem, like: a) unpacking the classes from the jar (this works, but I had the problem that 2 different jars contained a file with the same name stored in the same directory, so one would replace the other, and the class fails) b) I thought it would be a security problem so I ran tomcat with a SecurityManager, but it didn't solve the problem.. does somebody has any idea why this is happening??? can somebody help me to solve this... thanks in advance Jose Maria ___ $0 Web Hosting with up to 200MB web space, 1000 MB Transfer 10 Personalized POP and Web E-mail Accounts, and much more. Signup at www.doteasy.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ $0 Web Hosting with up to 200MB web space, 1000 MB Transfer 10 Personalized POP and Web E-mail Accounts, and much more. Signup at www.doteasy.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: custom session manager
The problem is AFAIK, that you cannot access the list of all sessions through the servlet-api. That feature was in the servlet-api at some time, but was removed, IIRC due to security issues. If you have a list of all sessions, you can easily iterate over them at login and manually expire all old sessions for the same user. = Max. one active session per user. -Ursprüngliche Nachricht- Von: Leon Rosenberg [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 6. Oktober 2005 16:11 An: Tomcat Users List Betreff: Re: custom session manager Sorry, aber how exactly does it solves the problem of having one session per user? :-) On 10/6/05, Tobias Meyer [EMAIL PROTECTED] wrote: -Ursprüngliche Nachricht- Von: Leon Rosenberg [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 6. Oktober 2005 11:20 An: Tomcat Users List Betreff: Re: custom session manager On 10/6/05, Tobias Meyer [EMAIL PROTECTED] wrote: Or, cou could add a static hashmap to your Servlet (or a bean if using JSPs) where you simply add the sessions with every request. You would have to put an attribute implementing javax.servlet.http.HttpSessionActivationListener in each session though, that removes the session from your hashmap when the session is expired or you will end up with having many invalid entries in your hashmap. (And I don't even know what happens if you keep the references to those Session objects when they are recycled by tomcat) We do this to keep track of our sessions within the application. If you keep your sessions in a hashmap forever they will never be freed by the garbage collector and you will end with an outofmemory error one day. That's why I said you need one Attribute that implements the HttpSessionActivationListener, which, on second thought , was wrong - you need to implement HttpSessionBindingListener. The Method public void valueUnbound(HttpSessionBindingEvent event) will get called automatically when the session expires, and you can add code that removes the session from the hashmap. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Database connections aren't being released...
As many people have pointed out, your app is probably not closing resources. A tool that can help find these is: http://findbugs.sourceforge.net/ George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Richard Road Runner [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 6:01 PM To: Tomcat Users List Subject: Database connections aren't being released... I am not sure that this is a Tomcat issue, but we are not sure what exactly is causing our problem. We are running Tomcat 5.0.27. We are using the most recent jconn2.jar driver to connect to a Sybase SQL Anywhere Studio 7 database via JDBC. Over a period of time, the number of connections to the database continues to increase far beyond the possible number of users. The only way to close the connections is to restart the database server. Again, we are not sure if we should be looking at Tomcat, the JDBC driver, or Sybase to solve this problem. Any input would be helpful. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Non-servlet class cannot access jar file in ./WEB-INF/lib when a Servlet does
Hi, thanks a lot for your comments about the files with the same name... they are not classes ok, let me explain... I'm using the javax.mail package, which is in a jar, called mailapi.jar, and in order to use this package we also need the JavaBeans activation framework, packed in a jar, called activation.jar, so each one of this jars contain a file called SUN_MICR.RSA and SUN_MICR.SF (I don't know what they are for, but the files in one jar have different content than the files in the other jar) in the META-INF subdirectory, so when I unpack this jars, this files are replaced by the ones of the jar I unpack last, so when I run the servlet, the class that sends the email does not work, but when I call this email sender class from a servlet, there is no problem, this is the whole detailed situation, and I'm a bit confused... Thanks a lot for your time Jose Maria -- Original Message -- From: Sabitha [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org Date: Thu, 6 Oct 2005 10:54:30 -0400 Jose, I have a similar servlet which initializes a singleton class to load the Tomcat resources for AXIS web service. The servlet is loaded at startup. This singleton class uses classes from a jar file located in WEB-INF/lib. MY servlet and singleton and other classes are in WEB-INF/classes. In production environment, servlet and all other classes are in jar under WEB-INF/lib and these classes use other classes in another jar in WEB-INF/lib. It works fine. Probably having two classes with same name is the problem, but how is that possible to have two classes with same name in the same package? If they are in two different packages, you need to refer that class with complete package structure, eg : package.className = new package.className(); -Sabitha Jose Maria Ramirez Martinez a écrit : Hi, everybody I have the next problem: A servlet calls a non-servlet class, and this non-servlet class imports classes from a jar file, but the classloader does not find the class from the jar file (so when I call the servlet from an internet browser, I get a NoClassDefFoundException) But if a servlet class imports the same classes from the jar, the class loader does find them... I've tried some ways to solve this problem, like: a) unpacking the classes from the jar (this works, but I had the problem that 2 different jars contained a file with the same name stored in the same directory, so one would replace the other, and the class fails) b) I thought it would be a security problem so I ran tomcat with a SecurityManager, but it didn't solve the problem.. does somebody has any idea why this is happening??? can somebody help me to solve this... thanks in advance Jose Maria ___ $0 Web Hosting with up to 200MB web space, 1000 MB Transfer 10 Personalized POP and Web E-mail Accounts, and much more. Signup at www.doteasy.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ $0 Web Hosting with up to 200MB web space, 1000 MB Transfer 10 Personalized POP and Web E-mail Accounts, and much more. Signup at www.doteasy.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Modjk and Tomcat 5.5.4 problem
Rick, Thanks for the info. I will try it out. It is interesting when I look at the config for all of the other Connectors, they all have a connectionTimeout value. -John On Oct 5, 2005, at 7:24 PM, Rick wrote: We had an issue where it seemed like it would crash using mod_jk, the trouble was the connections were not letting go. By default, I think the timeout is infinite, so after setting the property: connectionTimeout, in the server.xml's connector descriptor as follows, Connector port= protocol=AJP/1.3 connectionTimeout=6 .../ The old connections would get cleaned up and we stopped having problems, however, I'm not sure this was the correct way to do this, seems to work. Not sure if this is related to your problem. -Rick -Original Message- From: John Martyniak [mailto:[EMAIL PROTECTED] Posted At: Wednesday, October 05, 2005 3:53 PM Posted To: Tomcat Dev Conversation: Modjk and Tomcat 5.5.4 problem Subject: Modjk and Tomcat 5.5.4 problem Has anyone had any problems with ModJK crashing the server? I haven't been able to fully debug yet, primarily because it doesn't update any logs to state there is a problem, and I can't reliably replicate the problem. I am using Apache 2.0.47, modjk 1.2.5 and tomcat 5.5.4 I think that it has something to do with modjk because when I go directly to the appserver the problem doesn't seem to exist. Any help would be greatly appreciated. Thank you, -John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: custom session manager
On 10/6/05, Tobias Meyer [EMAIL PROTECTED] wrote: The problem is AFAIK, that you cannot access the list of all sessions through the servlet-api. That feature was in the servlet-api at some time, but was removed, IIRC due to security issues. If you have a list of all sessions, you can easily iterate over them at login and manually expire all old sessions for the same user. = Max. one active session per user. ok, got you, yes that's feasible thanx for explanations leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] How much RAM can java use
Sorry for off-topic, but there are so many experts here! :-) Does anyone know for sure how much RAM I can use with JAVA 1.4 or 1.5? It seems to me, that the VM don't use more than 1.2 GB RAM even I gave it more (with mx/ms settings). We are planning to go to 16GB RAM machines to have a better caching, but I started to doubt that I can use 16GB Ram in a single JVM. Any thoughts, anyone? thanx leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
error-page 503 in web.xml not working in tomcat 5.5.9
Hi,I am using tomcat 5.5.9. I have set up global error pages for 404 and 503 in web.xml file under tomcat home dir/conf folder. Example - error-page error-code404/error-code location/systemDown.html/location /error-page error-page error-code503/error-code location/systemDown.html/location /error-page Error 404 is working fine and tomcat displays my page but for 503, it displays its own message( HTTP Status 503 - This application is not currently available...) Please help. Regards, Arch
RE: [OT] How much RAM can java use
Hi, This will depend on which architecture of machine you are using. You will need both a 64 bit machine and a 64bit JVM to use that much memory. We use 12GB here with no problems on 64 bit solaris. Ta Matt -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: 06 October 2005 16:53 To: Struts Users Mailing List; Tomcat Users List Subject: [OT] How much RAM can java use Sorry for off-topic, but there are so many experts here! :-) Does anyone know for sure how much RAM I can use with JAVA 1.4 or 1.5? It seems to me, that the VM don't use more than 1.2 GB RAM even I gave it more (with mx/ms settings). We are planning to go to 16GB RAM machines to have a better caching, but I started to doubt that I can use 16GB Ram in a single JVM. Any thoughts, anyone? thanx leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Modjk and Tomcat 5.5.4 problem
Hey John, I have been looking into this on my end as well, since I'm not fully satisfied that it's the proper solution. As a question, what does your Apache workers.properties file look like. Do you have any of the properties such as recycle_timeout, socket_timeout, cachesize, or cache_timeout set? -Rick -Original Message- From: John Martyniak [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 8:43 AM Posted To: Tomcat Dev Conversation: Modjk and Tomcat 5.5.4 problem Subject: Re: Modjk and Tomcat 5.5.4 problem Rick, Thanks for the info. I will try it out. It is interesting when I look at the config for all of the other Connectors, they all have a connectionTimeout value. -John On Oct 5, 2005, at 7:24 PM, Rick wrote: We had an issue where it seemed like it would crash using mod_jk, the trouble was the connections were not letting go. By default, I think the timeout is infinite, so after setting the property: connectionTimeout, in the server.xml's connector descriptor as follows, Connector port= protocol=AJP/1.3 connectionTimeout=6 .../ The old connections would get cleaned up and we stopped having problems, however, I'm not sure this was the correct way to do this, seems to work. Not sure if this is related to your problem. -Rick -Original Message- From: John Martyniak [mailto:[EMAIL PROTECTED] Posted At: Wednesday, October 05, 2005 3:53 PM Posted To: Tomcat Dev Conversation: Modjk and Tomcat 5.5.4 problem Subject: Modjk and Tomcat 5.5.4 problem Has anyone had any problems with ModJK crashing the server? I haven't been able to fully debug yet, primarily because it doesn't update any logs to state there is a problem, and I can't reliably replicate the problem. I am using Apache 2.0.47, modjk 1.2.5 and tomcat 5.5.4 I think that it has something to do with modjk because when I go directly to the appserver the problem doesn't seem to exist. Any help would be greatly appreciated. Thank you, -John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] How much RAM can java use
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Subject: [OT] How much RAM can java use Does anyone know for sure how much RAM I can use with JAVA 1.4 or 1.5? The answer is very platform specific. For example, on a normal 32-bit Windows system, each process has a maximum of 2 GB to play with, but some of that is taken up by various .dlls. (And unfortunately, these are scattered throughout the range, and the Sun JVM insists on having contiguous space for the heap.) There is a boot option for some versions of Windows Server that changes the process virtual space to 3 GB, at the expense of some kernel capacity. I've seen 64-bit Sparc systems with Java heaps sized at hundreds of megabytes... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Modjk and Tomcat 5.5.4 problem
Rick, I have made the changes and was able to replicate the problem pretty quickly. And again no message in the mod_jk or catalina.out files. It turns out that my workers file has all of those properties. I am including it below. # Define worker using ajp13 worker.list=worker1, worker2 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=300 -John On Oct 6, 2005, at 12:01 PM, Rick wrote: Hey John, I have been looking into this on my end as well, since I'm not fully satisfied that it's the proper solution. As a question, what does your Apache workers.properties file look like. Do you have any of the properties such as recycle_timeout, socket_timeout, cachesize, or cache_timeout set? -Rick -Original Message- From: John Martyniak [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 8:43 AM Posted To: Tomcat Dev Conversation: Modjk and Tomcat 5.5.4 problem Subject: Re: Modjk and Tomcat 5.5.4 problem Rick, Thanks for the info. I will try it out. It is interesting when I look at the config for all of the other Connectors, they all have a connectionTimeout value. -John On Oct 5, 2005, at 7:24 PM, Rick wrote: We had an issue where it seemed like it would crash using mod_jk, the trouble was the connections were not letting go. By default, I think the timeout is infinite, so after setting the property: connectionTimeout, in the server.xml's connector descriptor as follows, Connector port= protocol=AJP/1.3 connectionTimeout=6 .../ The old connections would get cleaned up and we stopped having problems, however, I'm not sure this was the correct way to do this, seems to work. Not sure if this is related to your problem. -Rick -Original Message- From: John Martyniak [mailto:[EMAIL PROTECTED] Posted At: Wednesday, October 05, 2005 3:53 PM Posted To: Tomcat Dev Conversation: Modjk and Tomcat 5.5.4 problem Subject: Modjk and Tomcat 5.5.4 problem Has anyone had any problems with ModJK crashing the server? I haven't been able to fully debug yet, primarily because it doesn't update any logs to state there is a problem, and I can't reliably replicate the problem. I am using Apache 2.0.47, modjk 1.2.5 and tomcat 5.5.4 I think that it has something to do with modjk because when I go directly to the appserver the problem doesn't seem to exist. Any help would be greatly appreciated. Thank you, -John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached
I`m using Tomcat 5.0.30 / Apache 2.0.54 / JK 1.2.14.1 I looked a bit in the source of the Tomcat JK connector, and the 'connectionTimeout' parameter of the Connector is relayed to 'soTimeout' of the listening JK sockets ChannelSocket.java. ...which takes us to the java.net.Socket api and SO_TIMEOUT parameter. Seems to me that mod_jk in Apache keeps the connection opened, therefore never closing it and reusing it for future calls. If so, and if I set a connectionTimeout on the Tomcat JK connector, it would always close the connection with a TimeoutException. That would explain the log entries. I don't know, I'm just guessing because my system is not in production yet, but if I set my Tomcat connector to 'no timeout' and my Apache worker to socket_timeout=30 secs, wouldn't the sockets be recycled on both ends anyway when not active for 30 secs? My Apache workers.properties looks like: worker.tomcat1.port=8009 worker.tomcat1.host=localhost worker.tomcat1.type=ajp13 worker.tomcat1.cachesize=150 worker.tomcat1.cache_timeout=600 worker.tomcat1.recycle_timeout=300 worker.tomcat1.socket_timeout=30 worker.tomcat1.socket_keepalive=1 and I haven't had the log entry in Tomcat since I set the cache and timeouts in Apache. Hope it helps... Jean-Marc -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Thursday, October 06, 2005 09:54 To: 'Tomcat Users List'; [EMAIL PROTECTED] Subject: RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached Jean-Marc, Actually, without the connectionTimeout set, jk seems to hold on to its connections indefinitely and after a while, the apache to tomcat connection hangs (pages quit serving). Could you tell me which combo of versions you use for apache, jk, and tomcat. I'm trying to figure out what is the correct configuration. Or if you have a link to a guide, I have yet to find a best practices. Thanks, Rick -Original Message- From: Jean-Marc Marchand [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 6:36 AM Posted To: Tomcat Dev Conversation: [5.5.9] Excessive jk INFO log msgs connection timeout reached Subject: RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached I got rid of this message when I realized that my AJP connector's configuration (in server.xml) had a connectionTimeout set. Try setting it bigger or simply removing it, which will default to 'no timeout'. Cheers, Jean-Marc -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 18:19 To: 'Tomcat Users List' Subject: [5.5.9] Excessive jk INFO log msgs connection timeout reached Anyone know the proper way to handle these messages? I get piles of them in catalina.out Oct 5, 2005 3:00:23 PM org.apache.jk.common.ChannelSocket processConnection INFO: connection timeout reached Tried adding the following line to the default catalina_home/common/classes/logging.properties org.apache.jk.common.ChannelSocket.level=WARN Has no effect. The only thing I have been able to find is people using Log4j instead of the default java.util.logging that came setup with Tomcat 5.5. Was wondering, is that the only way? If so, why does it work w/ Log4j and not the default java.util.logging? Looking at the source for 'org.apache.jk.common.ChannelSocket', the line reads... log.info( connection timeout reached); Should it not instead read... if(log.isInfoEnabled()) log.info( connection timeout reached); Anyway, thanks for any help to this. -Rick Gavin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] How much RAM can java use
On 10/6/05, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Subject: [OT] How much RAM can java use Does anyone know for sure how much RAM I can use with JAVA 1.4 or 1.5? The answer is very platform specific. For example, on a normal 32-bit Windows system, each process has a maximum of 2 GB to play with, but some of that is taken up by various .dlls. (And unfortunately, these are scattered throughout the range, and the Sun JVM insists on having contiguous space for the heap.) There is a boot option for some versions of Windows Server that changes the process virtual space to 3 GB, at the expense of some kernel capacity. I've seen 64-bit Sparc systems with Java heaps sized at hundreds of megabytes... Ok, I'll try to be more specific: Debian 3.1, kernel 2.6.x-smp (32 bit) or Debian 3.1, kernel 2.6.x-smp-emt64 (64 bit) Hardware: AMD Opteron and Xeon64 (both 64 bit) SUN jdk1.5 and/or jdk1.4.2 4 GB total RAM for 32-bit linux, with 3/1 memory partitioning 16GB total RAM for 64-bit linux. thanx leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] How much RAM can java use
On the 32 bit system you definitely won't get more the 2G without some kernel hacking and you may well see even less than that. On the 64 with a 64 bit JVM you should be able to use however much you like obviously leaving some space for the OS to run in. -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: 06 October 2005 17:16 To: Tomcat Users List Subject: Re: [OT] How much RAM can java use On 10/6/05, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Subject: [OT] How much RAM can java use Does anyone know for sure how much RAM I can use with JAVA 1.4 or 1.5? The answer is very platform specific. For example, on a normal 32-bit Windows system, each process has a maximum of 2 GB to play with, but some of that is taken up by various .dlls. (And unfortunately, these are scattered throughout the range, and the Sun JVM insists on having contiguous space for the heap.) There is a boot option for some versions of Windows Server that changes the process virtual space to 3 GB, at the expense of some kernel capacity. I've seen 64-bit Sparc systems with Java heaps sized at hundreds of megabytes... Ok, I'll try to be more specific: Debian 3.1, kernel 2.6.x-smp (32 bit) or Debian 3.1, kernel 2.6.x-smp-emt64 (64 bit) Hardware: AMD Opteron and Xeon64 (both 64 bit) SUN jdk1.5 and/or jdk1.4.2 4 GB total RAM for 32-bit linux, with 3/1 memory partitioning 16GB total RAM for 64-bit linux. thanx leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] How much RAM can java use
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Subject: Re: [OT] How much RAM can java use I've seen 64-bit Sparc systems with Java heaps sized at hundreds of megabytes... Oops, I meant hundreds of _gigabytes_ (just a slight miscalculation :-). With the 32-bit Sun JVM, you're not going to get much more than 1.2 GB you're at now, primarily due to the contiguous heap requirement and the use of signed 32-bit integers within the HotSpot heap manager. To take advantage of the 64-bit platforms, you'll need to install a true 64-bit JVM, which is a separate download from the normal JRE/JDK. With that, you should be able to use pretty much all of the RAM, minus the system overhead. The key issue is insuring that the 64-bit Debian provides a decent amount of virtual space for each process. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached
Thanks Jean-Marc, After checking over my workers.properties, orginally configured by someone else, it appears to be missing some of the connection timeout handling properties you have listed in yours. I'm guessing this is the root of my issue. I'll give them a try. Thanks again, Rick -Original Message- From: Jean-Marc Marchand [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 9:15 AM Posted To: Tomcat Dev Conversation: [5.5.9] Excessive jk INFO log msgs connection timeout reached Subject: RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached I`m using Tomcat 5.0.30 / Apache 2.0.54 / JK 1.2.14.1 I looked a bit in the source of the Tomcat JK connector, and the 'connectionTimeout' parameter of the Connector is relayed to 'soTimeout' of the listening JK sockets ChannelSocket.java. ...which takes us to the java.net.Socket api and SO_TIMEOUT parameter. Seems to me that mod_jk in Apache keeps the connection opened, therefore never closing it and reusing it for future calls. If so, and if I set a connectionTimeout on the Tomcat JK connector, it would always close the connection with a TimeoutException. That would explain the log entries. I don't know, I'm just guessing because my system is not in production yet, but if I set my Tomcat connector to 'no timeout' and my Apache worker to socket_timeout=30 secs, wouldn't the sockets be recycled on both ends anyway when not active for 30 secs? My Apache workers.properties looks like: worker.tomcat1.port=8009 worker.tomcat1.host=localhost worker.tomcat1.type=ajp13 worker.tomcat1.cachesize=150 worker.tomcat1.cache_timeout=600 worker.tomcat1.recycle_timeout=300 worker.tomcat1.socket_timeout=30 worker.tomcat1.socket_keepalive=1 and I haven't had the log entry in Tomcat since I set the cache and timeouts in Apache. Hope it helps... Jean-Marc -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Thursday, October 06, 2005 09:54 To: 'Tomcat Users List'; [EMAIL PROTECTED] Subject: RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached Jean-Marc, Actually, without the connectionTimeout set, jk seems to hold on to its connections indefinitely and after a while, the apache to tomcat connection hangs (pages quit serving). Could you tell me which combo of versions you use for apache, jk, and tomcat. I'm trying to figure out what is the correct configuration. Or if you have a link to a guide, I have yet to find a best practices. Thanks, Rick -Original Message- From: Jean-Marc Marchand [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 6:36 AM Posted To: Tomcat Dev Conversation: [5.5.9] Excessive jk INFO log msgs connection timeout reached Subject: RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached I got rid of this message when I realized that my AJP connector's configuration (in server.xml) had a connectionTimeout set. Try setting it bigger or simply removing it, which will default to 'no timeout'. Cheers, Jean-Marc -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 18:19 To: 'Tomcat Users List' Subject: [5.5.9] Excessive jk INFO log msgs connection timeout reached Anyone know the proper way to handle these messages? I get piles of them in catalina.out Oct 5, 2005 3:00:23 PM org.apache.jk.common.ChannelSocket processConnection INFO: connection timeout reached Tried adding the following line to the default catalina_home/common/classes/logging.properties org.apache.jk.common.ChannelSocket.level=WARN Has no effect. The only thing I have been able to find is people using Log4j instead of the default java.util.logging that came setup with Tomcat 5.5. Was wondering, is that the only way? If so, why does it work w/ Log4j and not the default java.util.logging? Looking at the source for 'org.apache.jk.common.ChannelSocket', the line reads... log.info( connection timeout reached); Should it not instead read... if(log.isInfoEnabled()) log.info( connection timeout reached); Anyway, thanks for any help to this. -Rick Gavin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: custom session manager
There is one problem with this approach. Load balancing/clustering. If you have a HashMap in one tomcat JVM, how does that information get propogated to other JVM's possibly on other machines? Thank you by the way for all the inputs so far On 10/6/05, Leon Rosenberg [EMAIL PROTECTED] wrote: On 10/6/05, Tobias Meyer [EMAIL PROTECTED] wrote: The problem is AFAIK, that you cannot access the list of all sessions through the servlet-api. That feature was in the servlet-api at some time, but was removed, IIRC due to security issues. If you have a list of all sessions, you can easily iterate over them at login and manually expire all old sessions for the same user. = Max. one active session per user. ok, got you, yes that's feasible thanx for explanations leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Q:how to remove charset from HTTP responce to allow browser use a browser selected charset?
Hello, In my application users enter data using different languages. The problem I'm facing is the browser sets the page encoding always to ISO-8859-1. (I guess this is default based on server OS) User can change encoding on the page (Browser settings) and everything looks OK but only for one page. On the next page encoding is back to ISO-8859-1. Is there any way to instruct tomcat not to send the page encoding? I prefer not set it to specific one by using meta http-equiv=Content-Type content=text/html; charset= just want to remove charset from the header, so browser will use the last selected charset. I have Tomcat 5.0.24 on redhat 9 Thank you, Mark. __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Turning on debugging in Tomcat 5.5
Most of the installed Tomcat classes have something like container.isDebugEnabled() {...} How do I enable these debug statements in Tomcat 5.5? Thanks, Jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to use JkAutoAlias with a URL Path
Is it possible to define a URL path under which the JKAutoAlias is configured ? What I am trying to say is, can we have something like JkAutoAlias /java-apps /usr/local/tomcat/webapps that would effectively make all my tomcat webapps accessible under http://localhost/java-apps/ Is there any other way to do this from tomcat or apache ? Thanks, Bhavin.
Re: [OT] How much RAM can java use
Leon Rosenberg wrote: Debian 3.1, kernel 2.6.x-smp (32 bit) or Debian 3.1, kernel 2.6.x-smp-emt64 (64 bit) Hardware: AMD Opteron and Xeon64 (both 64 bit) SUN jdk1.5 and/or jdk1.4.2 4 GB total RAM for 32-bit linux, with 3/1 memory partitioning 16GB total RAM for 64-bit linux. I've tested 32/64 bit JVMs extensively and done considerable amount of JAVA_OPTS tuning for my company's application. On a 32-bit machine you can't reliably go above a -Xms=1600m without getting OOM errors. With a 3/1 split your virtual page table size for the entire JVM process must be below 3GB total virtual memory. That's 3GB allocated, not commited. The JVM allocates a lot more memory besides the heap. With the 64-bit JVMs, the sky's the limit, however the 64-bit address also make your application take up more space relative to a 32-bit JVM. A 3.2GB 64-bit heap space isn't going to double the amount of identical objects you can create as compared to a 32-bit 1.6GB heap space because all pointer references will occupy twice the space. -ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Embedded Tomcat and SSL?
Hi, I am using an embedded tomcat instance within my application. I am trying to set up a connector using SSL. When I start the server, it creates the connector and bind to the port successfully. When I request a page from the web browser, I get the following error in my browser: The connection to the server has terminated unexpectedly. Some data may have been transferred. The same scenario works fine with HTTP. Here is my code snippet: // APPPORT and isSSLEnabled are set correctly to 8443 and true. Connector httpConnector = this._server.createConnector((java.net.InetAddress)null, Integer.parseInt(ApplicationResourcesUtil.getProperty(Constants.RESOURCEKEY_APPPORT)),isSSLEnabled); //add new Connector to set of Connectors for embedded server, associated with Engine this._server.addConnector(httpConnector); this._server.start(); Looking at the tomcat website, they talk about registering keystore. What APIs do I use to programmatically specify the keystore file? Is there something else that needs to be configured before SSL will work in the embedded more? Thanks, -Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mark certain contexts inactive?
Hello, On my development machine, I have created quite a few contexts or webapp instances, and due to that fact, the startup time is increasing. I do not want to remove any of the contexts as they all mean something to me, but I would like to be able to mark them so they do not start up. And then be able to turn them on when needed. Is there a clean way of doing this? Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: isapi_redirector2.dll question
John, JK2 is deprecated. Are you sure you want to use it? See http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/connectors.html for a list of connectors and current statuses for TC4. Mark John MccLain wrote: I have installed the IIS to Tomcat redirector on my windows XP pro machine and it works great. I took the same steps to install in on a win2k machine running IIS5.0, and it fails. Both machines have the same tomcat version (5.5.11) and both are configured identically. Here is the workers2.properties file - #Look at #http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/configwebcom.html #for parameter description [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=c:/tomcat/temp/jk2.shm size=1048576 #[channel.socket:localhost:8009] #info=Ajp13 forwarding over socket #tomcatId=localhost:8009 # define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 tomcatId=localhost:8009 # Map webapps to the Web server uri space [uri:/Acuity/*] - I ahve also put the required registry entries in and added the dll as a filter into IIS - both done on both machines. All is fine on my machine, but on the win2k machine (with 256 mb memory), the log file gives the error: Error [jk_isapi_plugin.c(496)]HttpExtensionPOroc: worker is NULL I have rebooted both machines, and the filter DOES have an up arrow listed for its status in both machines. My question is - What are the ways a worker is NULL can occur, and how do I fix this error??? John McClain Senior Software Engineer TCS Healthcare [EMAIL PROTECTED] (530)886-1700x235 Skepticism is the first step toward truth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to disable jk2 and enable jk1 on Tomcat5 with Apache 1.3
alebu wrote: On Tomcat startup there is info message that indicates that tomcat starts using jk2. As I understand, that cames from that line in server.xml: Connector port=8009 enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 / How to disable jk2 and prevent tomcat to use jk1.2 ? The info messages shows it starting with JK on my machine. I think we will need to see a copy of the message and your server.xml Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mysql connection with JSP
When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is behaviour that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner Cengiz Yazgan wrote: Hi everybody I want to connect a mysql database with jsp code. Can anybody help me to write a connection string. Thx. Cengiz YAZGAN Sistem Mühendisi/System Engineer DorukNet Tel / Phone : +90 212 326 92 00 / 447 Fax : +90 212 227 28 11 E-mail : [EMAIL PROTECTED] http://www.doruk.net.tr http://www.doruk.net.tr/english.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Tomcat return me a OLD version of my doc.jar ?
When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is behaviour that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner Amadeo Alonso wrote: Hi all, ¿Can anyone explain it , please? I use Tomcat 5.5 as server pages html with an 'Applet' that uses a 'doc.jar' I have placed two connector tags in 'server.xml' file to use ports :80 y :8080 in the same way I Have fixed bugs from mi 'doc.jar' (v1) to a new version with the same name 'doc.jar' (v2) and now, (using IExplorer): OK: _http://expresiongrafica.caminos.upm.es:8080/PAU/PAU-Septiembre2005-C2.html return de rigth 'doc.jar' (v2) BUT: _http://expresiongrafica.caminos.upm.es:80/PAU/PAU-Septiembre2005-C2.html o _http://expresiongrafica.caminos.upm.es/PAU/PAU-Septiembre2005-C2.html return me the OLD VERSION of 'doc.jar' (v1) with the old bugs, as I deduct from the 'Java Console' OK also _http://localhost /PAU/AppletDoc.html (or 127.0.0.1) _http://localhost:80/PAU/AppletDoc.html _http://localhost:8080/PAU/AppletDoc.html _http://localhost:8080/PAU/AppletDoc.html BUT _http://138.100.67.143:8080/PAU/AppletDoc.html OK _http://138.100.67.143 /PAU/AppletDoc.html (o :80) BAD, v1 How can I destroy the old version? where is it? What is it happening? regards amadeo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: exception in session handling
Ronald Klop wrote: Hello, Is it normal that the session is invalidated before the valueUnbound handlers are called? The spec is your friend. spec-quote section=SRV.15.1.7 ...For sessions that are invalidated or expire, notifications are sent after the session has been invalidated or expired... /spec-quote Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Q:how to remove charset from HTTP responce to allow browser use a browser selected charset?
Mark wrote: Hello, In my application users enter data using different languages. The problem I'm facing is the browser sets the page encoding always to ISO-8859-1. (I guess this is default based on server OS) User can change encoding on the page (Browser settings) and everything looks OK but only for one page. On the next page encoding is back to ISO-8859-1. Is there any way to instruct tomcat not to send the page encoding? If you are using JSPs, no. The spec requires that the charset is set. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Q:how to remove charset from HTTP responce to allow browser use a browser selected charset?
Hi Mark, In my case servlet generates an output, so no JSP for now... Can I do it using filters? Or define and store user's prefs with encoding outside of tomcat and in the session and use if it's exists in the session? Thanks a lot! Mark. --- Mark Thomas [EMAIL PROTECTED] wrote: Mark wrote: Hello, In my application users enter data using different languages. The problem I'm facing is the browser sets the page encoding always to ISO-8859-1. (I guess this is default based on server OS) User can change encoding on the page (Browser settings) and everything looks OK but only for one page. On the next page encoding is back to ISO-8859-1. Is there any way to instruct tomcat not to send the page encoding? If you are using JSPs, no. The spec requires that the charset is set. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Yahoo! for Good Donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help on a publication
here the is what i have done, what could be the reason because this app is not showing up thank you in advance for your help -- by oxygene27 on 2005/10/04 16:39 Hi everybody again, please help, Is it necessary to have the database up, for having the webapp visible in tomcat? it's just that i have chose as a name mapserv BUT i cannot see my publication, it is in $TOMCAT_HOME/webapps/mapserv I have done 1. Create a dir in [TOMCAT_HOME]/webapps. 2. Unzip the distribution zip file into this folder. 3. i have created in mysql the database, running the script .sql 4. i have copied the mm.(connector JDBC).jar into the WEB-INF/lib directory 5. i have restarted Tomcat. and go to : http://myhost:8080/mapserv/index.html and appears like nothing exist :S does not appears anything, like a wrong application what can I do? by artem on 2005/10/04 21:37 1) Verify that the path to index database (clearinghouse) is correct. Open WEB-INF/mapserv-home/mapserv.xml. Check the section database user=root password= url=jdbc:mysql://localhost/alov driver=com.mysql.jdbc.Driver server=MySQL/ 2) Verify that SQL server is up. 3) Verify that web.xml in the WEB-INF The best way to check database is to enter into admin zone. http://localhost:8080/map/pump If Tomcat and our server are installed correctly you have to see the login screen. If connection to clearinghouse database is correct after login you won't see the error message. by oxygene27 on 2005/10/05 17:58 thank you, i have followed your indications, but i can't see the webapp yet, i dont know what's happening... all the servers are up, and the publication is its right place, this is the message i get: - HTTP Status 404 - /alovmap/index.html type Status report message /alovmap/index.html description The requested resource (/alovmap/index.html) is not available. Apache Tomcat/5.0.29 - my files are here and just like this: $TOMCAT/webapps: drwxr-xr-x 3 www www 512 Oct 4 16:01 ROOT drwxr-xr-x 11 www www 512 Oct 5 16:11 alovmap drwxr-xr-x 4 www www 512 Nov 10 2004 balancer drwxrwxr-x 3 www www 512 Nov 10 2004 dbtest drwxr-xr-x 21 www www 512 Nov 10 2004 jsp-examples drwxr-xr-x 7 root www 512 Aug 25 16:23 lenya drwxr-xr-x 11 www www 512 Oct 5 16:10 mapserv drwxr-xr-x 4 www www 512 Nov 10 2004 servlets-examples drwxr-xr-x 12 www www 1024 Nov 10 2004 tomcat-docs drwxr-xr-x 22 www www 512 Sep 20 09:49 webdav alovmap content: drwxr-xr-x 11 www www 512 Oct 5 16:11 . drwxr-xr-x 12 www www 512 Oct 3 18:22 .. -rw-r--r-- 1 www www 3285 Oct 3 18:27 LICENSE.txt drwxr-xr-x 2 www www 512 Oct 3 18:27 META-INF drwxr-xr-x 2 www www 512 Oct 3 18:27 Sydney drwxr-xr-x 4 www www 512 Oct 5 16:03 WEB-INF -rw-r--r-- 1 www www 266453 Oct 3 18:27 alov_applet.jar -rw-r--r-- 1 www www 435314 Oct 5 16:11 alov_servlet.jar drwxr-xr-x 2 www www 512 Oct 3 18:27 base drwxr-xr-x 2 www www 512 Oct 3 18:27 images drwxr-xr-x 2 www www 1024 Oct 3 18:27 images_wms drwxr-xr-x 2 www www 512 Oct 3 18:27 img -rw-r--r-- 1 www www 2916 Oct 3 18:27 index.html drwxr-xr-x 2 www www 512 Oct 3 18:27 layouts -rw-r--r-- 1 www www 1043 Oct 3 18:27 main3.css drwxr-xr-x 2 www www 1536 Oct 3 18:27 sample -rw-r--r-- 1 www www 150 Oct 3 18:27 top.html -rw-r--r-- 1 www www 1386 Oct 3 18:27 up_search.html -rw-r--r-- 1 www www 10270 Oct 3 18:27 wms.jsp -rw-r--r-- 1 www www 4334 Oct 3 18:27 wms.xml -rw-r--r-- 1 www www 3194 Oct 3 18:27 wms_feature.jsp -rw-r--r-- 1 www www 423 Oct 3 18:27 world.html -rw-r--r-- 1 www www 4462 Oct 3 18:27 world.xml -rw-r--r-- 1 www www 51 Oct 3 18:27 world_keymap.gfw -rw-r--r-- 1 www www 1837 Oct 3 18:27 world_keymap.gif I WAS COPYING THE alov_servlet.jar TO THIS DIRECTORY, JUST TESTING... BUT after restarting the TOMCAT Server it appears the same message, like if nothing exist. what could be the problem ?
Re: [OT] How much RAM can java use
Chuck, Ryan, thanx, you were extremely helpful! regards Leon On 10/6/05, J. Ryan Earl [EMAIL PROTECTED] wrote: Leon Rosenberg wrote: Debian 3.1, kernel 2.6.x-smp (32 bit) or Debian 3.1, kernel 2.6.x-smp-emt64 (64 bit) Hardware: AMD Opteron and Xeon64 (both 64 bit) SUN jdk1.5 and/or jdk1.4.2 4 GB total RAM for 32-bit linux, with 3/1 memory partitioning 16GB total RAM for 64-bit linux. I've tested 32/64 bit JVMs extensively and done considerable amount of JAVA_OPTS tuning for my company's application. On a 32-bit machine you can't reliably go above a -Xms=1600m without getting OOM errors. With a 3/1 split your virtual page table size for the entire JVM process must be below 3GB total virtual memory. That's 3GB allocated, not commited. The JVM allocates a lot more memory besides the heap. With the 64-bit JVMs, the sky's the limit, however the 64-bit address also make your application take up more space relative to a 32-bit JVM. A 3.2GB 64-bit heap space isn't going to double the amount of identical objects you can create as compared to a 32-bit 1.6GB heap space because all pointer references will occupy twice the space. -ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tracking Datasource Connection Usage?
I started getting exceptions saying no connections were available on my JDBC datasource (org.gjt.mm.mysql.Driver). The pool was definitely large enough to handle the load. So it appears that I'm not freeing the all the connections as I should. I noticed that I did not have the 'removeAbandoned' flag set on the Resource tag. Changing that has apparently fixed the out of connections problem. But I really want to clean up the code and fix it the right way. I've got the close() statements in place. But obviously, I'm missing some of them somewhere. Is there any process for logging/tracking allocating and freeing connections (and absence thereof.), available connections, etc? Or are there any methods I can call to give me this type of debug info? What's the recommended way to debug this? Thanks. JWM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tracking Datasource Connection Usage?
http://findbugs.sourceforge.net/ Will tell you where in your code you are not freeing resources. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: JWM [mailto:[EMAIL PROTECTED] Sent: Thursday, October 06, 2005 2:09 PM To: tomcat-user@jakarta.apache.org Subject: Tracking Datasource Connection Usage? I started getting exceptions saying no connections were available on my JDBC datasource (org.gjt.mm.mysql.Driver). The pool was definitely large enough to handle the load. So it appears that I'm not freeing the all the connections as I should. I noticed that I did not have the 'removeAbandoned' flag set on the Resource tag. Changing that has apparently fixed the out of connections problem. But I really want to clean up the code and fix it the right way. I've got the close() statements in place. But obviously, I'm missing some of them somewhere. Is there any process for logging/tracking allocating and freeing connections (and absence thereof.), available connections, etc? Or are there any methods I can call to give me this type of debug info? What's the recommended way to debug this? Thanks. JWM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mod_jk + Apache on RHEL3 gives 503 for jsp only
Hello, I have a website that I am migrating to a new server. Server is Redhat ES3 2.4.21-20.0.1.ELsmp. Server version: Apache/2.0.46 I have jakarta-tomcat-5.5.9 installed and working properly on the new server. It is perfectly accessible from the legacy web server. On the Website on the new server, access to jsp based pages give a 503 error. The main page, home.jsp, loads fine in the servlet if no page is given. http://webserver/PI/ The home.jsp spawns a 503 if is in the URL. http://webserver/PI/home.jsp I can successfully get images from the page from the tomcat instance. It does not like the .jsp extension. In the mod_jk log I can see the match made: [Wed Sep 28 10:29:14 2005] [18841:2816] [debug] map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context URI '/PI/*' [Wed Sep 28 10:29:14 2005] [18841:2816] [debug] map_uri_to_worker::jk_uri_worker_map.c (475): Found a wildchar match worker3 - /PI/* However, in the apache access log is the 503. xxx.89.23.173 - - [28/Sep/2005:10:29:14 -0400] GET /PI/home.jsp HTTP/1.1 503 412 - Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 SESSIONID=128F9AD992A16BC3D3EB1ED0AD5549C1 I have watched in Ethereal as no traffic goes from the apache to the tomcat. I have tried using the loopback and local network address. I have tried adding a *.jsp directive to the mod_jk config for the servlet. Any help would be appreciated. I have a dent in my desk from hitting it with my forehead. Apache Config: #INSERT OF TOMCAT CONF PARAMETERS # Load mod_jk module # LoadModule jk_module modules/mod_jk.so LoadModule jk_module /etc/httpd/modules/mod_jk.so # Declare the module for IfModule directive #AddModule mod_jk.c # Where to find workers.properties JkWorkersFile /etc/httpd/conf/workers.properties # Where to put jk logs JkLogFile /var/log/httpd/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel debug # Select the log format JkLogStampFormat [%a %b %d %H:%M:%S %Y] # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat %w %V %T # Send servlet for context /examples to worker named worker1 JkMount /examples/servlet/* worker1 JkMount /PI/* worker3 #JkMount /PI/*.jsp worker3 # Send JSPs for context /examples to worker named worker1 JkMount /examples/*.jsp worker1 JkMount /journals/*.jsp worker1 Worker Properties /etc/httpd/conf/workers.properties # Define some properties workers.apache_log=/var/log/httpd/ workers.tomcat_home=/usr/local/tomcat/jakarta-tomcat-5.5.9 workers.java_home=/usr/bin/java ps=/ # worker.list=worker1 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=172.20.1.19 worker.worker1.port=8009 # worker.list=worker2 # Set properties for worker2 (ajp13) worker.worker2.type=ajp13 worker.worker2.host=172.20.1.19 worker.worker2.port=10009 # worker.list=worker3 # Set properties for worker3 (ajp13) worker.worker3.type=ajp13 worker.worker3.host=127.0.0.1 worker.worker3.port=8099 # worker.list=worker4 # Set properties for worker4 (ajp13) worker.worker4.type=ajp13 worker.worker4.host=172.20.1.19 worker.worker4.port=8099 _ Tim Pickard CrossRef Systems Support Analyst and Administrator 40 Salem Street Lynnfield, MA 01940 tpickard at crossref dot org 781 295 0072 x27 __
RE: Q:how to remove charset from HTTP responce to allow browser use a browser selected charset?
Hi Mark, Can you talk a little about what the data is.. Just form data from different locales? I store all my data in UTF-8 and just instruct the page encoding to be the same (UTF-8) and I'm able to handle input and display of whatever people enter. Had a few odd things to overcome to get it working like, JSP: I had to save the actual JSP file in UTF8 otherwise I couldn't get it to serve the page with UTF8 properly.. This started after Tomcat 5.0.16 or something like that. Servlet: don't think I had to do anything wild.. Just set the charset before you do anything with the output stream, including just getting a handle to the stream writer. Set the contenttype first. response.setContentType(text/html;charset=UTF-8); Depending on what you are reading from and such. You may also want to set some Java ARGs when starting Tomcat... Like: -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8 -DjavaEncoding=UTF-8 Not sure if this is relevant, but hope it helps, Rick -Original Message- From: Mark [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 12:13 PM Posted To: Tomcat Dev Conversation: Q:how to remove charset from HTTP responce to allow browser use a browser selected charset? Subject: Re: Q:how to remove charset from HTTP responce to allow browser use a browser selected charset? Hi Mark, In my case servlet generates an output, so no JSP for now... Can I do it using filters? Or define and store user's prefs with encoding outside of tomcat and in the session and use if it's exists in the session? Thanks a lot! Mark. --- Mark Thomas [EMAIL PROTECTED] wrote: Mark wrote: Hello, In my application users enter data using different languages. The problem I'm facing is the browser sets the page encoding always to ISO-8859-1. (I guess this is default based on server OS) User can change encoding on the page (Browser settings) and everything looks OK but only for one page. On the next page encoding is back to ISO-8859-1. Is there any way to instruct tomcat not to send the page encoding? If you are using JSPs, no. The spec requires that the charset is set. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Yahoo! for Good Donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] How much RAM can java use
This was probably one of the best threads I have 'listened' to in ages. I am researching setting up my own Tomcat hosting. This is going to be of use. -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: 06 October 2005 20:48 To: Tomcat Users List Subject: Re: [OT] How much RAM can java use Chuck, Ryan, thanx, you were extremely helpful! regards Leon On 10/6/05, J. Ryan Earl [EMAIL PROTECTED] wrote: Leon Rosenberg wrote: Debian 3.1, kernel 2.6.x-smp (32 bit) or Debian 3.1, kernel 2.6.x-smp-emt64 (64 bit) Hardware: AMD Opteron and Xeon64 (both 64 bit) SUN jdk1.5 and/or jdk1.4.2 4 GB total RAM for 32-bit linux, with 3/1 memory partitioning 16GB total RAM for 64-bit linux. I've tested 32/64 bit JVMs extensively and done considerable amount of JAVA_OPTS tuning for my company's application. On a 32-bit machine you can't reliably go above a -Xms=1600m without getting OOM errors. With a 3/1 split your virtual page table size for the entire JVM process must be below 3GB total virtual memory. That's 3GB allocated, not commited. The JVM allocates a lot more memory besides the heap. With the 64-bit JVMs, the sky's the limit, however the 64-bit address also make your application take up more space relative to a 32-bit JVM. A 3.2GB 64-bit heap space isn't going to double the amount of identical objects you can create as compared to a 32-bit 1.6GB heap space because all pointer references will occupy twice the space. -ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Converting webdav servlet to be accessed by webservice using axis
How can I convert/use the WebdavServlet class that is included in tomcat to be used a webservice using axis ? Thanks, Bhavin.
Re: help on a publication
I have this failure inside the log, when i am trying to see the context in the navigator.. i can solve this only fixing up the X Window ? I thought X Window had nothing to do with this could be another thing? thank you 2005-10-06 19:32:32 StandardContext[/alovmap]Context initialized 58 2005-10-06 19:32:32 StandardContext[/alovmap]Exception starting filter ogcFilter 59 java.lang.NoClassDefFoundError 60 at java.lang.Class.forName0(Native Method) 61 at java.lang.Class.forName(Class.java:141) 62 at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment( GraphicsEnvironment.java:62) 63 at java.awt.Font.initializeFont(Font.java:308) 64 at java.awt.Font.init(Font.java:344) 65 at org.alov.map.MapUtils.clinit(MapUtils.java:116) 66 at org.alov.serv.OGC_Filter.init(OGC_Filter.java:179) 67 at org.apache.catalina.core.ApplicationFilterConfig.getFilter( ApplicationFilterConfig.java:225) 68 at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef( ApplicationFilterConfig.java:308) 69 at org.apache.catalina.core.ApplicationFilterConfig.init( ApplicationFilterConfig.java:79) 70 at org.apache.catalina.core.StandardContext.filterStart( StandardContext.java:3702) 71 at org.apache.catalina.core.StandardContext.start(StandardContext.java :4329) 72 at org.apache.catalina.core.ContainerBase.addChildInternal( ContainerBase.java:823) 73 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java :807) 74 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) 75 at org.apache.catalina.core.StandardHostDeployer.install( StandardHostDeployer.java:277) 76 at org.apache.catalina.core.StandardHost.install(StandardHost.java:832) 77 at org.apache.catalina.startup.HostConfig.deployDirectories( HostConfig.java:701) 78 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432) 79 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) 80 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java :349) 81 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent( LifecycleSupport.java:119) 82 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) 83 at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) 84 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) 85 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) 86 at org.apache.catalina.core.StandardService.start(StandardService.java :480) 87 at org.apache.catalina.core.StandardServer.start(StandardServer.java :2313) 88 at org.apache.catalina.startup.Catalina.start(Catalina.java:556) 89 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 90 at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) 91 at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) 92 at java.lang.reflect.Method.invoke(Method.java:324) 93 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) 94 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) 2005/10/6, Hugo Osorio [EMAIL PROTECTED]: here the is what i have done, what could be the reason because this app is not showing up thank you in advance for your help -- by oxygene27 on 2005/10/04 16:39 Hi everybody again, please help, Is it necessary to have the database up, for having the webapp visible in tomcat? it's just that i have chose as a name mapserv BUT i cannot see my publication, it is in $TOMCAT_HOME/webapps/mapserv I have done 1. Create a dir in [TOMCAT_HOME]/webapps. 2. Unzip the distribution zip file into this folder. 3. i have created in mysql the database, running the script .sql 4. i have copied the mm.(connector JDBC).jar into the WEB-INF/lib directory 5. i have restarted Tomcat. and go to : http://myhost:8080/mapserv/index.html and appears like nothing exist :S does not appears anything, like a wrong application what can I do? by artem on 2005/10/04 21:37 1) Verify that the path to index database (clearinghouse) is correct. Open WEB-INF/mapserv-home/mapserv.xml. Check the section database user=root password= url=jdbc:mysql://localhost/alov driver=com.mysql.jdbc.Driver server=MySQL/ 2) Verify that SQL server is up. 3) Verify that web.xml in the WEB-INF The best way to check database is to enter into admin zone. http://localhost:8080/map/pump If Tomcat and our server are installed correctly you have to see the login screen. If connection to clearinghouse database is correct after login you won't see the error message. by oxygene27 on 2005/10/05 17:58 thank you, i have followed your indications, but i can't see the webapp yet, i dont know what's happening... all the servers are up, and the publication is its right place, this is the message i get: - HTTP Status 404 - /alovmap/index.html type Status report message /alovmap/index.html description The
RE: help on a publication
The reference in your stacktrace might be an indicator that you are not running tomcat in 'headless' mode. And now I understand from where the by so-and-so on such-and-such came from in your original email. Check out http://alov.org/topic.do?t_id=369 by artem on 2004/02/18 02:54 Make sure that java on your server is 1.3 or higher. To work in headless environment (without X server) you have to add the following line in your catalina.sh CATALINA_OPTS=-Djava.awt.headless=true $CATALINA_OPTS -Original Message- From: Hugo Osorio [mailto:[EMAIL PROTECTED] Sent: Thursday, October 06, 2005 5:15 PM To: Tomcat Users List Subject: Re: help on a publication I have this failure inside the log, when i am trying to see the context in the navigator.. i can solve this only fixing up the X Window ? I thought X Window had nothing to do with this could be another thing? thank you 2005-10-06 19:32:32 StandardContext[/alovmap]Context initialized 58 2005-10-06 19:32:32 StandardContext[/alovmap]Exception starting filter ogcFilter 59 java.lang.NoClassDefFoundError 60 at java.lang.Class.forName0(Native Method) 61 at java.lang.Class.forName(Class.java:141) 62 at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment( GraphicsEnvironment.java:62) 63 at java.awt.Font.initializeFont(Font.java:308) 64 at java.awt.Font.init(Font.java:344) 65 at org.alov.map.MapUtils.clinit(MapUtils.java:116) 66 at org.alov.serv.OGC_Filter.init(OGC_Filter.java:179) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Embedded Tomcat and SSL?
are you using Apace with Tomcat? I have done embedded Tomcat and SSL, but it was Apache sitting in front of Tomcat. On 10/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I am using an embedded tomcat instance within my application. I am trying to set up a connector using SSL. When I start the server, it creates the connector and bind to the port successfully. When I request a page from the web browser, I get the following error in my browser: The connection to the server has terminated unexpectedly. Some data may have been transferred. The same scenario works fine with HTTP. Here is my code snippet: // APPPORT and isSSLEnabled are set correctly to 8443 and true. Connector httpConnector = this._server.createConnector((java.net.InetAddress)null, Integer.parseInt(ApplicationResourcesUtil.getProperty(Constants.RESOURCEKEY_APPPORT)),isSSLEnabled); //add new Connector to set of Connectors for embedded server, associated with Engine this._server.addConnector(httpConnector); this._server.start(); Looking at the tomcat website, they talk about registering keystore. What APIs do I use to programmatically specify the keystore file? Is there something else that needs to be configured before SSL will work in the embedded more? Thanks, -Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mark certain contexts inactive?
Hi Scott, On 6 Oct 2005 at 13:43, Scott Purcell wrote: On my development machine, I have created quite a few contexts or webapp instances, and due to that fact, the startup time is increasing. I do not want to remove any of the contexts as they all mean something to me, but I would like to be able to mark them so they do not start up. And then be able to turn them on when needed. Is there a clean way of doing this? Not sure that you can do much at the Context level, but have you looked at the deployOnStartup attribute of the Host element in your server.xml file? As I understand it, if that is set to false, it will prevent a Host from being deployed until the server receives a request for that application. I usually create a new Host for each web application rather than adding contexts under the default host. The only functionality I lose this way is automated deployment of a _new_ application, but the benefits outweigh that loss for me. One benefit is the ability to stop an application from loading up on startup. HTH, Rob Hills Western Australia - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tracking Datasource Connection Usage?
Hi, On 6 Oct 2005 at 15:09, JWM wrote: I started getting exceptions saying no connections were available on my JDBC datasource (org.gjt.mm.mysql.Driver). The pool was definitely large enough to handle the load. So it appears that I'm not freeing the all the connections as I should. I noticed that I did not have the 'removeAbandoned' flag set on the Resource tag. Changing that has apparently fixed the out of connections problem. But I really want to clean up the code and fix it the right way. I've got the close() statements in place. But obviously, I'm missing some of them somewhere. Is there any process for logging/tracking allocating and freeing connections (and absence thereof.), available connections, etc? Or are there any methods I can call to give me this type of debug info? What's the recommended way to debug this? There have already been useful tips on debugging, but I've found that the most common way to chew up connections is to not put the code that frees the conneciton inside a finally {} block. If you don't free the connection in a finally {} block, it may not be freed if an exception occurs. HTH, Rob Hills Western Australia - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: Database connections aren't being released...
I've confirmed that we added the parameter removeAbandoned=true to the Database resource in the server.xml about a year ago and it had no effect. None of us think that we are not closing connecitons properlly.
Re: Tracking Datasource Connection Usage?
Rob Hills wrote: I started getting exceptions saying no connections were available on my JDBC datasource (org.gjt.mm.mysql.Driver). The pool was definitely large enough to handle the load. So it appears that I'm not freeing the all the connections as I should. I noticed that I did not have the 'removeAbandoned' flag set on the Resource tag. Changing that has apparently fixed the out of connections problem. But I really want to clean up the code and fix it the right way. I've got the close() statements in place. But obviously, I'm missing some of them somewhere. Is there any process for logging/tracking allocating and freeing connections (and absence thereof.), available connections, etc? Or are there any methods I can call to give me this type of debug info? What's the recommended way to debug this? There have already been useful tips on debugging, but I've found that the most common way to chew up connections is to not put the code that frees the conneciton inside a finally {} block. If you don't free the connection in a finally {} block, it may not be freed if an exception occurs. My understanding of finally is that it's ALWAYS executed, (even if something in any block (try or catch) does a return statement). So I would say finally is good practice to close both Statement handles and Database Connection handles. My first mistakes were in not closing statement handles this leaves resources open on handles that affect how the database connection can be reclaimed. I was used to closing the database connection and expecting the open statement or resultset to be mopped up right away. But if you think about it for a moment these resources might also be open on the SQL server through the connection and the GC takes a while to reclaim. try { // code 1 } catch(FooException e) { // code 2 } finally { // code 3 } // code 4 No exception execution is: code1 + code3 + code4 + end_of_func Caught FooException: code1 + code2 + code3 + return Uncaught Exception: code1 + code3 (thrown to callee) This is confirmed in my Just Java 2 (6th Edn) page 215. On another matter I am using Apache DBCP and am finding that it does not seem to use the pooled connections, it always created a new connection to the MySQL server, even if there are a number of already existing free connection. I am using a JNDI binding so the auth credentials should be working. I am still in development with the application. Resource name=jdbc/foobar auth=Container scope=Shareable type=javax.sql.DataSource factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory url=jdbc:mysql://mysql.domain.com:3306/databasename driverClassName=com.mysql.jdbc.Driver username=sqlusername password=sqlpassword maxWait=3000 maxIdle=2 maxActive=90 removeAbandonedTimeout=5 removeAbandoned=true / I too had to add extra flags in to get a stage connection pooler but believe there is something broken in DBCP that stops is re-using connections like it should. This has simply covered over the problem. Maybe we can get together and compare notes, any ideas how to enable verbose logging of DBCP so I can confirm the application is doing what it should ? I am using Hibernate3 have confirmed everytime that my servlet filter is closing the session and thus returning the connection back to DBCP like it should, the connection from MySQL SHOW PROCESSLIST are still connected and thus in the pool. But the next servlet request always opens a new connection, when I dont think it should, it should use the one already in the pool. Darryl -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot setup JNDI with MySQL
localhost has special meaning to the MySQL command line tool, this uses the Unix Domain socket for transport, like /tmp/mysql.sock this does not work with Java I don't believe there is any API to access Unix Domain sockets. Confirm: mysql -h localhost -u username -ppassword database AND mysql -h 127.0.0.1 -u username -ppassword database both work.. the first uses Unix Domain sockets the 2nd TCPIP socket, same as the Java JDBC driver uses. Maybe netstat -ton | grep 3306 can help you find where MySQL is connected with TCPIP. If you can't find it you need to look at my.cnf from mysql's var direction, maybe /opt/mysql/var/my.cnf and check you DONT have skip-networking set. Then check for port= and bind= values if its running on the non-standard settings than INADDR_ANY:3306. My question, in my (5.5.9) $CATALINE_HOME/common/lib I have: commons-el.jar jasper-compiler.jar jasper-compiler-jdt.jar jasper-runtime.jar jsp-api.jar mysql-connector-java-3.1.10-bin.jar naming-factory-dbcp.jar naming-factory.jar naming-resources.jar servlet-api.jar But you also have: commons-collections-3.1.jar commons-dbcp-1.2.1.jar commons-pool-1.2.jar I am having problems with naming-factory-dbcp.jar I'm not sure which base version it is for a start and it does not seem to re-use the connections in the pool. Is it possible to override the version shipped with TC adding a few files and changing the class path in the Resource to the official Apache one ? Do you know which version of DBCP is shipped with TC 5.5.9 ? Thanks Darryl -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Database connections aren't being released...
Richard Road Runner wrote: I am not sure that this is a Tomcat issue, but we are not sure what exactly is causing our problem. We are running Tomcat 5.0.27. We are using the most recent jconn2.jar driver to connect to a Sybase SQL Anywhere Studio 7 database via JDBC. Over a period of time, the number of connections to the database continues to increase far beyond the possible number of users. The only way to close the connections is to restart the database server. Are you using DBCP ? I have an issue with 5.5.9 and DBCP shipped with it I found 2 weeks ago. I would describe my problem as DBCP is not reusing database connections when it should but it instead creates a new one, until the SQL server has too many connections (or your DBCP hits upper parameter limits). With TC and MySQL I can confirm this by logging my database handle close and watching what happens with SHOW PROCESSLIST sql command on the server. Each request needs 1 database connection and the logging should confirm it returns (releases) the connection back to DBCP pool. I have followed this path with the debugger and got inside DBCP to prove the release takes place. I had put down the problem and just configured up my DBCP parameters to expire old connections as fast as possible and up the maximum limits. This wont work for me in production, maybe I switch to C3P0 connection pooling at that time. Its just so difficult to help out and nail the problem with TCs refactored and repackaged DBCP, I would very much appreciate an SDK version of the full TC package that includes all source in the JARs. I am doing a CVS build.xml now, but I think this will be for 5.5.12, I just need to work out how to fix the version for a 5.5.9 release and compare the two trees to maybe try and nail this one, or at least confirm the blame here is with DBCP. -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mod_jk + Apache on RHEL3 gives 503 for jsp only
--- [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have jakarta-tomcat-5.5.9 installed and working properly on the new server. It is perfectly accessible from the legacy web server. By perfectly accessible you mean . . . ? The main page, home.jsp, loads fine in the servlet if no page is given. http://webserver/PI/ The home.jsp spawns a 503 if is in the URL. http://webserver/PI/home.jsp I can successfully get images from the page from the tomcat instance. It does not like the .jsp extension. By successfully getting images, do you mean: http://webserver/PI/image.png or http://tomcatserver:8080/PI/image.png I have watched in Ethereal as no traffic goes from the apache to the tomcat. I have tried using the loopback and local network address. Why? Is this Tomcat instance on the same server? #INSERT OF TOMCAT CONF PARAMETERS # Load mod_jk module # LoadModule jk_module modules/mod_jk.so LoadModule jk_module /etc/httpd/modules/mod_jk.so # Declare the module for IfModule directive #AddModule mod_jk.c # Where to find workers.properties JkWorkersFile /etc/httpd/conf/workers.properties # Where to put jk logs JkLogFile /var/log/httpd/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel debug # Select the log format JkLogStampFormat [%a %b %d %H:%M:%S %Y] # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat %w %V %T I don't see the specification for JkShmFile # Send servlet for context /examples to worker named worker1 JkMount /examples/servlet/* worker1 The above should be: JkMount /servlets-examples/servlet/* worker1 JkMount /PI/* worker3 #JkMount /PI/*.jsp worker3 Why are you using worker3 here? # Send JSPs for context /examples to worker named worker1 JkMount /examples/*.jsp worker1 The above shoould be /jsp-examples/*.jsp worker1 JkMount /journals/*.jsp worker1 Worker Properties /etc/httpd/conf/workers.properties # Define some properties workers.apache_log=/var/log/httpd/ workers.tomcat_home=/usr/local/tomcat/jakarta-tomcat-5.5.9 workers.java_home=/usr/bin/java ps=/ # worker.list=worker1 According to the documentation this should contain a comma separated list of all the workers. However, if you're going to the same Tomcat instance all the time, you'll only need one worker definition # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=172.20.1.19 worker.worker1.port=8009 First of all, there should only be one worker list. Second of all, why do you have multiple workers going to the same host but different ports? Do you have multiple Tomcats running on this host? # worker.list=worker2 # Set properties for worker2 (ajp13) worker.worker2.type=ajp13 worker.worker2.host=172.20.1.19 worker.worker2.port=10009 # worker.list=worker3 # Set properties for worker3 (ajp13) worker.worker3.type=ajp13 worker.worker3.host=127.0.0.1 worker.worker3.port=8099 # worker.list=worker4 # Set properties for worker4 (ajp13) worker.worker4.type=ajp13 worker.worker4.host=172.20.1.19 worker.worker4.port=8099 Even after all that is done, there are some other issues when connecting Apache httpd and Tomcat. If Apache's DocumentRoot does not correspond to Tomcat's appBase, then any static files contained in the application will not be served by Apache without some more Apache configuration changes. There are several ways of accomplishing this, using the Directory directive and Aliases or JkAutoAlias in Apache's httpd.conf. /mde/ __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: precompiling JSPs -- how to resolve references normally resolved by apache?
Jon, Thanks for your help. The uribase and uriroot were not set correctly. Here is the final version that I got working. I had one additional twist that I needed to copy the JSP files to another location first using the ant copy task. I set uriroot to the webapps root {dir}/html, and then jasper2 automatically found the JSP files in the subdirectories under jsp/** and correctly resolved the references /jsp/**.jsp inside the JSP files. Once it works, it's great. But it several hours of frustration because tomcat4.x jasper often just print NullPointerExceptions instead of an error message. So you have to guess what is wrong. -Alex target name=jspc depends=init mkdir dir=${TMP_DIR}/html/ mkdir dir=${TMP_DIR}/WEB-INF/classes/ mkdir dir=${TMP_DIR}/WEB-INF/src/ copy todir=${TMP_DIR}/html flatten=false fileset dir=${TOP}/web/html include name=jsp/*.jsp/ /fileset /copy taskdef classname=org.apache.jasper.JspC name=jasper2 classpath id=jspc.classpath fileset dir=${BASE_ENG_DIR}/${TOMCAT_DIR}\common\endorsed include name=*.jar/ /fileset fileset dir=${BASE_ENG_DIR}/${TOMCAT_DIR}\common\lib include name=*.jar/ /fileset !-- compiled classes and 3rd party jars -- pathelement path=${CLASS_DIR}/ filelist refid=active.external.jar.filelist/ /classpath /taskdef !--property name=p1 refid=jspc.classpath/-- !--echoclasspath = ${p1}/echo-- jasper2 verbose=9 compiler=jasper41 validateXml=false uriroot=${TMP_DIR}/html webXmlFragment=${TMP_DIR}/WEB-INF/generated_web.xml outputDir=${TMP_DIR}/WEB-INF/src / /target target name=compile-server-jsps depends=init,jspc mkdir dir=${TMP_DIR}/WEB-INF/classes/ mkdir dir=${TMP_DIR}/WEB-INF/lib/ javac destdir=${TMP_DIR}/WEB-INF/classes optimize=off failonerror=true srcdir=${TMP_DIR}/WEB-INF/src excludes=**/*.smap classpath pathelement location=${TMP_DIR}/WEB-INF/classes/ path refid=jspc.classpath/ /classpath include name=** / exclude name=tags/** / /javac /target On Thu, 06 Oct 2005 14:06:23 +0100, Jon Wingfield [EMAIL PROTECTED] said: Unless you have a directory ${TOP}/web/html/jsp/jsp your uribase/uriroot probably aren't right. [EMAIL PROTECTED] wrote: Hi, I am trying to get our JSPs to be precompiled as part of our ant build process to catch all syntax errors at compile time. The problem I have run into is that we are using apache + tomcat and we have set the following rules in apache httpd. conf: JkMount /servlets/* ajp13 JkMount /jsp/* ajp13 JkMount /controller/* cont JkMount /cgi-bin/java-rmi.cgi ajp13 Inside some of our servlets and JSPs, they refer to other jsps using the absolute URL /jsp/ which works in deployed environment because apache redirects it. For example, in one JSP we have %@ include file=/jsp/Header.jsp % I setup the tomcat-4.1.30 ant jspc task and it was giving a NPE. Then I tried the Ant Jspc optional task, and it gave me an error message: the file '\Status.jsp' generated the following general exceptionn: org.apache.jasper.JasperExeption: /Status.jsp(3,0) File /jsp/Header.jsp not found Is there any quick and dirty way to get the JspC to resolve the /jsp/*.jsp urls to *.jsp or is there no way? My alternative is to try to change all the /jsp/*.jsp references to *.jsp everywhere we do an %@ include % or jsp:include/ or jsp:forward/. I think that would be ok since those directices are handled on the tomcat side. Changing it would be kind of messy since we have a ton of JSPs in a large directory hierarchy, so some of those /jsp/Header.jsp references would have to be changed to ../../Header.jsp, etc. I know I can't get away from the /jsp mapping completely because we have URLs and HTTP redirects which depend on it. Here is the quick and dirty jspc ant target I created: jspc srcdir=${TOP}/web/html/jsp uribase=${TOP}/web/html/jsp uriroot=${TOP}/web/html/jsp destdir=${TMP_DIR}/WEB-INF/src compiler=jasper41 verbose=9 include name=*.jsp/ classpath !--todo: including all the tomcat jars, overkill i know...-- fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\bin include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\common\endorsed