答复: 答复: An exception, would anybody tell me the reason?
Chris Thanks for replying. The thread dump is created in product server which I can't access directly. What u see is just part of snapshot for the stack when the server hang. I have no idea of what happened as well, so I will ask the one in charge of server for more info. Maybe the problem will be solved when I know more, maybe I will ask you again. Anyway, thank you for your help. Thank u, it seems I misunderstood the meaning of thread dump. The thread dump was created when the tomcat hang, could you find any clue of the reason? What you gave was was called a stack trace. Stack traces are generated when exceptions are thrown but not caught (they are caught by the Java VM and generally printed to standard output) or when a thread dump is requested. If you got a thread dump, then you must have requested one. As I recall, there didn't seem to be anything wrong with the dump you showed. Why don't you tell us more about what is happening? -chris - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem starting Tomcat 5.5 or 5.0 with java option, instead of jvm.
Hi I'm unable to start Tomcat (5.5.16, 5.0.28) when the startup mode is set to java Starting it in jvm mode is ok No errors in tomcat logs, Tried to find related information on the web, but all related info is did not help. This is a basic installarion, no modification have been made windows 2003 jdk1.5.0_07 Anyone? Thanks Itamar -- View this message in context: http://www.nabble.com/Problem-starting-Tomcat-5.5-or-5.0-with-java-option%2C-instead-of-jvm.-tf2031874.html#a5589514 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk connection_pool_size property
I have setup load balancing between Apache 1.3.33 and Tomcat 4.0.6 using the mod_jk connector. Initial tests were fine and the balancing seemed to work a treat. However, with any load on the server, I was seeing 503 errors reporting server unavailability. To resolve this issue, I set the following property in the workers.properties file: connection_pool_size=1000 which has resolved the immediate problem and the system can now process a heavy load without failure. The only thing that troubles me, that's preventing me from claiming success is the following note in red highlighting in the apache documentation, which can be viewed online at http://tomcat.apache.org/connectors-doc/config/workers.html. Extract: Do not use connection_pool_size with values higher then 1 on *Apache 2.xprefork * or *Apache 1.3.x*!. Can anyone explain the reason why this shouldnt be done? My system seems to work fine, but I'd be nervous going live with the configuration described above, without first understanding the warning in the apache docs. Any help will be great! JR
Servlet that needs ROOT access
Is it possible to run Tomcat as non ROOT (desirable as I see from FAQs/other threads), but have a servlet that needs ROOT access? Or is the solution to have the servlet application code running as a separate daemon outside tomcat, with some form of comms to tomcat servlet when tasks need to be done? -Paul - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet that needs ROOT access
It is possible to run as non root (assume the root here is root for Unix/Linux?) you can create a specific user say tomcat but still assign with group root, or you can create group tomcat, make sure your jdk is accessible by the tomcat user and or group Is you mean the root application in tomcat, yes you can, simply copy your web app structure (index.*, WEB-INF ) into root, or you can modify the server.xml baseDoc pointing to / but not webapps, so when you type xxx.xxx.xxx.xxx:8080, it will start up your application Not sure whether it is what you are asking.. On 8/1/06, Paul McMahon [EMAIL PROTECTED] wrote: Is it possible to run Tomcat as non ROOT (desirable as I see from FAQs/other threads), but have a servlet that needs ROOT access? Or is the solution to have the servlet application code running as a separate daemon outside tomcat, with some form of comms to tomcat servlet when tasks need to be done? -Paul - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- When we invent time, we invent death. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet that needs ROOT access
Yes I meant as root user in Linux, not the ROOT webapp. I could try giving tomcat user root group access; this is also potentially a security hole though? On Tuesday 01 August 2006 12:14, you wrote: It is possible to run as non root (assume the root here is root for Unix/Linux?) you can create a specific user say tomcat but still assign with group root, or you can create group tomcat, make sure your jdk is accessible by the tomcat user and or group Is you mean the root application in tomcat, yes you can, simply copy your web app structure (index.*, WEB-INF ) into root, or you can modify the server.xml baseDoc pointing to / but not webapps, so when you type xxx.xxx.xxx.xxx:8080, it will start up your application Not sure whether it is what you are asking.. On 8/1/06, Paul McMahon [EMAIL PROTECTED] wrote: Is it possible to run Tomcat as non ROOT (desirable as I see from FAQs/other threads), but have a servlet that needs ROOT access? Or is the solution to have the servlet application code running as a separate daemon outside tomcat, with some form of comms to tomcat servlet when tasks need to be done? -Paul - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Paul McMahon -01763 261 466 ext 569 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet that needs ROOT access
Hi Paul, If you use root to run, which means tomcat can access anywhere as your root can do upload a simple script (if you application has that function can crash your system), if you create a specific user and group, and define permission nicely, this specific user can only do specific thing as you dont need change most of other user and group's permission besides, you can ensure your tomcat by : 1. start it using catalina.sh with security manager, this would be more strict and you have to define your policy well otherwise your webapp will not even work 2. block certain hosts (assume you know some ip addresses or range always trying to break into system...) put them into /etc/hosts.deny 3. only open ports that you need, 4. use firewall 5, To make your tomcat secure is not just on tomcat itself but have to consider OS wide. Just Opinion, wish could help Regards Li On 8/1/06, Paul McMahon [EMAIL PROTECTED] wrote: Yes I meant as root user in Linux, not the ROOT webapp. I could try giving tomcat user root group access; this is also potentially a security hole though? On Tuesday 01 August 2006 12:14, you wrote: It is possible to run as non root (assume the root here is root for Unix/Linux?) you can create a specific user say tomcat but still assign with group root, or you can create group tomcat, make sure your jdk is accessible by the tomcat user and or group Is you mean the root application in tomcat, yes you can, simply copy your web app structure (index.*, WEB-INF ) into root, or you can modify the server.xml baseDoc pointing to / but not webapps, so when you type xxx.xxx.xxx.xxx:8080, it will start up your application Not sure whether it is what you are asking.. On 8/1/06, Paul McMahon [EMAIL PROTECTED] wrote: Is it possible to run Tomcat as non ROOT (desirable as I see from FAQs/other threads), but have a servlet that needs ROOT access? Or is the solution to have the servlet application code running as a separate daemon outside tomcat, with some form of comms to tomcat servlet when tasks need to be done? -Paul - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Paul McMahon -01763 261 466 ext 569 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- When we invent time, we invent death. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk not compiling correctly (apparently) - 'garbled' error
Found the problem, so in case anyone is interested: Chris wrote: My suggestion above is almost certainly the problem: you have two competing versions of Apache installed. You should pick one and uninstall the other. From experience, I have to say that using the version available from the package manager (does CentOS use RPM?) is almost always better than compiling everything yourself, because dependencies are generally checked appropriately, etc. when you let the package manager handle everything. Just my .02. -chris Despite my claiming Apache wasn't already installed, Chris was right. Sorry for my mistake and the resulting confusion. A 'yum list installed httpd' showed the previous version was present, and that explains the problem. We can at least get mod_jk compiled and installed now. Thanks for the help Chris! -Tim - Do you Yahoo!? Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
RE: Servlet that needs ROOT access
From: Paul McMahon [mailto:[EMAIL PROTECTED] Is it possible to run Tomcat as non ROOT, but have a servlet that needs ROOT access? No. Or is the solution to have the servlet application code running as a separate daemon outside tomcat, with some form of comms to tomcat servlet when tasks need to be done? That would be my preference if I were implementing this. How much of your 'servlet application code' *actually* needs root access? Can you partition into a small piece that does, and most that doesn't? Minimising your attack surface in this way would probably be useful. Can you give us any more information about what you're doing that requires root? Does it *have* to require root, or can the requirement be reduced so that a non-root Tomcat can also do the same thing? In one sense this opens up an alternative hole; in another, depending on what you're doing, that may be better than allowing unrestricted root access to all tasks. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Hi , 1.Have you fallowed the same steps whic is mentioned in this link.Pleasecheck once again . http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html and check one more link they also having the same problem http://forum.sun.com/jive/thread.jspa?threadID=101183tstart=0 2.Check your system weather its blocking the ports by navigating to virus scanner console if its there. Regards Raju On 8/1/06, David Smith [EMAIL PROTECTED] wrote: And you are sure your test with the client software was via TCP, not some other piped/ODBC connection scheme? I'm guessing this is a Windows system. Have you checked your firewall for allowing the connections? Also try using TCPMon from sysinternals.org to see what's happening with connections to the database. It's good at showing net connection on a Windows box in real time. --David Aynalem, Seblewengel (Trawick) wrote: Thanks David. I am able to connect to SQL Server 2000. Actually Tomcat 5.5.17 and SQL Server 2000 is on the same machine that I am working on. Could there be any other cause for this error: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect) -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 4:21 PM To: Tomcat Users List Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' Well this is supposed to be an SQL Server 2000 database server. Use it's client tool to connect to the database. If successful, your server is running. I'm not familiar with the product, but if you can find it in the preferences, make sure you connect via TCP just like tomcat would. --David Aynalem, Seblewengel (Trawick) wrote: Sorry to ask this... how do you verify server connection independently. This is my first time configuring doing database connection. Thanks a lot, -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 3:49 PM To: Tomcat Users List Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' Hmmm connection refused. Is your server listening for connections at jdbc:sqlserver://localhost:1433 ? Can you verify it independently? --David Aynalem, Seblewengel (Trawick) wrote: Thanks a lot... I do need to have a space in context.xml file. That solved the problem with xml syntax. I now seem to have problem with database connection. Here is the code I use to connect... InitialContext ic=null; DataSource ds=null; Connection conn = null; try { // testing ic = new InitialContext(); ds = (DataSource)ic.lookup(java:comp/env/jdbc/sqlserver); conn = ds.getConnection(); } catch (Exception e) { StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw, true)); lastError = sw.toString(); System.out.println(lastError); return false; } And the error I get is this... lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource( BasicDataSource.java:855) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection( BasicDataSource.java:540) at ISOTracking.SessionBean.login(SessionBean.java:217) at org.apache.jsp.ISOTracking.LoginAction_jsp._jspService(LoginAction_jsp.java:57) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:332) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:178)
RE: configuring 2 servlets on different ports
actually, they are already in separate webapps, and I still can't find a way to configure them to bind to separate ports. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 4:57 PM To: Tomcat Users List Subject: Re: configuring 2 servlets on different ports Jim, I'm using tomcat 5.5, and tried creating 2 services, each with a connector that used a different port. Whatever I try for the context within these services, it appears as if both servlets are available on both ports. Is there a magic combination of Context elements that would allow this? I think you'd need separate web.xml files for each context: one that maps only servlet #1 and one that maps only servlet #2. But that means that you aren't using the same exact configuration for both contexts, which might be a deal-breaker for you. -chris NOTICE: This message, including all attachments transmitted with it, is for the use of the addressee only. It may contain proprietary, confidential and/or legally privileged information belonging to Litle Co. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, you must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message. If you believe you have received this message in error, please delete it and all copies of it from your system and notify the sender immediately by reply e-mail. Thank you. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet that needs ROOT access
From: Paul McMahon [mailto:[EMAIL PROTECTED] The servlet application needs to do things like mkfs, vgcfgrestore, vgchange, mount and umount. I'd use setuid scripts with very careful permissions: - Write some shell scripts, one per action, to do what you need; - Audit those scripts for possible security holes; - Put the Tomcat process into its own group (let's call it 'tomcat'); - chown root.tomcat script - chmod 710 script - chmod u+s script - Call the scripts from the servlet. At this point, your threats come from: someone breaking into your servlet or installing a new servlet on the machine and running a script as Tomcat (damage limited to whatever the script can do); someone su-ing to tomcat (ditto); someone gaining the same group membership as Tomcat (ditto); someone affecting filestore and being able to change permissions (major damage); or holes in the scripts (damage potentially unlimited). There may be other threats I've not seen. But I ain't a security expert :-). - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat creates a cookie with a new jsessionid when timeout occurs
Hi there. I have the following problem in my web application. I am using the url rewriting method for session maintenance, but when a timeout occurs in my web application, tomcat sets a cookie named jsessionid (used for session tracking purposes) with a new session id value before redirecting the user to the login page. This jsessionid cookie value does not match the previous session id, it is a new one, and is also different from the new one created in the (re)login process. Why does this happen? Does tomcat always create a jsessionid cookie when a timeout occurs? And if this is a tomcat issue, how do I disallow this (if it is possible, anyway)? Regards, Luís Amorim
RE: configuring 2 servlets on different ports
All webapps listen on the same http port if deployed within the same tomcat instance. Your option is to deploy each webapp on its own instance of tomcat, each listening on a different port. Creating a new instance of tomcat means a separate JVM with all the additional needs from system resource perspective. Is this an option for you? -Original Message- From: Williams, Jim [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 9:20 AM To: Tomcat Users List Subject: RE: configuring 2 servlets on different ports actually, they are already in separate webapps, and I still can't find a way to configure them to bind to separate ports. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 4:57 PM To: Tomcat Users List Subject: Re: configuring 2 servlets on different ports Jim, I'm using tomcat 5.5, and tried creating 2 services, each with a connector that used a different port. Whatever I try for the context within these services, it appears as if both servlets are available on both ports. Is there a magic combination of Context elements that would allow this? I think you'd need separate web.xml files for each context: one that maps only servlet #1 and one that maps only servlet #2. But that means that you aren't using the same exact configuration for both contexts, which might be a deal-breaker for you. -chris NOTICE: This message, including all attachments transmitted with it, is for the use of the addressee only. It may contain proprietary, confidential and/or legally privileged information belonging to Litle Co. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, you must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message. If you believe you have received this message in error, please delete it and all copies of it from your system and notify the sender immediately by reply e-mail. Thank you. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Thanks David, Raju and Johnny for your time and valuable suggestions. To David's question: I checked Client Network Utility service for SQL server 2000 and saw that TCP/IP is enabled on port 1433. I do check the firewall, yes it was on. It has the option of adding exceptions to allow programs/service to connect to the machine. So I added SQL server 2000 on port 1433. I did netstat -an on command prompt to see active connection... but port 1433 is not listed. I also used sysinternals.org as suggested and SQL Server is not listed. This might mean SQL Server is not using TCP/IP on port 1433??? To Raju's question... I have tried to read and re-read tomcat manual... I will check if there is anything I missed. I am also trying to see how I can apply the solution suggested on the link provided. Jonny - SQL Server is installed as default instance... TCP/IP was enabled on port 1433. Any further help is higly appreciated. Thanks a lot. -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:26 AM To: Tomcat Users List Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' And you are sure your test with the client software was via TCP, not some other piped/ODBC connection scheme? I'm guessing this is a Windows system. Have you checked your firewall for allowing the connections? Also try using TCPMon from sysinternals.org to see what's happening with connections to the database. It's good at showing net connection on a Windows box in real time. --David Aynalem, Seblewengel (Trawick) wrote: Thanks David. I am able to connect to SQL Server 2000. Actually Tomcat 5.5.17 and SQL Server 2000 is on the same machine that I am working on. Could there be any other cause for this error: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect) -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 4:21 PM To: Tomcat Users List Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' Well this is supposed to be an SQL Server 2000 database server. Use it's client tool to connect to the database. If successful, your server is running. I'm not familiar with the product, but if you can find it in the preferences, make sure you connect via TCP just like tomcat would. --David Aynalem, Seblewengel (Trawick) wrote: Sorry to ask this... how do you verify server connection independently. This is my first time configuring doing database connection. Thanks a lot, -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 3:49 PM To: Tomcat Users List Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' Hmmm connection refused. Is your server listening for connections at jdbc:sqlserver://localhost:1433 ? Can you verify it independently? --David Aynalem, Seblewengel (Trawick) wrote: Thanks a lot... I do need to have a space in context.xml file. That solved the problem with xml syntax. I now seem to have problem with database connection. Here is the code I use to connect... InitialContext ic=null; DataSource ds=null; Connection conn = null; try { // testing ic = new InitialContext(); ds = (DataSource)ic.lookup(java:comp/env/jdbc/sqlserver); conn = ds.getConnection(); } catch (Exception e) { StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw, true)); lastError = sw.toString(); System.out.println(lastError); return false; } And the error I get is this... lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) at ISOTracking.SessionBean.login(SessionBean.java:217) at org.apache.jsp.ISOTracking.LoginAction_jsp._jspService(LoginAction_jsp.java:57) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
I think you have your answer. The SQL Server is not setup to listen on 1433 or not running. Address this and things should start working. --David Aynalem, Seblewengel (Trawick) wrote: Thanks David, Raju and Johnny for your time and valuable suggestions. To David's question: I checked Client Network Utility service for SQL server 2000 and saw that TCP/IP is enabled on port 1433. I do check the firewall, yes it was on. It has the option of adding exceptions to allow programs/service to connect to the machine. So I added SQL server 2000 on port 1433. I did netstat -an on command prompt to see active connection... but port 1433 is not listed. I also used sysinternals.org as suggested and SQL Server is not listed. This might mean SQL Server is not using TCP/IP on port 1433??? To Raju's question... I have tried to read and re-read tomcat manual... I will check if there is anything I missed. I am also trying to see how I can apply the solution suggested on the link provided. Jonny - SQL Server is installed as default instance... TCP/IP was enabled on port 1433. Any further help is higly appreciated. Thanks a lot. -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:26 AM To: Tomcat Users List Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' And you are sure your test with the client software was via TCP, not some other piped/ODBC connection scheme? I'm guessing this is a Windows system. Have you checked your firewall for allowing the connections? Also try using TCPMon from sysinternals.org to see what's happening with connections to the database. It's good at showing net connection on a Windows box in real time. --David Aynalem, Seblewengel (Trawick) wrote: Thanks David. I am able to connect to SQL Server 2000. Actually Tomcat 5.5.17 and SQL Server 2000 is on the same machine that I am working on. Could there be any other cause for this error: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect) -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 4:21 PM To: Tomcat Users List Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' Well this is supposed to be an SQL Server 2000 database server. Use it's client tool to connect to the database. If successful, your server is running. I'm not familiar with the product, but if you can find it in the preferences, make sure you connect via TCP just like tomcat would. --David Aynalem, Seblewengel (Trawick) wrote: Sorry to ask this... how do you verify server connection independently. This is my first time configuring doing database connection. Thanks a lot, -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 3:49 PM To: Tomcat Users List Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' Hmmm connection refused. Is your server listening for connections at jdbc:sqlserver://localhost:1433 ? Can you verify it independently? --David Aynalem, Seblewengel (Trawick) wrote: Thanks a lot... I do need to have a space in context.xml file. That solved the problem with xml syntax. I now seem to have problem with database connection. Here is the code I use to connect... InitialContext ic=null; DataSource ds=null; Connection conn = null; try { // testing ic = new InitialContext(); ds = (DataSource)ic.lookup(java:comp/env/jdbc/sqlserver); conn = ds.getConnection(); } catch (Exception e) { StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw, true)); lastError = sw.toString(); System.out.println(lastError); return false; } And the error I get is this... lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) at ISOTracking.SessionBean.login(SessionBean.java:217) at org.apache.jsp.ISOTracking.LoginAction_jsp._jspService(LoginAction_jsp.java:57) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
Re: configuring 2 servlets on different ports
Jim, actually, they are already in separate webapps, and I still can't find a way to configure them to bind to separate ports. Are you running a single instance of Tomcat with two connectors? Or, are you running two instances of Tomcat, each with one connector? I think the second option will do what you want. -chris signature.asc Description: OpenPGP digital signature
Re: Servlet that needs ROOT access
Everyone, The servlet application needs to do things like mkfs, vgcfgrestore, vgchange, mount and umount. Eek. From a webapp? I'd use setuid scripts with very careful permissions: - Write some shell scripts, one per action, to do what you need; - Audit those scripts for possible security holes; I agree. In fact, I might even go farther and suggest that you go with more a batch-job-list configuration, where your webapp drops descriptions of the work to be done into a directory or a database or something. Then, have a cron job or something like that come along every so often and process the jobs. Firing off new processes from Java can get ugly (even though it really shouldn't be), and if you are putting user input into your command-line, you're just asking for trouble. With batch-style processing, you generally treat everything as data and not as a command (as one might be tempted do when firing off a process from within the JVM). If you need to do stuff like mkfs, mount, etc. I assume that this is an /intranet/-style webapp -- meaning that your users are relatively trusted when compared to an open web site. -chris signature.asc Description: OpenPGP digital signature
Tomcat restart needed
Hi. In my web application, I have a thread running in the background that sends emails to the user when some event occurs. However, yesterday it stopped sending emails. I've checked catalina.out log and there was no exception in there, apparently it was all ok. So, I've restarted tomcat and things went back to normal, which means the thread started to send emails again. My question is: why did this happen, why was necessary to restart tomcat to get things right? Regards, Luís Amorim
Re: Tomcat creates a cookie with a new jsessionid when timeout occurs
Luis, I am using the url rewriting method for session maintenance, but when a timeout occurs in my web application, tomcat sets a cookie named jsessionid (used for session tracking purposes) with a new session id value before redirecting the user to the login page. This jsessionid cookie value does not match the previous session id, it is a new one, and is also different from the new one created in the (re)login process. This is expected behavior. Why does this happen? Does tomcat always create a jsessionid cookie when a timeout occurs? And if this is a tomcat issue, how do I disallow this (if it is possible, anyway)? Tomcat is creating a new session in this case because it is redirecting the user to the login page, and wants to make sure that the original request (the one that was intercepted in order to take the user to the login page) is fulfilled. It does this by storing that information in the session (or, if not actually /in/ the session, it is at least /related/ to the session). So, Tomcat is preparing for a login, and creates a session to handle everything. If you want to disable session creation, I think you are going to have to turn off container-managed authentication (and then you'll have to implement your own). -chris signature.asc Description: OpenPGP digital signature
RE: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
Hello Guru, The name of the application is actually mobiledoc, not myapp. In my previous e-mail I called it myapp for the sake of simplicity. From now on I will call it by its real name, mobiledoc. mobiledoc.xml does not exist in /usr/local/tomcat5/conf mobiledoc.xml does not exist in /home/myaccount/tomcat5/conf mobiledoc.xml exists in /usr/local/tomcat5/conf/Catalina/localhost mobiledoc.xml exists in /home/myaccount/tomcat5/conf/Catalina/localhost The contents of the file are as follows: Context path=/mobiledoc docBase=mobiledoc debug=1 reloadable=false /Context That's it. -- Eric Robinson -Original Message- From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 6:08 AM To: 'Tomcat Users List' Subject: RE: Someone Please: Why Is Tomcat Looking In The Wrong Directory? Can you post ( copy the content and paste it into the email ) the myapp.xml in the conf directory of tomcat ? Guru Gurumoorthy Raghupathy Systems Operations - Fidelity Investments International * Tel: +44 1737 836798 * Internal: 8-724 6798 * Tel (R): +442086610646 * Tel (R): +447899033459 * Tel (S): +447736059647 * Mail-Zone : XTW2A * E-Mail: mailto:[EMAIL PROTECTED] Important: Fidelity Investments International, Fidelity Investment Services Limited, Fidelity Pensions Management and Financial Administration Services Limited (a Fidelity Group company) are all authorised and regulated in the UK by the Financial Services Authority and have their registered offices at Oakhill House, 130 Tonbridge Road, Hildenborough, Tonbridge, Kent TN11 9DZ. Tel 01732 361144. Fidelity only gives information on products and does not give investment advice to private clients based on individual circumstances. Any comments or statements made are not necessarily those of Fidelity. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Fidelity may be subject to our monitoring procedures. 'Direct link to Fidelitys website. http://www.fidelity-international.com/world/index.html -Original Message- From: Robinson, Eric [mailto:[EMAIL PROTECTED] Sent: 01 August 2006 14:03 To: Tomcat Users List; Corobitsyn Roman Subject: RE: Someone Please: Why Is Tomcat Looking In The Wrong Directory? I checked and the permissions are correct, but I think you missed the basic problem. We have an application, myapp. It exists in /home/myaccount/tomcat5/webapps/myapp But tomcat is looking for it in /user/local/tomcat5/webapps/myapp Hence the file not found errors. The question is why does tomcat insist on looking for the app in the wrong place? $CATALINA_BASE is set correctly and other pages are being served correctly from /home/myaccount/tomcat5/webapps -- Eric Robinson -Original Message- From: Corobitsyn Roman [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 5:45 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? Hello Eric, Try to check OS permissions for dir webapps/myapp/conf Tuesday, August 1, 2006, 4:36:09 PM, you wrote: RE Hello all, RE When I start tomcat, I get several messages like these: RE java.io.FileNotFoundException: RE /usr/local/tomcat5/webapps/myapp/conf/myapp.properties (No such file RE or RE directory) RE This file actually exists in RE /home/myaccount/tomcat5/webapps/myapp/conf/myapp.properties RE I have $CATALINA_BASE set to /home/myaccount/tomcat5 RE My instance of tomcat is starting mostly fine. I can connect to it RE on my custom port and see my own default page, but for some reason RE tomcat is still looking for myapp in the directory specified by $CATALINA_HOME. RE Someone please take a moment and give me some tips on why this might RE be happening. RE Thanks much, RE -- RE Eric Robinson RE Disclaimer - August 1, 2006 RE This email and any files transmitted with it are confidential and RE intended solely for [EMAIL PROTECTED] If you are not the RE named addressee you should not disseminate, distribute, copy or RE alter this email. Any views or opinions presented in this email are RE solely those of the author and might not represent those of RE Physician Select Management (PSM) or Physician's Managed Care (PMC). RE Warning: Although the message sender has taken reasonable RE precautions to ensure no viruses are present in this email, neither RE PSM nor PMC can accept responsibility for any loss or damage arising RE from the use of this email or attachments. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Status 404 - /jsp-examples/
[EMAIL PROTECTED] wrote: Can't get the jsp-example to run, getting 404 error. I have installed tomcat 5.0.28 under AIX 5.3 and Java SDK 1.4.2. The service is running under the same account that I used to install. I have setup the following environment variables: CATALINA_HOME CATALINA_BASE JAVA_HOME I have added following to the path: /usr/java14/jre/bin:/usr/java14/bin The default page index.jsp from the webapps folder comes up okay and I can perform most of the admin functions however the jsp-examples and servelet examples return 404 error. I have installed tomcat multiple times yet no luck. Google has not been of any help. In the bugs database, only reference I found was to check on the tomcat users list. Seems like tomcat is missing the context path for jsp-examples, where would I check that? Shouldn't that be alreday defined in the default configuration files. Please advise, I am really frustrated. Thanks! Email Firewall made the following annotations NOTICE --- This message is for the designated recipient only and may contain confidential, privileged or proprietary information. If you have received it in error, please notify the sender immediately and delete the original and any copy or printout. Unintended recipients are prohibited from making any other use of this e-mail. Although we have taken reasonable precautions to ensure no viruses are present in this e-mail, we accept no liability for any loss or damage arising from the use of this e-mail or attachments, or for any delay or errors or omissions in the contents which result from e-mail transmission. - You didn't show an example of the url being called, so I must ask if you included the port on which tomcat is running in your call. ie http://host:8080/jsp-examples/some.jsp 8080 is the default, but it can be changed in the server.xml file. - Lou Caudell (Notice: This party reserves all rights) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Trawick, I do check the firewall, yes it was on. It has the option of adding exceptions to allow programs/service to connect to the machine. So I added SQL server 2000 on port 1433. This probably shouldn't have mattered, since you mentioned that everything is running on the local machine. The firewall usually won't interfere with localhost-localhost communications. I did netstat -an on command prompt to see active connection... but port 1433 is not listed. I also used sysinternals.org as suggested and SQL Server is not listed. This might mean SQL Server is not using TCP/IP on port 1433??? I'm not sure about SQL Server, but some DBs like MySQL allow localhost communication through some means /other than/ TCP (MySQL uses a named pipe on the filesystem -- not an option in win32 AFAIK). Anyhow, is it possible that TCP/IP communication is not enabled? This would suggest otherwise: I checked Client Network Utility service for SQL server 2000 and saw that TCP/IP is enabled on port 1433. Does that mean that SQL Server is expecting to accept connections on 1433? I assume so. Stupid question: is SQL Server actually running? -chris signature.asc Description: OpenPGP digital signature
Re: Tomcat restart needed
Luis, My question is: why did this happen, why was necessary to restart tomcat to get things right? This could have happened for lots of reasons. You'll to check your log files to see if you got any exceptions or anything like that. Specifically, check your application's log file (if you are using log4j or anything like that), then the context log created by Tomcat (usually called either [your-app].log or localhost.log), and then the standard output log (catalina.out). Hope that helps, -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk connection_pool_size property
Java Rab wrote: I have setup load balancing between Apache 1.3.33 and Tomcat 4.0.6 using the mod_jk connector. Initial tests were fine and the balancing seemed to work a treat. However, with any load on the server, I was seeing 503 errors reporting server unavailability. To resolve this issue, I set the following property in the workers.properties file: connection_pool_size=1000 which has resolved the immediate problem and the system can now process a heavy load without failure. The only thing that troubles me, that's preventing me from claiming success is the following note in red highlighting in the apache documentation, which can be viewed online at http://tomcat.apache.org/connectors-doc/config/workers.html. Extract: Do not use connection_pool_size with values higher then 1 on *Apache 2.xprefork * or *Apache 1.3.x*!. Can anyone explain the reason why this shouldnt be done? My system seems to work fine, but I'd be nervous going live with the configuration described above, without first understanding the warning in the apache docs. Any help will be great! Apache 1.3 and Apache 2.x-prefork create a separate child process for each client connection, meaning that if you have default 250 MaxClients, you can end up with MaxClients * connection_pool_size connections to the Tomcat, that would in your case be 25. Pretty high number, right :) With worker mpm the connection_pool_size defaults to ThreadsPerChild, that in the final gives the MaxClients connections to the Tomcat. So the default value for connection_pool_size is always ThreadsPerChild that with prefork mpm is by design always 1. I suggest that you Google for worker/prefork mpm theory and usability. Lots of OS vendors simply choose prefork mpm without any analysis, simply presuming its more safe then any semi threaded model. Regards, Mladen. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: where can I find the rule about how to translate JSP to servlet jave?
the JSPs (at runtime) automatically create a servlet in the work directory. Is that what you're asking? -Original Message- From: Peng Li [mailto:[EMAIL PROTECTED] Sent: Friday, July 28, 2006 7:55 PM To: users@tomcat.apache.org Subject: where can I find the rule about how to translate JSP to servlet jave? Hi in tomcat, the jsp is translated to java, and then compiled to class. does anyone know where can i find the rule about how to do the translation? appreciate any help cheers Peng - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat creates a cookie with a new jsessionid when timeout occurs
Hello, Christopher. Thanks for your reply. Can you please tell me how do I turn off container-managed authentication? Regards, Luís Amorim Christopher Schultz [EMAIL PROTECTED] 01-08-2006 15:19 Please respond to Tomcat Users List To: Tomcat Users List users@tomcat.apache.org cc: Subject: Re: Tomcat creates a cookie with a new jsessionid when timeout occurs Luis, I am using the url rewriting method for session maintenance, but when a timeout occurs in my web application, tomcat sets a cookie named jsessionid (used for session tracking purposes) with a new session id value before redirecting the user to the login page. This jsessionid cookie value does not match the previous session id, it is a new one, and is also different from the new one created in the (re)login process. This is expected behavior. Why does this happen? Does tomcat always create a jsessionid cookie when a timeout occurs? And if this is a tomcat issue, how do I disallow this (if it is possible, anyway)? Tomcat is creating a new session in this case because it is redirecting the user to the login page, and wants to make sure that the original request (the one that was intercepted in order to take the user to the login page) is fulfilled. It does this by storing that information in the session (or, if not actually /in/ the session, it is at least /related/ to the session). So, Tomcat is preparing for a login, and creates a session to handle everything. If you want to disable session creation, I think you are going to have to turn off container-managed authentication (and then you'll have to implement your own). -chris - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to disable cookies for session management in Tomcat
Hi You have to put in your context cookies=false For more have a look at http://tomcat.apache.org/tomcat-5.5-doc/config/context.html hope this help On 8/1/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi there. Is there any way to tell Tomcat to never use cookies for session management? Regards, Luís Amorim - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat restart needed
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] In my web application, I have a thread running in the background that sends emails to the user when some event occurs. However, yesterday it stopped sending emails. [...] My question is: why did this happen, why was necessary to restart tomcat to get things right? Any of a myriad reasons, but my first guess (until shown otherwise) would be your threading code. Writing threaded code so that it handles unusual conditions properly is *hard*. For example, are you *absolutely* sure that your code has *no* race conditions that would cause syncronisation between the email thread and any worker threads to be lost? Even if (say) two worker threads tried to submit jobs to the email thread at the same time? Did you take a thread dump before you restarted Tomcat to analyse for possible deadlocks? Are you running on a multi-core or hyperthreaded processor, where 'at the same time' takes on new meaning if you're used to a single CPU? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Yes, SQL Server is expected to accept connection on 1433 - which is the default port. For you question: SQL Server is running... I can see it clearly on the Task Manager. I am trying to see if it is actually using TCP/IP or named pipes... Thanks, -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 10:23 AM To: Tomcat Users List Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' Trawick, I do check the firewall, yes it was on. It has the option of adding exceptions to allow programs/service to connect to the machine. So I added SQL server 2000 on port 1433. This probably shouldn't have mattered, since you mentioned that everything is running on the local machine. The firewall usually won't interfere with localhost-localhost communications. I did netstat -an on command prompt to see active connection... but port 1433 is not listed. I also used sysinternals.org as suggested and SQL Server is not listed. This might mean SQL Server is not using TCP/IP on port 1433??? I'm not sure about SQL Server, but some DBs like MySQL allow localhost communication through some means /other than/ TCP (MySQL uses a named pipe on the filesystem -- not an option in win32 AFAIK). Anyhow, is it possible that TCP/IP communication is not enabled? This would suggest otherwise: I checked Client Network Utility service for SQL server 2000 and saw that TCP/IP is enabled on port 1433. Does that mean that SQL Server is expecting to accept connections on 1433? I assume so. Stupid question: is SQL Server actually running? -chris
Streaming PDF over HTTPS
Hi all, I have setup the standard 8443 ssl connector in Tomcat after creating my own certificate and everything works fine... My application has a few servlets that generate dynamic pdf files using the iText classes library. These work fine over http, but Tomcat gives me the following message if I run the application over https sun.security.validator.ValidatorException: No trusted certificate found This only happens with the pdf servlets, not with the other parts of the application... I am using IE 6, but I have the same problem with Firefox 1.5 and Netscape 8.1. Although I think this is a server side (Tomcat) configuration issue, I mention the browser because I know IE has a bug with streaming files over https. A workaround has been found and discussed here http://forum.java.sun.com/thread.jspa?forumID=45threadID=233446 I have tried to apply this, but to no avail... the code I use to stream is as below: /* . */ response.setContentType(application/pdf); response.setHeader(Pragma, public); response.setHeader(Cache-Control, max-age=0); response.setHeader(Content-Disposition, attachment; filename=aaa.pdf ); // the contentlength is needed for MSIE!!! response.setContentLength(baos.size()); // write ByteArrayOutputStream to the ServletOutputStream ServletOutputStream out = response.getOutputStream(); baos.writeTo(out); out.flush(); /* . */ can anyone help with this, please? Thank you very much for your help. Francesco ttps. A workaround has been - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: Servlet that needs ROOT access
[Marked OT as this is now some distance from Tomcat] From: Christopher Schultz [mailto:[EMAIL PROTECTED] I might even go farther and suggest that you go with more a batch-job-list configuration I was assuming the app was for interactive control and that the OP wanted the user of the webapp to see the outcome of their actions. If that's not the case, I agree that this approach can be made more secure and would also recommend it. With batch-style processing, you generally treat everything as data and not as a command (as one might be tempted do when firing off a process from within the JVM). I disagree somewhat. Sooner or later you're going to be invoking commands like mkfs from the command line, so you're building that command line anyway; you're simply a little further inside the walls before you need to do so. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Config Problem: Will Pay for a Quick Answer!
Please accept my apologies for being so direct, but we're in a huge hurry to get the answer to a tomcat configuration problem. I think it is a simple problem, but I have been unable to figure it out. (See my post earlier today entitled, Someone Please: Why Is Tomcat Looking In The Wrong Directory?) Would someone who knows tomcat very well please e-mail me directly or call 775.720.2082 (USA). I will be happy to pay for a consultative phone call that leads to a solution. I can also give you SSH access to the server to speed things up. Thank you, -- Eric Robinson Disclaimer - August 1, 2006 This email and any files transmitted with it are confidential and intended solely for Tomcat Users List. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
On 8/1/06, Robinson, Eric [EMAIL PROTECTED] wrote: mobiledoc.xml exists in /usr/local/tomcat5/conf/Catalina/localhost mobiledoc.xml exists in /home/myaccount/tomcat5/conf/Catalina/localhost The above just feels wrong -- why both places? I'd delete the first one. The contents of the file are as follows: Context path=/mobiledoc docBase=mobiledoc And you could certainly specify an absolute path for your docBase, if you're in a hurry :-) FWIW, -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
On Aug 1, 2006, at 10:15 AM, Robinson, Eric wrote: The contents of the file are as follows: Context path=/mobiledoc docBase=mobiledoc debug=1 reloadable=false /Context Just a stab in the dark, but why don't you try to put the absolute path to the mobiledoc webapp in the docBase attribute? It looks like something is getting screwy with your environment (CATLINA_{HOME| BASE} vars(?)). Like: Context path=/mobiledoc docBase=/home/myaccount/tomcat5/webapps/mobiledoc debug=1 reloadable=false / Check: + http://tomcat.apache.org/tomcat-5.5-doc/config/context.html and + http://tomcat.apache.org/tomcat-5.5-doc/config/host.html for some more ideas to hunt for. Hth, -steve - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sessions in Tomcat
I am running into a strange situation with my session using tomcat 5.0.I have a jsp that puts two objects into a session which is used by all succeeding jsp pages. The first browser session works fine and I can navigate thru all my pages without a problem. A few minutes later I open another browser window and I immediately get a null pointer exception. I traced the problem to accessing the objects in the session. The jsp that does a session.setAttribute(test,obj) works fine. When I do a System.out.println(Contents of obj=,obj) I get the proper value. But when I do a session.getAttribute(test) I get a null pointer exception. I checked Tomcat/conf/web.xml and see the session-config element set to 30 minutes. When I added to the jsp to check if the session is invalid do a request.getSession() to create a new session I get the same results. I finally tried going into Tomcat's manager and doing a reload. Both browser sessions bring to work normally, the original browser continues as if nothing happened and the second browser session loads without the null pointer exception. Is there something I am not setting? Even more bizarre, after I do a reload of the website if I open two browser windows very quickly they both succeed. When I let a browser window sit with no activity for more than two or three minutes and I click to a link to navigate thru my jsp pages I immediately get a null pointer exception anywhere I am accessing the one of the session objects. Here is my session entry in the web.xml session-config session-timeout30/session-timeout /session-config Any help would be appreciated. If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/
RE: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
I deleted the first one. It was a legacy of when the application used to be in that path. Same result. -- Eric Robinson Disclaimer - August 1, 2006 This email and any files transmitted with it are confidential and intended solely for Tomcat Users List. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments.-Original Message- From: Hassan Schroeder [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:06 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? On 8/1/06, Robinson, Eric [EMAIL PROTECTED] wrote: mobiledoc.xml exists in /usr/local/tomcat5/conf/Catalina/localhost mobiledoc.xml exists in /home/myaccount/tomcat5/conf/Catalina/localhost The above just feels wrong -- why both places? I'd delete the first one. The contents of the file are as follows: Context path=/mobiledoc docBase=mobiledoc And you could certainly specify an absolute path for your docBase, if you're in a hurry :-) FWIW, -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
Sorry, I cannot answer that question as I am not the developer. Although I called it myapp for simplicty, it is really a third-party application. -- Eric Robinson -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:23 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? I'm responding to the first message in the thread, but have read all of it. A thought: How are you opening this file? Hopefully it's via ServletContext.getResourceAsStream( /myapp/conf/myapp.properties ) ; --David Robinson, Eric wrote: Hello all, When I start tomcat, I get several messages like these: java.io.FileNotFoundException: /usr/local/tomcat5/webapps/myapp/conf/myapp.properties (No such file or directory) This file actually exists in /home/myaccount/tomcat5/webapps/myapp/conf/myapp.properties I have $CATALINA_BASE set to /home/myaccount/tomcat5 My instance of tomcat is starting mostly fine. I can connect to it on my custom port and see my own default page, but for some reason tomcat is still looking for myapp in the directory specified by $CATALINA_HOME. Someone please take a moment and give me some tips on why this might be happening. Thanks much, -- Eric Robinson Disclaimer - August 1, 2006 This email and any files transmitted with it are confidential and intended solely for [EMAIL PROTECTED] If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
On 8/1/06, Robinson, Eric [EMAIL PROTECTED] wrote: I deleted the first one. It was a legacy of when the application used to be in that path. Same result. And restarted Tomcat? What is your instance of Tomcat's relevant appBase pointing to? -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
Fair enough. Are the JSPs, servlets, etc., ... all being called from the /home/myaccount/tomcat5/webapps directory? Here's where I'm going with this: If resources like this properties file are being opened from the wrong location, but other webapp resources (images, jsps, servlets, etc., ...) are being served up from the proper location, it could be the result of bugs in your third party webapp. Maybe it's reliant on a hard coded path or a relative path to the current directory at the time tomcat was started. --David Robinson, Eric wrote: Sorry, I cannot answer that question as I am not the developer. Although I called it myapp for simplicty, it is really a third-party application. -- Eric Robinson -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:23 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? I'm responding to the first message in the thread, but have read all of it. A thought: How are you opening this file? Hopefully it's via ServletContext.getResourceAsStream( /myapp/conf/myapp.properties ) ; --David Robinson, Eric wrote: Hello all, When I start tomcat, I get several messages like these: java.io.FileNotFoundException: /usr/local/tomcat5/webapps/myapp/conf/myapp.properties (No such file or directory) This file actually exists in /home/myaccount/tomcat5/webapps/myapp/conf/myapp.properties I have $CATALINA_BASE set to /home/myaccount/tomcat5 My instance of tomcat is starting mostly fine. I can connect to it on my custom port and see my own default page, but for some reason tomcat is still looking for myapp in the directory specified by $CATALINA_HOME. Someone please take a moment and give me some tips on why this might be happening. Thanks much, -- Eric Robinson Disclaimer - August 1, 2006 This email and any files transmitted with it are confidential and intended solely for [EMAIL PROTECTED] If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP Status 404 - /jsp-examples/
I have tomcat 5.0.28 installed under AIX 5.03 (no issues under Windows): URL's tried: Tomcat default page: http://host:8080/ Next, I clicked on the jsp examples link on the default Page, it returned HTTP Status 404 - /jsp-examples/ http://host:8080/jsp-examples/ I even tried individual pages, same 404 return code: HTTP Status 404 - /jsp-examples/jsp2/simpletag/hello.jsp http://host:8080/jsp-examples/jsp2/simpletag/hello.jsp -Original Message- From: Lou Caudell [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 7:17 AM To: Tomcat Users List Subject: Re: HTTP Status 404 - /jsp-examples/ [EMAIL PROTECTED] wrote: Can't get the jsp-example to run, getting 404 error. I have installed tomcat 5.0.28 under AIX 5.3 and Java SDK 1.4.2. The service is running under the same account that I used to install. I have setup the following environment variables: CATALINA_HOME CATALINA_BASE JAVA_HOME I have added following to the path: /usr/java14/jre/bin:/usr/java14/bin The default page index.jsp from the webapps folder comes up okay and I can perform most of the admin functions however the jsp-examples and servelet examples return 404 error. I have installed tomcat multiple times yet no luck. Google has not been of any help. In the bugs database, only reference I found was to check on the tomcat users list. Seems like tomcat is missing the context path for jsp-examples, where would I check that? Shouldn't that be alreday defined in the default configuration files. Please advise, I am really frustrated. Thanks! Email Firewall made the following annotations -- -- NOTICE --- This message is for the designated recipient only and may contain confidential, privileged or proprietary information. If you have received it in error, please notify the sender immediately and delete the original and any copy or printout. Unintended recipients are prohibited from making any other use of this e-mail. Although we have taken reasonable precautions to ensure no viruses are present in this e-mail, we accept no liability for any loss or damage arising from the use of this e-mail or attachments, or for any delay or errors or omissions in the contents which result from e-mail transmission. - You didn't show an example of the url being called, so I must ask if you included the port on which tomcat is running in your call. ie http://host:8080/jsp-examples/some.jsp 8080 is the default, but it can be changed in the server.xml file. - Lou Caudell (Notice: This party reserves all rights) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5 and IPv6 configuration
Hans Müller wrote: currently I'm trying to set-up a standalone Tomcat 5.5.17 server in an IPv6 environment on a FreeBSD 6.1 machine. Unfortunately, Tomcat refuses to start. Here is the relevant content of the catalina.out log-file: SEVERE: StandardServer.await: create[8005]: java.net.BindException: Can't assign requested address [...] Then I looked at the particular portion of the source code which causes the exception and I found that the IPv4 address 127.0.0.1 is actually hardcoded several times there (in StandardServer.java, Catalina.java and some others). Of course, the JVM cannot create an IPv6 address using this IPv4 representation. Therefore I changed 127.0.0.1 to localhost, recompiled Tomcat and happily discovered that it is working now. BUT... since I can read everywhere that Tomcat should be IPv6 compliant, this code-change doesn't seem to be the real solution to me. Firtly I'm not the only one who is using IPv6 and secondly the developers are definitely not that stupid to hardcode an IPv4 address and thereby break IPv6 compatibility. So, I'd like to ask you if there is a configuration-only way to solve this issue, i.e. to avoid that StandardServer is being called? I've never had the problem you describe. I use Linux though. On my machine the shutdown port binds to IPv6 representation of 127.0.0.1: tcp6 0 0 :::127.0.0.1:8007 :::*LISTEN 7970/java (I've changed the port from 8005 to 8007). Are you using APR? If so, is IPv6 support compiled in? Regards mks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to disable cookies for session management in Tomcat
Luis, Is there any way to tell Tomcat to never use cookies for session management? RTFM: http://tomcat.apache.org/tomcat-4.1-doc/config/context.html Look for the 'cookies' attribute. -chris signature.asc Description: OpenPGP digital signature
Re: Tomcat creates a cookie with a new jsessionid when timeout occurs
Luis, Hello, Christopher. Thanks for your reply. Can you please tell me how do I turn off container-managed authentication? You need to remove any security-constraint elements from your web.xml file. Note that the presence of any security-constraint elements probably means that your application is expecting some kind of authentication. Don't turn off logins just because you're angry that sessions are being created ;) -chris signature.asc Description: OpenPGP digital signature
Re: Streaming PDF over HTTPS
Francesco, These work fine over http, but Tomcat gives me the following message if I run the application over https sun.security.validator.ValidatorException: No trusted certificate found This usually indicates that Java is trying to make an HTTPS connection to a server that does not have a trusted certificate installed locally. So, first: does your servlet make any outgoing HTTPS connections? If you are using something like Cocoon to do transformations or you are loading up some kind of page description file over HTTPS, then this may be the case. If you /are/ making such a connection, make sure that the cert for the remote server (even if it is the local server :) ) has been imported into your keystore that Java is using. -chris signature.asc Description: OpenPGP digital signature
Re: Sessions in Tomcat
Donald, The first browser session works fine and I can navigate thru all my pages without a problem. A few minutes later I open another browser window and I immediately get a null pointer exception. Is it possible that you are have cookies turned off and are having the JSP encode the jsessionid into each URL? If that's the case, you might be simply typing a URL into your second browser window that doesn't have this magic parameter, and therefore not getting a session. [After a restart, ] both browser sessions bring to work normally, the original browser continues as if nothing happened and the second browser session loads without the null pointer exception. No, that's just plain weird. Is there something I am not setting? Even more bizarre, after I do a reload of the website if I open two browser windows very quickly they both succeed. When I let a browser window sit with no activity for more than two or three minutes and I click to a link to navigate thru my jsp pages I immediately get a null pointer exception anywhere I am accessing the one of the session objects. Hmm... perhaps your browser is configured to prohibit cookie life longer than a couple of minutes??? Seems far-fetched, but you've got a weird problem. How are you getting your session? Can you post a bit of code? It would be particularly useful to see the code you use to create the session, to get the attributes (as well as verify that the session exists), and then the place where the NPE is being thrown. -chris signature.asc Description: OpenPGP digital signature
RE: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
Steve, Thanks for the idea. Unfortunately, it did not work. Here is what /home/myacct/tomcat5/conf/Catalina/localhost/mobiledoc.xml now looks like: Context path=/mobiledoc docBase=/home/myacct/tomcat5/webapps/mobiledoc debug=1 reloadable=false /Context But when I start tomcat, I get... java.io.FileNotFoundException: /usr/local/tomcat5/webapps/mobiledoc/conf/mobiledoccfg.properties (No such file or directory) Grrr... -- Eric Robinson Disclaimer - August 1, 2006 This email and any files transmitted with it are confidential and intended solely for [EMAIL PROTECTED] If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments.-Original Message- From: Steve Lianoglou [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:08 AM To: Tomcat Users List Cc: Robinson, Eric Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? On Aug 1, 2006, at 10:15 AM, Robinson, Eric wrote: The contents of the file are as follows: Context path=/mobiledoc docBase=mobiledoc debug=1 reloadable=false /Context Just a stab in the dark, but why don't you try to put the absolute path to the mobiledoc webapp in the docBase attribute? It looks like something is getting screwy with your environment (CATLINA_{HOME| BASE} vars(?)). Like: Context path=/mobiledoc docBase=/home/myaccount/tomcat5/webapps/mobiledoc debug=1 reloadable=false / Check: + http://tomcat.apache.org/tomcat-5.5-doc/config/context.html and + http://tomcat.apache.org/tomcat-5.5-doc/config/host.html for some more ideas to hunt for. Hth, -steve - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Status 404 - /jsp-examples/
Prahlad, URL's tried: Tomcat default page: http://host:8080/ Next, I clicked on the jsp examples link on the default Page, it returned HTTP Status 404 - /jsp-examples/ http://host:8080/jsp-examples/ I even tried individual pages, same 404 return code: HTTP Status 404 - /jsp-examples/jsp2/simpletag/hello.jsp http://host:8080/jsp-examples/jsp2/simpletag/hello.jsp Try looking at the server.xml file for Tomcat to see if the examples context is actually enabled. It might be commented-out or otherwise disabled. I don't have much experience with Tomcats after 4.1.32 :O but there are new ways of deploying webapps that you might have to check. When in doubt, check the auto-deply WAR directory to see if jsp-examples.war or anything like that is in there. -chris signature.asc Description: OpenPGP digital signature
Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
Eric, java.io.FileNotFoundException: /usr/local/tomcat5/webapps/mobiledoc/conf/mobiledoccfg.properties (No such file or directory) Grrr... Okay, time for the brute force method: $ grep conf/mobiledoccfg `find /home/myacct/tomcat5/ -type f` Assuming that you find a .class file (or even better, a Java or JSP file) that contains that path, poke around in there to see if the path has been hard-coded. If it has been hard-coded, call up your 3rd-party vendor and let them know, and ask for a patch. Here's a quick workaround: $ cd /usr/local/tomcat5 $ rm -rf conf (check to see if this is okay!!) $ ln -s /home/myaccount/tomcat5/conf . That ought to do the trick. You might have to turn on symlink following in order to get it working. If none of this makes sense or you can't find anything, I might be willing to take you up on your offer for payment to take a first-hand look. ;) -chris signature.asc Description: OpenPGP digital signature
RE: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
David, I do not know if the 3rd party app has hard-coded paths. I grepped for tomcat in the app directory and below and I see a couple of places where it is doing a System.GetProperty(tomcat.home), but that's about it. -- Eric Robinson -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:55 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? Fair enough. Are the JSPs, servlets, etc., ... all being called from the /home/myaccount/tomcat5/webapps directory? Here's where I'm going with this: If resources like this properties file are being opened from the wrong location, but other webapp resources (images, jsps, servlets, etc., ...) are being served up from the proper location, it could be the result of bugs in your third party webapp. Maybe it's reliant on a hard coded path or a relative path to the current directory at the time tomcat was started. --David Robinson, Eric wrote: Sorry, I cannot answer that question as I am not the developer. Although I called it myapp for simplicty, it is really a third-party application. -- Eric Robinson -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:23 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? I'm responding to the first message in the thread, but have read all of it. A thought: How are you opening this file? Hopefully it's via ServletContext.getResourceAsStream( /myapp/conf/myapp.properties ) ; --David Robinson, Eric wrote: Hello all, When I start tomcat, I get several messages like these: java.io.FileNotFoundException: /usr/local/tomcat5/webapps/myapp/conf/myapp.properties (No such file or directory) This file actually exists in /home/myaccount/tomcat5/webapps/myapp/conf/myapp.properties I have $CATALINA_BASE set to /home/myaccount/tomcat5 My instance of tomcat is starting mostly fine. I can connect to it on my custom port and see my own default page, but for some reason tomcat is still looking for myapp in the directory specified by $CATALINA_HOME. Someone please take a moment and give me some tips on why this might be happening. Thanks much, -- Eric Robinson Disclaimer - August 1, 2006 This email and any files transmitted with it are confidential and intended solely for [EMAIL PROTECTED] If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sessions in Tomcat
Cookies are turned on and I see the jsessionid in the url. I have even deleted the cookie and tried a refresh of the page. It recreates the cookie but I still get the same null pointer exception. The only way I have been able to get around the problem is to do a reload. I am running Tomcat 5.0. I have tried two different machines with the same results. Both are running Windows XP. I have even coded all the jsp pages to go back to the jsp that has the directive page session=true and where it sets the attributes. Still no success. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 12:46 PM To: Tomcat Users List Subject: Re: Sessions in Tomcat * PGP Signed by an unknown key: 08/01/2006 at 12:46:13 PM Donald, The first browser session works fine and I can navigate thru all my pages without a problem. A few minutes later I open another browser window and I immediately get a null pointer exception. Is it possible that you are have cookies turned off and are having the JSP encode the jsessionid into each URL? If that's the case, you might be simply typing a URL into your second browser window that doesn't have this magic parameter, and therefore not getting a session. [After a restart, ] both browser sessions bring to work normally, the original browser continues as if nothing happened and the second browser session loads without the null pointer exception. No, that's just plain weird. Is there something I am not setting? Even more bizarre, after I do a reload of the website if I open two browser windows very quickly they both succeed. When I let a browser window sit with no activity for more than two or three minutes and I click to a link to navigate thru my jsp pages I immediately get a null pointer exception anywhere I am accessing the one of the session objects. Hmm... perhaps your browser is configured to prohibit cookie life longer than a couple of minutes??? Seems far-fetched, but you've got a weird problem. How are you getting your session? Can you post a bit of code? It would be particularly useful to see the code you use to create the session, to get the attributes (as well as verify that the session exists), and then the place where the NPE is being thrown. -chris * Unknown Key * 0xF2EFD0F0 If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
Chris, It makes sense, but before I try the symlink approach, be advised of the full scenario. Multiple doctor's offices will be connected to the same server. Each office will have its own instance of tomcat running a copy (sometimes a different version) of the 3rd party app. The config files are different for each site. For example, the file /home/myacct/tomcat5/webapps/mobiledoc/mobiledocconfig.properties contains database connection information so each instance of the mobiledoc application connects to a matching mysql database (on a different server). Does the brute-force approach you outlined still apply? -- Eric Robinson Disclaimer - August 1, 2006 This email and any files transmitted with it are confidential and intended solely for Tomcat Users List. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments.-Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 9:55 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? Eric, java.io.FileNotFoundException: /usr/local/tomcat5/webapps/mobiledoc/conf/mobiledoccfg.properties (No such file or directory) Grrr... Okay, time for the brute force method: $ grep conf/mobiledoccfg `find /home/myacct/tomcat5/ -type f` Assuming that you find a .class file (or even better, a Java or JSP file) that contains that path, poke around in there to see if the path has been hard-coded. If it has been hard-coded, call up your 3rd-party vendor and let them know, and ask for a patch. Here's a quick workaround: $ cd /usr/local/tomcat5 $ rm -rf conf (check to see if this is okay!!) $ ln -s /home/myaccount/tomcat5/conf . That ought to do the trick. You might have to turn on symlink following in order to get it working. If none of this makes sense or you can't find anything, I might be willing to take you up on your offer for payment to take a first-hand look. ;) -chris - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Status 404 - /jsp-examples/
[EMAIL PROTECTED] wrote: I have tomcat 5.0.28 installed under AIX 5.03 (no issues under Windows): URL's tried: Tomcat default page: http://host:8080/ Next, I clicked on the jsp examples link on the default Page, it returned HTTP Status 404 - /jsp-examples/ http://host:8080/jsp-examples/ I even tried individual pages, same 404 return code: HTTP Status 404 - /jsp-examples/jsp2/simpletag/hello.jsp http://host:8080/jsp-examples/jsp2/simpletag/hello.jsp -Original Message- From: Lou Caudell [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 7:17 AM To: Tomcat Users List Subject: Re: HTTP Status 404 - /jsp-examples/ [EMAIL PROTECTED] wrote: Can't get the jsp-example to run, getting 404 error. I have installed tomcat 5.0.28 under AIX 5.3 and Java SDK 1.4.2. The service is running under the same account that I used to install. I have setup the following environment variables: CATALINA_HOME CATALINA_BASE JAVA_HOME I have added following to the path: /usr/java14/jre/bin:/usr/java14/bin The default page index.jsp from the webapps folder comes up okay and I can perform most of the admin functions however the jsp-examples and servelet examples return 404 error. I have installed tomcat multiple times yet no luck. Google has not been of any help. In the bugs database, only reference I found was to check on the tomcat users list. Seems like tomcat is missing the context path for jsp-examples, where would I check that? Shouldn't that be alreday defined in the default configuration files. Please advise, I am really frustrated. Thanks! Email Firewall made the following annotations -- -- NOTICE --- This message is for the designated recipient only and may contain confidential, privileged or proprietary information. If you have received it in error, please notify the sender immediately and delete the original and any copy or printout. Unintended recipients are prohibited from making any other use of this e-mail. Although we have taken reasonable precautions to ensure no viruses are present in this e-mail, we accept no liability for any loss or damage arising from the use of this e-mail or attachments, or for any delay or errors or omissions in the contents which result from e-mail transmission. - You didn't show an example of the url being called, so I must ask if you included the port on which tomcat is running in your call. ie http://host:8080/jsp-examples/some.jsp 8080 is the default, but it can be changed in the server.xml file. - Lou Caudell (Notice: This party reserves all rights) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Sounds silly, but I would place a simple html file in the directory to determine the status of your tomcat instance. Actually the default page at http://host:8080/ should be there. It's always a good idea to install all of the management/sample tools the first time on a new platform. - Lou Caudell (Notice: This party reserves all rights) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
I would think that you would want Application specific folder option of docBase in your context.xml -symlink All users of the box (unless specifically excluded) will operate with the symlink -docBase an attribute which is embedded in your webapps context /META-INF/context.xml If you only want to change the load point for your docs for your specific webapp you can modify docBase for your webapps context to quote You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host documentation available at http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Martin-- __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: Robinson, Eric [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: Tomcat Users List users@tomcat.apache.org Subject: RE: Someone Please: Why Is Tomcat Looking In The Wrong Directory? Date: Tue, 1 Aug 2006 10:02:27 -0700 MIME-Version: 1.0 Received: from mail.apache.org ([209.237.227.199]) by bay0-mc10-f8.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Tue, 1 Aug 2006 10:03:04 -0700 Received: (qmail 1922 invoked by uid 500); 1 Aug 2006 17:02:51 - Received: (qmail 1910 invoked by uid 99); 1 Aug 2006 17:02:51 - Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49)by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2006 10:02:51 -0700 Received: pass (asf.osuosl.org: local policy) Received: from [71.9.23.10] (HELO ns1c.nvipa.com) (71.9.23.10)by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2006 10:02:51 -0700 Received: from ipa-vault.nvipa.com (unknown [71.9.23.9])by ns1c.nvipa.com (Postfix) with ESMTP id A0E25114218for users@tomcat.apache.org; Tue, 1 Aug 2006 10:36:59 -0700 (PDT) Received: from mail pickup service by ipa-vault.nvipa.com with Microsoft SMTPSVC; Tue, 1 Aug 2006 10:02:31 -0700 X-Message-Info: LsUYwwHHNt0voKmStxjXEixp3BQ5WzKbBHp64yvqDxQ= Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk List-Help: mailto:[EMAIL PROTECTED] List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Post: mailto:users@tomcat.apache.org List-Id: users.tomcat.apache.org Delivered-To: mailing list users@tomcat.apache.org X-ASF-Spam-Status: No, hits=0.0 required=10.0tests= X-Spam-Check-By: apache.org Content-Class: urn:content-classes:message X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Someone Please: Why Is Tomcat Looking In The Wrong Directory? thread-index: Aca1ite8yMjJ3haQSAqx+0a5HfS/fwAAHa3g X-OriginalArrivalTime: 01 Aug 2006 17:02:31.0030 (UTC) FILETIME=[468C8160:01C6B58C] X-Virus-Checked: Checked by ClamAV on apache.org Return-Path: [EMAIL PROTECTED] Chris, It makes sense, but before I try the symlink approach, be advised of the full scenario. Multiple doctor's offices will be connected to the same server. Each office will have its own instance of tomcat running a copy (sometimes a different version) of the 3rd party app. The config files are different for each site. For example, the file /home/myacct/tomcat5/webapps/mobiledoc/mobiledocconfig.properties contains database connection information so each instance of the mobiledoc application connects to a matching mysql database (on a different server). Does the brute-force approach you outlined still apply? -- Eric Robinson Disclaimer - August 1, 2006 This email and any files transmitted with it are confidential and intended solely for Tomcat Users List. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments.-Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 9:55 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? Eric, java.io.FileNotFoundException: /usr/local/tomcat5/webapps/mobiledoc/conf/mobiledoccfg.properties (No such file or directory) Grrr... Okay, time for the brute force method: $ grep conf/mobiledoccfg `find /home/myacct/tomcat5/ -type f` Assuming that you find a .class file (or even better, a Java or JSP file) that contains that path, poke around in there to see if
Re: HTTP Status 404 - /jsp-examples/
Lou- I have noted these maladies can happen when Tomcat's default-servlet is not configured correctly Please display configuration for defaultServlet located at $CATALINA_HOME/conf/web.xml (it should look something like) servlet servlet-namedefault/servlet-name servlet-class org.apache.catalina.servlets.DefaultServlet /servlet-class init-param param-namedebug/param-name param-value0/param-value /init-param init-param param-namelistings/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet ... servlet-mapping servlet-namedefault/servlet-name url-pattern//url-pattern /servlet-mapping doc available at http://tomcat.apache.org/tomcat-5.5-doc/default-servlet.html#what HTH, Martin-- __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. [EMAIL PROTECTED] wrote: I have tomcat 5.0.28 installed under AIX 5.03 (no issues under Windows): URL's tried: Tomcat default page: http://host:8080/ Next, I clicked on the jsp examples link on the default Page, it returned HTTP Status 404 - /jsp-examples/ http://host:8080/jsp-examples/ I even tried individual pages, same 404 return code: HTTP Status 404 - /jsp-examples/jsp2/simpletag/hello.jsp http://host:8080/jsp-examples/jsp2/simpletag/hello.jsp -Original Message- From: Lou Caudell [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 7:17 AM To: Tomcat Users List Subject: Re: HTTP Status 404 - /jsp-examples/ [EMAIL PROTECTED] wrote: Can't get the jsp-example to run, getting 404 error. I have installed tomcat 5.0.28 under AIX 5.3 and Java SDK 1.4.2. The service is running under the same account that I used to install. I have setup the following environment variables: CATALINA_HOME CATALINA_BASE JAVA_HOME I have added following to the path: /usr/java14/jre/bin:/usr/java14/bin The default page index.jsp from the webapps folder comes up okay and I can perform most of the admin functions however the jsp-examples and servelet examples return 404 error. I have installed tomcat multiple times yet no luck. Google has not been of any help. In the bugs database, only reference I found was to check on the tomcat users list. Seems like tomcat is missing the context path for jsp-examples, where would I check that? Shouldn't that be alreday defined in the default configuration files. Please advise, I am really frustrated. Thanks! Email Firewall made the following annotations -- -- NOTICE --- This message is for the designated recipient only and may contain confidential, privileged or proprietary information. If you have received it in error, please notify the sender immediately and delete the original and any copy or printout. Unintended recipients are prohibited from making any other use of this e-mail. Although we have taken reasonable precautions to ensure no viruses are present in this e-mail, we accept no liability for any loss or damage arising from the use of this e-mail or attachments, or for any delay or errors or omissions in the contents which result from e-mail transmission. - You didn't show an example of the url being called, so I must ask if you included the port on which tomcat is running in your call. ie http://host:8080/jsp-examples/some.jsp 8080 is the default, but it can be changed in the server.xml file. - Lou Caudell (Notice: This party reserves all rights) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Sounds silly, but I would place a simple html file in the directory to determine the status of your tomcat instance. Actually the default page at http://host:8080/ should be there. It's always a good idea to install all of the management/sample tools the first time on a new platform. - Lou Caudell (Notice: This party reserves all rights) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:
Tomcat 5.5 Configuration Question
I'm trying to set up Tomcat 5.5 to run an internally developed web application. The machine on which Tomcat is installed will only ever run this one application. I would like to install the application in such a way that when a URL such as: http://localhost:8080/ is entered, the user will be running my web application. Right now the 'default' application brings me to the Tomcat page which has items on it which allow me to manage the server. I would like this application to be located somewhere other than as the root application. Also, I realize that I could rename my .war file to be ROOT.war and it would likely expand into ROOT and become the default application, but I want the application to be stored in appname.war. I've been running this application with Resin and in Resin I can configure the root application in the resin.conf configuration file. I've looked at the various Tomcat configuration files and I can't figure out how, where or if there is a way to do this. Any tips on how I might go about doing this would be greatly appreciated. Thanks! -- James Howe - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
Eric, It makes sense, but before I try the symlink approach, be advised of the full scenario. Multiple doctor's offices will be connected to the same server. Each office will have its own instance of tomcat running a copy (sometimes a different version) of the 3rd party app. The config files are different for each site. Does each office have their own copy of the software running /on the same machine/? If so, i think you might be out of luck. If they're on different machines, then you can just pick the target directory that is appropriate for the configuration file. If you're all on one machine, then maybe you can create the /usr/local/tomcat5/conf directory and use separate symlinks for each individual file -- perhaps that will do the trick. I don't quite understand your deployment strategy, so I can't be sure if I know that you mean. Just 'cause I'm curious: what software are you running? -chris signature.asc Description: OpenPGP digital signature
RE: clustering problem
I have a question of the architecture you created..i am interseting in it. Do you have a document how you did this? thx Maarten -Oorspronkelijk bericht- Van: Sharma, Siddharth [mailto:[EMAIL PROTECTED] Verzonden: maandag 31 juli 2006 23:06 Aan: Tomcat Users List Onderwerp: clustering problem Hi We have a 4 machine configuration. Each machine has: 1. 3 Tomcat instances (so total 12 instances) 2. 1 Apache with mod_jk (so total 4 Apaches) The Apaches/mod_jks are fronted by a hardware load balancer. Each mod_jk load balances across all 12 tomcats. In other words, you could hit any one of the four Apaches/mod_jks and get load balanced to any one of the 12 tomcats. Once you hit one tomcat, you are sticky to it. All this works, but I am wondering if there is a way to do tomcat instance targeting. In other words, indicate to mod_jk that the request should be sent to a specific tomcat instance. This is useful to check if each instance is up and accepting. I am not worried about DoS since a proxy sits between the client and the Apaches that maintains the jsessionid cookie for the client and does not accept it from the client. Any ideas? Thanks -Sidd - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.5/403 - Release Date: 28-7-2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.5/404 - Release Date: 31-7-2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering problem
Which part? The apache tomcat specific stuff? This is available on the tomcat website. Look at the connectors section. That's how I configured everything. The proxy? That's proprietary. Sorry cannot divulge. -Original Message- From: MW Janssen [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 2:22 PM To: 'Tomcat Users List' Subject: RE: clustering problem I have a question of the architecture you created..i am interseting in it. Do you have a document how you did this? thx Maarten -Oorspronkelijk bericht- Van: Sharma, Siddharth [mailto:[EMAIL PROTECTED] Verzonden: maandag 31 juli 2006 23:06 Aan: Tomcat Users List Onderwerp: clustering problem Hi We have a 4 machine configuration. Each machine has: 1. 3 Tomcat instances (so total 12 instances) 2. 1 Apache with mod_jk (so total 4 Apaches) The Apaches/mod_jks are fronted by a hardware load balancer. Each mod_jk load balances across all 12 tomcats. In other words, you could hit any one of the four Apaches/mod_jks and get load balanced to any one of the 12 tomcats. Once you hit one tomcat, you are sticky to it. All this works, but I am wondering if there is a way to do tomcat instance targeting. In other words, indicate to mod_jk that the request should be sent to a specific tomcat instance. This is useful to check if each instance is up and accepting. I am not worried about DoS since a proxy sits between the client and the Apaches that maintains the jsessionid cookie for the client and does not accept it from the client. Any ideas? Thanks -Sidd - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.5/403 - Release Date: 28-7-2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.5/404 - Release Date: 31-7-2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
Hmmm. and the plot thickens. Have you asked the vendor about this issue? Can they offer any insights as to how they access the myapp.properties file? --David Robinson, Eric wrote: David, I do not know if the 3rd party app has hard-coded paths. I grepped for tomcat in the app directory and below and I see a couple of places where it is doing a System.GetProperty(tomcat.home), but that's about it. -- Eric Robinson -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:55 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? Fair enough. Are the JSPs, servlets, etc., ... all being called from the /home/myaccount/tomcat5/webapps directory? Here's where I'm going with this: If resources like this properties file are being opened from the wrong location, but other webapp resources (images, jsps, servlets, etc., ...) are being served up from the proper location, it could be the result of bugs in your third party webapp. Maybe it's reliant on a hard coded path or a relative path to the current directory at the time tomcat was started. --David Robinson, Eric wrote: Sorry, I cannot answer that question as I am not the developer. Although I called it myapp for simplicty, it is really a third-party application. -- Eric Robinson -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:23 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? I'm responding to the first message in the thread, but have read all of it. A thought: How are you opening this file? Hopefully it's via ServletContext.getResourceAsStream( /myapp/conf/myapp.properties ) ; --David Robinson, Eric wrote: Hello all, When I start tomcat, I get several messages like these: java.io.FileNotFoundException: /usr/local/tomcat5/webapps/myapp/conf/myapp.properties (No such file or directory) This file actually exists in /home/myaccount/tomcat5/webapps/myapp/conf/myapp.properties I have $CATALINA_BASE set to /home/myaccount/tomcat5 My instance of tomcat is starting mostly fine. I can connect to it on my custom port and see my own default page, but for some reason tomcat is still looking for myapp in the directory specified by $CATALINA_HOME. Someone please take a moment and give me some tips on why this might be happening. Thanks much, -- Eric Robinson Disclaimer - August 1, 2006 This email and any files transmitted with it are confidential and intended solely for [EMAIL PROTECTED] If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Status 404 - /jsp-examples/
Martin Gainty wrote: Lou- I have noted these maladies can happen when Tomcat's default-servlet is not configured correctly Please display configuration for defaultServlet located at $CATALINA_HOME/conf/web.xml (it should look something like) servlet servlet-namedefault/servlet-name servlet-class org.apache.catalina.servlets.DefaultServlet /servlet-class init-param param-namedebug/param-name param-value0/param-value /init-param init-param param-namelistings/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet ... servlet-mapping servlet-namedefault/servlet-name url-pattern//url-pattern /servlet-mapping doc available at http://tomcat.apache.org/tomcat-5.5-doc/default-servlet.html#what HTH, Martin-- __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. [EMAIL PROTECTED] wrote: I have tomcat 5.0.28 installed under AIX 5.03 (no issues under Windows): URL's tried: Tomcat default page: http://host:8080/ Next, I clicked on the jsp examples link on the default Page, it returned HTTP Status 404 - /jsp-examples/ http://host:8080/jsp-examples/ I even tried individual pages, same 404 return code: HTTP Status 404 - /jsp-examples/jsp2/simpletag/hello.jsp http://host:8080/jsp-examples/jsp2/simpletag/hello.jsp -Original Message- From: Lou Caudell [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 7:17 AM To: Tomcat Users List Subject: Re: HTTP Status 404 - /jsp-examples/ [EMAIL PROTECTED] wrote: Can't get the jsp-example to run, getting 404 error. I have installed tomcat 5.0.28 under AIX 5.3 and Java SDK 1.4.2. The service is running under the same account that I used to install. I have setup the following environment variables: CATALINA_HOME CATALINA_BASE JAVA_HOME I have added following to the path: /usr/java14/jre/bin:/usr/java14/bin The default page index.jsp from the webapps folder comes up okay and I can perform most of the admin functions however the jsp-examples and servelet examples return 404 error. I have installed tomcat multiple times yet no luck. Google has not been of any help. In the bugs database, only reference I found was to check on the tomcat users list. Seems like tomcat is missing the context path for jsp-examples, where would I check that? Shouldn't that be alreday defined in the default configuration files. Please advise, I am really frustrated. Thanks! Email Firewall made the following annotations -- -- NOTICE --- This message is for the designated recipient only and may contain confidential, privileged or proprietary information. If you have received it in error, please notify the sender immediately and delete the original and any copy or printout. Unintended recipients are prohibited from making any other use of this e-mail. Although we have taken reasonable precautions to ensure no viruses are present in this e-mail, we accept no liability for any loss or damage arising from the use of this e-mail or attachments, or for any delay or errors or omissions in the contents which result from e-mail transmission. - You didn't show an example of the url being called, so I must ask if you included the port on which tomcat is running in your call. ie http://host:8080/jsp-examples/some.jsp 8080 is the default, but it can be changed in the server.xml file. - Lou Caudell (Notice: This party reserves all rights) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Sounds silly, but I would place a simple html file in the directory to determine the status of your tomcat instance. Actually the default page at http://host:8080/ should be there. It's always a good idea to install all of the management/sample tools the first time on a new platform. - Lou Caudell (Notice: This party reserves all rights) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
org.apache.catalina.servlets.DefaultServlet won't deallocate
Hi, Sometimes when I reload/shutdown my application I see this error message in tomcat's console window: 1-Aug-2006 3:06:50 PM org.apache.catalina.core.StandardWrapper unload INFO: Waiting for 26 instance(s) to be deallocated The number of instances is never the same. I made myself a custom tomcat build and added some debug in org.apache.catalina.core.StandardWrapper.unload() to know what class those instances belongs to. The instances which cannot be deallocated are instances of org.apache.catalina.servlets.DefaultServlet. Anybody has an idea of what could cause this? Thank you -- Jean-Francois Beaulac [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
Okay, so I finally connected with someone at the vendor. Surprise! It turns out they do not follow the standard method for creating multiple instances of tomcat, i.e., by using $CATALINA_BASE. Instead, I was advised to copy the entire tomcat directory structure for each instance. I did this and it worked. I also had to create a new entry in init.d for the new tomcat service and edit a few other files, but at least now it is working. Talk about brute force! At least its good to know I wasn't being a complete ninny with the way I was configuring it. Nonetheless, THANKS VERY MUCH TO ALL for the many responses. I am completely floored by the amount of help people offered. This is a very active list, to say the least. -- Eric Robinson -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 11:34 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? Hmmm. and the plot thickens. Have you asked the vendor about this issue? Can they offer any insights as to how they access the myapp.properties file? --David Robinson, Eric wrote: David, I do not know if the 3rd party app has hard-coded paths. I grepped for tomcat in the app directory and below and I see a couple of places where it is doing a System.GetProperty(tomcat.home), but that's about it. -- Eric Robinson -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:55 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? Fair enough. Are the JSPs, servlets, etc., ... all being called from the /home/myaccount/tomcat5/webapps directory? Here's where I'm going with this: If resources like this properties file are being opened from the wrong location, but other webapp resources (images, jsps, servlets, etc., ...) are being served up from the proper location, it could be the result of bugs in your third party webapp. Maybe it's reliant on a hard coded path or a relative path to the current directory at the time tomcat was started. --David Robinson, Eric wrote: Sorry, I cannot answer that question as I am not the developer. Although I called it myapp for simplicty, it is really a third-party application. -- Eric Robinson -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:23 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? I'm responding to the first message in the thread, but have read all of it. A thought: How are you opening this file? Hopefully it's via ServletContext.getResourceAsStream( /myapp/conf/myapp.properties ) ; --David Robinson, Eric wrote: Hello all, When I start tomcat, I get several messages like these: java.io.FileNotFoundException: /usr/local/tomcat5/webapps/myapp/conf/myapp.properties (No such file or directory) This file actually exists in /home/myaccount/tomcat5/webapps/myapp/conf/myapp.properties I have $CATALINA_BASE set to /home/myaccount/tomcat5 My instance of tomcat is starting mostly fine. I can connect to it on my custom port and see my own default page, but for some reason tomcat is still looking for myapp in the directory specified by $CATALINA_HOME. Someone please take a moment and give me some tips on why this might be happening. Thanks much, -- Eric Robinson Disclaimer - August 1, 2006 This email and any files transmitted with it are confidential and intended solely for [EMAIL PROTECTED] If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail:
Dynamically add Filter to webapp without declaring in web.xml
Hello, is it possible to dynamically add a Filter for a web app using the tomcat ? If so, is there an example how to do this ? OR is it possible to somehow init some webapps params before the Filter is loaded ? I tried to use a Servlet and used the load-on-startup1/load-on-startup within the web.xml - however the servlet is loaded AFTER the filter is initialized (even when no web page has been requested). Is there a better approach then using a init servlet ? The problem i currently have, is that im using a 3rd party Security Filter which has no knowledge of my application and relies on some Configuration (access rights) which is initialized by my webapp. A good example for this problem would be if you have dynamic Log4j configuration i.e. not using a log4j.xml in the classpath but configuring it through the java api. The Filter is already initialized when you do the log4j initializion in the init servlet - thus making it impossible to see/track an debug/error messages from the filter at all. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Someone Please: Why Is Tomcat Looking In The Wrong Directory?
As an additional comment: Based on earlier comments, it looks like the vendor's application is using the system property tomcat.home to create the file path to open. As you found out this will prevent using CATALINA_BASE or creating virtual hosts under one Tomcat. The vendor might look at using something like: getServletConfig().getServletContext().getRealPath(virtual) and then getting virtual fed in via a context-param in the web.xml file. That should return the real path to the file. It will fail when the application is being served from a .war file, but requiring the war file to be exploded should be OK. Just some random thoughts at the end of the thread. /mde/ --- Robinson, Eric [EMAIL PROTECTED] wrote: Okay, so I finally connected with someone at the vendor. Surprise! It turns out they do not follow the standard method for creating multiple instances of tomcat, i.e., by using $CATALINA_BASE. Instead, I was advised to copy the entire tomcat directory structure for each instance. I did this and it worked. I also had to create a new entry in init.d for the new tomcat service and edit a few other files, but at least now it is working. Talk about brute force! At least its good to know I wasn't being a complete ninny with the way I was configuring it. Nonetheless, THANKS VERY MUCH TO ALL for the many responses. I am completely floored by the amount of help people offered. This is a very active list, to say the least. -- Eric Robinson -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 11:34 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? Hmmm. and the plot thickens. Have you asked the vendor about this issue? Can they offer any insights as to how they access the myapp.properties file? --David Robinson, Eric wrote: David, I do not know if the 3rd party app has hard-coded paths. I grepped for tomcat in the app directory and below and I see a couple of places where it is doing a System.GetProperty(tomcat.home), but that's about it. -- Eric Robinson -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:55 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? Fair enough. Are the JSPs, servlets, etc., ... all being called from the /home/myaccount/tomcat5/webapps directory? Here's where I'm going with this: If resources like this properties file are being opened from the wrong location, but other webapp resources (images, jsps, servlets, etc., ...) are being served up from the proper location, it could be the result of bugs in your third party webapp. Maybe it's reliant on a hard coded path or a relative path to the current directory at the time tomcat was started. --David Robinson, Eric wrote: Sorry, I cannot answer that question as I am not the developer. Although I called it myapp for simplicty, it is really a third-party application. -- Eric Robinson -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:23 AM To: Tomcat Users List Subject: Re: Someone Please: Why Is Tomcat Looking In The Wrong Directory? I'm responding to the first message in the thread, but have read all of it. A thought: How are you opening this file? Hopefully it's via ServletContext.getResourceAsStream( /myapp/conf/myapp.properties ) ; --David Robinson, Eric wrote: Hello all, When I start tomcat, I get several messages like these: java.io.FileNotFoundException: /usr/local/tomcat5/webapps/myapp/conf/myapp.properties (No such file or directory) This file actually exists in /home/myaccount/tomcat5/webapps/myapp/conf/myapp.properties I have $CATALINA_BASE set to /home/myaccount/tomcat5 My instance of tomcat is starting mostly fine. I can connect to it on my custom port and see my own default page, but for some reason tomcat is still looking for myapp in the directory specified by $CATALINA_HOME. Someone please take a moment and give me some tips on why this might be happening. Thanks much, -- Eric Robinson Disclaimer - August 1, 2006 This email and any files transmitted with it are confidential and === message truncated === __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamically add Filter to webapp without declaring in web.xml
Depending on your version of tomcat, ServletContextListener may be an excellent standard way to go. There was a thread just a few days ago on that. --David Harakiri wrote: Hello, is it possible to dynamically add a Filter for a web app using the tomcat ? If so, is there an example how to do this ? OR is it possible to somehow init some webapps params before the Filter is loaded ? I tried to use a Servlet and used the load-on-startup1/load-on-startup within the web.xml - however the servlet is loaded AFTER the filter is initialized (even when no web page has been requested). Is there a better approach then using a init servlet ? The problem i currently have, is that im using a 3rd party Security Filter which has no knowledge of my application and relies on some Configuration (access rights) which is initialized by my webapp. A good example for this problem would be if you have dynamic Log4j configuration i.e. not using a log4j.xml in the classpath but configuring it through the java api. The Filter is already initialized when you do the log4j initializion in the init servlet - thus making it impossible to see/track an debug/error messages from the filter at all. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamically add Filter to webapp without declaring in web.xml
Thank you David judging by the description of All ServletContextListeners are notified of context initialization BEFORE any filter its exactly what i need. --- David Smith [EMAIL PROTECTED] wrote: Depending on your version of tomcat, ServletContextListener may be an excellent standard way to go. There was a thread just a few days ago on that. --David Harakiri wrote: Hello, is it possible to dynamically add a Filter for a web app using the tomcat ? If so, is there an example how to do this ? OR is it possible to somehow init some webapps params before the Filter is loaded ? I tried to use a Servlet and used the load-on-startup1/load-on-startup within the web.xml - however the servlet is loaded AFTER the filter is initialized (even when no web page has been requested). Is there a better approach then using a init servlet ? The problem i currently have, is that im using a 3rd party Security Filter which has no knowledge of my application and relies on some Configuration (access rights) which is initialized by my webapp. A good example for this problem would be if you have dynamic Log4j configuration i.e. not using a log4j.xml in the classpath but configuring it through the java api. The Filter is already initialized when you do the log4j initializion in the init servlet - thus making it impossible to see/track an debug/error messages from the filter at all. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5 and IPv6 configuration
Hi and thanks for your reply. I've never had the problem you describe. I use Linux though. On my machine the shutdown port binds to IPv6 representation of 127.0.0.1: tcp6 0 0 :::127.0.0.1:8007 :::*LISTEN 7970/java I made some more tests and I think my problem is due to a Java/FreeBSD/IPv6 incompatibility of some sort which prevents Java to fallback to the IPv6 representation :::127.0.0.1. When I run a test-app (which I took from another thread regarding this topic, see below) on a Linux machine it actually behaves as expected and binds to the address :::127.0.0.1. However, when I run it on any of my FreeBSD machines with an IPv6 capable JVM, it throws exactly the same BindException as the Tomcat when trying to create an IPv6 address from a given IPv4 representation. import java.net.*; public class TestServer { public static void main (String[] args) throws Exception { if (args.length != 2) { System.out.println(Usage: java TestServer host_address_ipv6 port); System.exit(1); } System.out.println(Host Address=+args[0]); System.out.println(Port=+args[1]); ServerSocket ss = new ServerSocket(); ss.bind(new InetSocketAddress(InetAddress.getByName(args[0]), Integer.parseInt(args[1]))); System.out.println(ServerSocket Bound); ss.accept(); } } I know this is not a Java/FreeBSD list, but I would be glad if somebody knows a solution and would post it here. Are you using APR? If so, is IPv6 support compiled in? No, I'm not using ARP, just a plain Tomcat installation. Regards, Hans - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Silent install of tomcat 4.1.31 on windows fails
Hi, I'm new to this list. Apologies if my question is naive or insufficiently researched. I have spent some time searching the web and these mail archives, but I haven't come across this problem. My company is upgrading our product to use Tomcat 4.1.31 (from 4.1.29). I have found that when I do a clean install of Tomcat 4.1.31 the installer fails to do a couple of things that 4.1.29 used to do: 1) There is no entry for Apache Tomcat in the Windows Control Panel Add or Remove programs list. 2) There are several files missing from the conf directory C:\Program Files\Apache Group\Tomcat 4.1\conf\ In fact, the only file that does get installed there is server.xml. These five files are missing: catalina.policy jk2.properties server-noexamples.xml.config tomcat-users.xml web.xml Since we are installing tomcat as one of several 3rd party products in our own windows installer, we install in silent mode: jakarta-tomcat-4.1.31-LE-jdk14.exe /S /D=our install dir I tested by running the tomcat installer from a DOS prompt: d:\tmp\jakarta-tomcat-4.1.31-LE-jdk14.exe /S When I run with the /S option I have both problems. When I run the installer with no options, neither problem occurs. When I install tomcat 4.1.29 d:\tmp\jakarta-tomcat-4.1.29-LE-jdk14.exe /S neither problem occurs. I can copy the files over myself if I have to, but I don't know how to work around the control panel add/remove programs problem. I have the Java 2 SDK 1.4.2_12 installed. I am testing/developing on Windows XP SP2. Is this a known issue? Is there an install log I should be looking at for diagnostic purposes? Any suggestions, explanations, or workarounds would be appreciated. Thanks, Eric - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cpu 100% java
I'm on OS X 10.4.7 running with weblog software (blojsom) I have to do a kill -9 on java to stop it from using 100+ on cpu sometimes, to let users connect. This comes up over and over in the log: 2006-08-01 17:22:08 StandardWrapperValve[blojsom]: Servlet.service() for servlet blojsom threw exception javax.servlet.ServletException: Servlet execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:193) at org.blojsom.filter.CompressionFilter.doFilter (CompressionFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:193) at org.blojsom.filter.PermalinkFilter.doFilter (PermalinkFilter.java:208) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke (StandardContext.java:2417) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke (ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline $StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service (CoyoteAdapter.java:193) at org.apache.jk.server.JkCoyoteHandler.invoke (JkCoyoteHandler.java:309) at org.apache.jk.common.HandlerRequest.invoke (HandlerRequest.java:387) at org.apache.jk.common.ChannelSocket.invoke (ChannelSocket.java:673) at org.apache.jk.common.ChannelSocket.processConnection (ChannelSocket.java:615) at org.apache.jk.common.SocketConnection.runIt (ChannelSocket.java:786) at org.apache.tomcat.util.threads.ThreadPool $ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Thread.java:613) - Root Cause - java.lang.OutOfMemoryError: Java heap space Can some one point me in the right direction to fix? Thanks Ben - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Does Tomcat 5.5's classloader handle classpath*
Hi, There is a mechanism in Spring to load all classpath resources that match a particular name using classpath*:myfilename. Apparently various classloaders behave differently in this respect - see http://static.springframework.org/spring/docs/2.0.x/reference/resources.html#d0e5951 and http://forum.springframework.org/showthread.php?t=27179. Post #4 seems to suggest that Tomcat handles it fine, but it doesn't seem to be working for me in tomcat 5.5.9. Anyone know if this should work? cheers, David - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPS connector and clientAuth=want: how to retrieve client cert in servlet?
Shankar Unni wrote: However, I'm stuck trying to retrieve the client certificate from the ServletRequest in the servlet itself. Never mind - I had botched the truststore setup for the server, so the client cert was not being passed in. Answer for the archives: import java.security.cert.X509Certificate; String certAttrName = javax.servlet.request.X509Certificate; X509Certificate[] certchain = (X509Certificate[])request.getAttribute(certAttrName); - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cpu 100% java
Ben, I'm on OS X 10.4.7 running with weblog software (blojsom) I have to do a kill -9 on java to stop it from using 100+ on cpu sometimes, to let users connect. I assume that you also have to restart Tomcat at this point, yes? This comes up over and over in the log: 2006-08-01 17:22:08 StandardWrapperValve[blojsom]: Servlet.service() for servlet blojsom threw exception javax.servlet.ServletException: Servlet execution threw an exception [snip] - Root Cause - java.lang.OutOfMemoryError: Java heap space You done run outta memory. Since this question (why did I run out of memory) comes up a lot, I'll save you some time going through the gauntlet of one-off responses you are likely to get: 1. Contact the vendor or read their documentation to find out how much memory they recommend for the application (taking into account the number of users, etc.) and check to see that you have your JVM configured have that much memory. If they recommend 128MB and you have 16MB configured, then you might just be running out of memory. 2. If you are meeting the vendor's suggestions for memory usage, but you think that you have an unusual load (number of users, frequency or requests, whatever), then consider increasing your memory /somewhat/ to cover that load. Generally, you don't need to go allocating 4GB of heap space right away... if you do that, you're more likely to put the problem off than anything else. 3. There might be a memory leak. Since you are getting 100% CPU use, you might have found a problem with the software getting it into a tight and infinite loop (or, at least sufficiently many iterations that it may as well be infinite) that generates loads of objects: hence, your memory exhaustion. Make sure you have the latest patches from the vendor. 4. If you added any of your own code, check that out. If you are using a weird JDBC driver, check to see that you have the latest compatible version. In fact, check all your libraries. After that, it's just a matter of changing your memory settings. How you do that depends on your deployment, but generally you set the environment variable JAVA_OPTS and use the -X parameters to set the Java heap size. Often, it helps to set the initial and maximum heap sizes to the same thing, so that the memory manager never has to grow the heap during the life of the process -- that can save time and avoid OOMs if Java demands too much memory too fast (I really hope this is fixed in recent versions of the JVM... this used to happen and it really should not). Hope that helps, -chris signature.asc Description: OpenPGP digital signature
Tomcat Cluster
Hi, I started some experiments with a cluster of 2 Tomcats (5.5.16). I configured the two Tomcats nearly identically (except the ports). I think the cluster works as I see messages in the console saying that a new cluster member was recognized when the second Tomcat starts. The only confusing messages are the following: 27.07.2006 13:27:17 org.apache.catalina.cluster.session.ClusterSessionListener messageReceived WARNUNG: Context manager doesn't exist:/edac 27.07.2006 13:27:18 org.apache.catalina.cluster.session.ClusterSessionListener messageReceived WARNUNG: Context manager doesn't exist:/edac 27.07.2006 13:27:18 org.apache.catalina.cluster.session.ClusterSessionListener messageReceived WARNUNG: Context manager doesn't exist:/edac edac in my application under webapps. What do these messages mean? Did I miss anything with my configuration? Is this a problem for the session replication? And what do I have to configure? Best regards, Ralf. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP Status 404 - /jsp-examples/
I checked the $CATALINA_HOME/conf/web.xml, it does have the save default Servlet configuration as in your note. I will look further in the doc link you sent. The Admin and manager functions work fine clicking on the links from in the default page. Thanks, Paul Email Firewall made the following annotations NOTICE --- This message is for the designated recipient only and may contain confidential, privileged or proprietary information. If you have received it in error, please notify the sender immediately and delete the original and any copy or printout. Unintended recipients are prohibited from making any other use of this e-mail. Although we have taken reasonable precautions to ensure no viruses are present in this e-mail, we accept no liability for any loss or damage arising from the use of this e-mail or attachments, or for any delay or errors or omissions in the contents which result from e-mail transmission. - - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Cluster
it means that server-A has the webapp /edac but server-B doesn't. and server B is receiving messages, and ignoring them doesn't mean its an error, only if you expect both servers to have the webapp. This is not the case if one server is starting up and has not deployed the app yet Filip Ralf Schneider wrote: Hi, I started some experiments with a cluster of 2 Tomcats (5.5.16). I configured the two Tomcats nearly identically (except the ports). I think the cluster works as I see messages in the console saying that a new cluster member was recognized when the second Tomcat starts. The only confusing messages are the following: 27.07.2006 13:27:17 org.apache.catalina.cluster.session.ClusterSessionListener messageReceived WARNUNG: Context manager doesn't exist:/edac 27.07.2006 13:27:18 org.apache.catalina.cluster.session.ClusterSessionListener messageReceived WARNUNG: Context manager doesn't exist:/edac 27.07.2006 13:27:18 org.apache.catalina.cluster.session.ClusterSessionListener messageReceived WARNUNG: Context manager doesn't exist:/edac edac in my application under webapps. What do these messages mean? Did I miss anything with my configuration? Is this a problem for the session replication? And what do I have to configure? Best regards, Ralf. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: org.apache.catalina.servlets.DefaultServlet won't deallocate
Jean-Francois Beaulac wrote: Hi, Sometimes when I reload/shutdown my application I see this error message in tomcat's console window: 1-Aug-2006 3:06:50 PM org.apache.catalina.core.StandardWrapper unload INFO: Waiting for 26 instance(s) to be deallocated This is an INFO message, not an error. Anybody has an idea of what could cause this? Usually servlets that haven't finished servicing requests. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Silent install of tomcat 4.1.31 on windows fails
[EMAIL PROTECTED] wrote: My company is upgrading our product to use Tomcat 4.1.31 (from 4.1.29). I have found that when I do a clean install of Tomcat 4.1.31 the installer fails to do a couple of things that 4.1.29 used to do: 1) There is no entry for Apache Tomcat in the Windows Control Panel Add or Remove programs list. 2) There are several files missing from the conf directory C:\Program Files\Apache Group\Tomcat 4.1\conf\ In fact, the only file that does get installed there is server.xml. These five files are missing: catalina.policy jk2.properties server-noexamples.xml.config tomcat-users.xml web.xml Confirmed with the latest 4.1.32 distribution. I'll look into it but there are no plans at the moment for a 4.1.33 release any time soon. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]