RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI and Connection Pooling?
Hi Allistair, I just got the basic JNDI datasource working for MS SQL Server with Tomcat 5.5. I tried using the ConnectionPoolDataSource instead of the standard DataSource but I cannot get this working. Not sure whether I need to replace the res-typejavax.sql.DataSource/res-type with something else in the web.xml file. I changed the driverclass name from the standard datasource class of com.microsoft.jdbc.sqlserver.SQLServerDriver - used with standard datasource to the com.microsoft.jdbcx.sqlserver.SQLServerDataSource class used by MS connection pooling in the TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file. Also added the factory for PooledConnections - factory=com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory to the TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file. Any ideas to get the MS Connection Pooling working, or is there no need in Tomcat 5.5 - In aother words does Tomcat 5.5 automatically used Cnnection Pooling with a datasource?? Many thanks for your help with this. Best Regards, Ian -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 16:05 To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI? Hi Wade, Can you perhaps resend the configuration files server.xml web.xml yourapp.xml listing of files in common/lib listing of files in yourapp/WEB-INF/lib Again? Cheers, Allistair. -Original Message- From: Wade Chandler [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 17:58 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI? --- Wylie, Ian [EMAIL PROTECTED] wrote: Allistair, My apologies for taking much longer than usual to get back to you but I had to finish some Java code that allowed us to upgrade our portal to PlumTree version 5. To clarify and answer your points below. 1) I have opted not to have a context.xml file in the META-INF directory but I am using the TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file instead. 2) I have ensured that the 3 MS JAR files for the JDBC connection exist only in TOMCAT_HOME/common/lib and not in my webapp lib. 3) I have changed the java code to use a simple 'DataSource' instead of a 'ConnectionPoolDataSource' connection. See Java code snippet below :- Unfortunately I still get the error below :- ERROR - NamingException - Config error with JNDI and datasource.javax.naming.NamingException: Cannot create resource instance ERROR com.webconnex.cognos.PORT.OMTLreport : Cannot create resource instance I have attached my web.xml and TOMCAT_HOME/conf/Catalina/localhost/webappname.xml files for your perusal. I am of yet no further forward in solving my problem. Any further insight would be appreciated, as Tomcat 5 allows me to do quite a few things better, not least of which is debugging!! Java Code snippet :- = logger.debug(Before InitialContext.) ; InitialContext ctx = new InitialContext(); if (ctx == null) { log(ERROR initialising InitialContext.) ; logger.error(ERROR initialising InitialContext.) ; } log(Before Context.) ; ds = (DataSource) ctx.lookup(java:comp/env/jdbc/UKportalPool); log(Before initialising DataSource.) ; if(ds != null) { con = ds.getConnection(); if (con != null) { if ((pType != null) (!pType.equals())) { userDetails = new pfUsersBean(pType, posName, typeCD, firstLineProduct); userSessionDetails = new pfUserSessionBean(); userDetails.getPrefix(con, userDetails); // See if User is in database //userDetails.getPrefix(pCon, userDetails); // See if User is in database ptpResponse.setSettingValue(SettingType.Portlet, SalesCubePrefix, userDetails.getSalesCubePrefix() ) ; ptpResponse.setSettingValue(SettingType.Portlet, description, userDetails.getGeographyID() ) ; ptpResponse.setSettingValue(SettingType.Portlet, TMTLdescription, userDetails.getGeographyID() ) ; ptpResponse.setSettingValue(SettingType.Portlet, MSOdescription, userDetails.getGeographyID() ) ; } } else { log(ERROR - DB Connection returned was null in PortletHelper
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI and Connection Pooling?
Hi Allistair, The problem was that I had duplicated the TOMCAT_HOME/conf/Catalina/localhost/webappname.xml entry in server.xml. So I removed the context element from server.xml. Then, the basic datasource JNDI started working. I will investigate the change you suggested for Connection Pooling as well as have a look at jTDS. I will report back after further investigations. It is great to be able to use Tomcat 5.5 with the JVM 1.5. I have just downloaded and installed Eclipse 3.1 which can compile using the JVM 1.5 - as one of my other tasks currently is to call a .NET web service from Java. I am hoping to get this working using Apache SOAP. Many thanks for your help with this. Best Regards, Ian -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 24 August 2005 12:42 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI and Connection Pooling? Hi again, By the way, you really ought to consider *not* using the MS drivers. jTDS at jtds.sourceforge.net is more performant. Cheers, Allistair -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 24 August 2005 12:33 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI and Connection Pooling? Hi Allistair, I just got the basic JNDI datasource working for MS SQL Server with Tomcat 5.5. I tried using the ConnectionPoolDataSource instead of the standard DataSource but I cannot get this working. Not sure whether I need to replace the res-typejavax.sql.DataSource/res-type with something else in the web.xml file. I changed the driverclass name from the standard datasource class of com.microsoft.jdbc.sqlserver.SQLServerDriver - used with standard datasource to the com.microsoft.jdbcx.sqlserver.SQLServerDataSource class used by MS connection pooling in the TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file. Also added the factory for PooledConnections - factory=com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFact ory to the TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file. Any ideas to get the MS Connection Pooling working, or is there no need in Tomcat 5.5 - In aother words does Tomcat 5.5 automatically used Cnnection Pooling with a datasource?? Many thanks for your help with this. Best Regards, Ian -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 16:05 To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI? Hi Wade, Can you perhaps resend the configuration files server.xml web.xml yourapp.xml listing of files in common/lib listing of files in yourapp/WEB-INF/lib Again? Cheers, Allistair. -Original Message- From: Wade Chandler [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 17:58 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI? --- Wylie, Ian [EMAIL PROTECTED] wrote: Allistair, My apologies for taking much longer than usual to get back to you but I had to finish some Java code that allowed us to upgrade our portal to PlumTree version 5. To clarify and answer your points below. 1) I have opted not to have a context.xml file in the META-INF directory but I am using the TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file instead. 2) I have ensured that the 3 MS JAR files for the JDBC connection exist only in TOMCAT_HOME/common/lib and not in my webapp lib. 3) I have changed the java code to use a simple 'DataSource' instead of a 'ConnectionPoolDataSource' connection. See Java code snippet below :- Unfortunately I still get the error below :- ERROR - NamingException - Config error with JNDI and datasource.javax.naming.NamingException: Cannot create resource instance ERROR com.webconnex.cognos.PORT.OMTLreport : Cannot create resource instance I have attached my web.xml and TOMCAT_HOME/conf/Catalina/localhost/webappname.xml files for your perusal. I am of yet no further forward in solving my problem. Any further insight would be appreciated, as Tomcat 5 allows me to do quite a few things better, not least of which is debugging!! Java Code snippet :- = logger.debug(Before InitialContext.) ; InitialContext ctx = new InitialContext(); if (ctx == null) { log(ERROR initialising InitialContext.) ; logger.error(ERROR initialising InitialContext.) ; } log(Before Context.) ; ds
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI?
for now of; 1. TOMCAT_HOME/webapps/webappname/META-INF/context.xml or 2. TOMCAT_HOME/conf/Catalina/localhost/webappname.xml B) Ensure your database JAR(s) are in TOMCAT_HOME/common/lib (not in your webapp lib). C) Try something simpler ... DataSource dataSource = null; try { Context ctx = new InitialContext(); dataSource = (DataSource) ctx.lookup(java:comp/env/jdbc/UKportalPool); } catch (NamingException nE) { log.error(nE.getMessage()); } catch (NullPointerException npE) { log.error(npE.getMessage()); } Allistair. -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 12:02 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Alistair, Well I have learned something that I was doing wrong, but after removing the webappname.xml I get the same error. Any more ideas? Thanks, Ian -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:53 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi, You can only configure a web application in 1 place. You can't use *both* context.xml AND a webappname.xml. I think the TOMCAT_HOME\conf\Catalina\localhost method is tried first, and because this does not have any of your datasources in it you get your problems. Decide on either TOMCAT_HOME\conf\Catalina\localhost\webappname.xml or META-INF/context.xml and see if you get any further first. Cheers, Allistair -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:47 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Alistair, For configuration purposes I attach the Context.xml, web.xml and mininPCO-practise.xml - which is the web application file which resides in TOMCAT_HOME\conf\Catalina\localhost directory. The error message is basically Cannot create resource instance. (Full Error message attached below.) The Java code above works in 4.1.31, so I am not really worried about this, unless Tomcat 5.5.9 works differently. Here is the code snippet from the java class PortletHelper that is being executed which produces the error at the end of this email. Well I think that is all that anyone needs to check out my app. If anyone can offer some good advice on this, it would be much appreciated. Best Regards, Ian == = JAVA CODE SNIPPET START logger.debug(Before InitialContext.) ; InitialContext ctx = new InitialContext(); if (ctx == null) { log(ERROR initialising InitialContext.) ; logger.error(ERROR initialising InitialContext.) ; } log(Before Context.) ; Context envCtx = (Context) ctx.lookup(java:comp/env); if (envCtx != null) { log(Before initialising DataSource.) ; ConnectionPoolDataSource ds = (ConnectionPoolDataSource)envCtx.lookup(jdbc/UKportalPool); if(ds != null) { pCon = ds.getPooledConnection(); JAVA CODE SNIPPET END == ERROR MESSAGE START 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before Context. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before initialising DataSource. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: ERROR - NamingException - Config error with JNDI and datasource.javax.naming.NamingException: Cannot create resource instance 10-Aug-2005 15:26:56 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet OMTLreport threw exception java.lang.NullPointerException at com.webconnex.portal.PortletHelper.initPortlet(PortletHelper.java:230) at com.webconnex.cognos.PORT.OMTLreport.processRequest(OMTLreport .java:243) at com.webconnex.portal.PortletHelper.doGet(PortletHelper.java:321) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Application FilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterCh ain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI?
David, Thanks for the link. I have followed the instructions but unfortunately get similar errors to what I had previously I am afraid. In a situation like this I am sure I could get the company to pay for some support for this type of problem, but I am unsure who would be best to help with this. Without further help, I will have to sideline the upgrade to 5.5, until there is more info out there for the connecting using JNDI with a MS SQL Server example. In my opinion the people who develop Tomcat should provide an example of JNDI for ALL major databases. This is one of the things that makes the Tomcat offering lacking somewhat in maturity. It seems to me it is relatively easy to get the basic JSP / Servlet stuff up and running in no time, but it has always been a hassle to get JNDI to work in Tomcat. The Tomcat folks provide MySQL and an Oracle example but they need to provide examples for MS SQL Server, DB2 and Sybase. Thanks for your help though - as it may have worked... :-) Best Regards, Ian Ian Wylie Business Intelligence Architect Business Information Technology (BIT) Pfizer Global Pharmaceuticals (PGP) -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: 10 August 2005 14:56 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? http://thielen.typepad.com/programming/2005/07/hibernate_on_to.html David Thielen 303-499-2544 www.windwardreports.com -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 10, 2005 4:37 AM To: tomcat-user@jakarta.apache.org Subject: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi All, I have just installed Tomcat 5.5.9 on our Dev Server. I managed with a bit of work and a few searches on the web to get Tomcat 4.1.x working with MS SQL Server using JNDI and database pooled connections to work. This has been working well for some time now. However, there is quite a few advantages for upgrading the current system to Tomcat 5.5, not least of which, is improvements to the list and functionality of tools that aid with Java debugging! I cannot get Tomcat 5.5.9 working with JNDI and MS SQL Server at the moment. I have already read all the various official docs on JNDI how-to and searched the web but even after all that and changing various things that others have recommended, I cannot get the JNDI to work. Has anyone out there successfully using JNDI with Tomcat and MS SQL Server? If so please can you put another professional out of there misery! Many thanks, Best Regards, _ http://www.pfizer.co.uk/Ian Wylie - [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Business Intelligence Architect Business Information Technology (BIT) Pfizer Global Pharmaceuticals (PGP) Direct: +44 (0)1737 330422 Address: Pfizer Ltd, Walton Oaks (IPC 2G), Dorking Road, Tadworth, Surrey, KT20 7NS. LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this e-mail by anyone else is unauthorised. If you are not an addressee, any disclosure or copying of the contents of this e-mail or any action taken (or not taken) in reliance on it is unauthorised and may be unlawful. If you are not an addressee, please inform the sender immediately. Pfizer Limited is registered in England under No. 526209 with its registered office at Ramsgate Road, Sandwich, Kent CT13 9NJ _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI?
Alistair, For configuration purposes I attach the Context.xml, web.xml and mininPCO-practise.xml - which is the web application file which resides in TOMCAT_HOME\conf\Catalina\localhost directory. The error message is basically Cannot create resource instance. (Full Error message attached below.) The Java code above works in 4.1.31, so I am not really worried about this, unless Tomcat 5.5.9 works differently. Here is the code snippet from the java class PortletHelper that is being executed which produces the error at the end of this email. Well I think that is all that anyone needs to check out my app. If anyone can offer some good advice on this, it would be much appreciated. Best Regards, Ian === JAVA CODE SNIPPET START logger.debug(Before InitialContext.) ; InitialContext ctx = new InitialContext(); if (ctx == null) { log(ERROR initialising InitialContext.) ; logger.error(ERROR initialising InitialContext.) ; } log(Before Context.) ; Context envCtx = (Context) ctx.lookup(java:comp/env); if (envCtx != null) { log(Before initialising DataSource.) ; ConnectionPoolDataSource ds = (ConnectionPoolDataSource)envCtx.lookup(jdbc/UKportalPool); if(ds != null) { pCon = ds.getPooledConnection(); JAVA CODE SNIPPET END == ERROR MESSAGE START 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before Context. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before initialising DataSource. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: ERROR - NamingException - Config error with JNDI and datasource.javax.naming.NamingException: Cannot create resource instance 10-Aug-2005 15:26:56 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet OMTLreport threw exception java.lang.NullPointerException at com.webconnex.portal.PortletHelper.initPortlet(PortletHelper.java:230) at com.webconnex.cognos.PORT.OMTLreport.processRequest(OMTLreport.java:243) at com.webconnex.portal.PortletHelper.doGet(PortletHelper.java:321) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105 ) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav a:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo rkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:684) at java.lang.Thread.run(Unknown Source) 10-Aug-2005 15:30:09 org.apache.catalina.core.ApplicationContext log ERROR MESSAGE END = -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 10:38 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi, Can you please send more information, such as error messages, stdout logging and the configuration for your pool. Cheers, Allistair. -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 10:28 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? David, Thanks for the link. I have followed the instructions but unfortunately get similar errors to what I had previously I am afraid. In a situation like this I am sure I could get the company to pay for some support
RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI?
Alistair, Well I have learned something that I was doing wrong, but after removing the webappname.xml I get the same error. Any more ideas? Thanks, Ian -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:53 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Hi, You can only configure a web application in 1 place. You can't use *both* context.xml AND a webappname.xml. I think the TOMCAT_HOME\conf\Catalina\localhost method is tried first, and because this does not have any of your datasources in it you get your problems. Decide on either TOMCAT_HOME\conf\Catalina\localhost\webappname.xml or META-INF/context.xml and see if you get any further first. Cheers, Allistair -Original Message- From: Wylie, Ian [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:47 To: Tomcat Users List Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI? Alistair, For configuration purposes I attach the Context.xml, web.xml and mininPCO-practise.xml - which is the web application file which resides in TOMCAT_HOME\conf\Catalina\localhost directory. The error message is basically Cannot create resource instance. (Full Error message attached below.) The Java code above works in 4.1.31, so I am not really worried about this, unless Tomcat 5.5.9 works differently. Here is the code snippet from the java class PortletHelper that is being executed which produces the error at the end of this email. Well I think that is all that anyone needs to check out my app. If anyone can offer some good advice on this, it would be much appreciated. Best Regards, Ian == = JAVA CODE SNIPPET START logger.debug(Before InitialContext.) ; InitialContext ctx = new InitialContext(); if (ctx == null) { log(ERROR initialising InitialContext.) ; logger.error(ERROR initialising InitialContext.) ; } log(Before Context.) ; Context envCtx = (Context) ctx.lookup(java:comp/env); if (envCtx != null) { log(Before initialising DataSource.) ; ConnectionPoolDataSource ds = (ConnectionPoolDataSource)envCtx.lookup(jdbc/UKportalPool); if(ds != null) { pCon = ds.getPooledConnection(); JAVA CODE SNIPPET END == ERROR MESSAGE START 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before Context. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: Before initialising DataSource. 10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log INFO: OMTLreport: ERROR - NamingException - Config error with JNDI and datasource.javax.naming.NamingException: Cannot create resource instance 10-Aug-2005 15:26:56 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet OMTLreport threw exception java.lang.NullPointerException at com.webconnex.portal.PortletHelper.initPortlet(PortletHelper.java:230) at com.webconnex.cognos.PORT.OMTLreport.processRequest(OMTLreport .java:243) at com.webconnex.portal.PortletHelper.doGet(PortletHelper.java:321) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Application FilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterCh ain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.ja va:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.ja va:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:126 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:105 ) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve.java :107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap ter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Process or.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle r.processConne ction(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT cpEndpoint.jav a:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le
Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JN DI?
Hi All, I have just installed Tomcat 5.5.9 on our Dev Server. I managed with a bit of work and a few searches on the web to get Tomcat 4.1.x working with MS SQL Server using JNDI and database pooled connections to work. This has been working well for some time now. However, there is quite a few advantages for upgrading the current system to Tomcat 5.5, not least of which, is improvements to the list and functionality of tools that aid with Java debugging! I cannot get Tomcat 5.5.9 working with JNDI and MS SQL Server at the moment. I have already read all the various official docs on JNDI how-to and searched the web but even after all that and changing various things that others have recommended, I cannot get the JNDI to work. Has anyone out there successfully using JNDI with Tomcat and MS SQL Server? If so please can you put another professional out of there misery! Many thanks, Best Regards, _ http://www.pfizer.co.uk/Ian Wylie - [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Business Intelligence Architect Business Information Technology (BIT) Pfizer Global Pharmaceuticals (PGP) Direct: +44 (0)1737 330422 Address: Pfizer Ltd, Walton Oaks (IPC 2G), Dorking Road, Tadworth, Surrey, KT20 7NS. LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this e-mail by anyone else is unauthorised. If you are not an addressee, any disclosure or copying of the contents of this e-mail or any action taken (or not taken) in reliance on it is unauthorised and may be unlawful. If you are not an addressee, please inform the sender immediately. Pfizer Limited is registered in England under No. 526209 with its registered office at Ramsgate Road, Sandwich, Kent CT13 9NJ _
Cluster Element Multicast Problem
I have a rather strange problem. I have two RedHat machines running Tomcat in a clustered arrangement. I am using the built in Cluster element from tomcat 5.5.4. When idle, the machines seem to be working fine. In fact, even under a slight load the machines perform well. I can open up a terminal and use tcpdump to listen to the multicast ip and both machines are present with heartbeats. The FarmWarDeployer, although somewhat buggy, is also working. However, when subjected to a heavy load, one of the machines stops multicasting. Machine 1 is a dual Athlon MP with 2 gigs of RAM Machine 2 is a single P4 with 1 gig of RAM It is machine 1 that stops multicasting. I have tried a number of things. I tried renicing tomcat thinking that it was hogging all of the system resources. This did not work. I tried a different NIC thinking that may be the problem. This did not work either. In fact, both machines now use the same NIC and same module (e100). Does anyone have any ideas? -Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JK2 URI configuration
I can't figure out, or find any documentation on how to map a uri in workers2.properties to something other than its webapp directory name. For instance, I want to make the directory $CATALINA_BASE/webapps/mywebappv2.0.23 respond as though it were $CATALINA_BASE/webapps/mywebapp. I'm certain that this is not difficult, but I cannot find documentation on this. Any help would be much appreciated. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
failover
Can either JK or JK2 properly failover when a webapp fails? They seem to work fine when an entire tomcat instance drops, but they don't seem to do anything useful when a single webapp on a tomcat instance breaks down and starts throwing exceptions. They both continue to send requests to the broken webapp. Am I wrong? -Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jk2 problem
It seems as though my jk2 configuration isn't failing over properly. If a tomcat machine drops, it compensates properly. However, if a single application on one of the tomcat machines fails then apache/jk2 keeps that faulty app in the mix. When a user gets directed to a tomcat instance where the app is working, all is fine. However, jk2 still continues to route requests to the machine where the app is broken or missing.. is there something I can do to fix this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
error-page directive
Hello all, I have a web.xml (attached) that works fine if I remove the error-page directive, but gives a Exception initializing TldLocationsCache: XML parsing error on file /WEB-INF/web.xml: (line 72, col 11): The content of element type web-app must match (icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*). message when the indicated (java.lang.ClassNotFoundException) is encountered. I checked docs and books, but I can't find anything wrong with the web.xml. The template web.xml I used is the one from the struts 1.2.4 package. Could anyone please tell me what is wrong with this deployment descriptor? Thank you very much in advance for any input, Ian. ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app display-nameKNMI Operational DataCenter/display-name !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value3/param-value /init-param init-param param-namedetail/param-name param-value3/param-value /init-param load-on-startup3/load-on-startup /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- The Usual Welcome File List -- welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list !-- Struts Tag Library Descriptors -- taglib taglib-uri/tags/struts-bean/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/tags/struts-html/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/tags/struts-logic/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib taglib taglib-uri/tags/struts-nested/taglib-uri taglib-location/WEB-INF/struts-nested.tld/taglib-location /taglib taglib taglib-uri/tags/struts-tiles/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib error-page exception-typejava.lang.ClassNotFoundException/exception-type location/pages/apperror.jsp/location /error-page /web-app - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page directive
On Tue, 01 Mar 2005 10:32:42 +0100, Trond G. Ziarkowski [EMAIL PROTECTED] wrote: Hi, Have you tried to move your the error-page directive to between the welcome-file-list and taglib directives. Seem to remember this happening to me some time ago as well. That seems to get rid of the message, but it doesn't seem to honour the directive, because I still get tomcats default exception stacktrace page. Thank you so far, it's much appreciated, Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page directive
On Tue, 1 Mar 2005 10:41:36 +0100, Ian van der Neut [EMAIL PROTECTED] wrote: On Tue, 01 Mar 2005 10:32:42 +0100, Trond G. Ziarkowski [EMAIL PROTECTED] wrote: Hi, Have you tried to move your the error-page directive to between the welcome-file-list and taglib directives. Seem to remember this happening to me some time ago as well. That seems to get rid of the message, but it doesn't seem to honour the directive, because I still get tomcats default exception stacktrace page. The fact that it is not honoured seems to be because of a problem in the apperror.jsp file. Moving the error-page directive before the taglib directive solves the problem indeed. Just curious, does order matter in web.xml? If so, where is this documented? Or is this just a bug? Thank you very much, Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JK2 Failover Problem
I'm having trouble with the failover functionality of JK2. I have apache connected to two back-end tomcat engines running on separate machines. The failover works just fine when a tomcat engine dies. The node is not given any requests and the webapp continues to function normally. However, when an individual webapp dies I get problems. Apache continues to send requests to the non-functioning webapp, even if the app is not even deployed on that tomcat instance. I was under the impression that jk2 would take this into account, but it appears that it either doesn't or I don't have it set up to do this. any help would be greatly appreciated. Thanks, Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting default tomcat logger 5.0.28
I've managed to make some headway with this problem. I've moved my log4j.properties file over into the axis/web-inf/classes directory, and this catches all axis output, but what I want to know is how to direct all output to log4j. So, that initial startup stdout and stderr output to log4j. Is this possible? Thanks Ian Ian Wootten wrote: I'm having a right job trying to configure the default logger within tomcat. I want to use log4j and set it at a DEBUG level. I've added all the commons-logging.jar and log4j.jar packages to the classpath, but every time I declare the properties file I wish to use prior to these, it doesn't seem as if the log4j.properties file I want to be read is. The output remains the same. I've also tried to remedy this using the same method within the tomcatw.exe app, as I read that tomcat doesn't read the default CLASSPATH environment variables used by Windows XP and creates its own. This still yields no joy. Also with this app I have tried specifying the log4j.configuration=/file /property using the line -Dlog4j.configuration=C:\src\logging\log4jservice\log4j.properties under the java options. Still the file does not seem to be found. Currently my properties file lies in a different directory foo/bar/log4j.properties which I specify in the classpath, but as I say it doesn't seem to be picked up. I've even placed it under CATALINA_HOME/common/lib with the jar files in CATALINA_HOME/common/classes, under the reference of the Tomcat 5.5 version, hoping this might work..it doesn't. (Incidentally, I can't use Tomcat 5.5 due to restrictions on the software I'm going to generate). Log4J works fine standalone, I've built a number of apps with it, just not under tomcat it would seem. Can anyone make any suggestions? Thanks, Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Setting default tomcat logger 5.0.28
I'm having a right job trying to configure the default logger within tomcat. I want to use log4j and set it at a DEBUG level. I've added all the commons-logging.jar and log4j.jar packages to the classpath, but every time I declare the properties file I wish to use prior to these, it doesn't seem as if the log4j.properties file I want to be read is. The output remains the same. I've also tried to remedy this using the same method within the tomcatw.exe app, as I read that tomcat doesn't read the default CLASSPATH environment variables used by Windows XP and creates its own. This still yields no joy. Also with this app I have tried specifying the log4j.configuration=/file /property using the line -Dlog4j.configuration=C:\src\logging\log4jservice\log4j.properties under the java options. Still the file does not seem to be found. Currently my properties file lies in a different directory foo/bar/log4j.properties which I specify in the classpath, but as I say it doesn't seem to be picked up. I've even placed it under CATALINA_HOME/common/lib with the jar files in CATALINA_HOME/common/classes, under the reference of the Tomcat 5.5 version, hoping this might work..it doesn't. (Incidentally, I can't use Tomcat 5.5 due to restrictions on the software I'm going to generate). Log4J works fine standalone, I've built a number of apps with it, just not under tomcat it would seem. Can anyone make any suggestions? Thanks, Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error allocating a servlet instance caused by ClassCircularityError on java.util.Date with Tomcat 5.0.28
(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) The line of SimpleLogFormatter.format() which causes the problem looks like this: public String format( LogRecord record ) { StringBuffer buffer = new StringBuffer(); buffer.append( dateFormat.format( new Date( record.getMillis() ) ) ); ... We have found that we can eliminate the above exception by adding the following static block in the SimpleLogFormatter class. This is obviously a hack and I would like to avoid its use: static { synchronized( SimpleLogFormatter.class ) {} synchronized( SimpleDateFormat.class ) {} synchronized( Date.class ) {} synchronized( LogRecord.class ) {} synchronized( Formatter.class ) {} } How can this exception be avoided? As I said, the WAR file worked fine in Tomcat4.0 and Tomcat4.1, but does not work in Tomcat5.0. There's nothing tricky about the above code -- it's just creating a new instance of java.lang.Date -- so why is it failing? What was changed in Tomcat or Catalina code to cause this error? thanks, ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do I force the expiration of the JSESSIONID cookie for proxies?
I have a system which renders a session stored in the HttpSession unusable once the user logs out. All initialisation on the session is performed inside a HttpSessionListener.sessionCreated() method. Further accesses under the same JSESSIONID result in an error detailing that the user must close their browser before logging in again. However, many of our users access the system through phone network proxies which remember their cookies for them. There is no way that I know of to force the proxies to either not cache cookies or to flush the value for a cookie. However, the proxy should understand how to expire a cookie. Is it possible to set an expires on a JSESSIONID cookie to the current time on a user logout? Will HttpSession.invalidate() do this for me? I need some way to indicate to proxies that they should no longer use the old JSESSIONID cookie value and to replace it with any new value which should come along. Does anyone know how this can be done? I'd rather not reference JSESSIONID in my code in case a different value is ever used. thanks, ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ugh. IIS + Tomcat + multiple virtual hosts
I have a number of applications running under Tomcat root contexts, on various different servers/ports. Under Apache, I can use the JkMount /* workername directive under a virtual directory to allow me to do virtual hosting, under Apache, which allows me to specify that a particular hostname be handled by a particular worker, on a particular host and port. Quite clean, I like it. However, I find myself with the need to use IIS to front end the sites now, and the redirector DLL doesn't seem to account for this type of configuration. What this comes down to is having multiple instances of the redirector that refer to different workers2.properties files. Way back when, someone mentioned an enhancement that was planned whereby the redirector DLL would check for a file called dllname.properties somewhere, and if present, use it, otherwise, check the registry for the location of the config file. I blindly tried that, and it doesn't seem to work. Did this enhancement ever happen? Is there some secret incantation I have to do to make it work? Is there a way to do what I'm trying to accomplish? I've already suggested that we go with Apache instead and proxy any sites that require IIS, but I'm guessing that won't be an option. --- beati pacifici quoniam filii Dei vocabuntur - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ugh. IIS + Tomcat + multiple virtual hosts
On Wed, 05 Jan 2005 11:24:21 -0600, David Boyer wrote Resend correcting a typo: [channel.socket:web1:8010] port=8010 host=web1.bvu.edu [ajp13:web1:8010] channel=channel.socket:web1:8010 [uri:web1.bvu.edu/servlet/*] worker=ajp13:web1:8010 [channel.socket:web2:8009] port=8009 host=web2.bvu.edu [ajp13:web2:8009] channel=channel.socket:web2:8009 [uri:web2.bvu.edu/servlet/*] worker=ajp13:web2:8009 Hey, cool, that worked great. Is there actually any documentation for the workers2.properties file? I looked around and couldn't find anything really useful... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[tomcat 5.0] context.xml treated differently in WAR and directory deployments
Hi all, It seems that META-INF/context.xml is treated differently by WAR and directory deployments, at least in tomcat 5.0.30-beta. Looking at HostConfig.java, the method 'deployWARs' checks each '.war' file for a META-INF/context.xml file (line 528) and if it exists, it is copied to the catalina configuration directory (line 546). However, no such processing occurs in the method 'deployDirectories'. Each directory in appBase is checked for a WEB-INF subdirectory, but that is all (line 683). Is this the desired behavior? Am I missing some other piece of the puzzle? For me it's troublesome since I'm using the MyEclipse Tomcat deployer that just does a (more-or-less) simple copy of the project directory to the webapp directory. This means that I have to copy the META-INF/context.xml file by hand to the configuration directory every time I modify it. While not a huge problem, it's inconvenient and were it automatic it would be easier to convince people where I work that moving to Tomcat is a good idea. :-) Thanks, Ian Flanigan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TC Drops bytes when client uses Chunked Encoding AND specifying Content-Length at the same time.
We are using TC 5.0.28 on JDK 1.4.2 We have a client who POST to TC using header Transfer-encoding: chunked and at the same time specify the Content-Length header when posting to us. It seems that if the Content-Length is specified, TC is dropping the last few bytes..?? This same customer claims that his code works with the Jetty Servlet (which is the old embedded servlet in JBoss 3.2.1 and earlier). We have done some prelim testing and confirmed that a) if Content-Length is NOT specified and Chunked encoding is used, TC works as specified. b) Jetty works either way (with or without Content-Length). My questions are: 1. what is the correct behavior in HTTP 1.1? I've read through the spec but am unable to ascertain whether or not Content-Lenght should NOT be used when chunked encoding is used. 2. Is this a bug in TC? Unfortunately, our client isn't able to modify the code to NOT include the Content-Length or NOT use Chunk encoding Thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Won't deploy to root context even with Context path=?
Hi Yoav, Thanks for the reply. I changed my server.xml as follows: Host name=localhost debug=9 appBase=webapps unpackWARs=true autoDeploy=false xmlValidation=false xmlNamespaceAware=false I restarted, but no change: Dec 7, 2004 7:56:37 AM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /myapp from URL file:/Applications/jakarta-tomcat-5.0.28/webapps/myapp I searched but could not find any other Host declarations, nor any instances of 'autoDeploy' in my conf directory. I tried setting every instance of debug in server.xml to 9, but upon restart I'm not getting any more output in logs/catalina.out than I did with debug=0. I tried removing server.xml altogether to see if was being ignored for some reason, but then tomcat failed to start. Anything else I could try? Thanks Again, Ian Shapira, Yoav wrote: Hi, Because you've probably left autoDeploy on for your Host. Yoav Shapira http://www.yoavshapira.com -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Ian Brandt Sent: Monday, December 06, 2004 7:14 PM To: [EMAIL PROTECTED] Subject: Won't deploy to root context even with Context path=? Hi, I'm running 5.0.28. I'm using the default $CATALINA_HOME/conf/server.xml. I have removed the ROOT and example webapps leaving only admin, manager (in server/webapps), and myapp (expanded into $CATALINA_HOME/webapps). In $CATALINA_HOME/conf/Catalina/localhost/myapp.xml I have specified my Context path=. When I start the server I get: INFO: Installing web application at context path /myapp from... I then also get the apparently infamous: [myapp] WARN [main] SettingsFactory.buildSettings(96) | Could not obtain connection metadata org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' When I change the Context path back to =myapp in myapp.xml the JDBC error goes away, so I'm assuming there's some sort of context mismatch when I specify but Tomcat deploys to /myapp anyway. So my question is why might Tomcat deploy my webapp to the context path /myapp as opposed to the root context when I specify path=? Thanks! Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Won't deploy to root context even with Context path=?
More info and a solution: I tried 5.5.4 with similar results. I found that I could hit my app at http://localhost:8080/, and use database connectivity, but no matter what I still always got that error at startup. On a tip from the author of AppFuse I: mv $CATALINA_HOME/webapps/myapp $CATALINA_HOME/webapps/ROOT mv $CATALINA_HOME/conf/Catalina/localhost/myapp.xml $CATALINA_HOME/conf/Catalina/localhost/ROOT.xml Edited ROOT.xml setting docBase=ROOT (path= on 5.0.18, or removed completely on 5.5.4). That did the trick. Regards, Ian Ian Brandt wrote: Hi Yoav, Thanks for the reply. I changed my server.xml as follows: Host name=localhost debug=9 appBase=webapps unpackWARs=true autoDeploy=false xmlValidation=false xmlNamespaceAware=false I restarted, but no change: Dec 7, 2004 7:56:37 AM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /myapp from URL file:/Applications/jakarta-tomcat-5.0.28/webapps/myapp I searched but could not find any other Host declarations, nor any instances of 'autoDeploy' in my conf directory. I tried setting every instance of debug in server.xml to 9, but upon restart I'm not getting any more output in logs/catalina.out than I did with debug=0. I tried removing server.xml altogether to see if was being ignored for some reason, but then tomcat failed to start. Anything else I could try? Thanks Again, Ian Shapira, Yoav wrote: Hi, Because you've probably left autoDeploy on for your Host. Yoav Shapira http://www.yoavshapira.com -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Ian Brandt Sent: Monday, December 06, 2004 7:14 PM To: [EMAIL PROTECTED] Subject: Won't deploy to root context even with Context path=? Hi, I'm running 5.0.28. I'm using the default $CATALINA_HOME/conf/server.xml. I have removed the ROOT and example webapps leaving only admin, manager (in server/webapps), and myapp (expanded into $CATALINA_HOME/webapps). In $CATALINA_HOME/conf/Catalina/localhost/myapp.xml I have specified my Context path=. When I start the server I get: INFO: Installing web application at context path /myapp from... I then also get the apparently infamous: [myapp] WARN [main] SettingsFactory.buildSettings(96) | Could not obtain connection metadata org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' When I change the Context path back to =myapp in myapp.xml the JDBC error goes away, so I'm assuming there's some sort of context mismatch when I specify but Tomcat deploys to /myapp anyway. So my question is why might Tomcat deploy my webapp to the context path /myapp as opposed to the root context when I specify path=? Thanks! Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Won't deploy to root context even with Context path=?
Hi, I'm running 5.0.28. I'm using the default $CATALINA_HOME/conf/server.xml. I have removed the ROOT and example webapps leaving only admin, manager (in server/webapps), and myapp (expanded into $CATALINA_HOME/webapps). In $CATALINA_HOME/conf/Catalina/localhost/myapp.xml I have specified my Context path=. When I start the server I get: INFO: Installing web application at context path /myapp from... I then also get the apparently infamous: [myapp] WARN [main] SettingsFactory.buildSettings(96) | Could not obtain connection metadata org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' When I change the Context path back to =myapp in myapp.xml the JDBC error goes away, so I'm assuming there's some sort of context mismatch when I specify but Tomcat deploys to /myapp anyway. So my question is why might Tomcat deploy my webapp to the context path /myapp as opposed to the root context when I specify path=? Thanks! Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
persistence after the request response cycle
Hi All, In my present set up I have a servlet serving a HTML page, the HTML page returns the form data via POST which the same servlet saves to a MySQL database. I'd like to extend the present setup so that after receiving the 1st POST data, the servlet responds with HTML page 2. HTML page 2 then returns form data via POST to the same servlet. The servlet would then save the accumulated responses from HTML pages 1 2 to the MySQL database. How can I get the servlet to remember or persist the response of HTML page 1 without writing to the database or to file. Thanks Ian ___ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HttpServletRequest.getCharacterEncoding -- useless?
Does the subject API ever return anything useful. Using Tomcat 5, I can't get it to return anything but null. Googling around, it seems that other servlet containers either always return null or always return some default value (usually ISO-8859-1). How the heck am I supposed to process form input if I can't figure out how it's encoded? Thanks! -- Ian Pilcher[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpServletRequest.getCharacterEncoding -- useless?
Ian Pilcher wrote: Does the subject API ever return anything useful. Using Tomcat 5, I can't get it to return anything but null. Googling around, it seems that other servlet containers either always return null or always return some default value (usually ISO-8859-1). OK, getCharacterEncoding isn't completely useless. It is, however, almost completely useless. AFAICT, it only works if the client includes the encoding in the Content-Type HTTP header. If I manually create an HTTP request with: Content-Type: application/x-www-form-urlencoded;charset=UTF-8 request.getCharacterEncoding returns UTF-8. Unfortunately, neither IE nor Mozilla do this. There is a Mozilla bug open: http://bugzilla.mozilla.org/show_bug.cgi?id=241540 I encourage anyone who is getting bitten by this issue to vote for this bug. -- Ian Pilcher[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2, apache and index.jsp
Debian is a Linux distribution. Debian Woody is the stable version, and Debian/testing is, well, in a testing state. As you can see from my email, I haven't been able to successfully forward all requests. I was hoping it would be as simple as outlined in the HOWTO, but, as with everything, that was not the case. ian. -Original Message- From: Tonte Pouncil [mailto:[EMAIL PROTECTED] Sent: July 13, 2004 9:55 AM To: Tomcat Users List Subject: RE: mod_jk2, apache and index.jsp Sergei, Ian, and Anybody else: Hello, I am trying to do the same thing, which is to have Apcache 2.0.49 forward all jsp and servlet request to Tomcat 5.0.25 on a windows box. Have you or anyone else been able to get this to work successfully? What is debian/testing? And what is Debian Woody system? Regards, Tonté -Original Message- From: Sergei Genchev [mailto:[EMAIL PROTECTED] Sent: Monday, July 12, 2004 4:49 PM To: [EMAIL PROTECTED] Subject: mod_jk2, apache and index.jsp Hi, I have Apache 2.0.49/Tomcat 5.0.25/mod_jk 2.04 on debian/testing My setup Works Mostly(TM), i.e if I go to http://myserver.mydomain.tld/index.jsp, Apache calls Tomcat and everything works fine. If I just go to http://myserver.mydomain.tld AND there is an index.html file in the webroot directory, index.html gets served instead. Relevant entries in httpd.conf: DirectoryIndex index.jsp index.html ... LocationMatch /*.jsp JkUriSet worker ajp13:localhost:8009 /LocationMatch If I remove index.html from DirectoryIndex and leave just index.jsp there - works fine If I remove LocationMatch /*.jsp entry - index.jsp gets served even if there is index.html present - it does not get passed to tomcat, so it is just served as a text file - but still served. I did strace on apache and I can see that, if *.jsp is mapped to ajp13, apache looks for index.html first even though index.jsp is the first file in DirectoryIndex directive. If I add more index files, i.e DirectoryIndex index.jsp index.html yyy.zzz xxx.yyy apache would look for all of these files before giving up and serving index.jsp - provided it did not find any of the other index files. If there is xxx.yyy, it will get served instead. If *.jsp is not mapped to ajp13, apache looks for index.jsp first, like it supposed to and if there is one does not look further for other index files. If I do not load mod_jk at all, apache would also look for index.jsp first and serve it if found - obviously as a text file. Unfortunately, I have to have both index.jsp and index.html as index files and I need index.jsp to have precedence - our web developers jump back and forth between those tho. The same setup worked fine with apache 1.3.27/mod_jk/tomcat2.something The questions I have are: - Who's at fault here - Apache or mod_jk? - And, more importantly - how do I make index.jsp work as default index file even if index.html is present? Thanks a lot! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk not forwarding requests to Tomcat
As the above directive indicates, I would like to have all requests to Apache forwarded to Tomcat. However, that is not happening and any URL I try results in a 404 with an error indicating such in Apache's error.log. No errors indicating failure appear in the obvious spots, and no output exists in the mod_jk.log indicated above. The inprocess log files do not exist, either. I have since abandoned attempts to forward everything, and have isolated a few choice URLs. I also changed my workers.properties to the following, as suggested in the Quickstart HOWTO (http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/quickhowto.html): # Define 1 real worker using ajp13 worker.list=worker1 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=300 In addition, I uncommented the ajp13 connector, although I am not sure why it was commented out. Adding the following line to your mod_jk configuration may forward all requests, except root: JkMount /* worker1 I just tried that and it worked on my system, so if you are having problems it may work on yours. ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk not forwarding requests to Tomcat
I am running Tomcat4.1.24 with Apache1.3.26 and libapache-mod-jk1.2.5 on a Debian Woody system. I have tried to set up mod-jk using the instructions found at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html and using the auto-generated config file. I added this to the end of my httpd.conf: Include /etc/tomcat4/auto/mod_jk.conf That file contains the following: IfModule !mod_jk.c LoadModule jk_module /usr/lib/apache/1.3/mod_jk.so /IfModule JkWorkersFile /usr/local/share/tomcat4/conf/jk/workers.properties JkLogFile /usr/local/share/tomcat4/logs/mod_jk.log JkLogLevel emerg and was generated by this directive: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/lib/apache/1.3/mod_jk.so forwardAll=true/ The workers.properties file contains the following: workers.tomcat_home=/usr/local/share/tomcat4 workers.java_home=/usr/local/j2sdk1.4.1/ ps=/ worker.list=ajp12, ajp13 worker.ajp12.port=8007 worker.ajp12.host=localhost worker.ajp12.type=ajp12 worker.ajp12.lbfactor=1 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp12, ajp13 worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar worker.inprocess.cmd_line=start worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr As the above directive indicates, I would like to have all requests to Apache forwarded to Tomcat. However, that is not happening and any URL I try results in a 404 with an error indicating such in Apache's error.log. No errors indicating failure appear in the obvious spots, and no output exists in the mod_jk.log indicated above. The inprocess log files do not exist, either. Any ideas as to what could be wrong? I would like Apache to forward all requests to Tomcat because I cannot run Tomcat on ports under 1024, and because I do not really wish to recompile the kernel to enable port-forwarding. I had thought mod_jk would be an easier venture. thanks, ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using javax.servlet.Filter to alter HTTP headers (was RE: How can the Server header in an HTTP response be customised?)
Is it possible to programmatically change the Server header? [...] Surely there is a way to alter the Server header of an HTTP response, if only for security reasons. I can't be the only person who wishes to do this. I would appreciate any suggestions as to how this can be accomplished. Is there another Tomcat mailing list where I can get my question answered, preferably one where Tomcat developers lurk? Nobody here seems to be able to provide answers. thank you, Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using javax.servlet.Filter to alter HTTP headers (was RE: How can the Server header in an HTTP response be customised?)
The Server header is hardcoded into the Connectors. You can't remove/change it without a PATCH/recompile to org.apache.coyote.http11.Constants That's certainly what I saw when looking at the source. There's no way alter it using a javax.servlet.Filter and a javax.servlet.HttpServletResponseWrapper? I tried (see previous messages on this topic) but got nowhere fast. Are there plans to allow the Server header to be altered in the near future? It is certainly a feature I would like to see, both for reasons of security and for limiting the size of the HTTP header for small devices on a rate plan. Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using javax.servlet.Filter to alter HTTP headers (was RE: How can the Server header in an HTTP response be customised?)
Unless there is a PATCH in bugzilla, then no. OK. Thanks for your help, Tim. Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using javax.servlet.Filter to alter HTTP headers (was RE: How can the Server header in an HTTP response be customised?)
Is it possible to programmatically change the Server header? Barring that, is it possible to set a Server header for a servlet within its web.xml file? My least preferred method is to change the Server header within Tomcat's server.xml file. I was thinking that a javax.servlet.Filter which intercepts a call to set an HTTP header would do the trick. I wrote a naive Filter (listed below) and added parameters to my web.xml (also shown below) to accomplish this. Its init() and doFilter() methods are called, but the setHeader() method of the HttpServletResponseWrapper is never hit. I also overrode the addHeader() method and added a call to that within my servlet. The addHeader() method in the wrapper gets called, but only when that method is called within the servlet, not from within Tomcat. Surely there is a way to alter the Server header of an HTTP response, if only for security reasons. I can't be the only person who wishes to do this. I would appreciate any suggestions as to how this can be accomplished. thank you, Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using javax.servlet.Filter to alter HTTP headers (was RE: How can the Server header in an HTTP response be customised?)
Is it possible to programmatically change the Server header? Barring that, is it possible to set a Server header for a servlet within its web.xml file? My least preferred method is to change the Server header within Tomcat's server.xml file. I looked at Tomcat's source code, and that Server header is hard-coded with values read in from a properties file and set in source. As such, there looks to be no way to specify a different value in the server.xml or web.xml. A poor design decision in my mind, but nevertheless. I was thinking that a javax.servlet.Filter which intercepts a call to set an HTTP header would do the trick. I wrote a naive Filter (listed below) and added parameters to my web.xml (also shown below) to accomplish this. Its init() and doFilter() methods are called, but the setHeader() method of the HttpServletResponseWrapper is never hit. Can calls to setHeader() in Tomcat source, specifically HttpConnector, be wrapped with Filter objects? or does that only apply to calls within servlet source? How can I wrap all calls to setHeader()? thanks, Ian. /** * The javax.servlet.Filter to set HTTP headers to null. */ public class HttpRemoveHeaderFilter implements Filter { private String headerToRemove; public void destroy() { } public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain ) throws IOException, ServletException { chain.doFilter( request, new RemoveHeaderWrapper( (HttpServletResponse)response, headerToRemove ) ); } public void init( FilterConfig config ) throws ServletException { headerToRemove = config.getInitParameter( remove ); } private final class RemoveHeaderWrapper extends HttpServletResponseWrapper { private String headerToRemove; public RemoveHeaderWrapper( HttpServletResponse response, String headerToRemove ) { super( response ); this.headerToRemove = headerToRemove; } public void setHeader( String s, String s1 ) { if( s.matches( headerToRemove ) ) { super.setHeader( s, null ); } else { super.setHeader( s, s1 ); } } } } Below are the associated contents of my web.xml file. filter filter-nameremoveHeader/filter-name filter-classHttpRemoveHeaderFilter/filter-class init-param param-nameremove/param-name param-valueServer/param-value /init-param /filter filter-mapping filter-nameremoveHeader/filter-name url-pattern/servlet/url-pattern /filter-mapping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How can the Server header in an HTTP response be customised?
I would like to change the value of the Server HTTP header returned by Tomcat. Calling HttpServletResponse.setHeader( Server, value ) will either add a second Server header or will do nothing, depending on whether it is called before or after the HTTP body is written. Is it possible to programmatically change the Server header? Barring that, is it possible to set a Server header for a servlet within its web.xml file? My least preferred method is to change the Server header within Tomcat's server.xml file. thank you, ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
configuring tomcat and apache on windows 2000
greetings I'm trying to get tomcat running with apache on windows 2000. I used to work in UNIX a lot but have become lazy with Windows, so please excuse my questions, the first of which is why isn't there an option to download a windows version of apache with the tomcat servlet engine built in? Or at least tomcat with the Jserv module included? I've got apache http server 2.0.49 running and have downloaded and installed jakarta-tomcat-4.1.30 and downloaded jakarta-tomcat-connectors-jk2.0.4-win32-apache2.0.49.zip. I extracted the mod_jk2.so file from the latter zip to the modules folder in the Apache2 folder. I added a line to load that module to the httpd.conf file. I created a workers2.properties file (in notepad) and then cut and pasted this [channel.socket:localhost:8009] port=8009 host=127.0.0.1 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/examples/*] worker=ajp13:localhost:8009 into it. Then I added # The default port is 8009 but you can use another one # channelSocket.port=8009 to the bottom of the jk2.properties file (in c:\jakarta-tomcat-4.1.30\conf) Apache runs, and when I run the startup.bat file tomcat starts, but then tomcat seems to be hung at INFO: Jk running ID=0 time=0/31 config=C:\jakarta-tomcat-4.1.30\bin\jk2.properties Any clues or help would be greatly appreciated. Ian Parfitt Selkirk College Castlegar, BC
Got servlet - cancel that last request
It seems to be running now after all, sorry for any distractions. Ian Parfitt
Tomcat still ain't working with the Apache webserver
Can open the http:/localhost/examples, but the SnoopServlet is giving HTTP Status 404. Also I'm not getting the configuration file Tomcat-Apache.conf showing up in the C:\jakarta-tomcat-4.1.30\conf directory. My verdict: Tomcat and Apache are not talking. Any ideas? Workers2.properties and jk2.properties files working on Windows 2000 would be helpful, any other windows tweaks. All the software is on the same machine: Windows 2000 Apache web server (apache_2.0.49-win32-x86-no_ssl.msi) Tomcat (jakarta-tomcat-4.1.30.zip) Apache - Tomcat connector module (jakarta-tomcat-connectors-jk2.0.4-win32-apache2.0.49.zip) many thanks in advance Ian Parfitt Selkirk College, Castlegar, BC [EMAIL PROTECTED]
Problem with request parameters getting mixed with requests from minutes before
We have a really difficult problem that surfaces only once every week or so in which request parameters for requests from a particular mapping get mixed randomly with request parameters from the same mapping that occurred minutes before. It sounds unbelievable, but that seems to be what is happening. We are using Tomcat 4.1.27 and connector mod_jk 1.2 with Apache 2. Our DB is Postgres in a Linux server. Our web application has a fair amount of load such that synchronization issues are a big deal. Has anyone come across this before or know why it might be happening? How we might avoid it? Ian Wark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with request parameters getting mixed with requests from minutes before (PartII)
On Thu, Jun 03, 2004 at 07:41:30PM +0900, ian.wark wrote: : We have a really difficult problem that surfaces only once every week or so : in which request parameters : for requests from a particular mapping get mixed randomly with request : parameters from the same mapping : that occurred minutes before. : : Has anyone come across this before or know why it might be happening? How : we might avoid it? duplicate info for different people usually means instance variable where there should be a method-local variable --There is a request instance variable in the bean, however the action creates a bean for each request inside the control method, so --I can't see there being multiple threads accessing the same instance variable. How are these request params being set? -QM --The short answer is: the application uses the struts framework and on this jsp, submitting is done via JavaScript form submits. Here are some more details. We can tell that is is the same session from the log. So it is the same user. The user does a search and comes up with a list of items. Each item in the list has a link that submits to a details screen that has the details of that particular item. On that screen various information is displayed and there are three buttons below. One called 'check', one called 'back' (ie back to the search list) and another one that is something like 'finished with'. After clicking the 'check' the 'finished with' button becomes pressable. All submitting is done via JavaScript form submits. The problem seems to occur after a sequence similar to the following: 1. User clicks the link to get to the detail screen 2. User clicks the 'check' button which submits the request to itself and updates the check status. 3. The user clicks another button. Which button is not clear because the parameter reads something equivalent to 'check eck' (Japanese equivalent) which does not exist. The button name is taken via JavaScript. The other strange parameter is alarmNo which picks up randomish information after the = sign. Normally there is just one number. Here is an excerpt of one mishappen request from our log. [POST]/AlarmDetail.do?finishUserId=changeConfirmFlg=0addDatet=2004/05/29 09:13:58A13:58confirmExecUpdFlg=0errfilepath =alarmNo=39372=38932dFlg=039583 alarmDetail=etc etc.. We thought at first that the reason might be because the button doesn't have a multiple press lock via Javascript, so that you don't accicentally submit twice. It does have a 'Do you really want to do this' style dialog box. But even if the user managed to submit twice, you don't get two requests getting bunged together. Another very outside chance might be memory leaks. We have closed all the statements in our SQL explicitely, but not the ResultSets. Does that make things little a bit clearer? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat, SSL and multiple urls
Hi. Is it possible for tomcat to have multiple domain names connecting thru SSL? For example, my tomcat-5.0.19 is hosted on a server with 202.10.11.12 as its public IP. This IP can be accessed thru either www.myserver1.net or www.myserver2.net. All connections can only go thru SSL (https). Is this possible? If so, how do I configure tomcat's keystore? Thanks in advance. - ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat, SSL and multiple urls
This setup is actually not for load balancing. We just had a bad experience yesterday wherein a supposed world class data center here failed to pay their bills resulting to forfeit their registration for their domain names, 2 of which were ours. Because of this our services were inaccessible to all our clients. To prevent another event like this, I was thinking of having another domain name for our server hosted on a different DNS. I'm just not sure whether tomcat can handle multiple SSL certificates. If so, how do I configure it? Thanks for your reply. - ian -Original Message- From: Shane Linley [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 2:53 PM To: Tomcat Users List Subject: RE: tomcat, SSL and multiple urls The SSL protocol demands that the domain recorded within the SSL certificate is the same as the domain thru which the SSL connection is obtained. Otherwise the SSL connection negotiation will fail. This is to avoid the nastiness of hijacking and whatnot. To use the 2 different domains that you have you will need 2 different SSL certificates, taking into account the limitations in the web server et all to handle multiple SSL certificates for different domains etc. My memory is a little fuzzy on this area as its been a while since I've had to think about it so take some salt with this :) Alternativly if you had a redirector or load balancer of some kind sitting in front of your web server you could have a SSL certifcate bound to a more generic domain like www.myserver.net, and have the redirector/balancer dish out the requests to www.myserver1.net and www.myserver2.net while still supporting the SSL. I don't know how Tomcats load balancing works with SSL... But then i'm not a network architect either... so more salt.. Regards, Shane. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: session affinity with loadbalancing (apache2, mod_jk, tomcat5 on linux 9, jdk1.4.2)
Yah I missed that one. thanks -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] Sent: Thursday, April 15, 2004 3:50 PM To: Tomcat Users List Subject: RE: session affinity with loadbalancing (apache2, mod_jk, tomcat5 on linux 9, jdk1.4.2) Did you set the jvmRoute in the Engine tag in server.xml. The value must match the name of the workers. (I'm not shure if it's the name or the attribute 'tomcatid') - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
session affinity with loadbalancing (apache2, mod_jk, tomcat5 on linux 9, jdk1.4.2)
I've read in the Workers How To of apache that the property sticky_session for lb worker properties enables / disables session affinity for the load balancer. When I tried it on my system the session doesn't seem to be retained often resulting to a session timed out or a not logged in error. Below is my worker.properties configuration. # # worker.properties # # In Unix, we use forward slashes: ps=/ # list the workers by name worker.list=tomcat1, tomcat2, loadbalancer # # tomcat1 worker # worker.tomcat1.host=192.168.0.61 worker.tomcat1.port=8009 worker.tomcat1.lbfactor=100 worker.tomcat1.type=ajp13 worker.tomcat1.cachesize=10 worker.tomcat1.cache_timeout=600 worker.tomcat1.socket_keepalive=1 worker.tomcat1.socket_timeout=300 # # tomcat2 worker # worker.tomcat2.host=192.168.0.65 worker.tomcat2.port=8009 worker.tomcat2.lbfactor=100 worker.tomcat2.type=ajp13 worker.tomcat2.cache_timeout=600 worker.tomcat2.socket_keepalive=1 worker.tomcat2.socket_timeout=300 # # end of file # Can anyone give me an idea where I may have an error? Thanks. - ian
how does lb factor work?
Can anyone explain to me how lb factors work? What values are recommended? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Which directory for web.xml?
WEB-INF/ [EMAIL PROTECTED] 02/04/04 11:44AM Hi All, When an application is deployed on tomcat, which directory should web.xml be in? thanks, Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSPC under Tomcat5.0.18
Hi. Can you show us your ant jspc task? [EMAIL PROTECTED] 01/26/03 03:46AM Dear list members , Recently I've decided to redeploy some of my projects with Tomcat5.0.18. Part of my projects are precomplied JSP files which were compiled using JSPC that came with Tomcat4.1.29. To my surprise those classes were not able to run properly with Tomcat5, while deploying JSP files without precompiling worked alright. The next step was to recompile JSP files allover using JSPC shipped with Tomcat5 and so I did using the Latest ANT release 1.6.0. ANT failed to complie the files with the following reason : Buildfile: build.xml jspc: [jspc] Compiling 21 source files/var/tomcat5/webapps/System/src/jsp/org/apache/jsp [jasperc] error:org.apache.jasper.JasperException: Unrecognized option: -v9. Use -help for help. [jasperc] at org.apache.jasper.JspC.setArgs(JspC.java:307) [jasperc] at org.apache.jasper.JspC.main(JspC.java:231) Can anyone tell me what is the issue here ? Why it is not backwards compatible ? How can I precompile the JSP files for Tomcat 5 ? Thanks in advance. Regards , Dima Gutzeit. - MailVision LTD. RD Team. Phone: 972-4-8500505 ext. 14 Fax: 972 - 4 - 8508000 http://www.mailvision.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0 and php servlet installation problem
I think I have nearly got my tomcat5/phpPHP 4.3.4 installation to work: but I am getting this error when I load a php testpage CLASSPATH IS SET TO /usr/java/j2sdk_nb/j2sdk1.4.2/bin/:/usr/java/j2sdk_nb/netbeans3.5.1/tomcat406/common/lib/servlet.jar:/var/tomcat/jakarta-tomcat-5.0.16-src/src/jakarta-tomcat-5/build/server/lib/phpsrvlt.jar LD_LIBRARY_PATH is /usr/local/apache/modules/libphp4.so I think the issue is with java.library.path being incorrect but don't know where to correct it. root cause java.lang.UnsatisfiedLinkError: no php4 in java.library.path java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491) java.lang.Runtime.loadLibrary0(Runtime.java:788) java.lang.System.loadLibrary(System.java:834) net.php.reflect.loadLibrary(reflect.java:34) net.php.reflect.(reflect.java:29) net.php.servlet.init(servlet.java:157) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:509) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677) java.lang.Thread.run(Thread.java:534) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jaas.jar not included w/ Tomcat 5.0.16 - why?
jaas.jar is no longer present in server/lib/ as it was in Tomcat 4.x. this causes ClassNotFoundExceptions when running under JDK 1.3. was this an oversight or was it intentional. if it was intentional, it should be documented in RUNNING.txt. thanks, Ian Ian P. Springer [EMAIL PROTECTED] Developer Resources Partner Enablement Adaptive Management, HP Software GBU 856.638.6338 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK2 Won't create .so's for Tomcat 5/Apache 2.0.48
Hi I posted how i got apache2 + tomcat41 with jk2 just yesterday if you go to the mailing list, tomcat users and click on the Archive you should be able to see it. Please let me know if this helps or if I can be of further help, have not tried with tomcat5 yet, should still work I think Ian - Original Message - From: James Myers [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 05, 2004 1:12 PM Subject: JK2 Won't create .so's for Tomcat 5/Apache 2.0.48 Hello, I have lost the remainder of what hair I had trying to get JK2 to create mod_jk2.so and jkini.so. Has anyone ever made this combination work? I'm using configure like this: ./configure --with-tomcat41=/usr/local/tomcat5.0 \ --with-apache2=/usr/local/apache2 \ --with-apxs2=/usr/local/apache2/bin/apxs Any help would be greatly appreciated. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache2 + Tomcat4 + mod_jk2 success
Hi Regarding the missing files I could not find a source/binary on jakarta web site from binaries page only solaris and windose are listed. I searched the web and found only jakarta-tomcat-connectors-jk2-2.0.2-src something was wrong with the realease and it would not compile. I felt that if I used the CVS I should get the most current release taking the risk that the CVS is the cutting edge and may not be as good as a stable release. In the CVS release the path to JK2 source is /jakarta-tomcat-connectors/jk/native2 there is no JK2 directory in the release, I can see no reason to do it this way and there should be a JK2 directory, something for the developers to look at sometime I guess. I was also confused as to why there are depreciated source files required for the build, something else for a developer to look at. Have you got Unix domain sockets to work with JK2? I tried but was unable to get it to work I hade the line channelUnix.file=/usr/local/apache2/logs/jk2.socket in my jk2.properties file but the file was not being automatical generated by apache on startup so error log was full of file not found messages, I created the file myself and the errors changed to connection refused and when I stopped apache it deleted jk2.socket file. Sorry about the wrong path you are right should have been /usr/local/apache2/bin/apxs it was getting late after a long day is my only excuse. Ian - Original Message - From: Oscar Carrillo [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, January 05, 2004 4:04 AM Subject: Re: Apache2 + Tomcat4 + mod_jk2 success Thanks. Some of the steps surprised me in missing files, etc. Can anyone else comment on why this would be the case? BTW, you have a reference to /usr/local/apache2/bin/apes, which should probably be /usr/local/apache2/bin/apxs. I'm also surprised that some of your directories say jk, not jk2. Is that correct? Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Sun, 4 Jan 2004, Ian Harwood wrote: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache2 + Tomcat4 + mod_jk2 success
Hi Having succeeded in getting jk2_mod to work thought I would document what I did My setup Linux RH9 basic setup, httpd-2.0.48 installed from source NOT RPM, tomcat-4.1.29, ant-1.5.4 The following was setup in /etc/profile JAVA_HOME=/usr/java/java CATALINA_HOME=/usr/local/tomcat PATH=$JAVA_HOME/bin:$PATH:$HOME/bin:/sbin:/usr/sbin CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar:$CATALI NA_HOME/common/lib/servlet.jar Add the following to the EXPORT line JAVA_HOME CATALINA_HOME CLASSPATH You will need to logout/login or restart to set the environment Install Apache2 from source make sure you enable dynamic loading by adding --enable-so I also like to add --enable-mods-shared=most Ie ./configure --enable-so --enable-mods-shared=most I installed into the default directory (/usr/local/apache2) Install tomcat nothing unusual here I placed mine in /usr/local/jakarta-tomcat-4.1.29 and made a symbolic link from /usr/local/tomcat Test both are working OK then stop both Now for the JK2 connector Download the connector source from CVS this was the only way I could get all the files needed cvs -d :pserver:[EMAIL PROTECTED]:home/cvspublic checkout jakarta-tomcat-connectors This will download all files into a director jakata-tomcat-connectors below the current directory This brings down all connectors the one we need is in jakata-tomcat-connectors/jk/native2 Have a read of the readme.txt file from this we can see we need to download 2 more files (APR, APR-UTILS) the locations are given I placed mine in /jakata-tomcat-connectors/jk/native2/apr Run buildconf ./buildconf Before we can go further we have to modify two of the source files jk_channel_socket.c and jk_pool.c Both the files are in jk/native2/common Jk_channel_socket.c find #error jk_channel_socket is deprecated line74 just after copyright notice Remove this line Jk_pool.c find #error jk_pool is deprecated line64 just after copyright notice Remove this line Run configure We need to add some parameters to configure: ./configure --with-apxs2=/usr/local/apache2/bin/apes --with-tomcat41=/usr/local/tomcat --with-java-home=/usr/java/java --with-jni Change all paths to suit your system Hopefully all will go well Run Make ./make At the end of make you will see a message about running libtools for me it was Libtool --finish /usr/local/apache2/modules This did not work for me I just copied mod_jk2.so from /jk/build/jk2/apache2 to /usr/local/apache2/modules And libjkjni.so to /usr/local/tomcat/server/lib Make sure apache and tomcat are not running File jk2.properties /usr/local/tomcat/conf/jk2.properties handler.list=channelSocket,request channelSocket.port=8009 channelSocket.address=127.0.0.1 File httpd.conf /usr/local/apache2/conf/httpd.conf Add LoadModule jk2_module modules/mod_jk2.so File workers2.properties /usr/local/apache2/conf/workers2.properties [shm] file=/usr/local/apache2/logs/jk2.shm size=1048576 debug=0 Disabled=0 [channel.socket:localhost:8009] [status:status] [uri:/jkstatus/*] group=status:status [uri:/examples/*] Info=map the entire examples webapp Debug=0 [uri:/tomcat-docs/*] You will need to add uri for all the webapps you use OK time to test all this Start tomcat first can be a bit slow to start give a little time Start apache2 Goto http://localhost you should get default apache2 goto http://localhost:8080 you should get default tomcat page Goto http://localhost/examples you should get tomcat directory listing if so all done I hope this works for you I have not tested this greatly so may still be thinks missing Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache Tomcat and Context help
Hi, give this untested rule a shot. It _should_ work. RewriteRule ^/tomcat/manager/(.*)$ /manager/$1 [P] --Ian [EMAIL PROTECTED] 12/31/03 03:04PM Hello, I have played with the mod_rewrite a bit, no luck. There is a good possibility that I am doing something wrong. This is a snippet of the apache config I used. Any feedback would be appreciated! LoadModule rewrite_module modules/mod_rewrite.so IfModule mod_rewrite.c RewriteEngine on RewriteRule ^/tomcat/manager/* /manager [P] /IfModule BTW - I have tried many combinations of $ * $1 with no luck :-( Regards, Douglas WF Acheson [EMAIL PROTECTED] -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: December 31, 2003 1:52 PM To: Tomcat Users List Subject: RE: Apache Tomcat and Context help Howdy, You probably already know this is easily done by modifying manager.xml to use a different context path (/tomcat/manager instead of /manager). But you want to do it on the Apache side. You could use mod_rewrite to forward /manager to /tomcat/manager or vice versa. Yoav Shapira Millennium ChemInformatics -Original Message- From: Douglas WF Acheson [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 31, 2003 1:41 PM To: [EMAIL PROTECTED] Subject: Apache Tomcat and Context help Hello, I have successfully integrated Apache v2.0.40 with tomcat v5.0.12 using jk2 under Linux RH9 :-) Everything works fine using straight mapping. So, when I want to use the manager (just playing around for now) I enter http://hostname/manager/html and I am presented with the Tomcat manager page :) NOW here comes the problem, I would like to reference the Tomcat manager page as http://hostname/tomcat/manager and have the same page presented. What I do not want to do is alter the webapp deployment descriptor (web.xml) file. I would like to alias (somehow) the context, or URI, in apache only. I was thinking of something like this: # Define the Manager proxy that comes with Tomcat [uri:/tomcat/manager/*] context=/manager info=Manager prefix mapping But, after frustrating attempts I cannot seem to get it correct. I have search the mail archives and a few people have asked similar questions, but I have not see any replies. Hope someone can help me ... Here is my simple workers2.properties file: [logger] level=DEBUG #[uriMap:] #info=Maps the requests. Options: debug #debug=0 # Alternate file logger [logger.file:0] level=DEBUG file=/home/www/runtime/logs/jk2.log [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=/home/www/runtime/run/jk2.shm size=100 debug=0 disabled=0 [channel.socket:localhost:8009] info=Ajp13 forwarding over socket debug=5 tomcatId=localhost:8009 [status:] info=Status worker, displays runtime informations [uri:/jkstatus/*] info=Display status information and checks the config file for changes. group=status: # Define the servlet examples proxy that comes with Tomcat [uri:/servlets-examples/*] info=Servlet prefix mapping # Define the JSP examples proxy that comes with Tomcat [uri:/jsp-examples/*] info=JSP prefix mapping # Define the Administration proxy that comes with Tomcat [uri:/admin/*] info=Admin prefix mapping # Define the Manager proxy that comes with Tomcat [uri:/manager/*] context=/manager info=Manager prefix mapping Regards, Douglas WF Acheson [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
need attribute for java key password for ssl connector
I have a customer that has assigned a password to his private key and a separate password to his keystore...and is unwilling to make them the same. I can't get Tomcat (using 4.0) to access the cert in his keystore because I can't figure out what attribute to use to specify the key password. I have the attribute for the keystore password, keystorePass, set correctly. Any ideas? Ian
Re: JVM paramaters with Tomcat Windows service
Along these lines, what parameters would be recommend to increase the amount of RAM taken by the JVM? - Original Message - From: Asif Chowdhary [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, November 11, 2003 9:15 AM Subject: RE: JVM paramaters with Tomcat Windows service For the tomcat service, select the properties option. At the bottom of the General Tab Window you will see a place to specify' start parameters. You can specify the parmaters there. -Original Message- From: Marcel Stor [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 11, 2003 2:37 AM To: [EMAIL PROTECTED] Subject: JVM paramaters with Tomcat Windows service Hi, How do I define JVM parameters when Tomcat is brought up by an existing! Windows service? Regards, Marcel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat ver 4.1.27
Do you get Tomcat errors or browser errors? - Original Message - From: Hardee, Brenda G NAVSAFECEN [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, October 24, 2003 10:56 AM Subject: Tomcat ver 4.1.27 I have Tomcat ver 4.1.27 running as a service on a win2000 platform. I cannot connect to the service with my browser (i.e.). If a run Tomcat in the startup script I can connect with my browser. Can anyone give me some help? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Windows service crashing
For some reason, a couple times a day, the Apache Tomcat 4.1 service crashes under Windows 2000 with no message at all. We have [EMAIL PROTECTED] configured to restart after 1 minutes, but I'd still like to know why this happens. Seems to only happen on our production box, not our test server. Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Access Tomcat-declared Resource from outside Tomcat
I've got a database resource declared as part of Tomcat's resource pool (JNDI?) -- I need a standalone Java app to access it. How do I declare such a thing in a standalone app? I realize this is slightly off topic but I figured someone else out there might try to do the same thing. Literally, what I'm doing is creating an alert subsystem that at certain times, the OS schedules a batch run, and it queries for certain conditions occurring in database tables, and emails people alerts. Thanks all! Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Windows service crashing
Absolutely nothing -- you only see the new instance starting. That's the odd thing about it. The only evidence whatsoever that it went down is in the Windows Event Viewer -- it says The Apache Tomcat 4.1 service terminated unexpectedly. It has done this 1 time(so). The following corrective action will be taken in 6 milliseconds: Restart the service. Weird... - Original Message - From: Robert Priest [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 10:55 AM Subject: RE: Windows service crashing What is being written to the log file? -Original Message- From: Ian Hunter [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 10:49 AM To: [EMAIL PROTECTED] Subject: Windows service crashing For some reason, a couple times a day, the Apache Tomcat 4.1 service crashes under Windows 2000 with no message at all. We have [EMAIL PROTECTED] configured to restart after 1 minutes, but I'd still like to know why this happens. Seems to only happen on our production box, not our test server. Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Access Tomcat-declared Resource from outside Tomcat
I don't follow you -- shouldn't I be able to create an instance of a naming context and populate it from within my App, then refer back to it? For this app, I don't mind hard coding the parameters, it's just that I have a class called DataStore that contains all the access points to the persistence layer of my web app. The DataStore class knows nothing about Tomcat. Surely I can use some other JNDI provider and fool the DataStore class into talking to it... In fact, here is the single point of reference to the database resource: // Return DataSource via JNDI with object named in Constants.DATABASE_KEY public static javax.sql.DataSource getDs() throws java.sql.SQLException { javax.sql.DataSource ds = null; try { // Obtain our environment naming context javax.naming.Context initCtx = new javax.naming.InitialContext(); javax.naming.Context envCtx = (javax.naming.Context) initCtx.lookup(java:comp/env); // Look up our data source String check = Constants.DATABASE_KEY; ds = (javax.sql.DataSource) envCtx.lookup(Constants.DATABASE_KEY); } catch (javax.naming.NamingException e) { e.printStackTrace(); return null; } return ds; } What else can I use as a JNDI provider? - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 11:01 AM Subject: RE: Access Tomcat-declared Resource from outside Tomcat Howdy, Currently tomcat doesn't have an external JNDI provider, so you can't really do what you're looking for. Yoav Shapira Millennium ChemInformatics -Original Message- From: Ian Hunter [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 10:50 AM To: [EMAIL PROTECTED] Subject: Access Tomcat-declared Resource from outside Tomcat I've got a database resource declared as part of Tomcat's resource pool (JNDI?) -- I need a standalone Java app to access it. How do I declare such a thing in a standalone app? I realize this is slightly off topic but I figured someone else out there might try to do the same thing. Literally, what I'm doing is creating an alert subsystem that at certain times, the OS schedules a batch run, and it queries for certain conditions occurring in database tables, and emails people alerts. Thanks all! Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bugs and weakness when Tomcat works a NT Service (tcservcfg)
Also note that you have to adjust the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache Tomcat 4.1\Parameters\JVM Library -- you have to make sure that's pointing to a real copy of jvm.dll -- the default is c:\program files\Java\j2rex.x.x\bin\client\jvm.dll and if that's not where you have Java installed, all kinds of weird things will happen. - Original Message - From: Goehring, Chuck Mr., RCI - San Diego [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 1:37 PM Subject: RE: Bugs and weakness when Tomcat works a NT Service (tcservcfg) Jose, Uninstall Tomcat. Start the installer and one of the screens has a list of products (Tomcat, Source etc) if you scroll down, there is and unchecked item that says to install it as a service. You must check this one to get it installed. If you are re-installing you also need to make sure it installs in the same directory to prevent other problems. Once the installer completes you can run it as a service or disable the service and use the startup.bat in the bin directory to start it from a command prompt. Sometimes this is desirable when debugging things that go wrong at startup. Chuck -Original Message- From: Jose Euclides da Silva Junior - DATAPREVRJ [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 10:28 AM To: 'Tomcat Users List'; Goehring, Chuck Mr., RCI - San Diego Subject: RES: Bugs and weakness when Tomcat works a NT Service (tcservcfg) Where is this checkbox? How can i reach there? I am talking about TomCat 4.1.18... -Mensagem original- De: Goehring, Chuck Mr., RCI - San Diego [mailto:[EMAIL PROTECTED] Enviada em: terça-feira, 21 de outubro de 2003 14:22 Para: Tomcat Users List Assunto: RE: Bugs and weakness when Tomcat works a NT Service (tcservcfg) Jose, I spent a long time trying to manually setup Tomcat to run as a service. Finally ended up re-installing and checking the little checkbox that makes it usable as a service. It is unchecked by default. Once it is installed, you can change the account it executes as in the services thingy in control panel. Chuck -Original Message- From: Jose Euclides da Silva Junior - DATAPREVRJ [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 10:11 AM To: '[EMAIL PROTECTED]' Subject: Bugs and weakness when Tomcat works a NT Service (tcservcfg) Hi all, there have been a nightmare since i ve decided to make TomCat 4.1.18 be a Windows NT 4.0's Service.First of all, i ve the stuped idea of looking for a program which could make it for me. So, i found the nightmare main actor -- tcservcfg and the second one -- windows!!! Thus, i made the following steps: 1 - ...runned the main actor ( tcservcfg ) - OK! 2 - started up the service - OK! 3 - test the environment - FAILURE! NOW, THE NIGHTMARE begins 4 - Only the static pages are availables, so whenever my app tries to use Result Sets, I get this error message: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.NullPointerException at BancoServlet.recuperaTopicoAssunto(BancoServlet.java:413) at BancoServlet.service(BancoServlet.java:249) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tion FilterChain.java:247) LINE 413 points to a resultset statement, see below: ring query = Select * FROM DICAS WHERE ID_TOPICO = + topico2; pstmt = con.prepareStatement(query); rs = pstmt.executeQuery(); if ( !rs.next() ) { // -- THIS IS LINE 413 -- fechaconection( pstmt,rs,con); chamadevolta = getServletContext().getRequestDispatcher(/semconteudo.jsp); chamadevolta.forward(request,response); } 5 - I ve tried to find something about permission but i didnt find anything. 6 - THE WORST: I stopped the service and tried to work as before -- starting TomCat by running startup.bat file. Unfortunatelly, TomCat doesnt starts up ANYMORE !!! 7- Then, i ve disabled all TomCat's services 8- Tried step 6 again - FAILURE AGAIN 9 - Finally, i ve removed the Registry key of TomCat service. 10 - Tried step 6 again - FAILURE AGAIN - it is a loop, isnt it... Really, any single help will be appreciated... Euclides. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe,
Multiple AuthN configs with jk2.properties
Hi, I have a number of apps sitting behind apache+mod_jk. Some want apache+mod_jk to manage authN and so require request.tomcatAuthentication=false in jk2.properties and others what to manage authentication themselves with request.tomcatAuthentication=true. Unfortunately the behaviour appears to be mutually exclusive with one set of apps broken regardless. Eithe the app returns a 403 because apache did the authn, or the app sees null in request.getRemoteUser(); Does anyone know if its possible to set 2 Coyote/JK2 connectors up on the same tomcat instance with different properties ? jk2.properties appears to be hard coded in JkMain. Does anyone know how to use the LOCALNAME feature in the javadoc for JkMain (jk2.properties) ? eg request.noauthcon.tomcatAuthentication=false request.authcon.tomcatAuthentication=true but I cant see how to map that to a port for a mod_jk end to attach to ? Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat sucks at receiving large messages
Unless your client is very conforming to the rules (ie. Content-Length is is correct wrt to available bytes) you could be waiting for a while for the stream of data to come across or until your socket read statement timeout int length = req.getContentLength(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); int count = 0 int total = 0; byte[] buf = new byte[8192]; // not sure which OS u have but if u are on Windows, // use 8192 for the default OS block size InputStream is = req.getInputStream(); while ( (count = is.read(buf) ) != -1) { total += count; baos.write(buf,0,count); } if (total != length) { // handle this case as u see fit. } last note: bytearray is prob. better than reader/char array unless you don't intend to handle non-character data. int length = req.getContentLength(); char [] charArr = new char[length]; int readResult = 0; int sum = 0; do { sum += readResult; length -= readResult; readResult = reader.read(charArr, sum, length); } while (readResult length); Howdy, Seems like a very decent fix. Thanks for posting it so others can have a future reference solution ;) I wonder if there's a java.nio solution that will perform better... Yoav Shapira Millennium ChemInformatics -Original Message- From: Stewart, Daniel J [mailto:[EMAIL PROTECTED] Sent: Thursday, October 02, 2003 12:34 PM To: Tomcat Users List Subject: RE: Tomcat sucks at receiving large messages Since I will be occasionally receiving messages in the 10Mbyte range, I can't read in a line at a time - it takes too long. The bug in the code below is because BufferedReader.read() will not necessarily return the whole buffer. So I replace the line reader.read(charArr); With this: int length = req.getContentLength(); char [] charArr = new char[length]; int readResult = 0; int sum = 0; do { sum += readResult; length -= readResult; readResult = reader.read(charArr, sum, length); } while (readResult length); Thanks for your help. Any other critiques on the use of the standard library are welcome. Dan -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 11:30 AM To: Tomcat Users List Subject: RE: Tomcat sucks at receiving large messages Howdy, public void service(HttpServletRequest req, HttpServletResponse res) { BufferedReader reader = req.getReader(); try { char [] charArr = new char[req.getContentLength()]; reader.read(charArr); String str = new String(charArr); try { File f = new File(servlet.out); PrintWriter out = new PrintWriter(new FileWriter(f)); out.print(str); out.flush(); out.close(); } catch(IOException err { System.err.println(err.toString()); } } catch(IOException err) { System.err.println(err.toString()); } } What happens if you ditch the req.getContentLength() approach (there are times when it will be -1 anyways), and do something like: BufferedReader reader = req.getReader(); StringBuffer contents = new StringBuffer(); String line = null; while((line = reader.readLine()) != null) { contents.append(line); } System.out.println(contents); (Later we'll worry about the writing -- first make sure you're reading the entire contents). Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL
jasper/jspc task - verbose flag not working
Env: Ant 1.5.3 on Win2K , TC 4.1 I can't seem to get Jasper/JSPC to work with verbose flag. My snippet of build.xml is below. Thanks. target name=jspc depends=initJsp description=Compiling Jsp mkdir dir=${jspservlet}/WEB-INF/src / taskdef classname=org.apache.jasper.JspC name=jasper2 classpath refid=MyProject.classpath/ /taskdef jasper2 verbose=9 validateXml=false uriroot=${jsp.src} webXmlFragment=${jspservlet}/WEB-INF/generated_jsp_servlet_mapping.xml outputDir=${jspservlet}/WEB-INF/src / depend srcdir=${jspservlet}/WEB-INF/src destdir=${jspservlet}/WEB-INF/classes cache=${jspservlet}/dependencies / /target - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SSL Connector attributes
I am trying to find out what all of the possible values are for the 'algorithm' and 'protocol' attributes of the Factory element in the HTTPS connector. I have looked all over the web and have only found a reference to the existence of the 'algorithm' attribute, but no usage examples. Also, the only example for the 'protocol' attribute I can find is the one included in the configuration file, protocol=TLS. Does anyone know what the possible values are? Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ant task for reloading webapps
I don't know if my last mail got throught so I'll resend. I'm using Tomcat 3.3 and cannot get the redeploying to work (ie I copy the war over an existing one and Tomcat should load the new war). I cannot get it to work. Everywhere on the net seems to say it's broken so I'm willing to now accept that now! My question is this: I have read how Tomcat 4 has an ant task to reload the war file, which works, but is this possible with Tomcat 3.3? Regards, Ian Colledge Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can't get to /admin dir of our webapp
Hello All, We have deployed our webapp to the / context (), and we're trying to access the admin directory (/admin) but Tomcat wants to server up it's little admin webapp. How can I get tomcat to server our /admin directory from out / webapp? Thanks, Ian.
RE: Can't get to /admin dir of our webapp
John, I've done that, and now I simply get a 404 from Tomcat. -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Monday, June 16, 2003 2:51 PM To: Tomcat Users List Subject: Re: Can't get to /admin dir of our webapp Remove the /admin webapp. John On Mon, 16 Jun 2003 14:47:07 -0400, Zabel, Ian [EMAIL PROTECTED] wrote: Hello All, We have deployed our webapp to the / context (), and we're trying to access the admin directory (/admin) but Tomcat wants to server up it's little admin webapp. How can I get tomcat to server our /admin directory from out / webapp? Thanks, Ian. -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't get to /admin dir of our webapp
I mean that I renamed the $CATALINA_HOME/server/webapps/admin directory. I will now try removing the admin.xml context file from the webapps base, as Dominic suggested. Ian. -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Monday, June 16, 2003 3:00 PM To: Tomcat Users List Subject: Re: Can't get to /admin dir of our webapp OK, please define I did that. What did you do? Is Tomcat still trying to deploy the admin webapp? John On Mon, 16 Jun 2003 14:49:55 -0400, Zabel, Ian [EMAIL PROTECTED] wrote: John, I've done that, and now I simply get a 404 from Tomcat. -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Monday, June 16, 2003 2:51 PM To: Tomcat Users List Subject: Re: Can't get to /admin dir of our webapp Remove the /admin webapp. John On Mon, 16 Jun 2003 14:47:07 -0400, Zabel, Ian [EMAIL PROTECTED] wrote: Hello All, We have deployed our webapp to the / context (), and we're trying to access the admin directory (/admin) but Tomcat wants to server up it's little admin webapp. How can I get tomcat to server our /admin directory from out / webapp? Thanks, Ian. -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't get to /admin dir of our webapp
Thanks guys, this worked! I removed the $CATALINA_HOME/server/webapps/admin directory and also the $CATALINA_HOME/webapps/admin.xml file and now /admin loads from our webapp. Thanks again, Ian. -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Monday, June 16, 2003 3:07 PM To: Tomcat Users List Subject: Re: Can't get to /admin dir of our webapp That should do it. John On Mon, 16 Jun 2003 15:04:10 -0400, Zabel, Ian [EMAIL PROTECTED] wrote: I mean that I renamed the $CATALINA_HOME/server/webapps/admin directory. I will now try removing the admin.xml context file from the webapps base, as Dominic suggested. Ian. -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Monday, June 16, 2003 3:00 PM To: Tomcat Users List Subject: Re: Can't get to /admin dir of our webapp OK, please define I did that. What did you do? Is Tomcat still trying to deploy the admin webapp? John On Mon, 16 Jun 2003 14:49:55 -0400, Zabel, Ian [EMAIL PROTECTED] wrote: John, I've done that, and now I simply get a 404 from Tomcat. -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Monday, June 16, 2003 2:51 PM To: Tomcat Users List Subject: Re: Can't get to /admin dir of our webapp Remove the /admin webapp. John On Mon, 16 Jun 2003 14:47:07 -0400, Zabel, Ian [EMAIL PROTECTED] wrote: Hello All, We have deployed our webapp to the / context (), and we're trying to access the admin directory (/admin) but Tomcat wants to server up it's little admin webapp. How can I get tomcat to server our /admin directory from out / webapp? Thanks, Ian. -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't get to /admin dir of our webapp
Phillip, This is a good point, and I will discuss with my coworkers. Ian. -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Monday, June 16, 2003 3:27 PM To: 'Tomcat Users List' Subject: RE: Can't get to /admin dir of our webapp I strongly disagree with all of you. Suppose you are upgrading from 4.1.18 to 4.1.24. The unpacked tar will override all of the contents re admin and install its admin app. Why don't you guys think of renaming your own admin app to something like myappadmin? -Original Message- From: Jeff Tulley [mailto:[EMAIL PROTECTED] Sent: June 16, 2003 3:20 PM To: [EMAIL PROTECTED] Subject: RE: Can't get to /admin dir of our webapp I've moved ours to be /tomcat/admin, so the we still have the admin functionality, but in a less generic name. It is just a simple change in webapps/admin.xml Jeff Tulley ([EMAIL PROTECTED]) (801)861-5322 Novell, Inc., The Leading Provider of Net Business Solutions http://www.novell.com [EMAIL PROTECTED] 6/16/03 1:16:23 PM Thanks guys, this worked! I removed the $CATALINA_HOME/server/webapps/admin directory and also the $CATALINA_HOME/webapps/admin.xml file and now /admin loads from our webapp. Thanks again, Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 4.1.24: /admin dir in our .war gets 404
Resending cause my other post seems to be lost. Hello all, We deploy our war file to the / context on our tomcat server (we use apache as our webserver, with mod_jk). We just added a /admin directory into our application, and we are trying to deploy the app. At first, when I went to http://tomcatserver/admin/ I was getting Tomcat's admin app, which I believe is served out of Tomcat's /server/webapps/admin directory structure. I renamed this hoping to get access to our webapps admin dir, but I simply get a 404 from the Tomcat server. (NOTE: this is not a 404 from apache, it is a Tomcat error) Where is the configuration for this /admin context? I can't find it anywhere. Thank you, Ian.
Tomcat 4.1.24: /admin dir in our .war gets 404
Hello all, We deploy our war file to the / context on our tomcat server (we use apache as our webserver, with mod_jk). We just added a /admin directory into our application, and we are trying to deploy the app. At first, when I went to http://tomcatserver/admin/ I was getting Tomcat's admin app, which I believe is served out of Tomcat's /server/webapps/admin directory structure. I renamed this hoping to get access to our webapps admin dir, but I simply get a 404 from the Tomcat server. (NOTE: this is not a 404 from apache, it is a Tomcat error) Where is the configuration for this /admin context? I can't find it anywhere. Thank you, Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OutOfMemoryError under high load
Hello, We're running into the following problem when our Tomcat instances are under heavy load. SEVERE: Caught exception executing [EMAIL PROTECTED], terminating thread java.lang.OutOfMemoryError: unable to create new native thread The exception is always on thread creation, and correlates a condition where the process count on the machine suddenly starts to ramp up from a few hundred to a little above 1000 processes. (Load is fairly constant during this time, and the condition always expresses itself at right around the same level of traffic, about 6Mbps of throughput per server.) There appears to be plenty of heap memory available when this happens, so that coupled with the thread creation message leads us to suspect that we're running into an OS tuning problem, instead of specifically a problem with our app. (A radical rewrite of how our domain objects are cached, and tuning of various caches to various sizes, resulted in near identical performance, aside from large differences in CPU utilization. This seems to further support this conclusion.) Tuning maxProcessors and a variety of other parameters in our app seems to have no discernible effect, neither beneficial nor detrimental, beyond changes in CPU utilization, which always falls in a band between 10 and 60%, depending on the tuning choices. We're currently using Tomcat 4.1.13 under Linux 2.4.17 with Sun JDK 1.4.1_01. We've tuned all the obvious parameters, (ulimit -n and /proc/sys/kernel/threads-max, for example,) or at least all the ones we could think of. I think we're missing something obvious, and the OS is not letting us spawn more threads. Anyone know what we're doing wrong? Thanks in advance, -Ian McFarland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help with SEVERE: Exception starting filter Set Character Encoding
Hi, I get the error SEVERE: Exception starting filter Set Character Encoding java.lang.ClassNotFoundException: filters.SetCharacterEncodingFilter when I start tomcat (see below). My environment is AIX 5.1: I loaded Java 2 SDK 1.4 (port for aix from ibm website) and tomcat 5.0 from apache website (no aix port available from ibm). Anyone know what am I missing? Or is this config unworkable? p.s. tomcat runs, i can access admin and manger apps but the jsp examples and servlet examples fail # catalina.sh run Using CATALINA_BASE: /usr/jakarta-tomcat-5.0.2 Using CATALINA_HOME: /usr/jakarta-tomcat-5.0.2 Using CATALINA_TMPDIR: /usr/jakarta-tomcat-5.0.2/temp Using JAVA_HOME: /usr/java14 Jun 5, 2003 2:25:38 PM org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource execute INFO: Reading descriptors ( dom ) 1177 Jun 5, 2003 2:25:38 PM org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource execute INFO: Reading descriptors ( dom ) 249 Jun 5, 2003 2:25:39 PM org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource execute INFO: Reading descriptors ( dom ) 698 Jun 5, 2003 2:25:39 PM org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource execute INFO: Reading descriptors ( dom ) 89 Jun 5, 2003 2:25:40 PM org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource execute INFO: Reading descriptors ( dom ) 604 Jun 5, 2003 2:25:40 PM org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource execute INFO: Reading descriptors ( dom ) 53 Jun 5, 2003 2:25:40 PM org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource execute INFO: Reading descriptors ( dom ) 113 Jun 5, 2003 2:25:40 PM org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource execute INFO: Reading descriptors ( dom ) 313 Jun 5, 2003 2:25:40 PM org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource execute INFO: Reading descriptors ( dom ) 57 Jun 5, 2003 2:25:41 PM org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource execute INFO: Reading descriptors ( dom ) 25 Jun 5, 2003 2:25:41 PM org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource execute INFO: Reading descriptors ( dom ) 65 Jun 5, 2003 2:25:41 PM org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource execute INFO: Reading descriptors ( dom ) 44 Jun 5, 2003 2:25:41 PM org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource execute INFO: Reading descriptors ( dom ) 33 Jun 5, 2003 2:25:44 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8080 Jun 5, 2003 2:25:44 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 9354 ms Jun 5, 2003 2:25:45 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jun 5, 2003 2:25:45 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.2 Jun 5, 2003 2:25:46 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Jun 5, 2003 2:25:52 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Jun 5, 2003 2:25:52 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Jun 5, 2003 2:25:57 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Jun 5, 2003 2:25:57 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /tomcat-docs from URL file:/usr/jakarta-tomcat-5.0.2/webapps/tomcat-docs Jun 5, 2003 2:25:58 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /jsp-examples from URL file:/usr/jakarta-tomcat-5.0.2/webapps/jsp-examples Jun 5, 2003 2:26:00 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /servlets-examples from URL file:/usr/jakarta-tomcat-5.0.2/webapps/servlets-examples Jun 5, 2003 2:26:02 PM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter Set Character Encoding java.lang.ClassNotFoundException: filters.SetCharacterEncodingFilter at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1327) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1174) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:257) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:352) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:125) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3559) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4112) at
Re: help with SEVERE: Exception starting filter Set Character Encoding
Hi, firstly, thanks for the quick response. Let me answer you last comment first re Out of curiosity, why would you expect an AIX port of tomcat from IBM (or anyone else)? Tomcat is pure Java -- there's no more AIX port than Solaris port ;) Here's what led me to believe I need to put down the ibm SDK port http://java.sun.com/cgi-bin/java-ports.cgi Also this comment AIX SDK 1.4 - A beta version of IBM's AIX port of Java 2 SDK, Standard Edition, Version 1.4.0. on IBM's website http://www.alphaworks.ibm.com/nav/Java?openc=Java+-+Developer+Kits Can I infer from your comment that I should just load the sdk directly from Sun rather than the port and then load tomcat 4.1.24 Thanks again, Ian - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, June 05, 2003 3:31 PM Subject: RE: help with SEVERE: Exception starting filter Set Character Encoding Howdy, I get the error SEVERE: Exception starting filter Set Character Encoding java.lang.ClassNotFoundException: filters.SetCharacterEncodingFilter when I start tomcat (see below). Do you have this class anywhere in your distribution? I loaded Java 2 SDK 1.4 (port for aix from ibm website) and tomcat 5.0 from apache website (no aix port available from ibm). Tomcat 5.x is alpha-quality. The examples in particular (which both the ContentEncoding and the Compression filters are) are not perfect yet. Comment these two filters out of the examples web.xml if you want to see the rest of the examples. If you need a stable environment, I suggest you try tomcat 4.1.24. Out of curiosity, why would you expect an AIX port of tomcat from IBM (or anyone else)? Tomcat is pure Java -- there's no more AIX port than Solaris port ;) Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with SEVERE: Exception starting filter Set Character Encoding
It would be handy if I read you comment properly, I see you were refering to Tomcat not the SDK. Sorry - Ian - Original Message - From: Ian Warner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, June 05, 2003 4:01 PM Subject: Re: help with SEVERE: Exception starting filter Set Character Encoding Hi, firstly, thanks for the quick response. Let me answer you last comment first re Out of curiosity, why would you expect an AIX port of tomcat from IBM (or anyone else)? Tomcat is pure Java -- there's no more AIX port than Solaris port ;) Here's what led me to believe I need to put down the ibm SDK port http://java.sun.com/cgi-bin/java-ports.cgi Also this comment AIX SDK 1.4 - A beta version of IBM's AIX port of Java 2 SDK, Standard Edition, Version 1.4.0. on IBM's website http://www.alphaworks.ibm.com/nav/Java?openc=Java+-+Developer+Kits Can I infer from your comment that I should just load the sdk directly from Sun rather than the port and then load tomcat 4.1.24 Thanks again, Ian - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, June 05, 2003 3:31 PM Subject: RE: help with SEVERE: Exception starting filter Set Character Encoding Howdy, I get the error SEVERE: Exception starting filter Set Character Encoding java.lang.ClassNotFoundException: filters.SetCharacterEncodingFilter when I start tomcat (see below). Do you have this class anywhere in your distribution? I loaded Java 2 SDK 1.4 (port for aix from ibm website) and tomcat 5.0 from apache website (no aix port available from ibm). Tomcat 5.x is alpha-quality. The examples in particular (which both the ContentEncoding and the Compression filters are) are not perfect yet. Comment these two filters out of the examples web.xml if you want to see the rest of the examples. If you need a stable environment, I suggest you try tomcat 4.1.24. Out of curiosity, why would you expect an AIX port of tomcat from IBM (or anyone else)? Tomcat is pure Java -- there's no more AIX port than Solaris port ;) Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Taglib troubles with 4.1.24
Sorry about the double post! I wasn't sure if my email was working. To follow up: Maybe I need to null this specific variable at the beginning of my doStartTag()? Ian. -Original Message- From: Ian Zabel [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2003 4:31 PM To: [EMAIL PROTECTED] Subject: Taglib troubles with 4.1.24 Importance: High I'm trying to code up some enhancements to my tag library, and I've just switched to Tomcat 4.1.24. I have a String defined in a base class which is appended to by many methods in the tag. For instance: public abstract class TagBase extends TagSupport { private String attributes; public void addAttribute( String attr, String value ) { if ( attributes == null || attributes.length() == 0 ) attributes = ; attributes += + attr; if ( value != null ) attributes += =\ + value + \; } } The problem is that my tags are accumulating more and more attributes from previous calls to the tag. One tag for example is an html radio tag. All of the attributes that I am setting with the addAttribute() method accumulate across tags. Like so: input type=radio name=testing value=1/Radio Button 1 input type=radio name=testing value=1 value=2/Radio Button 2 input type=radio name=testing value=1 value=2 value=3/Radio Button 3 input type=radio name=testing value=1 value=2 value=3 value=4/Radio Button 4 input type=radio name=testing value=1 value=2 value=3 value=4 value=5 checked=true/Radio Button 5 input type=radio name=testing value=1 value=2 value=3 value=4 value=5 checked=true value=6/Radio Button 6 input type=radio name=testing value=1 value=2 value=3 value=4 value=5 checked=true value=6 value=7/Radio Button 7 input type=radio name=testing value=1 value=2 value=3 value=4 value=5 checked=true value=6 value=7 value=8/Radio Button 8 What am I doing wrong here? Is this related to Tomcat 4.1's Tag Pooling? Is there anything I can do to fix this? Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Taglib troubles with 4.1.24
I'm trying to code up some enhancements to my tag library, and I've just switched to Tomcat 4.1.24. I have a String defined in a base class which is appended to by many methods in the tag. For instance: public abstract class TagBase extends TagSupport { private String attributes; public void addAttribute( String attr, String value ) { if ( attributes == null || attributes.length() == 0 ) attributes = ; attributes += + attr; if ( value != null ) attributes += =\ + value + \; } } The problem is that my tags are accumulating more and more attributes from previous calls to the tag. One tag for example is an html radio tag. All of the attributes that I am setting with the addAttribute() method accumulate across tags. Like so: input type=radio name=testing value=1/Radio Button 1 input type=radio name=testing value=1 value=2/Radio Button 2 input type=radio name=testing value=1 value=2 value=3/Radio Button 3 input type=radio name=testing value=1 value=2 value=3 value=4/Radio Button 4 input type=radio name=testing value=1 value=2 value=3 value=4 value=5 checked=true/Radio Button 5 input type=radio name=testing value=1 value=2 value=3 value=4 value=5 checked=true value=6/Radio Button 6 input type=radio name=testing value=1 value=2 value=3 value=4 value=5 checked=true value=6 value=7/Radio Button 7 input type=radio name=testing value=1 value=2 value=3 value=4 value=5 checked=true value=6 value=7 value=8/Radio Button 8 What am I doing wrong here? Is this related to Tomcat 4.1's Tag Pooling? Is there anything I can do to fix this? Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Taglib troubles with 4.1.24
I'm trying to code up some enhancements to my tag library, and I've just switched to Tomcat 4.1.24. I have a String defined in a base class which is appended to by many methods in the tag. For instance: public abstract class TagBase extends TagSupport { private String attributes; public void addAttribute( String attr, String value ) { if ( attributes == null || attributes.length() == 0 ) attributes = ; attributes += + attr; if ( value != null ) attributes += =\ + value + \; } } The problem is that my tags are accumulating more and more attributes from previous calls to the tag. One tag for example is an html radio tag. All of the attributes that I am setting with the addAttribute() method accumulate across tags. Like so: input type=radio name=testing value=1/Radio Button 1 input type=radio name=testing value=1 value=2/Radio Button 2 input type=radio name=testing value=1 value=2 value=3/Radio Button 3 input type=radio name=testing value=1 value=2 value=3 value=4/Radio Button 4 input type=radio name=testing value=1 value=2 value=3 value=4 value=5 checked=true/Radio Button 5 input type=radio name=testing value=1 value=2 value=3 value=4 value=5 checked=true value=6/Radio Button 6 input type=radio name=testing value=1 value=2 value=3 value=4 value=5 checked=true value=6 value=7/Radio Button 7 input type=radio name=testing value=1 value=2 value=3 value=4 value=5 checked=true value=6 value=7 value=8/Radio Button 8 What am I doing wrong here? Is this related to Tomcat 4.1's Tag Pooling? Is there anything I can do to fix this? Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat not sending session cookies to IE
On Thursday 13 March 2003 11:40 pm, Bill Barker wrote: I've never had problems myself with TC 3.3.x-5.0.x (I stopped using 3.2.x long ago :). IE 6.x has a cookie-lockout feature that may be causing the problem. With the factory settings, Tomcat should be fine. Go to Tools-Internet Options-Privacy to see if your settings are too high (e.g. anything above Medium High). I tried that, but it didn't help. But I also ruled that out because the same browser will connect to my development Tomcat instance but not to the client server, without any modification to the IE cookie settings. Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat not sending session cookies to IE
On Friday 14 March 2003 5:11 am, Tim Funk wrote: Could it be this? http://marc.theaimsgroup.com/?l=tomcat-devm=104247780113629w= -Tim It looks close, but I don't think that's it. For that issue to be true here, the browser would have had to have received a cookie in the first place. But I kept checking the Cookies folder and when I connect to my development server, a cookie appears there. When I connect to the client's server, no cookie ever shows up in the Cookies folder - that's what makes me think Tomcat isn't sending it in the first place. Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat not sending session cookies to IE
On Friday 14 March 2003 8:58 am, Scott, Sean wrote: If the domain and path of the cookie do not map correctly to your web application, the browser will not send it. I like to use Mozilla when troubleshooting cookie problems because it allows you to look at the cookies and make sure they are as you expected. I just gave that a shot, took a look through Mozilla's cookie manager. I'm not sure domain names come in to play here. I am accessing both servers using their hostnames only, no domain names - this is all taking place on the local network. So each cookie is identified by its host, not its domain. Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat not sending session cookies to IE
On Friday 14 March 2003 9:18 am, Dennis Cartier wrote: Ian, If you are stumped, you could try running a sniffer to see just what is included in the response. Set-Cookie header or not. Tcpdump on any Unix box or Ethereal comes in handy for this. Dennis Well first off, let me thank you for introducing me to such a cool new toy. I installed Ethereal and did some sniffing, and there's just a whole lot of cool stuff you can find out with that program. What a fun thing for a Friday afternoon. :-) Anyway, back to the issue at hand. I did two runs with Ethereal, one from the test box browser to the client server Tomcat, which does not work, and then from the client server IE to the test box Tomcat, which does work. Tomcat is sending the cookie in both instances, but the next connection from the client, it does not send the cookie back from the test box browser for the client server Tomcat (it does in the other case). So, why is the browser rejecting that cookie? I tried one last thing (which I should have tried long ago) - I used the IP address of the machine in the URL instead of its name. And guess what? I works. So it seems those who said it was a domain thing were right, but I can't figure out exactly why it's acting this way when Mozilla didn't have a problem using the hostname. The hunt for the perfect answer continues (but at least now it sort-of works). Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat not sending session cookies to IE
Greetings, list. I'm having IE issues. :-) I have Tomcat set up on Win2K, SP3, and it refuses to send the session cookie to IE (version 6, SP1). This means that I can log in to my application just fine, but when I click to the next page and my code checks for a valid session, it finds none. (works fine with Mozilla 1.2.1 and Konqueror 3.0) It worked fine when I first set up this server (a customer's server that they sent to us to work with), back in January. We sent the machine back to the client, and it didn't work, so sent it back and I found some things that I'm not sure were there when I first set up the box - the .NET framework, and FrontPage 2002 Server Extensions. Those may be related, may not - I mention them just in case. I have attacked this problem from many angles and just can't figure out what's going on. The original version of Tomcat was 3.2.3 (yes, very old, you don't need to tell me). Thinking it might be something with that version, I tried 3.2.4 (baby steps), and 3.3.1a (toddler steps). Same problem. Thinking maybe IIS was being a pain, I tried going directly to port 8080 to bypass the redirector. Same problem. Thinking it was a browser issue, I fiddled with the cookie settings for IE on the server machine, setting it to accept everything. No joy. So I tried hitting it from another machine, my daily workstation, which I know works fine because I IE every day to hit my local Tomcat instance. Didn't work either. Tried pointing the server IE to the Tomcat instance on my workstation - worked fine, which tells me IE on the server is willing to accept cookies. So, the Tomcat instance on my workstation will send out cookies, and both my browser and the server browser will accept them. The Tomcat instance on the server does not send out the cookies, either when going through IIS or running standalone. I've done a diff of all the configuration files for Tomcat between my instance of Tomcat and the one on the server (when they are both 3.2.3, as that's what's on my machine), and they are all identical except the auto-generated ones, which I don't really care about anyway. Help. :-) Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Forced to use isapi_redirector.dll and now have problems
But now I get this error: requested resource /jakarta/isapi_redirector.dll is not available. Does anyone have any clues as to the cause of this? It sounds like it needs a context entry in server.xml but that's not mentioned in any instructions. Do you have a virtual directory created in IIS that points to the directory your isapi_redirector.dll is in? For example, I have the isapi_redirector.dll in D:\tomcat\conf\iis\i386\, and I have a virtual directory in IIS called jakarta that points to that directory. Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Configuring Tyrex in tomcat 4.1.2
Hi I am trying to configure tyrex to work with tomcat to get transaction management working. I've downloaded the six jar files as per the documentation and placed them in the $TOMCAT_HOME$/common/lib I have created myself a domain-config.xml file which looks as follows: domain namedefault/name !-- Limit to 50 concurrent transactions -- maximum50/maximum !-- Default transaction timeout: 2 minutes -- timeout120/timeout resources !-- Specification for data source myDataSource -- dataSource namemyDatasource/name jarC:\Program Files\Apache Group\Tomcat 4.1\webapps\NDEIS\WEB-INF\lib\oracle.jar/jar classoracle.jdbc.xa.OracleXADataSource/class config usersomeusername/user passwordsomepassword/password serverNamelabdbsdev/serverName port1521/port databasendeis/database /config /dataSource limits !-- Start with 5 connections, never go below 5, and never go above 50 -- maximum50/maximum minimum5/minimum initial5/initial !-- Discard connections idle for 5 minutes -- maxRetain300/maxRetain !-- If maximum reached, block for 10 seconds -- timeout10/timeout /limits /resources /domain I also have modified my server.xml to include the following code snippet Context path=/NDEIS docBase=NDEIS debug=0 reloadable=true crossContext=true !-- Entry for tyrex -- Environment name=tyrexDomainConfig type=java.lang.String value=domain-config.xml/ Environment name=tyrexDomainName type=java.lang.String value=default/ Resource name=myDataSource auth=Container type=tyrex.resource.Resource/ ResourceParams name=myDataSource parameter namename/name valuemyDataSource/name /parameter /ResourceParams /Context After making these changes tomcat refuses to startup. Resource name=myDataSource auth=Container type=tyrex.resource.Resource/ ResourceParams name=myDataSource parameter namename/name valuemyDataSource/name /parameter /ResourceParams I've noticed that when I remove the above bold section from the context/context element then tomcat starts up. So the problem most probably lies with the domain-config.xml but I cant figure it out. Can anybody please help. Regards Ian Venter ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager ([EMAIL PROTECTED]) This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **
Re: JDBC Realm MS SQL 2000
What Exception do you get? - Original Message - From: Søren Blidorf [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 7:51 AM Subject: VS: JDBC Realm MS SQL 2000 This is how I set it up for Access. When I change the driver settings to Oracle or MySQL it works just fine. The connection to the SQL server works just fine. It is only the realm that does not work. I am not sure what else to send!!! Context path=/web docBase=c:/projects/web/web debug=0 reloadable=true Realm className=org.apache.catalina.realm.JDBCRealm debug=0 connectionName=username connectionPassword=password driverName=sun.jdbc.odbc.JdbcOdbcDriver connectionURL=jdbc:odbc:web userTable=users userNameCol=username userCredCol=password userRoleTable=user_roles roleNameCol=rolename / /Context -Oprindelig meddelelse- Fra: Xavier Prélat [mailto:[EMAIL PROTECTED] Sendt: 25. februar 2003 13:44 Til: Tomcat Users List Emne: Re: JDBC Realm MS SQL 2000 Søren Blidorf wrote: Hi. I am trying to create a realm login. When I use a mysql, MS Access or Oracle DB it works just fine. But when I try with MS SQL 2000 server it just does not work. Can anybody tell me why? Søren Blidorf Nolas Consulting Gustav Wiedsvej 9 DK-2860 Søborg Telefon: +45 39676513 Direkte: +45 61676513 Web: www.nolas.dk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Can you tell us more about it just does not work... what is your conf, properties...etc... Xavier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to verify SSL/HTTPS behind Tomcat via AJP13
I've fallen back to seeing if getRequestURL().toString().startsWith(https) -- that seems pretty kludgy. Any other ideas? - Original Message - From: Turner, John [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 8:41 AM Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13 The return from getProtocol() is correct, AFAIK. I don't believe there is a HTTPS/1.1 or similar, but I could be wrong. By check protocol type in the docs (agreed, it is unclear), I believe it means to do one (or all) of the following: - check the URL for https - check the port number for the request - use HttpServletRequest.isSecure(), though I think that will return false when you use Tomcat via a connector with ApacheI've never tried it to be sure. John -Original Message- From: Ian Hunter [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 9:26 PM To: Tomcat Users List Subject: How to verify SSL/HTTPS behind Tomcat via AJP13 From http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html -- Any pages which absolutely require a secure connection should check the protocol type associated with the page request and take the appropriate action of https is not specified. Also, When running Tomcat primarily as a Servlet/JSP container behind another web server, such as Apache or Microsoft IIS, it is usually necessary to configure the primary web server to handle the SSL connections from users. Typically, this server will negotiate all SSL-related functionality, then pass on any requests destined for the Tomcat container only after decrypting those requests. Likewise, Tomcat will return cleartext responses, that will be encrypted before being returned to the user's browser. In this environment, Tomcat knows that communications between the primary web server and the client are taking place over a secure connection (because your application needs to be able to ask about this), but it does not participate in the encryption or decryption itself. However, when I check request.getProtocol() I get HTTP/.1.1 even when I'm connecting via SSL (url shows https: and browser shows lock and confirms 128 bit SSL) -- what gives? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to verify SSL/HTTPS behind Tomcat via AJP13
So if I ditched ajp and went with a ModProxy directive or something, might that work? I wouldn't think so, because the protocol in use between Apache and Tomcat would then be http, not https. Maybe they ought to fix that page I quoted originally to give a more realistic understanding of SSL front ends... - Original Message - From: Turner, John [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 9:37 AM Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13 Nope. I think there are some SSL-specific Request variables that are sent along with a SSL request, you could always Enum through the list and look for them, but that is just as kludgy. The problem is that behind a connector like JK or JK2, there is no HTTP, and there is no HTTPS. The protocol being used is JK/JK2 (AJP13/14), so the only resources available to a developer at that point are the things that get sent along with typical requests. John -Original Message- From: Ian Hunter [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 9:31 AM To: Tomcat Users List Subject: Re: How to verify SSL/HTTPS behind Tomcat via AJP13 I've fallen back to seeing if getRequestURL().toString().startsWith(https) -- that seems pretty kludgy. Any other ideas? - Original Message - From: Turner, John [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 8:41 AM Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13 The return from getProtocol() is correct, AFAIK. I don't believe there is a HTTPS/1.1 or similar, but I could be wrong. By check protocol type in the docs (agreed, it is unclear), I believe it means to do one (or all) of the following: - check the URL for https - check the port number for the request - use HttpServletRequest.isSecure(), though I think that will return false when you use Tomcat via a connector with ApacheI've never tried it to be sure. John -Original Message- From: Ian Hunter [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 9:26 PM To: Tomcat Users List Subject: How to verify SSL/HTTPS behind Tomcat via AJP13 From http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html -- Any pages which absolutely require a secure connection should check the protocol type associated with the page request and take the appropriate action of https is not specified. Also, When running Tomcat primarily as a Servlet/JSP container behind another web server, such as Apache or Microsoft IIS, it is usually necessary to configure the primary web server to handle the SSL connections from users. Typically, this server will negotiate all SSL-related functionality, then pass on any requests destined for the Tomcat container only after decrypting those requests. Likewise, Tomcat will return cleartext responses, that will be encrypted before being returned to the user's browser. In this environment, Tomcat knows that communications between the primary web server and the client are taking place over a secure connection (because your application needs to be able to ask about this), but it does not participate in the encryption or decryption itself. However, when I check request.getProtocol() I get HTTP/.1.1 even when I'm connecting via SSL (url shows https: and browser shows lock and confirms 128 bit SSL) -- what gives? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat doesn't throw exception if client application closses the socket.
Hmm. What are you trying to do where that matters? Sounds like there might be a better way... - Original Message - From: Niketan Mourya [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 9:53 AM Subject: Tomcat doesn't throw exception if client application closses the socket. Hi All, I am facing a problem because tomcat doesn't throw exception if client closes the socket connection. Do any body have a workaround/solution to know about the socket connection status with the client application. I am using tomcat alone. Many thanks, -Niketan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to verify SSL/HTTPS behind Tomcat via AJP13
Thanks, I'll try to check that out. Does Apache add those variables to the request header? - Original Message - From: Eduardo Jaunez S. [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 9:53 AM Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13 Dear Ian, I have the same problem, but I'm trying to pass the SSL_* vars generated by mod_ssl in Apache into the Tomcat side. I think this aproach could resolve your problem (there are a lot of vars generated only when a SSL session is open). Unfortunately I can't do it yet, so the JkEnvVar doesn't work for my tests, and I don't know what is wrong. I send to you some hints (I receive from Tomcat Developer's list): httpd.conf: ... SSLOptions +StdEnvVars +ExportCertData ... JkEnvVar SSL_CLIENT_CERT SSL_CLIENT_CERT ... MyTest.jsp ... HttpServletRequest req ; //from the post ... // Gets the X.509 PEM Certificate String SSL_Client = req.getAttribute(SSL_CLIENT_CERT) ; ... If you are lucky than me, please let me know !!. Eduardo. -Mensaje original- De: Ian Hunter [mailto:[EMAIL PROTECTED] Enviado el: Martes, 25 de Febrero de 2003 11:31 Para: Tomcat Users List Asunto: Re: How to verify SSL/HTTPS behind Tomcat via AJP13 I've fallen back to seeing if getRequestURL().toString().startsWith(https) -- that seems pretty kludgy. Any other ideas? - Original Message - From: Turner, John [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 8:41 AM Subject: RE: How to verify SSL/HTTPS behind Tomcat via AJP13 The return from getProtocol() is correct, AFAIK. I don't believe there is a HTTPS/1.1 or similar, but I could be wrong. By check protocol type in the docs (agreed, it is unclear), I believe it means to do one (or all) of the following: - check the URL for https - check the port number for the request - use HttpServletRequest.isSecure(), though I think that will return false when you use Tomcat via a connector with ApacheI've never tried it to be sure. John -Original Message- From: Ian Hunter [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 9:26 PM To: Tomcat Users List Subject: How to verify SSL/HTTPS behind Tomcat via AJP13 From http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html -- Any pages which absolutely require a secure connection should check the protocol type associated with the page request and take the appropriate action of https is not specified. Also, When running Tomcat primarily as a Servlet/JSP container behind another web server, such as Apache or Microsoft IIS, it is usually necessary to configure the primary web server to handle the SSL connections from users. Typically, this server will negotiate all SSL-related functionality, then pass on any requests destined for the Tomcat container only after decrypting those requests. Likewise, Tomcat will return cleartext responses, that will be encrypted before being returned to the user's browser. In this environment, Tomcat knows that communications between the primary web server and the client are taking place over a secure connection (because your application needs to be able to ask about this), but it does not participate in the encryption or decryption itself. However, when I check request.getProtocol() I get HTTP/.1.1 even when I'm connecting via SSL (url shows https: and browser shows lock and confirms 128 bit SSL) -- what gives? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat doesn't throw exception if client application closses the socket.
The default session timeout is 30 minutes; maybe you'd want to consider lowering that. Keep in mind that if a client browser is using HTTP/1.0, there are no open connections ever; once they hit your site and get a page, the connection is immediately broken -- that's how http is supposed to work. Cookies and URL rewriting are solutions that people came up with to get around this. - Original Message - From: Niketan Mourya [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 10:25 AM Subject: Re: Tomcat doesn't throw exception if client application closses the socket. I am making a connection to a application( my server running on some other machine with limited number of threads). In the absence of exception I not able to close the connection to my server application (here some other complexity involves). And all the threads of my server application exhausted. The weblogic throws the connection when ever client application closes the connection. But it is not happening with tomcat. - Niketan. Ian Hunter wrote: Hmm. What are you trying to do where that matters? Sounds like there might be a better way... - Original Message - From: Niketan Mourya [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 9:53 AM Subject: Tomcat doesn't throw exception if client application closses the socket. Hi All, I am facing a problem because tomcat doesn't throw exception if client closes the socket connection. Do any body have a workaround/solution to know about the socket connection status with the client application. I am using tomcat alone. Many thanks, -Niketan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with [EMAIL PROTECTED] http://shopnow.netscape.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tcp/ip stack issues
If you don't have a NIC or an Ethernet connection, what's the point? In my experience, Win95 will still allow you to connect to 127.0.0.1, but in Win2K you can't even reach yourself without a network connection. My solution was to create an Ethernet loopback plug that I stick in my NIC port and a short time later I can at least access 127.0.0.1. - Original Message - From: Shital Joshi [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 11:10 AM Subject: tcp/ip stack issues hi there, we are using tomcat for our application. the application should work on all the windows platforms. now, if the tcp/ip stack is not initialized on windows 95 (if network card is not present or if the ithernet connection is not available) then tomcat fails to start. any solutions? your help is highly appreciated. -shital - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Mangled Content-Length header
Every so often a response to a POST request to Tomcat either fails to include the Content-Length header or mangles it so it doesn't read Content-Length. FYI, this is still happening. Here is what the request headers look like: POST /Phantom/servlet HTTP/1.1 User-Agent: PhantomClient Host: 216.234.50.130:8080 Content-Length: 60 Cookie: JSESSIONID=7DC08E2E8C001438E6510500EDC06D07 Here is what the response headers look like: HTTP/1.1 200 OK Content-Type: application/octet-stream Content-Lengtdb Date: Tue, 25 Feb 2003 17:28:49 GMT Server: Apache Coyote/1.0 Notice that the Content-Length header is mangled. Any ideas as to why this is happening? ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to verify SSL/HTTPS behind Tomcat via AJP13
From http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html -- Any pages which absolutely require a secure connection should check the protocol type associated with the page request and take the appropriate action of https is not specified. Also, When running Tomcat primarily as a Servlet/JSP container behind another web server, such as Apache or Microsoft IIS, it is usually necessary to configure the primary web server to handle the SSL connections from users. Typically, this server will negotiate all SSL-related functionality, then pass on any requests destined for the Tomcat container only after decrypting those requests. Likewise, Tomcat will return cleartext responses, that will be encrypted before being returned to the user's browser. In this environment, Tomcat knows that communications between the primary web server and the client are taking place over a secure connection (because your application needs to be able to ask about this), but it does not participate in the encryption or decryption itself. However, when I check request.getProtocol() I get HTTP/.1.1 even when I'm connecting via SSL (url shows https: and browser shows lock and confirms 128 bit SSL) -- what gives? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue
Put msutil.jar, mssqlserver.jar, and msbase.jar in WEB-INF/lib and all will be happy. - Original Message - From: Michael Ni [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 24, 2003 9:32 PM Subject: Tomcat and Microsoft SQL Server 2000 JDBC Driver issue My goal is to use JSP to query from my Microsoft SQL Server 2000. I have successfully created my environments and installed the drivers for the Microsoft SQL Server 2000 JDBC. However when i run my script i get the following error Driver not found:java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDrivercom.microsoft.jdbc.sqlserver.SQL ServerDriver exception: java.sql.SQLException: No suitable driverNo suitable driver you can see for yourself at the following url http://128.91.107.144:8080/test/home.jsp I attached my home.jsp page. Does tomcat need to have the microsoft drivers physically in the folder or subfolders of c:\Tomcat 4.1? All i did was create the CLASSPATH which assigned CLASSPATH to the 3 jar driver files. I've been stuck on this issue for 3 days. Can anyone help me? _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]