Re: JNDI Tomcat
OK Chris, Thanks Tom Original message Date: Tue, 19 Jun 2007 18:23:08 -0400 From: Christopher Schultz [EMAIL PROTECTED] Subject: Re: JNDI Tomcat To: Tomcat Users List users@tomcat.apache.org -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom, 1. DO NOT hijack threads. 2. DO post the things you have already tried. - -chris Tom Miller wrote: Any one have a better document on howto on JNDI Tomcat than this link http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource- examples-howto.html? I am trying to set up JNDI to work with Tomcat 5.5.7 I had followed instructions on apache.org but have not able to get it work yet. Any hints will be appreciate. Thank you. Tom Original message Date: Tue, 19 Jun 2007 12:35:10 -0400 From: Christopher Schultz [EMAIL PROTECTED] Subject: Re: Data Sources Overwritten To: Tomcat Users List users@tomcat.apache.org Jeff, You have not followed my suggestions: 1. Remove all JNDI datasource information from server.xml and never put it back in. 2. Use a META-INF/context.xml file and bundle it into your WAR file for deployment. context.xml should include 100% of the JNDI data source configuration that you need for your app. Consider using Resource and specifying everything instead of trying to use Resource /and/ ResourceParams. 3. Stop using the Manager to do anything at all. This will allow your application to setup its own data source instead of relying on the server to have it ready to go before deployment. Re-deployments will re-setup the connection, just as it was intended. This is all documented (poorly, I might add), on this page: http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource- examples-howto.html Under MySQL DBCP Example / 2. server.xml configuration, replace the direction to put the configuration into server.xml inside your Context element with into context.xml inside your Context element. -chris Jeffrey C. Baldwin wrote: Also, here is a copy of my server.xml. ?xml version='1.0' encoding='utf-8'? Server Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycl eListener/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource auth=Container description=User database that can be updated and saved name=UserDatabase type=org.apache.catalina.UserDatabase/ ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/v alue /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources Service name=Catalina Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true port=8080 redirectPort=8443 maxSpareThreads=75 maxThreads=150 minSpareThreads=25 /Connector Connector port=8009 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandle r redirectPort=8443 /Connector Engine defaultHost=localhost name=Catalina Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common resolveHosts=fal se / Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true / Context debug=0 docBase=mrs2 path=/mrs2 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_mrs2_log. suffix=.txt timestamp=true/ Resource name=jdbc/ZosDataSource auth=Container type=javax.sql.DataSource/Resource ResourceParams name=jdbc/ZosDataSource parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value5/value /parameter parameter namemaxIdle/name value1/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valueTS59MRS/value /parameter parameter namepassword/name valuepassword/value /parameter
JNDI Tomcat
Any one have a better document on howto on JNDI Tomcat than this link http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource- examples-howto.html? I am trying to set up JNDI to work with Tomcat 5.5.7 I had followed instructions on apache.org but have not able to get it work yet. Any hints will be appreciate. Thank you. Tom Original message Date: Tue, 19 Jun 2007 12:35:10 -0400 From: Christopher Schultz [EMAIL PROTECTED] Subject: Re: Data Sources Overwritten To: Tomcat Users List users@tomcat.apache.org -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeff, You have not followed my suggestions: 1. Remove all JNDI datasource information from server.xml and never put it back in. 2. Use a META-INF/context.xml file and bundle it into your WAR file for deployment. context.xml should include 100% of the JNDI data source configuration that you need for your app. Consider using Resource and specifying everything instead of trying to use Resource /and/ ResourceParams. 3. Stop using the Manager to do anything at all. This will allow your application to setup its own data source instead of relying on the server to have it ready to go before deployment. Re-deployments will re-setup the connection, just as it was intended. This is all documented (poorly, I might add), on this page: http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource- examples-howto.html Under MySQL DBCP Example / 2. server.xml configuration, replace the direction to put the configuration into server.xml inside your Context element with into context.xml inside your Context element. - -chris Jeffrey C. Baldwin wrote: Also, here is a copy of my server.xml. ?xml version='1.0' encoding='utf-8'? Server Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycl eListener/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource auth=Container description=User database that can be updated and saved name=UserDatabase type=org.apache.catalina.UserDatabase/ ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/v alue /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources Service name=Catalina Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true port=8080 redirectPort=8443 maxSpareThreads=75 maxThreads=150 minSpareThreads=25 /Connector Connector port=8009 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandle r redirectPort=8443 /Connector Engine defaultHost=localhost name=Catalina Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common resolveHosts=fal se / Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true / Context debug=0 docBase=mrs2 path=/mrs2 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_mrs2_log. suffix=.txt timestamp=true/ Resource name=jdbc/ZosDataSource auth=Container type=javax.sql.DataSource/Resource ResourceParams name=jdbc/ZosDataSource parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value5/value /parameter parameter namemaxIdle/name value1/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valueTS59MRS/value /parameter parameter namepassword/name valuepassword/value /parameter parameter namedriverClassName/name valuecom.ibm.db2.jcc.DB2Driver/value /parameter parameter nameurl/name valuejdbc:db2://123.456.789.120:5019/NETSNDB01/value !-- production 123.456.789.120:5019/NETSNDB01 -- /parameter
Re: mod_jk and apache problem
worker.worker3.type=ajp13 worker.worker3.cachesize=100 worker.worker3.cache_timeout=60 worker.worker3.socket_keepalive=1 worker.worker3.socket_timeout=5 worker.worker3.recycle_timeout=30 *** end of workers.properties file * *** server.xml file !-- Define an AJP 1.3 Connector on port 8110 -- Connector port=8110 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / !-- Define an AJP 1.3 Connector on port 8111 -- Connector port=8111 enableLookups=false redirectPort=8444 protocol=AJP/1.3 / !-- Define an AJP 1.3 Connector on port 8112 -- Connector port=8112 enableLookups=false redirectPort=8445 protocol=AJP/1.3 / Host name=localhost appBase=/app/webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false ***end of server.xml *** Tom Original message Date: Sun, 29 Oct 2006 07:54:15 -0500 From: Christopher Schultz Subject: Re: mod_jk and apache problem To: Tomcat Users List users@tomcat.apache.org Tom, Tom Miller wrote: The following said that if client click on links that including *.jsp then forward the requested to tomcat using worker2. But where will it go when the traffic forward to tomcat. If one have more than one context under Tomcat. How does it know which one to go from the three. Each worker you have points to an instance of Tomcat (it can be more complicated than that, but this is generally true). Based upon the /path/ of the URI, Tomcat will choose the correct webapp. JkMount /*.jsp worker2 If you have a webapp deployed into '/foo' and you access '/foo/bar.jsp', then you will be sent to the 'foo' webapp. Per your and other suggestion, I did this and it will give me error via the apache log. *** modified httpd.conf file JkMount /tticket/*.jsp worker2 So, you are expecting either a webapp called 'tticket' or you are using the ROOT webapp and have a directory called 'tticket' in there. Can you give us more details about your deployment? -chris signature.asc (1k bytes) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk and apache problem
The following said that if client click on links that including *.jsp then forward the requested to tomcat using worker2. But where will it go when the traffic forward to tomcat. If one have more than one context under Tomcat. How does it know which one to go from the three. for example: of multiple context under Tomcat. /app/webapps/ROOT/ /app/webapps/monpop/ /app/webapps/tticket/ ***httpd.conf file JkMount /*.jsp worker2 Per your and other sugguestion, I did this and it will give me error via the apache log. *** modified httpd.conf file JkMount /tticket/*.jsp worker2 It said File does not exist: /www/tticket/js/new_menu_settings1.js. I agreed with the error. It doesn't make sense to me either. I need to define or point /app/webapps/tticket/ to worker2 somehow. I don't know how.. I missed something here but I don't know what. Tom - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HELP Wanted
Summarry: I have five webased web site with java application. One application per web site. Here is my current enviroment: OS = Linux RedHat 4.0 Appache 2.0.50 Connector JK 1.2.6 Tomcat 5.5.4 I am currently have each website and application run on one machine. I also have some machine with two Tomcat instance. Each Tomcat instance support one virtual website and one application (context). Here is my new requirements: I have 5 webased application: Main Site: I would like all five web site run on the same machine #1 (with Apache and JK connector). I would like all five application using the same Tomcat instance (multiple context) on the same machine #2. Security and protect for both web site and application container need tobe consider in your implementation. Failover and Clustering Site: I would like machine #3 to be in cluster with machine #1 and machine #4 to be cluster with machine number #2. I will use load balance for the appache (machine #1 and machine #3). If you have a better sugguestion, I am listening. I also included a sample topology. I have built and configured all of my site with appache, tomcat and connector. The part I need help with is the multiple context with one Tomcat instance and clustering. I am currently have very little time to figure out how multiple context and clustering works. This is where I can use some help from some of you who have experienced with it and wanted to make some extra money. Please email if you are interested. If none of you volunteer I will have to post my need on the list and keep bother you all until I get some solution (-: (-: [EMAIL PROTECTED] Thanks much, Tom - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HELP Wanted with attachment
Summarry: I have five webased web site with java application. One application per web site. Here is my current enviroment: OS = Linux RedHat 4.0 Appache 2.0.50 Connector JK 1.2.6 Tomcat 5.5.4 I am currently have each website and application run on one machine. I also have some machine with two Tomcat instance. Each Tomcat instance support one virtual website and one application (context). Here is my new requirements: I have 5 webased application: Main Site: I would like all five web site run on the same machine #1 (with Apache and JK connector). I would like all five application using the same Tomcat instance (multiple context) on the same machine #2. Security and protect for both web site and application container need tobe consider in your implementation. Failover and Clustering Site: I would like machine #3 to be in cluster with machine #1 and machine #4 to be cluster with machine number #2. I will use load balance for the appache (machine #1 and machine #3). If you have a better sugguestion, I am listening. I also included a sample topology. I have built and configured all of my site with appache, tomcat and connector. The part I need help with is the multiple context with one Tomcat instance and clustering. I am currently have very little time to figure out how multiple context and clustering works. This is where I can use some help from some of you who have experienced with it and wanted to make some extra money. Please email if you are interested. If none of you volunteer I will have to post my need on the list and keep bother you all until I get some solution (-: (-: [EMAIL PROTECTED] Thanks much, Tom - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
can a URL be define within struts-config.xml?
How can I tell struts-config.xml to forward to a link? I wanted struts-config.xml to go to this site after it done. http://www.cisco.com What is the correct syntax to use when one wanted to have an action to goto within the struts-config.xml? I am running tomcat 5.0.7 Thanks much, Tom !-- == Action Mapping Definitions -- action-mappings action path=/login type=test.struts.LoginAction forward name=valid path=http://www.cisco.com; forward name=invalid path=/jsp/LoginView.jsp / /action /action-mappings - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5 Context Files
Chris, I have been looking for the same solution. Can you share what you had learn? Would you able to put together a howto on this topic? I think it will be a great benefit to the rest of us. Thanks much, Tom Original message Date: Tue, 30 May 2006 13:57:18 +0100 (BST) From: Chris Walker [EMAIL PROTECTED] Subject: Re: Tomcat 5.5 Context Files To: Tomcat Users List users@tomcat.apache.org After following up the advice from David and others, I think I've got the configuration I need. I'm posting a minimal version of the setup as it seems to me that this might be a fairly common requirement: - I'm running two applications on a single server; each has its own domain name. - Within each application there may be one or more contexts, corresponding to different versions of the webapp (used by different customers). - Various site-specific parameters need to be set within the context, where they will override values in web.xml. - I don't want any kind of auto deployment server.xml -- Server port=8005 shutdown=SHUTDOWN Service name=Catalina Connector port=8080 / Engine name=Catalina defaultHost=host1 !-- it seems that if both autoDeploy and deployOnStartup are false, the host returns empty pages, but if either one is false then it's OK -- Host name=host1 appBase=noapps autoDeploy=false unpackWARs=false deployXML=false / Host name=host2 appBase=noapps autoDeploy=false unpackWARs=false deployXML=false / /Engine /Service /Server directory structure --- {catalina_home} conf Catalina host1 ROOT.xml: Context docBase=${catalina.home}/ibo/ibo3 / ibo4.xml: Context docBase=${catalina.home}/ibo/ibo4 / ... host2 ROOT.xml: Context docBase=${catalina.home}/cbo/cbo.1.23.45 / ... noapps [nothing in here - would appBase=dev/null work?] ibo ibo3 WEB-INF ibo4 WEB-INF cbo cbo.1.23.45 WEB-INF I seem to have problems if the context directories aren't below ${catalina.home}, but this I can live with. Thanks to all who helped. Chris --- David Smith [EMAIL PROTECTED] wrote: Some thoughts: 1. The naming of all the associated files with your webapp should be consistent with the path attribute of the context element (assuming ibo4 is it's name): Context xml file should be named ibo4.xml The webapp's directory should be named ibo4 If deploying from a .war file, the .war file should be named ibo4.war. 2. The name of the root application is ROOT (case sensitive), so if this is to be the webapp to respond on request to /*, the war file, context xml file, and the webapp's folder should all be named ROOT (ROOT.xml, ROOT.war, webapps/ROOT). It should also be noted that with the context xml file in config/Catalina/www.iboserver.com/ibo4.xml, the path and docbase attributes may be ignored under tomcat 5.5. Open your manager webapp to see what's deployed and under what names. --David Chris Walker wrote: Thanks Mark. I noticed that, but my objective is to store configuration parameters that are platform-specific outside the webapp. The stuff in the server's context definitions nicely overrides anything in web.xml. Chris --- Mark Petrovic [EMAIL PROTECTED] wrote: Hi. Context fragments can also be put in your webapp's META-INF directory, per the 4th bullet item here http://tomcat.apache.org/tomcat-5.5-doc/config/context.html E.g., pluto:PGCRM jar tf dist/crmrpc.war |head -3 META-INF/ META-INF/MANIFEST.MF META-INF/context.xml where context.xml contains, in my particular case, a JDBC resource definition Context path=/crmrpc debug=5 reloadable=true crossContext=true Resource name=jdbc/crm auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=u password=p driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/cm?autoReconnect=true / /Context On 5/29/06, Chris Walker [EMAIL PROTECTED] wrote: Hello, I have just migrated a family of webapps from Tomcat 4 to Tomcat 5.5 . It's working OK, but reading through the documentation I see there is a recommendation that I remove the Context sections from server.xml and put them in files in {catalina_root}/conf/[engine]/[Host]. But when I do this I find that each of the contexts just responds with an empty HTML page - no HTTP error, and nothing in any of the Tomcat logs to suggest an error. This is the response: --- - --- !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META
multiple context with one Tomcat5.x instance
Is there a how to for linux on how to get more than one context to work under Tomcat 5.x? I am not using ../webapps/ROOT as a default context. I am trying to get three context under ../webapps/ ../webapps/production/ ../webapps/qa/ ../webapps/sandbox/ to work with one tomcat instance and with multiple Virtual host and jkworker. Thanks, Tom Original message Date: Thu, 13 Apr 2006 13:33:12 -0400 From: Rob Elliott [EMAIL PROTECTED] Subject: RE: Serve a file instead of a page using Tomcat. To: Tomcat Users List users@tomcat.apache.org Thanks for your response. I placed it under ROOT and I get the message HTTP Status 404 - video/3gp/video.3gp. What's interesting is that if I enter http://localhost:8080/ I get the admin page and then if I append video I see directory listing containing the 3gp directory, append 3gp and see video.3gp etc. I can get to the file this way but I want to specify the entire URL at once... -Original Message- From: P Y [mailto:[EMAIL PROTECTED] Sent: Thursday, April 13, 2006 12:07 PM To: Tomcat Users List Subject: Re: Serve a file instead of a page using Tomcat. The default webapp is in ROOT/, so, create the directory ROOT/video to be reached through http://localhost:8080/video/ ... On 4/13/06, Rob Elliott [EMAIL PROTECTED] wrote: I understand what you are saying... My appbase is the default webapps directory. Under webapps I created a video\3gp folder and in it is a file video.3gp. I added the following Mime mapping to the web.xml mime-mapping extension3gp/extension mime-typevideo/3gpp/mime-type /mime-mapping I stopped and then started tomcat and entered the URL in the browser http://localhost:8080/video/3gp/video.3gp however I receive 404 The requested resource is not available... -Original Message- From: John Powers [mailto:[EMAIL PROTECTED] Sent: Thursday, April 13, 2006 11:13 AM To: Tomcat Users List Subject: RE: Serve a file instead of a page using Tomcat. Whatever file you defined as a host in your server.xml will work.. (or any subdirectory of course). So if your appbase is c:\someDirOnMachine\stuff\abc\xyz\ And in there you have a folder called \123\ With a file blah.ext You can just serve out with http://Hostname:port/123/blah.ext -Original Message- From: Rob Elliott [mailto:[EMAIL PROTECTED] Sent: Thursday, April 13, 2006 9:26 AM To: Tomcat Users List Subject: RE: Serve a file instead of a page using Tomcat. Thanks for your response, I don't see a web folder for Tomcat, only under webapps. Will I need to deploy a WAR file to do this? Thanks... -Original Message- From: John Powers [mailto:[EMAIL PROTECTED] Sent: Thursday, April 13, 2006 10:17 AM To: Tomcat Users List Subject: RE: Serve a file instead of a page using Tomcat. If the file is in the web folder then you can just path to it http://localhost:8080/somedir/somefile.ext But if it isn't, then a servlet can read in from a file stream and read out to the servlet's out stream... -Original Message- From: Rob Elliott [mailto:[EMAIL PROTECTED] Sent: Thursday, April 13, 2006 8:35 AM To: users@tomcat.apache.org Subject: Serve a file instead of a page using Tomcat. Hello, Users will be entering a file URL with file extension into browser. How must you configure Tomcat to serve up a file for browser download rather than a web page? Thanks in advance, Information contained in this e-mail and any attachments are intended for the use of the addressee only, and may contain confidential information of Ubiquity Software Corporation. All unauthorized use, disclosure or distribution is strictly prohibited. If you are not the addressee, please notify the sender immediately and destroy all copies of this email. Unless otherwise expressly agreed in writing signed by an officer of Ubiquity Software Corporation, nothing in this communication shall be deemed to be legally binding. Thank you. --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: users- [EMAIL PROTECTED] --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: users- [EMAIL PROTECTED] --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: users- [EMAIL PROTECTED] --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: users- [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To
tomcat build for PDA (arm processor) ipaq or sharp
Greetings, Do we have a binary version of Tomcat build for PDA (ipaq or sharp zaurus) arm processor? If not can some one help? Thanks, Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]