GlobalNamingResource problem
Given the following server.xml snipplet (functional), we'd like to move the jdbc/entitlement to the host element using a GlobalNamingResource (see bottom for example one of many attempts).. Can someone shed some light on how to accomplish this so all my contexts within a HOST element have access to the JNDI naming resource? I get errors when obtaining a Connection, not when looking up the JNDI resource name. Host className=org.apache.catalina.core.StandardHost appBase=webapps autoDeploy=true configClass=org.apache.catalina.startup.ContextConfig contextClass=org.apache.catalina.core.StandardContext debug=0 deployXML=true errorReportValveClass=org.apache.catalina.valves.ErrorReportValve liveDeploy=true mapperClass=org.apache.catalina.core.StandardHostMapper name=localhost unpackWARs=true !-- Snip some other contexts -- Context cachingAllowed=true debug=1 docBase=Entitlement.war path=/Entitlement privileged=false reloadable=true Logger className=org.apache.catalina.logger.FileLogger debug=1 directory=logs prefix=localhost_onejax_log. suffix=.txt timestamp=true verbosity=1/ Resource name=jdbc/entitlement scope=Shareable type=javax.sql.DataSource/ ResourceParams name=jdbc/entitlement parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameusername/name valueusername/value /parameter parameter namepassword/name valuepassword/value /parameter parameter namedriverClassName/name valueorg.postgresql.Driver/value /parameter parameter nameurl/name valuejdbc:postgresql://somehost/somedatabase?autoReconnect=true/value /parameter /ResourceParams /Context Logger className=org.apache.catalina.logger.FileLogger debug=0 directory=logs prefix=localhost_log. suffix=.txt timestamp=true verbosity=1/ /Host - Would like it to be moved to the Host element so it is available to multiple contexts like this, but the contexts no longer have access to the jdbc pool: Host className=org.apache.catalina.core.StandardHost appBase=webapps autoDeploy=true configClass=org.apache.catalina.startup.ContextConfig contextClass=org.apache.catalina.core.StandardContext debug=0 deployXML=true errorReportValveClass=org.apache.catalina.valves.ErrorReportValve liveDeploy=true mapperClass=org.apache.catalina.core.StandardHostMapper name=localhost unpackWARs=true GlobalNamingResource Resource name=jdbc/entitlement scope=Shareable type=javax.sql.DataSource/ ResourceParams name=jdbc/entitlement parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameusername/name valueusername/value /parameter parameter namepassword/name valuepassword/value /parameter parameter namedriverClassName/name valueorg.postgresql.Driver/value /parameter parameter nameurl/name valuejdbc:postgresql://somehost/somedatabase?autoReconnect=true/value /parameter /ResourceParams /GlobalNamingResource !-- Snip some other contexts -- Context cachingAllowed=true debug=1 docBase=Entitlement.war path=/Entitlement privileged=false reloadable=true Logger className=org.apache.catalina.logger.FileLogger debug=1 directory=logs prefix=localhost_onejax_log. suffix=.txt timestamp=true verbosity=1/ /Context Logger className=org.apache.catalina.logger.FileLogger debug=0 directory=logs prefix=localhost_log. suffix=.txt timestamp=true verbosity=1/ /Host
RE: Location of the Root webapps
In the host element there is an appbase definition, you may modify this value (all contexts then become relative to this new location) -Original Message- From: Takumi Fujiwara [mailto:[EMAIL PROTECTED] Sent: Monday, March 15, 2004 2:55 PM To: [EMAIL PROTECTED] Subject: Location of the Root webapps Hi, Can someone please tell me if I can change the location of the ROOT directory? Currently, it is the directory, ${tomcat installation directory}\webapps\ROOT can I change it so that I can point to some other directory? Thank you . __ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JMX conflict in Tomcat 5.0
Put these jars under your webapp/WEB-INF/lib folder... -Original Message- From: Mark Richards [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 10:55 AM To: Tomcat Users List (E-mail) Subject: JMX conflict in Tomcat 5.0 Hello, I am working on a web-application that was previously deployed on Websphere but we would like to deploy it on Tomcat 5.0. However, our application uses JMX and it seems that our JMX jars conflict with Tomcat's JMX jars. We found that if we replace Tomcat's JMX jars with our JMX jars our application appears to work but I was wondering what the ramifications of this are for Tomcat. We are using the Sun implementation of JMX (I think it's version 1.1). Is there any way to make this work without mangling the Tomcat installation? Will Tomcat work properly with our JMX jars? Other details: Our web-app conforms to Servlet 2.2 JDK 1.3.1 Changing our version of JMX to whatever Tomcat uses is not an option at this time. Thanks, Mark Richards Software Developer InSystems Corporation Voice: (905) 513-1400 ext. 3552 Fax: (905) 513-1419 mailto:[EMAIL PROTECTED] http://www.insystems.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: Problem using JNDI/DBCP to get DataSouce
Check your validation query in your resource definition. -Original Message- From: Paul Mahoney [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 12:57 PM To: 'Parsons Technical Services'; 'Tomcat Users List' Subject: RE: Problem using JNDI/DBCP to get DataSouce Tried dataSource = (DataSource) initContext.lookup(java:comp/jdbc/OscarsDB); But it return null, so tried dataSource = (DataSource) initContext.lookup(java:comp/env/jdbc/OscarsDB); And a datasource instance was return so before, looking good... However, still got the same exception when trying to get a connection instance Cannot get a connection, pool exhausted with a nested exception Could not create a validated object -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: 17 March 2004 16:49 To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: Problem using JNDI/DBCP to get DataSouce Paul, Replace this: if (dataSource == null) { Context initContext = new InitialContext (); Context envContext = (Context) initContext.lookup (java:comp/env); dataSource = (DataSource) envContext.lookup (jdbc/OscarsDB); } With this: if (dataSource == null) { Context initContext = new InitialContext (); dataSource = (DataSource) initContext.lookup (java:comp/jdbc/OscarsDB); } This is working fine for me. Just a note that I am running against MySQL, but at this point in the code it should not matter especially since the hardwire way works. Doug - 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: Problem using JNDI/DBCP to get DataSouce
Would you include any resource definitions and/or any resource links/references. Also, the full stacktrace of the exception may shed some other potential problems. -Original Message- From: Paul Mahoney [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 1:05 PM To: D'Alessandro, Arthur; 'Tomcat Users List'; 'Parsons Technical Services' Subject: RE: Problem using JNDI/DBCP to get DataSouce I agree, but it looks good and I've tried without one being specified. In addition, I've never see a connection raised at the database server end. This makes me think the DataSource is just not working and I'm not seeing the proper error. But I can find nothing more in the logs :( -Original Message- From: D'Alessandro, Arthur [mailto:[EMAIL PROTECTED] Sent: 17 March 2004 18:00 To: Tomcat Users List; [EMAIL PROTECTED]; Parsons Technical Services Subject: RE: Problem using JNDI/DBCP to get DataSouce Check your validation query in your resource definition. -Original Message- From: Paul Mahoney [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 12:57 PM To: 'Parsons Technical Services'; 'Tomcat Users List' Subject: RE: Problem using JNDI/DBCP to get DataSouce Tried dataSource = (DataSource) initContext.lookup(java:comp/jdbc/OscarsDB); But it return null, so tried dataSource = (DataSource) initContext.lookup(java:comp/env/jdbc/OscarsDB); And a datasource instance was return so before, looking good... However, still got the same exception when trying to get a connection instance Cannot get a connection, pool exhausted with a nested exception Could not create a validated object - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem using JNDI/DBCP to get DataSouce
For future, recommend snipping any real host/username/passwords for security reasons. I am not familiar with Informix, however, given a logged in session by the user you specify, are you able to execute the query, and return 1 or more records? I recommend creating dummy table just for validation with 1 record, 1 field to minimize the overhead. A validation query is performed before each connection object is handed out. -Original Message- From: Paul Mahoney [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 2:19 PM To: D'Alessandro, Arthur; 'Tomcat Users List'; 'Parsons Technical Services' Subject: RE: Problem using JNDI/DBCP to get DataSouce To get this far I had to more the datasource resource defiition to the context. I've rasie the debug to 9 but could see no additional loging that would help. Here is the context ... Context className=org.apache.catalina.core.StandardContext cachingAllowed=true charsetMapperClass=org.apache.catalina.util.CharsetMapper cookies=true crossContext=false debug=9 displayName=Custom Fares docBase=C:/Documents and Settings/pmahoney/My Documents/Travel 2/code/webapps/CustomFares/web mapperClass=org.apache.catalina.core.StandardContextMapper path=/CustomFares privileged=false reloadable=false swallowOutput=false useNaming=true wrapperClass=org.apache.catalina.core.StandardWrapper Resource name=jdbc/OscarsDB scope=Shareable type=javax.sql.DataSource/ ResourceParams name=jdbc/OscarsDB parameter namevalidationQuery/name valueselect count(*) from systables/value /parameter parameter nameurl/name valuejdbc:informix-sqli://oscar1.travel2.com:1420/oscars:INFORMIXSERVE R=os cars_dbsrv/value /parameter parameter namepassword/name value1atan1a/value /parameter parameter namemaxActive/name value4/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namedriverClassName/name valuecom.informix.jdbc.IfxDriver/value /parameter parameter nameusername/name valuesy5t3m/value /parameter parameter namemaxIdle/name value2/value /parameter /ResourceParams /Context The stacktrace is... org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: java.util.NoSuchElementException: Could not create a validated object at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjec tPoo l.java:851) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSourc e.ja va:140) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja va:5 18) at com.travel2.customFares.Query.getJdbcConnection(Query.java:95) at com.travel2.customFares.Query.execute(Query.java:160) at com.travel2.customFares.CustomFaresService.GetFares(CustomFaresService.j ava: 58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java :402 ) at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.ja va:3 09) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333 ) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j ava: 71) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.j ava: 339) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tion FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke
RE: Kumar's JDBC problems with MySQL
TC4 supports context resource fragments, but not within a war (META-INF/context.xml in TC5)... -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 6:18 PM To: Tomcat Users List Subject: Kumar's JDBC problems with MySQL Kumar, First, I started you your own thread. I do this so that others and I can keep you straight as to who is who and know it is a seperate issue although on the same topic. Please repost your context portion of the xml, the section of code that accesses the connection pool and if global, the resourse section of the server.xml. We need to see your code to help give you some direction. You can also look back at the thread RE: Problem using JNDI/DBCP to get DataSouce for some pointers as well. As far as I am aware the main difference in TC4 and TC5 when seting up the DBCP is that in TC5 you can use xml fragments in your app and not have to modify your server.xml. List please correct me if I am wrong. Doug www.parsonstechnical.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: Context mapping and war
Which version of Tomcat? I believe this is known behavior for Tomcat 4, if you define a context element pointing to a war fail. There should be no problem with functionality; can you verify? A War is not required to be extracted in order for it to load properly. -Original Message- From: Jesse Vitrone [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 9:42 AM To: [EMAIL PROTECTED] Subject: Context mapping and war When I try to install my application, I put the war file in the webapps directory, and in the server.xml I add a context mapping. When I start Tomcat, my war file isn't getting extracted. Unpack wars is set to true: Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true If I comment out my context, the war gets extracted, but I need the context mapping. Once the war is extracted, I can put the context mapping in and everything works fine. Any idea why my war isn't getting extracted when the mapping is in there? My mapping looks like this: Context path=/mywebapp docBase=mywebapp debug=99 reloadable=true Resource name=jdbc/pmisDS auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/mywebappDS parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value50/value /parameter parameter namemaxIdle/name value5/value /parameter parameter namemaxWait/name value1/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter nameusername/name valueuser/value /parameter parameter namepassword/name valuepass/value /parameter parameter namedriverClassName/name valuecom.jnetdirect.jsql.JSQLDriver/value /parameter parameter nameurl/name valuejdbc:JSQLConnect://mydb/database=name/value /parameter /ResourceParams /Context Any suggestions would be greatly appreciated. Thanks, Jesse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Moving from 4.1 to 5
There is no blanket statement that can answer your question without testing.. TC4 implements jsp 1.2, TC5 implements JSP 2... We found some small problems when we migrated with closing tags element value value /element Works, however element /element Needs to be written as element/ in TC5... This is the only problem we had, but our site is very small.. -Original Message- From: Michael Davis [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 9:27 AM To: [EMAIL PROTECTED] Subject: Moving from 4.1 to 5 Hi, I've got an app running nicely on tomcat 4.1. We're setting up a brand new server, and I'm trying to decide whether it's a good time to migrate to version 5. Will my app run without modification? I'm using the Standard Tag Library and the Hibernate persistence library, nothing else special. thanks Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Context mapping and war
Change you docbase to 'mywebapp.war' and retry. -Original Message- From: Jesse Vitrone [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 9:52 AM To: 'Tomcat Users List' Subject: RE: Context mapping and war I'm running Tomcat 4.1.30 When I try to hit the app, I get a 404. I believe this is known behavior for Tomcat 4 Is it different for Tomcat 5? Thanks, Jesse -Original Message- From: D'Alessandro, Arthur [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 9:43 AM To: Tomcat Users List Subject: RE: Context mapping and war Which version of Tomcat? I believe this is known behavior for Tomcat 4, if you define a context element pointing to a war fail. There should be no problem with functionality; can you verify? A War is not required to be extracted in order for it to load properly. -Original Message- From: Jesse Vitrone [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 9:42 AM To: [EMAIL PROTECTED] Subject: Context mapping and war When I try to install my application, I put the war file in the webapps directory, and in the server.xml I add a context mapping. When I start Tomcat, my war file isn't getting extracted. Unpack wars is set to true: Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true If I comment out my context, the war gets extracted, but I need the context mapping. Once the war is extracted, I can put the context mapping in and everything works fine. Any idea why my war isn't getting extracted when the mapping is in there? My mapping looks like this: Context path=/mywebapp docBase=mywebapp debug=99 reloadable=true Resource name=jdbc/pmisDS auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/mywebappDS parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value50/value /parameter parameter namemaxIdle/name value5/value /parameter parameter namemaxWait/name value1/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter nameusername/name valueuser/value /parameter parameter namepassword/name valuepass/value /parameter parameter namedriverClassName/name valuecom.jnetdirect.jsql.JSQLDriver/value /parameter parameter nameurl/name valuejdbc:JSQLConnect://mydb/database=name/value /parameter /ResourceParams /Context Any suggestions would be greatly appreciated. Thanks, Jesse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Context mapping and war
Is there a need to? Unless your accessing files directly through the file system, it is not required... In TC5, you can add this context to your war, and it should expand (given the host configuration options defined). -Original Message- From: Jesse Vitrone [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 10:14 AM To: 'Tomcat Users List' Subject: RE: Context mapping and war That works! There's no way to make it extract though? Jesse -Original Message- From: D'Alessandro, Arthur [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 9:53 AM To: Tomcat Users List Subject: RE: Context mapping and war Change you docbase to 'mywebapp.war' and retry. -Original Message- From: Jesse Vitrone [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 9:52 AM To: 'Tomcat Users List' Subject: RE: Context mapping and war I'm running Tomcat 4.1.30 When I try to hit the app, I get a 404. I believe this is known behavior for Tomcat 4 Is it different for Tomcat 5? Thanks, Jesse -Original Message- From: D'Alessandro, Arthur [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 9:43 AM To: Tomcat Users List Subject: RE: Context mapping and war Which version of Tomcat? I believe this is known behavior for Tomcat 4, if you define a context element pointing to a war fail. There should be no problem with functionality; can you verify? A War is not required to be extracted in order for it to load properly. -Original Message- From: Jesse Vitrone [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 9:42 AM To: [EMAIL PROTECTED] Subject: Context mapping and war When I try to install my application, I put the war file in the webapps directory, and in the server.xml I add a context mapping. When I start Tomcat, my war file isn't getting extracted. Unpack wars is set to true: Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true If I comment out my context, the war gets extracted, but I need the context mapping. Once the war is extracted, I can put the context mapping in and everything works fine. Any idea why my war isn't getting extracted when the mapping is in there? My mapping looks like this: Context path=/mywebapp docBase=mywebapp debug=99 reloadable=true Resource name=jdbc/pmisDS auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/mywebappDS parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value50/value /parameter parameter namemaxIdle/name value5/value /parameter parameter namemaxWait/name value1/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter nameusername/name valueuser/value /parameter parameter namepassword/name valuepass/value /parameter parameter namedriverClassName/name valuecom.jnetdirect.jsql.JSQLDriver/value /parameter parameter nameurl/name valuejdbc:JSQLConnect://mydb/database=name/value /parameter /ResourceParams /Context Any suggestions would be greatly appreciated. Thanks, Jesse - 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
RE: Location of webapp directory
IF (and this is a big IF) your webapp is expanded, your relative path then becomes from the catalina bin directory, so ../webapps/webappname/otherpath Should work, but it's, I've had succes and failures doing this. -Original Message- From: Jonathan Melhuish [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 11:16 AM To: Tomcat Users List Subject: Location of webapp directory The JSP files for my web application are located within a subdirectory of the Tomcat webapps directory. Is there any way to read the filesystem location of this subdirectory from within a JSP page? I would have thought this would be easy, but I haven't managed to find anything that does this :-( TIA, Jon - 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: Location of webapp directory
Problem is ServletContext#getRealPath returns null if the webapp doesn't get expanded, is what I've had problems with in the past. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 11:19 AM To: Tomcat Users List Subject: RE: Location of webapp directory Hi, IF your webapp is expanded, use ServletContext#getRealPath. Don't rely on this relative to $CATALINA_HOME/bin approach. Yoav Shapira Millennium Research Informatics -Original Message- From: D'Alessandro, Arthur [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 11:15 AM To: Tomcat Users List Subject: RE: Location of webapp directory IF (and this is a big IF) your webapp is expanded, your relative path then becomes from the catalina bin directory, so ../webapps/webappname/otherpath Should work, but it's, I've had succes and failures doing this. -Original Message- From: Jonathan Melhuish [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 11:16 AM To: Tomcat Users List Subject: Location of webapp directory The JSP files for my web application are located within a subdirectory of the Tomcat webapps directory. Is there any way to read the filesystem location of this subdirectory from within a JSP page? I would have thought this would be easy, but I haven't managed to find anything that does this :-( TIA, Jon - 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 PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: bindaddress configuration??
address For servers with more than one IP address, this attribute specifies which address will be used for listening on the specified port. By default, this port will be used on all IP addresses associated with the server. From: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Monday, March 22, 2004 11:31 AM To: Tomcat Users List Subject: Re: bindaddress configuration?? any answer for this question? Emerson Cargnin wrote: I need to setup tomcat to listen to a different IP address (a virtual one create with ifconfig linux command)? I did it once a long time ago, nut don't remember exactly how to do it... I remember that this was a property at some node of server.xml :) thanks -- Emerson Cargnin Analista de Sistemas Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - 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]
Tomcat 5 Multiple SSL certificates (virtual hosts)
We'd like to implement a single Tomcat 5 server running multiple ip address aliases, each with it's own SSL certificate assigned. I do not see a configuration option, other than potentially trying to utilize a different keystore file (each with it's own tomcat alias cert) for each virtual host. Is there an easier way, and has anyone had any success in doing so? -Arthur
Re: Tomcat 5 Multiple SSL certificates (virtual hosts)
=org.apache.tomcat.util.net.jsse.JSSEImplementation / /Connector Engine name=Secure-Webdev2 defaultHost=secure2 debug=0 Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase/ !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt dir=secure2/logs timestamp=true/ !-- Developer Mode -- Host name=secure2 appBase=secure2/webapps unpackWARs=false autoDeploy=true deployXML=true deployOnStartUp=true !-- Valve className=org.apache.catalina.authenticator.SingleSignOn debug=0/ -- /Host /Engine /Service /Server I hope this help Peter -- http://tomcat.objektpark.org/ Bill Barker schrieb: IMHO, using separate keystore files is the easiest option. However, it should also be possible to specify which cert to use via the 'keyAlias' attribute on the Connector. D'Alessandro, Arthur [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] We'd like to implement a single Tomcat 5 server running multiple ip address aliases, each with it's own SSL certificate assigned. I do not see a configuration option, other than potentially trying to utilize a different keystore file (each with it's own tomcat alias cert) for each virtual host. Is there an easier way, and has anyone had any success in doing so? -Arthur - 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 5 Multiple SSL certificates (virtual hosts)
Was looking for such an attribute.. I'll have to investigate again, thanks. -Original Message- From: Bill Barker [mailto:[EMAIL PROTECTED] Sent: Wed Mar 24 02:11:52 2004 To: [EMAIL PROTECTED] Subject:Re: Tomcat 5 Multiple SSL certificates (virtual hosts) IMHO, using separate keystore files is the easiest option. However, it should also be possible to specify which cert to use via the 'keyAlias' attribute on the Connector. D'Alessandro, Arthur [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] We'd like to implement a single Tomcat 5 server running multiple ip address aliases, each with it's own SSL certificate assigned. I do not see a configuration option, other than potentially trying to utilize a different keystore file (each with it's own tomcat alias cert) for each virtual host. Is there an easier way, and has anyone had any success in doing so? -Arthur - 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: SSL Certificate
keytool -list -v -Original Message- From: Reis, Tom [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 9:37 AM To: Tomcat Users List (E-mail) Subject: SSL Certificate Is there a way to view a Verisign SSL certificate after it is imported into the .keystore file. It appears to be running but I wanted to check the dates to make sure that everything is good because I just renewed the certificate and I want to make sure that Tomcat is using this one. 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: Connection Pool setup.
May help if you post your resource snipplet (replacing any host /user/passwd info) -Original Message- From: Gordon Luk [mailto:[EMAIL PROTECTED] Sent: Thu Mar 25 05:30:56 2004 To: Tomcat Users List Subject:Connection Pool setup. Hi All, May be I missing understand the DBCP configuration. Anyone could help ? I want my connection pool are Max 100 connection, 10 conn. At start-up, max idle 10, when idle for 10 min then kill it. Something like that. Thanks. Regards, Gordon Luk --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.639 / Virus Database: 408 - Release Date: 3/22/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jdk1.4 tomcat5 log4j finds java.util.logging Logger not log4j
What are your imports? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Fri Apr 09 16:58:08 2004 To: [EMAIL PROTECTED] Subject:jdk1.4 tomcat5 log4j finds java.util.logging Logger not log4j hi all I am running tomcat 5, with jdk 1.4 and have not changed any of the jar directories (server/lib or common/lib) by adding my log4j.jar and the problem is when I got log, it is finding the jdk1.4 logging and not log4j. I have do log4j.jar in my WEB-INF/lib below is my init log4j init servlet and snippet of web.xml, all seems fine in the 1st servlet I hit, i do a private Log log = LogFactory.getLog(this.getClass().getName()); and then a print which Logger i am using and it shows java.util.logging.Logger System.out.println(* log= +log); which yields [EMAIL PROTECTED] and then System.out.println(* log.getLogger() = +((org.apache.commons.logging.impl.Jdk14Logger)log).getLogger()); which yields log.getLogger() [EMAIL PROTECTED] How can I get it to use log4j, i dropped log4j.jar in myapp/WEB-INF/lib/ and thought that would be enough any suggestions, and thanks for the help, Happy Easter this is an example from Struts Framework book (Switchback Software LLC), almost exact so I thought it should work === public class Log4jInitServlet extends HttpServlet { public void init() { String prefix = getServletContext().getRealPath(/); String file = getInitParameter(log4j-init-file); log(prefix+file= +prefix+file); if (file != null) { PropertyConfigurator.configure(prefix+file); } else { BasicConfigurator.configure(); } } public void doGet(HttpServletRequest req, HttpServletResponse res) { } } and web.xml --- servlet servlet-namelog4j-init/servlet-name servlet-classcdmanager.Log4jInitServlet/servlet-class init-param param-namelog4j-init-file/param-name param-valueWEB-INF\log4j.properties/param-value /init-param load-on-startup1/load-on-startup /servlet and my log4j.properties --- # Set root category priority to DEBUG and its only appender to A1. log4j.rootCategory=DEBUG,A1,F1 log4j.category.cdmanager=DEBUG,A1,F1 # A1 is set to be a ConsoleAppender. log4j.appender.A1=org.apache.log4j.ConsoleAppender # A1 uses PatternLayout. log4j.appender.A1.layout=org.apache.log4j.PatternLayout # log4j.appender.A1.layout.ConversionPattern=%d %-4r [%t](%F:%L) %-5p %c %x - %m%n log4j.appender.A1.layout.ConversionPattern=%d [%t](%F:%L) %-5p %x - %m%n # F1 is set to be a RollingFileAppender that uses PatternLayout, add F1 # to the desired categories to enable file trace log4j.appender.F1=org.apache.log4j.RollingFileAppender log4j.appender.F1.layout=org.apache.log4j.PatternLayout log4j.appender.F1.layout.ConversionPattern=%p %t %c - %m%n log4j.appender.F1.File=D:\\Tomcat5.0\\logs\\mylog.log log4j.appender.F1.MaxFileSize=100KB log4j.appender.F1.MaxBackupIndex=1 log4j.category.org=WARN,A1,F1 - 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: Global resource JDBC/JNDI
You need to make a refernce in your web app contexts to the global resource: ResourceLink name=jdbc/myresourcename global=jdbc/myresourcename type=javax.sql.DataSource/ -Original Message- From: snpe [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 12:49 PM To: [EMAIL PROTECTED] Subject: Global resource JDBC/JNDI Hello, I set jdbc/jndi for web application, but I want set jdbc/jndi for all applications I try set jdbc/jndi in GlobalResource, but this resources don't see in web application automatic Is it possible regards Haris Peco - 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: Global resource JDBC/JNDI
Is this TC4 or TC5? META-INF/context.xml only works with TC5 to my understanding. -Original Message- From: snpe [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 11:09 AM To: [EMAIL PROTECTED] Subject: Re: Global resource JDBC/JNDI Why MET-INF/context.xml don't work ? Thanks On Monday 12 April 2004 12:53 pm, Benjamin Armintor wrote: If you want the resource available in all applications, make it a global environment entry and put the link in the default context for the host. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: snpe [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 3:41 PM To: Tomcat Users List Subject: Re: Global resource JDBC/JNDI Should I do it for all applications ? I try this in META-INF/context.xml and it don't work - when I add jndi with tomcat admin it work, but add all parameters in conf/Catalina/host/app.xml Is it correct behavior ? Thanks Haris Peco On Sunday 11 April 2004 02:56 pm, D'Alessandro, Arthur wrote: You need to make a refernce in your web app contexts to the global resource: ResourceLink name=jdbc/myresourcename global=jdbc/myresourcename type=javax.sql.DataSource/ -Original Message- From: snpe [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 12:49 PM To: [EMAIL PROTECTED] Subject: Global resource JDBC/JNDI Hello, I set jdbc/jndi for web application, but I want set jdbc/jndi for all applications I try set jdbc/jndi in GlobalResource, but this resources don't see in web application automatic Is it possible regards Haris Peco - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: help needed - keytool import of CA certs
Robert, First thing, tomcat looks for the users home folder of whom is running tomcat for .keystore, if this is not available, or you wish to move the keystore, you can state so in the Connector within server.xml Another thing, the password defaults to 'changeit', if you wish to have an alternative password, you will need to specify again within the connector element. Third, you appear to be using the trustcacerts, is the cert you specify in hostname.crt the CA root cert (local CA) or the signed certificate? From your description, I assume it is the signed valid cert from Verisign. Off the top of my head, I don't remember the need for the '-trustcacerts' This is a good site that may help as well: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ssl-howto.html -Original Message- From: Robert Hall [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 6:56 PM To: Tomcat Users List Subject: help needed - keytool import of CA certs I've been floundering for too many hours/days having ventured into the java/keytool/keystore/CAcert realm for the first time to produce a CA signed certificate for JBoss/Tomcat. We have a Verisign/RSA cert, hostname.crt that produces the following when imported using 'keytool': $ keytool -import -trustcacerts -file hostname.crt -keystore hostname.keystore Enter keystore password: secret Owner: CN=hostname.berkeley.edu, OU=MY-ORG-UNIT, O=University of California, Berkeley, L=Berkeley, ST=California, C=US Issuer: OU=Secure Server Certification Authority, O=RSA Data Security, Inc., C=US Serial number: 63ba7416f9d061ad65db8b61554bd8c3 Valid from: Wed Aug 13 17:00:00 PDT 2003 until: Fri Aug 13 16:59:59 PDT 2004 Certificate fingerprints: MD5: 05:A7:B1:17:6B:C2:0B:FA:9A:B9:80:22:6A:B0:96:6B SHA1: B9:34:D0:58:C4:9C:01:CD:C1:05:D9:FD:C1:D1:45:43:E3:6C:17:1A Trust this certificate? [no]: yes Certificate was added to keystore And if you're still reading, some questions: 1. Should the Trust this certificate? prompt appear if a corresponding CA cert entry exists in $JAVA_HOME/jre/lib/security/cacerts ? 2. Is it necessary to go through the CSR (Certificate Signing Request) process when you already have a server cert file? 3. What else is needed in addition to an existing server cert file if you don't have to go through the CSR process? Thanks, Robert - 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 needed - keytool import of CA certs
I'm not too familiar with Jboss, is it within tomcat? If so, what does your server.xml connector snippplet look like? -Original Message- From: Robert Hall [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 8:06 PM To: Tomcat Users List Subject: Re: help needed - keytool import of CA certs Arthur, Thanks for the reply. Yes, the hostname.crt file is a signed certificate. I've tried importing both with and without the -trustcacerts parameter, the imports are successful, but I get the following exception in JBoss-3.2.3/Tomcat-4.1.29: 16:23:59,561 ERROR [PoolTcpEndpoint] Endpoint [SSL: ServerSocket[addr=/0.0.0.0,port=0,localport=8753]] ignored exception: java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No available certificate corresponds to the SSL cipher suites which are enabled. java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No available certificate corresponds to the SSL cipher suites which are enabled. at org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocke tFactory.java:152) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint. java:387) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:56 9) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:677) at java.lang.Thread.run(Thread.java:536) Thanks, Robert D'Alessandro, Arthur wrote: Robert, First thing, tomcat looks for the users home folder of whom is running tomcat for .keystore, if this is not available, or you wish to move the keystore, you can state so in the Connector within server.xml Another thing, the password defaults to 'changeit', if you wish to have an alternative password, you will need to specify again within the connector element. Third, you appear to be using the trustcacerts, is the cert you specify in hostname.crt the CA root cert (local CA) or the signed certificate? From your description, I assume it is the signed valid cert from Verisign. Off the top of my head, I don't remember the need for the '-trustcacerts' This is a good site that may help as well: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ssl-howto.html -Original Message- From: Robert Hall [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 6:56 PM To: Tomcat Users List Subject: help needed - keytool import of CA certs I've been floundering for too many hours/days having ventured into the java/keytool/keystore/CAcert realm for the first time to produce a CA signed certificate for JBoss/Tomcat. We have a Verisign/RSA cert, hostname.crt that produces the following when imported using 'keytool': $ keytool -import -trustcacerts -file hostname.crt -keystore hostname.keystore Enter keystore password: secret Owner: CN=hostname.berkeley.edu, OU=MY-ORG-UNIT, O=University of California, Berkeley, L=Berkeley, ST=California, C=US Issuer: OU=Secure Server Certification Authority, O=RSA Data Security, Inc., C=US Serial number: 63ba7416f9d061ad65db8b61554bd8c3 Valid from: Wed Aug 13 17:00:00 PDT 2003 until: Fri Aug 13 16:59:59 PDT 2004 Certificate fingerprints: MD5: 05:A7:B1:17:6B:C2:0B:FA:9A:B9:80:22:6A:B0:96:6B SHA1: B9:34:D0:58:C4:9C:01:CD:C1:05:D9:FD:C1:D1:45:43:E3:6C:17:1A Trust this certificate? [no]: yes Certificate was added to keystore And if you're still reading, some questions: 1. Should the Trust this certificate? prompt appear if a corresponding CA cert entry exists in $JAVA_HOME/jre/lib/security/cacerts ? 2. Is it necessary to go through the CSR (Certificate Signing Request) process when you already have a server cert file? 3. What else is needed in addition to an existing server cert file if you don't have to go through the CSR process? Thanks, Robert - 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: help needed - keytool import of CA certs
Have you tried the tc4 org.apache.catalina.net.SSLServerSocketFactory Connector className = org.apache.coyote.tomcat4.CoyoteConnector address=${jboss.bind.address} port = 8753 scheme = https secure = true enableLookups= true Factory className=org.apache.catalina.net.SSLServerSocketFactory keystoreFile=${jboss.server.home.dir}/conf/hostname.keystore keystorePass=secret clientAuth=false protocol = TLS/ /Connector The other thing, what does the keystore look like: keytool -list -v -keystore hostname.keystore I am not 100% sure if tomcat requires the cert to be inside of an alias of 'tomcat', that is how the tutorials, and how I've implemented ours. It's not difficult to copy to another alias Keytool -keyclone -alias current alias -dest tomcat -Original Message- From: Robert Hall [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 8:32 PM To: Tomcat Users List Subject: Re: help needed - keytool import of CA certs JBoss has Tomcat embedded and it uses jboss-service.xml instead of Tomcat's server.xml. The Connector element: Connector className = org.apache.coyote.tomcat4.CoyoteConnector address=${jboss.bind.address} port = 8753 scheme = https secure = true enableLookups= true Factory className = org.apache.coyote.tomcat4.CoyoteServerSocketFactory SSLImplementation=org.apache.tomcat.util.net.jsse.JSSEImplementation keystoreFile=${jboss.server.home.dir}/conf/hostname.keystore keystorePass=secret clientAuth=false protocol = TLS/ /Connector Thanks, Robert D'Alessandro, Arthur wrote: I'm not too familiar with Jboss, is it within tomcat? If so, what does your server.xml connector snippplet look like? -Original Message- From: Robert Hall [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 8:06 PM To: Tomcat Users List Subject: Re: help needed - keytool import of CA certs Arthur, Thanks for the reply. Yes, the hostname.crt file is a signed certificate. I've tried importing both with and without the -trustcacerts parameter, the imports are successful, but I get the following exception in JBoss-3.2.3/Tomcat-4.1.29: 16:23:59,561 ERROR [PoolTcpEndpoint] Endpoint [SSL: ServerSocket[addr=/0.0.0.0,port=0,localport=8753]] ignored exception: java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No available certificate corresponds to the SSL cipher suites which are enabled. java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No available certificate corresponds to the SSL cipher suites which are enabled. at org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESock e tFactory.java:152) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint . java:387) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5 6 9) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l .java:677) at java.lang.Thread.run(Thread.java:536) Thanks, Robert D'Alessandro, Arthur wrote: Robert, First thing, tomcat looks for the users home folder of whom is running tomcat for .keystore, if this is not available, or you wish to move the keystore, you can state so in the Connector within server.xml Another thing, the password defaults to 'changeit', if you wish to have an alternative password, you will need to specify again within the connector element. Third, you appear to be using the trustcacerts, is the cert you specify in hostname.crt the CA root cert (local CA) or the signed certificate? From your description, I assume it is the signed valid cert from Verisign. Off the top of my head, I don't remember the need for the '-trustcacerts' This is a good site that may help as well: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ssl-howto.html -Original Message- From: Robert Hall [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 6:56 PM To: Tomcat Users List Subject: help needed - keytool import of CA certs I've been floundering for too many hours/days having ventured into the java/keytool/keystore/CAcert realm for the first time to produce a CA signed certificate for JBoss/Tomcat. We have a Verisign/RSA cert, hostname.crt that produces the following when imported using 'keytool': $ keytool -import -trustcacerts -file hostname.crt -keystore hostname.keystore Enter keystore password: secret Owner: CN=hostname.berkeley.edu, OU=MY-ORG-UNIT, O=University of California, Berkeley, L=Berkeley, ST=California, C=US Issuer: OU=Secure Server Certification Authority, O=RSA Data Security, Inc., C=US Serial number: 63ba7416f9d061ad65db8b61554bd8c3 Valid from: Wed Aug 13 17:00:00 PDT 2003 until: Fri Aug 13 16:59:59 PDT 2004 Certificate fingerprints: MD5: 05:A7:B1:17:6B:C2:0B:FA:9A:B9:80:22:6A:B0:96:6B SHA1: B9:34:D0:58:C4:9C:01:CD:C1:05:D9:FD:C1:D1:45:43:E3:6C:17:1A Trust this certificate
RE: Mapping a WAR
TC4 | TC5? There are several ways, when defining the context for your webapp, use the context ... path= ... / If TC5, then you can rename your webapp to ROOT.war, and it will deploy. -Original Message- From: Umer Rashid [mailto:[EMAIL PROTECTED] Sent: Thursday, April 15, 2004 10:54 AM To: Tomcat Users List Subject: Mapping a WAR I want myapp.war to be mapped so that instead of writing http://www.mydomain.com/mywar; , I simply type http://www.mydomain.com; and the page is directed to the index.jsp of myapp.war, but the URL in the addess bar remains http://www.mydomain.com; . Can anyone help me in doing this? Regards, Umer - 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: Memory Leak
I think I've seen back posts indicating that the JMX option will do this, try removing.. Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ From your server.xml, we have no apparent memory leaks using the same configuration. -Original Message- From: Chanan Braunstein [mailto:[EMAIL PROTECTED] Sent: Thursday, April 15, 2004 10:27 AM To: 'Tomcat Users List' Subject: Memory Leak Hello, I am having a problem with Tomcat 5.0.19 on windows with JDK 1.4.2_02. The memory that java.exe is using keeps growing till the point that tomcat stops responding. Using a profiler, doesn't seem to give me any clues. I can see the memory being used by certain classes go up (mainly char[]) and even reach all the way to the point that used java heap equals to the java heap, but then GC kicks in and drops down back to where it was when I started the test. However, the memory in the task manager keeps going up. For example right now it is at 717,000 K, even though the heap used is at about 200,000 K. What am I missing here? My current params are -server -Xrs -Xms356M -Xmx356M - I tried all kinds of different sizes for the memory but that doesn't really help. Any suggestions as to where (how) to look to find my memory leak? Chanan Braunstein Knovel Corp. Web Development Manager 607-773-1840 x672 http://www.knovel.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Virtual host setup
Look at the tomcat configuration guide... The HOST element under server.xml is what your looking for. http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html -Original Message- From: Yongsheng Yang [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 20, 2004 3:27 PM To: [EMAIL PROTECTED] Subject: Virtual host setup Hello , I want to setup several virtual hosts in a single Tomcat. I want to use Name-based approach. For this approach, several virtual hosts share a single IP address. So I have to bind different web services to same address? for instance, the address of www.1.com and www.2.com is same and point to the same Tomcat server. Any detailed documents? -- Best regards, David mailto:[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 virtual hosts question
Yes, the manager app may be applied to each host, you'll need to define the manager context inside the host element. -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 20, 2004 5:11 PM To: Tomcat Users List Subject: tomcat virtual hosts question If I have configured some virtualhosts through tomcat, may I manage each one in a independent way like each one having a separate manager app??? -- Emerson Cargnin Analista de Sistemas Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - 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]
TC Case Sensitivity Question
I have done my due diligence on the net looking into this question, however was unable to locate a definitive answer regarding tomcat and case sensitivity with webapps URL mappings. Can anyone provide better insight on how to remove case sensitivity from the configuration? or examples on how to bypass; I did see a 404 redirector, but that sounds awfully unnecessary. Thanks, -Art
RE: TC Case Sensitivity Question
Same line of question, how do tomcat web admins present URL's? Is there a defacto standard for tomcat web developers that only upper, lower, or camel notation From and end users perspective, having to alter case for a web URL is a hassle, and in most cases would yield a 404 because of disregard of said case. Just looking for insight on how people handle the general computer user out there. -Art -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 10:45 PM To: Tomcat Users List Subject: Re: TC Case Sensitivity Question Art, Can anyone provide better insight on how to remove case sensitivity from the configuration? Ugh. Well, URLs are case-sensitive by the spec, so I'm not sure why you'd want to do this... or examples on how to bypass; I did see a 404 redirector, but that sounds awfully unnecessary. The 404 redirector is not what you want... I don't even know how you'd change this. I guess you could store everything on the filesystem as lower-case, and make all your URLs lowercase, and then intercept any URLs, say, using a Filter, and then change the URL... That might be even too far down the pipeline to intercept and translate any URLs, though. Same goes for a web server. You'd have to seriously hack the web server to do the same thing. -chris - 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: TC Case Sensitivity Question [Workaround]
That piece is known, but for webapps and the like, some people bookmark, some people remember.. I think a good overall suggestion is to utilize different Host elements with each mapping at the root of that Host to the specified webapp rather than using the webapps as virtual directories under a single host element This posting is more for others who may experience / have the same questions as me: For those of you familiar with IIS and host header virtual web's, tomcat may be configured as such: Host name=somewebapp.yourdomain.com appBase=webapps Aliassomeotherwebappalias.yourdomain.com/Alias Context cachingAllowed=true docBase=YourWar.war path= /Context /Host This would respond to the root levels of (case-insensitve for the fqdn's): somewebapp.yourdomain.com someotherwebappalias.yourdomain.com -Art -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 8:49 AM To: Tomcat Users List Subject: Re: TC Case Sensitivity Question Art, Same line of question, how do tomcat web admins present URL's? Is there a defacto standard for tomcat web developers that only upper, lower, or camel notation From and end users perspective, having to alter case for a web URL is a hassle, and in most cases would yield a 404 because of disregard of said case. Just looking for insight on how people handle the general computer user out there. Well, in general, users aren't expected to remember URLs. Hostnames are case-insensitive, and that's typically all you're ever expected to remember. Just type in www.google.com and you'll get google. Everything else is just bookmarks, right? If a user happens to remember a URL and types is in correctly, there's no expectation that the site will magically figure out what they wanted to type. -chris - 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]
TC Manager App question
I understand that there are caveats to using the manager application with contexts that have been specified within the server.xml file... I have 3 virtual hosts setup, all are separate web applications. Each has the manager context application associated to themselves. The manager appears to respond to listing the applications within each virtual host correctly, I have made the following folder structure: webapps\ webapps\vhost1\ webapps\vhost2\ and set the appbase for each virtual host to the correct folder. I then specify a context with a docbase of 'webapp1.war' for vhost1. If I restart the entire tomcat server, all looks normal, I get webapps\vhost1\webapp1.war webapps\vhost1\webapp1\ etc but when I stop the context under webapps1 via the webapps1 manager and start it again, it extracts the webapp1.war to the webapps folder instead of the appbase of webapps\vhost1 Essentially, we want to be able to upgrade virtualhosts without having to reload tomcat itself (affecting other web application on the same server). We also need the context pre-declared so we may take advantage of jdbc connection pooling. -Art
RE: Manager App Doesn't Reload wars
I pre-create my contexts within the server xml file, and point the source to the war file. I can then upgrade the war file, then stop/start the webapp from the manager application. This recreates the webapp from the new war. -Art -Original Message- From: Sleeper, Jesse [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 1:06 PM To: [EMAIL PROTECTED] Subject: Manager App Doesn't Reload wars I'll give it another shot. In Tomcat 4.1.1.2, wars can be Deployed on a Hot Server for the first time but not Undeployed if there are any jars in the WEB-INF/lib directory of the app. Tomcat also does not reflect any changes in the application if Undeployed and Deployed again because the references in the work directory do not get refreshed. Has anyone been able to get this feature to work like the docs say it does? Anyone...anyone? Jester - 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 in tomcat 5 and MS SQL 2000
Goto microsoft's site, they have a SQL 2000 JDBC driver available.. -Art -Original Message- From: Suchun Wu [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 8:26 PM To: Tomcat Users List Subject: Re: help in tomcat 5 and MS SQL 2000 In the how-to file you mentioned, there is no example for MS SQL and Sybase. There is an example for mysql. I wonder it works with MS SQL 2000. Someone has similar experience, please share. Thanks, Suchun - Original Message - From: Alan Czajkowski [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 11:37 AM Subject: Re: help in tomcat 5 and MS SQL 2000 u can either: a) search google for this info b) look at Tomcat Documentation in the JNDI Datasource HOW-TO, http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples -howto.html c) if setting up MS SQL 2000 is anything similar to Sybase ASE (which it should since they used to be the same product), then u can check out Sybase's jConnect 5.5 (which can be downloaded from Sybase's website) and how to set it up with Tomcat, http://info.sybase.com/resolution/detail.stm?id_number=10899047 Thanks, Alan Czajkowski - Database Administrator BMO Financial Group Decision Support Services 3300 Bloor Street West 14th Floor, West Tower Toronto, Ontario, M8X 2X2 Tel: 416.232.8736 - [EMAIL PROTECTED] 17/12/2003 10:07 AM Please respond to Tomcat Users List To: [EMAIL PROTECTED] cc: Subject:help in tomcat 5 and MS SQL 2000 Hi, I'd like to learn JSP with Tomcat 5. Any help in how to configure Tomcat in order to connect with MS SQL 2000 server. Thanks in advance, Suchun Wu 1 - 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: DELETED /ROOT CONTEXT PLEAS HELP!!!
Define deleted the /ROOT context... -Original Message- From: Dwayne Ghant [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 10:01 PM To: Tomcat Users List Subject: DELETED /ROOT CONTEXT PLEAS HELP!!! Like a dummy I made the owfull mistake of deleting the /ROOT context I really need to restore it ASAP. Can someone please help me I have been here for three ours trying to fix this without reinstalling the whole thing. My config. is tomcat5.0.2x/ Apache 2 / mod_jk2 PLEASE HELP. -- Dwayne A. Ghant Application Developer Temple University 215.204. [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: DELETED /ROOT CONTEXT PLEAS HELP!!!
Is there still a ROOT folder underneath the webapps dir? But how did you delete it? Manually out of server.xml, undeployed in the manager app, stopped tomcat, and deleted the ROOT folder underneath webapps. -Original Message- From: Dwayne Ghant [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 10:07 PM To: Tomcat Users List Subject: Re: DELETED /ROOT CONTEXT PLEAS HELP!!! You mean like this ??? Context path= docBase=$CATALINA_HOME/webapps/ROOT debug=0 reloadable=true crossContext=true privileged=true D'Alessandro, Arthur wrote: Define deleted the /ROOT context... -Original Message- From: Dwayne Ghant [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 10:01 PM To: Tomcat Users List Subject: DELETED /ROOT CONTEXT PLEAS HELP!!! Like a dummy I made the owfull mistake of deleting the /ROOT context I really need to restore it ASAP. Can someone please help me I have been here for three ours trying to fix this without reinstalling the whole thing. My config. is tomcat5.0.2x/ Apache 2 / mod_jk2 PLEASE HELP. -- Dwayne A. Ghant Application Developer Temple University 215.204. [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: DELETED /ROOT CONTEXT PLEAS HELP!!!
So you undeployed using the manager app.. You'll have to restore the ROOT folder from a backup, I'm assuming this is your custom root web application, and not the default that came with tomcat. -Original Message- From: Dwayne Ghant [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 10:09 PM To: Tomcat Users List Subject: Re: DELETED /ROOT CONTEXT PLEAS HELP!!! Using the manerger I login and clicked on the remove button to delete the /ROOT Context ... D'Alessandro, Arthur wrote: Define deleted the /ROOT context... -Original Message- From: Dwayne Ghant [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 10:01 PM To: Tomcat Users List Subject: DELETED /ROOT CONTEXT PLEAS HELP!!! Like a dummy I made the owfull mistake of deleting the /ROOT context I really need to restore it ASAP. Can someone please help me I have been here for three ours trying to fix this without reinstalling the whole thing. My config. is tomcat5.0.2x/ Apache 2 / mod_jk2 PLEASE HELP. -- Dwayne A. Ghant Application Developer Temple University 215.204. [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: DELETED /ROOT CONTEXT PLEAS HELP!!!
Yes, should work fine... If you copy/untar that replicated ROOT folder into webapps, it should auto-deploy (if so configured). Otherwise you can copy into the webapps folder, and use the deploy option. I'd make a tar backup of your tomcat folder just to be on the safe side, then try to deploy the replicated ROOT folder. -Original Message- From: Dwayne Ghant [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 10:18 PM To: Tomcat Users List Subject: Re: DELETED /ROOT CONTEXT PLEAS HELP!!! Yes, you are correct. No backup. but I do have a replicated directory on another installation of tomcat that I can copy over do you think that will work?? I really put my self in a jam NOW! D'Alessandro, Arthur wrote: So you undeployed using the manager app.. You'll have to restore the ROOT folder from a backup, I'm assuming this is your custom root web application, and not the default that came with tomcat. -Original Message- From: Dwayne Ghant [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 10:09 PM To: Tomcat Users List Subject: Re: DELETED /ROOT CONTEXT PLEAS HELP!!! Using the manerger I login and clicked on the remove button to delete the /ROOT Context ... D'Alessandro, Arthur wrote: Define deleted the /ROOT context... -Original Message- From: Dwayne Ghant [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 10:01 PM To: Tomcat Users List Subject: DELETED /ROOT CONTEXT PLEAS HELP!!! Like a dummy I made the owfull mistake of deleting the /ROOT context I really need to restore it ASAP. Can someone please help me I have been here for three ours trying to fix this without reinstalling the whole thing. My config. is tomcat5.0.2x/ Apache 2 / mod_jk2 PLEASE HELP. -- Dwayne A. Ghant Application Developer Temple University 215.204. [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: J2ee jars?
I started to play around with OpenEJB http://www.openejb.org/tomcat.html -Original Message- From: Rômulo Cordeiro Lana [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 11, 2005 1:48 PM To: Tomcat Users List Subject: J2ee jars? What is the best approach to include j2ee jars in tomcat? Rômulo Cordeiro Lana [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: Newbie - JDBC problem Name is not bound in this context
Add a resourcelink to your context definition. -Original Message- From: ohaya [mailto:[EMAIL PROTECTED] Sent: Sat Aug 07 18:07:42 2004 To: Tomcat Users List Subject:Re: Newbie - JDBC problem Name is not bound in this context I'm not a JNDI expert but you can try this: Context ic = new InitialContext(); Context ctx = (Context) ic.lookup(java:comp/env); DataSource ds = (DataSource) ic.lookup(jdbc/jimnew); Hi Dennis, I've been wrestling with this problem for most of today, and at this point, I don't think the problem is with the code, but rather, I think it's some kind of problem with configuration. What it looks like is that Tomcat, for some reason, doesn't think that there is a resource called 'jdbc/jimnew', even though 'jdbc/jimnew' appears to exist in GlobalNamingResources in server.xml. After working on this for hours, I'm a bit confused about this, as my impression was that if a resource was defined in GlobalNamingResources, then any application would be able to access that resource. I kind of cheated a bit with my small test page, and maybe that's why things aren't working. When Tomcat installed, it had a bunch of demo applications at http://myhost/jsp-examples. Just for this (I thought) quick test, I created a single JSP file, test.jsp in the jsp-examples directory, because I didn't want to go through all of the things to set up a new application in Tomcat, and I thought that my test.jsp would be automatically able to see the resources in GlobalNamingResources. Well, I'm either doing something wrong, or my assumption was wrong, because I keep getting that error (jdbc not bound in this context), and I can't find any way around it. I've tried adding the resource-ref, res-ref-name, res-type, and res-auth to the web.xml in the jsp-examples\WEB-INF directory, but even that didn't do the trick. At this point, I'm kind of stuck, and I'm hoping that someone on this list can tell me how I might be able to make this resource visible to my test.jsp. If I can't figure that out, I'm probably going to just try doing the JDBC stuff directly, without JNDI, etc... Thanks for trying... Jim - 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: Newbie - JDBC problem Name is not bound in this context
Context cachingAllowed=true docBase=yourwebappname.war debug=99 path=/yourwebappname privileged=false reloadable=true swallowOutput=true ResourceLink name=jdbc/jimnew global=jdbc/jimnew type=javax.sql.DataSource/ /Context Either in your server.xml, or as 'context.xml' in your webapps /META-INF folder.. -Original Message- From: ohaya [mailto:[EMAIL PROTECTED] Sent: Saturday, August 07, 2004 8:11 PM To: Tomcat Users List Subject: Re: Newbie - JDBC problem Name is not bound in this context D'Alessandro, Arthur wrote: Add a resourcelink to your context definition. Arthur, I'm kind of (well, really) new to Tomcat, so could you clarify? Am I right that you mean to add that to the server.xml? At least with the distribution that I installed, which I posted with my original msg, when I looked at the server.xml, there was hardly anything in it, i.e., no Context, etc. I think that there was basically just the SERVER, RESOURCE, RESOURCE PARAMS, and SERVICE. Given that that's the case, can I add JUST a RESOURCELINK, or do I need to add a CONTEXT also? Like I said, this is almost all new to me, so it's a little confusing... Thanks, Jim - 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: Running Tomcat 5 Headless
Add this to your JAVA_OPTS -Djava.awt.headless=true Normally, when rendering graphics, java will try to use the graphics engine. If no X-windows is installed, it fails to render things that use AWT. This parameter tells java not to use the system graphics engine. -Original Message- From: Nandish Rudra [mailto:[EMAIL PROTECTED] Sent: Monday, August 23, 2004 10:06 AM To: Tomcat Users List (E-mail) Subject: Running Tomcat 5 Headless Hello Everyone, Can any one tell me how to make tomcat start headless and what it exactly means, I am new to this term? I am running a webapp on redhat 9 machine (without X11) and using awt for manipulatiing images. The browsers look for X11 session whenever i try to access the servlets. From what I understand, a headless tomcat can solve my problem. Nandish Rudra ECI Conference Call Services, LLC - 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 zu an jdbc Datasource
Try a resourcelink in your context for the webapp. Eg. Context cachingAllowed=true docBase=yourwebappname.war debug=99 path=/yourwebappname privileged=false reloadable=true swallowOutput=true ResourceLink name=jdbc/globalname global=jdbc/globalname type=javax.sql.DataSource/ /Context -Original Message- From: Robert Einsle [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 9:02 AM To: Tomcat Users List Subject: Access zu an jdbc Datasource Hello List, I'm trying zu connect to an JDBC Datasource connecting to an Postgres Database. But it will not work. I tryed it link the Documentation, adding the Datasource under GlobalNamingResources, and add the another in web.xml. In ProgrammSource: --- cut --- Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/postgres); Connection conn = ds.getConnection(); --- cut --- The another is link the description in the JDBC Howto. While ds.getConnection() i recieved an Exception, cannot connect to Datasource name ''. Searchin a little bit, i cannot find the Environment for the Postgresdatabasesource. Does anyone has an Idea / Howto i can lokk about my Problem?? Thanks for Help \Robby - 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: [Possible bug?] Context configurations and .WAR deployment
Try changing the docbase from ROOT TO ROOT.war. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Mon Oct 11 13:39:17 2004 To: Tomcat Users List Subject:RE: [Possible bug?] Context configurations and .WAR deployment Hello, I will try including what I have in ROOT.xml as context.xml in META-INF, and then remove the ROOT.xml each time I remove the webapps/ROOT tree to copy in a new ROOT.war into webapps. However, here is what is in my ROOT.xml right now (that is causing the problem of ROOT.war not being expanded when ROOT.xml is updated): Context path= docBase=ROOT debug=0 Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ ResourceParams name=jdbc/DB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value200/value /parameter parameter namemaxIdle/name value30/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valuetest/value /parameter parameter namepassword/name valuetestpassword/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://10.0.0.1:3306/net_basic?autoReconnect=true/value /parameter /ResourceParams /Context Thank you, -Raiden Johnson On Sat, 9 Oct 2004, D'Alessandro, Arthur wrote: A suggestion, include the ROOT.xml as context.xml under META-INF, tomcat will create it under your host as ROOT.xml when it is deployed. That doesn't solve the problem your experiencing, what does your ROOT.xml look like? What are you referencing your docBase? Ours word fine by referencing the ROOT.war. Note, if you update the context.xml in your webapp, it doesn't auto update the cached ROOT.xml; you would need to undeploy the webapp, delete the ROOT.xml from conf/Catalina/localhost and redeploy the new webapp. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, October 09, 2004 3:33 AM To: [EMAIL PROTECTED] Subject: [Possible bug?] Context configurations and .WAR deployment Hello, I recently upgraded from Tomcat 5.0.19 to Tomcat 5.0.28. I am now running into a conflict between ROOT.xml and ROOT.war. This happens when I deploy to production: 1. I delete the ROOT.war and ROOT directory from /usr/local/tomcat/webapps 2. I delete the ROOT.xml context configuration file in /usr/local/tomcat/conf/Catalina/localhost 3. I then copy the new ROOT.war file to /usr/local/tomcat/webapps 4. I copy the new ROOT.xml file to /usr/local/tomcat/conf/Catalina/localhost This used to work fine in Tomcat 5.0.19. Now, in 5.0.28, when I startup the server, I get the following error: INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] And the new ROOT.war file is never expanded (which is why ROOT.xml can't find web.xml). The only way to get the .war file to expand, is to temporarily remove the ROOT.xml file, startup the server (which then expands the .war file), and then copy the ROOT.xml file over. The reason I'm using the ROOT.xml file is to setup DBCP for this webapp only. In theory, it's not updated often, but when updates occur, it would be copied over during this process, which is why I do it in my deployment script. What happened since Tomcat 5.0.19 to make it not expand the ROOT.war archive at the same time that it's processing a new ROOT.xml file? Thank you, -Raiden Johnson - 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: [Possible bug?] Context configurations and .WAR deployment
You only need to get rid of the cached version if you made changes to it. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Mon Oct 11 14:05:58 2004 To: Tomcat Users List Subject:RE: [Possible bug?] Context configurations and .WAR deployment Bingo! That worked. Thank you! However, you brought up something that makes a lot more sense to me. I always thought it was strange that I had to have a ROOT.xml outside of the webapp .war file. It makes a whole lot more sense to me to include ROOT.xml in the webapp .war file (under META-INF), and to just get rid of the cached version of ROOT.xml that is generated, when redeploying a new .war file. (Though, you would think that Tomcat would get rid of the cached version on its own.) I think I'm going to change to that method, so that I can keep everything in one .war file. Thank you very much for your help! -Raiden Johnson On Mon, 11 Oct 2004, D'Alessandro, Arthur wrote: Try changing the docbase from ROOT TO ROOT.war. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Mon Oct 11 13:39:17 2004 To: Tomcat Users List Subject: RE: [Possible bug?] Context configurations and .WAR deployment Hello, I will try including what I have in ROOT.xml as context.xml in META-INF, and then remove the ROOT.xml each time I remove the webapps/ROOT tree to copy in a new ROOT.war into webapps. However, here is what is in my ROOT.xml right now (that is causing the problem of ROOT.war not being expanded when ROOT.xml is updated): Context path= docBase=ROOT debug=0 Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ ResourceParams name=jdbc/DB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value200/value /parameter parameter namemaxIdle/name value30/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valuetest/value /parameter parameter namepassword/name valuetestpassword/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://10.0.0.1:3306/net_basic?autoReconnect=true/value /parameter /ResourceParams /Context Thank you, -Raiden Johnson On Sat, 9 Oct 2004, D'Alessandro, Arthur wrote: A suggestion, include the ROOT.xml as context.xml under META-INF, tomcat will create it under your host as ROOT.xml when it is deployed. That doesn't solve the problem your experiencing, what does your ROOT.xml look like? What are you referencing your docBase? Ours word fine by referencing the ROOT.war. Note, if you update the context.xml in your webapp, it doesn't auto update the cached ROOT.xml; you would need to undeploy the webapp, delete the ROOT.xml from conf/Catalina/localhost and redeploy the new webapp. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, October 09, 2004 3:33 AM To: [EMAIL PROTECTED] Subject: [Possible bug?] Context configurations and .WAR deployment Hello, I recently upgraded from Tomcat 5.0.19 to Tomcat 5.0.28. I am now running into a conflict between ROOT.xml and ROOT.war. This happens when I deploy to production: 1. I delete the ROOT.war and ROOT directory from /usr/local/tomcat/webapps 2. I delete the ROOT.xml context configuration file in /usr/local/tomcat/conf/Catalina/localhost 3. I then copy the new ROOT.war file to /usr/local/tomcat/webapps 4. I copy the new ROOT.xml file to /usr/local/tomcat/conf/Catalina/localhost This used to work fine in Tomcat 5.0.19. Now, in 5.0.28, when I startup the server, I get the following error: INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] And the new ROOT.war file is never expanded (which is why ROOT.xml can't find web.xml). The only way to get the .war file to expand, is to temporarily remove the ROOT.xml file, startup the server (which then expands the .war file), and then copy the ROOT.xml file over. The reason I'm using the ROOT.xml file is to setup DBCP for this webapp only. In theory, it's not updated often, but when updates occur, it would be copied over during this process, which is why I do it in my deployment script. What happened since Tomcat 5.0.19 to make it not expand the ROOT.war archive at the same time that it's processing a new ROOT.xml file? Thank you, -Raiden Johnson - To unsubscribe, e-mail
RE: [Possible bug?] Context configurations and .WAR deployment
A suggestion, include the ROOT.xml as context.xml under META-INF, tomcat will create it under your host as ROOT.xml when it is deployed. That doesn't solve the problem your experiencing, what does your ROOT.xml look like? What are you referencing your docBase? Ours word fine by referencing the ROOT.war. Note, if you update the context.xml in your webapp, it doesn't auto update the cached ROOT.xml; you would need to undeploy the webapp, delete the ROOT.xml from conf/Catalina/localhost and redeploy the new webapp. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, October 09, 2004 3:33 AM To: [EMAIL PROTECTED] Subject: [Possible bug?] Context configurations and .WAR deployment Hello, I recently upgraded from Tomcat 5.0.19 to Tomcat 5.0.28. I am now running into a conflict between ROOT.xml and ROOT.war. This happens when I deploy to production: 1. I delete the ROOT.war and ROOT directory from /usr/local/tomcat/webapps 2. I delete the ROOT.xml context configuration file in /usr/local/tomcat/conf/Catalina/localhost 3. I then copy the new ROOT.war file to /usr/local/tomcat/webapps 4. I copy the new ROOT.xml file to /usr/local/tomcat/conf/Catalina/localhost This used to work fine in Tomcat 5.0.19. Now, in 5.0.28, when I startup the server, I get the following error: INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] And the new ROOT.war file is never expanded (which is why ROOT.xml can't find web.xml). The only way to get the .war file to expand, is to temporarily remove the ROOT.xml file, startup the server (which then expands the .war file), and then copy the ROOT.xml file over. The reason I'm using the ROOT.xml file is to setup DBCP for this webapp only. In theory, it's not updated often, but when updates occur, it would be copied over during this process, which is why I do it in my deployment script. What happened since Tomcat 5.0.19 to make it not expand the ROOT.war archive at the same time that it's processing a new ROOT.xml file? Thank you, -Raiden Johnson - 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 reconnect to database server?
You may also want to put in a validation query, it adds overhead, but it forces a reconnection.. I had a similar problem with postgres where the pooled connections didn't know they were no longer properly connected. By adding the validation query, it forces the manager to verify connection before handing the connection down to the requesting code. -Art -Original Message- From: Philipp Taprogge [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 9:47 AM To: Tomcat Users List Subject: Re: Tomcat reconnect to database server? Hi! I don't know MSSQL in particular, but in princible it should be as simple as adding ?autoreconnect=true to the driver URL. Phil Derek Mahar wrote: How can I configure Tomcat 5.0.16 to reconnect to a Microsot SQL Server after a server restart? I have configured Tomcat to use JNDI datasources (through Resource and ResourceParam elements within GlobalNamingResources). I presume that at startup, Tomcat connects to the server and creates a pool of connections for later use. However, when we restart our server, Tomcat loses its connection(s) and does not re-establish these connections. -- And on the seventh day, He exited from append mode. (Book of create(2), line 255) - 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: Connection Pooling
I believe when you close the connection, which should be added in a finally block eg. } finally { try { oConn.close(); } catch (Exception ex) { // Can't recovery gracefully, do nothing } } -Art -Original Message- From: Hart, Justin [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 11:51 AM To: [EMAIL PROTECTED] Subject: Connection Pooling Is there some manner in which a database connection should be returned to the connection pool, or is that automatic? Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Microsoft SQL Server validation query
Any, such as if you have a user table, Select lastname from user where userid = 1 It's just a query which is going to return results. -Art D'Alessandro CBE Technologies Office: 617-514-1785 Cell: 617-905-5917 -Original Message- From: Derek Mahar [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 10:15 AM To: Tomcat Users List Subject: Microsoft SQL Server validation query Does anyone happen to know which validation query I should use for Microsoft SQL Server? Derek - 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]
OutOfMemory exception explanation?
We've been getting these every now and then: Jan 23, 2004 5:03:30 PM org.apache.tomcat.util.net.TcpWorkerThread runIt SEVERE: Exception in acceptSocket java.lang.OutOfMemoryError Jan 23, 2004 5:03:30 PM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception executing [EMAIL PROTECTED], terminating thread java.lang.IllegalStateException: Terminating thread at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:53 2) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:619) at java.lang.Thread.run(Thread.java:536) Once this occurrs, I have to stop / start the entire Tomcat container in order to allow this particular webapp to function again. It only effects a particular servlet mapping for a given webapp. Does anyone have any suggestions on how to resolve? We're running version 4.1.24.. Any leads would be great, thanks. -Art - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemory exception explanation?
Thanks for the suggestions, I do have a question though. As I indicated, the problem, when it occurs, only effects 1 of the many servlets. We have 2 WebApps running, both with a few servlets. This occurrs only on 1 servlet, and once it has errored, it causes that servlet to function improperly. Only that servlet, and even after completely removing the webapp that housed the servlet and re-adding it. Does this still sound like a problem with my webapp? Why doesn't Tomcat re-initialize the container which housed the servlet? Thanks again, I will look at profiling my app to see where there may be a failure. -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 27, 2004 11:44 AM To: 'Tomcat Users List' Subject: RE: OutOfMemory exception explanation? Apache JMeter And if you use eclipse, there is a plugin project on SourceForge called EclipseColorer. Hope there were more tutorials on how to use them though. -Original Message- From: Dhruva B. Reddy [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 27, 2004 9:12 AM To: Tomcat Users List Subject: RE: OutOfMemory exception explanation? I've looked for a free profiler, but was unable to find one (as in beer or speech). If you can deal with the barrage of sales calls, you can download a trial version of: JProbe: http://quest.com/jprobe/try.asp OptimizeIt: http://borland.com/products/downloads/download_optimizeit.html And...well, I forgot the third one I knew about. -d --- MURAT BALKAS [EMAIL PROTECTED] wrote: Hi, I need some info about these memory profiler's. Is there any free and easy-to-integrate-to-tomcat memory profiler? Thanks... Murat Filip Hanik [EMAIL PROTECTED]To: Tomcat Users List [EMAIL PROTECTED] om cc: Subject: RE: OutOfMemory exception explanation? 27.01.2004 01:35 Please respond to Tomcat Users List download a memory profiler, should give you the exact place where memory is being wasted. probably in your own webapp -Original Message- From: D'Alessandro, Arthur [mailto:[EMAIL PROTECTED] Sent: Monday, January 26, 2004 11:43 AM To: Tomcat Users List Subject: OutOfMemory exception explanation? We've been getting these every now and then: Jan 23, 2004 5:03:30 PM org.apache.tomcat.util.net.TcpWorkerThread runIt SEVERE: Exception in acceptSocket java.lang.OutOfMemoryError Jan 23, 2004 5:03:30 PM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception executing [EMAIL PROTECTED], terminating thread java.lang.IllegalStateException: Terminating thread at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:53 2) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:619) at java.lang.Thread.run(Thread.java:536) Once this occurrs, I have to stop / start the entire Tomcat container in order to allow this particular webapp to function again. It only effects a particular servlet mapping for a given webapp. Does anyone have any suggestions on how to resolve? We're running version 4.1.24.. Any leads would be great, thanks. -Art - 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