do I need to install Binary Distributions or Source Code Distributions for tomcat5.5
Hi , I am new to tomcat. I have window vista OS jdk1.6. Which version of tomcat 5.5 i.e Binary Distributions or Source Code Distributions. Please help me . Thank you sneha - Unlimited freedom, unlimited storage. Get it now
Re: do I need to install Binary Distributions or Source Code Distributions for tomcat5.5
Unless you plan to compile your tomcat and play with it's internals, you don't need the source En l'instant précis du 22/02/08 11:36, Sneha Manohar s'exprimait en ces termes: Hi , I am new to tomcat. I have window vista OS jdk1.6. Which version of tomcat 5.5 i.e Binary Distributions or Source Code Distributions. Please help me . Thank you sneha - Unlimited freedom, unlimited storage. Get it now -- http://www.devlog.be (a belgian developer's logs) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to modify default tomcat http header property Server: Apache-Coyote/1.1 ?
You didn't mention which version of tomcat you are using. Starting w/ 5.5, the server attribute can be added to the Connector in server.xml. See http://tomcat.apache.org/tomcat-5.5-doc/config/http.html for further details. --David Hanks Wang (hanwan) wrote: Hi all, I deployed a servlet in Tomcat which sends response to all http post requests, and I composed the response data by HttpServletResponse object. But I found Tomcat will generate a default http header property in the response: Server: Apache-Coyote/1.1 So my question is : Is there a way to change the value? eg: change it to Server: For-Test I try to use below method: response.setHeader(Server, For-Test); Then the http header becomes to: Server: Apache-Coyote/1.1 Server: For-test But the Apache-Coyote/1.1 still there. So how can I delete it or modify it? Thanks! B.R Han - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Cluster - node02 is invalid, removed or not replicated at this node.
Hello guys! We are trying to test Tomcat clustering but we are getting some problems. Sometimes (Log2) everything works fine but in other cases the cluster doesn't work (Log1). The only difference is the time that we wait after we shutdown a node. When we make a request after shutdown a node, cluster doesn't work, but if we wait more time (1 minute more or less), the cluster works fine and we can proceed making requests. Log 1: 22/Fev/2008 10:31:11 org.apache.catalina.cluster.tcp.ReplicationValvecreatePrimaryIndicator FINE: Context /outpatient: Primarity of session 1E4B56ED32E80A15EE5B40E5C83FB49E.node02 in request attribute org.apache.catalina.cluster.tcp.isPrimarySession is false. 22/Fev/2008 10:31:11 org.apache.catalina.cluster.tcp.SimpleTcpClusterlogSendMessage INFO: SEND 22/Fev/2008:10:31:11 16 - 1E4B56ED32E80A15EE5B40E5C83FB49E.node02#-#localhost#-#/outpatient#-#0#-#1203676271418 22/Fev/2008 10:31:13 org.apache.catalina.cluster.tcp.ReplicationValveresetDeltaRequest FINE: Cluster is standalone: reset Session Request Delta at context /outpatient 22/Fev/2008 10:31:15 org.apache.catalina.cluster.tcp.ReplicationValvecreatePrimaryIndicator FINE: Context /outpatient: Requested session 1E4B56ED32E80A15EE5B40E5C83FB49E.node02 is invalid, removed or not replicated at this node. Log 2: 22/Fev/2008 10:34:08 org.apache.catalina.cluster.tcp.ReplicationValvecreatePrimaryIndicator FINE: Context /outpatient: Primarity of session 76CFC5DD3CF130EA0A10875E7B7C.node01 in request attribute org.apache.catalina.cluster.tcp.isPrimarySession is false. 22/Fev/2008 10:34:08 org.apache.catalina.cluster.tcp.SimpleTcpClusterlogSendMessage INFO: SEND 22/Fev/2008:10:34:08 2 - 76CFC5DD3CF130EA0A10875E7B7C.node01#-#localhost#-#/outpatient#-#0#-#1203676448864 22/Fev/2008 10:34:10 org.apache.catalina.cluster.tcp.ReplicationValveresetDeltaRequest FINE: Cluster is standalone: reset Session Request Delta at context /outpatient 22/Fev/2008 10:34:38 org.apache.catalina.cluster.tcp.ReplicationValvecreatePrimaryIndicator FINE: Context /outpatient: Primarity of session 76CFC5DD3CF130EA0A10875E7B7C.node02 in request attribute org.apache.catalina.cluster.tcp.isPrimarySession is true. Our cluster setup: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster doClusterLog=true clusterLogName=clusterlog manager.className= org.apache.catalina.cluster.session.DeltaManager manager.expireSessionsOnShutdown=false manager.notifyListenersOnReplication=false manager.notifySessionListenersOnReplication=false manager.sendAllSessions=false manager.sendAllSessionsSize=500 manager.sendAllSessionsWaitTime=20 Membership className= org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastClusterDomain=d10 mcastPort=45564 mcastFrequency=1000 mcastDropTime=1000 recoveryCounter=10 recoveryEnabled=true recoverySleepTime=5000/ Receiver className= org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=9016 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className= org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=fastasyncqueue recoverTimeout=500 stateTransferTimeout=1 recoverCounter=6 doTransmitterProcessingStats=true doProcessingStats=true doWaitAckStats=true queueTimeWait=true queueDoStats=true queueCheckLock=true ackTimeout=1500 waitForAck=true keepAliveTimeout=8 keepAliveMaxRequestCount=-1/ Valve className= org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;.*\.txt; primaryIndicator=true debug=1 /
Problem during starting tomcat-Exception in thread main java.lang.NoClassDefFoundError: org/apache/catalina/s
hi I have installed tomcat6.x. I have set the path of tomcat_home java_home. when I start server , screen closes.I have used catalina out , I get follwing error Exception in thread main java.lang.NoClassDefFoundError: org/apache/catalina/s tartup/Bootstrap. sneha - Save all your chat conversations. Find them online.
Re: Tomcat Cluster - node02 is invalid, removed or not replicated at this node.
HI Andrew, Your mcastDropTime=1000 is to low. Please set it to 3 and it is true that you must wait 35 sec before you can restart a cluster node. Use the Java Service Wrapper or add this to your start scripts to configure this. Peter Am 22.02.2008 um 11:48 schrieb Andrew Hole: Hello guys! We are trying to test Tomcat clustering but we are getting some problems. Sometimes (Log2) everything works fine but in other cases the cluster doesn't work (Log1). The only difference is the time that we wait after we shutdown a node. When we make a request after shutdown a node, cluster doesn't work, but if we wait more time (1 minute more or less), the cluster works fine and we can proceed making requests. Log 1: 22/Fev/2008 10:31:11 org.apache.catalina.cluster.tcp.ReplicationValvecreatePrimaryIndicator FINE: Context /outpatient: Primarity of session 1E4B56ED32E80A15EE5B40E5C83FB49E.node02 in request attribute org.apache.catalina.cluster.tcp.isPrimarySession is false. 22/Fev/2008 10:31:11 org.apache.catalina.cluster.tcp.SimpleTcpClusterlogSendMessage INFO: SEND 22/Fev/2008:10:31:11 16 - 1E4B56ED32E80A15EE5B40E5C83FB49E.node02#-#localhost#-#/outpatient#- #0#-#1203676271418 22/Fev/2008 10:31:13 org.apache.catalina.cluster.tcp.ReplicationValveresetDeltaRequest FINE: Cluster is standalone: reset Session Request Delta at context /outpatient 22/Fev/2008 10:31:15 org.apache.catalina.cluster.tcp.ReplicationValvecreatePrimaryIndicator FINE: Context /outpatient: Requested session 1E4B56ED32E80A15EE5B40E5C83FB49E.node02 is invalid, removed or not replicated at this node. Log 2: 22/Fev/2008 10:34:08 org.apache.catalina.cluster.tcp.ReplicationValvecreatePrimaryIndicator FINE: Context /outpatient: Primarity of session 76CFC5DD3CF130EA0A10875E7B7C.node01 in request attribute org.apache.catalina.cluster.tcp.isPrimarySession is false. 22/Fev/2008 10:34:08 org.apache.catalina.cluster.tcp.SimpleTcpClusterlogSendMessage INFO: SEND 22/Fev/2008:10:34:08 2 - 76CFC5DD3CF130EA0A10875E7B7C.node01#-#localhost#-#/outpatient#- #0#-#1203676448864 22/Fev/2008 10:34:10 org.apache.catalina.cluster.tcp.ReplicationValveresetDeltaRequest FINE: Cluster is standalone: reset Session Request Delta at context /outpatient 22/Fev/2008 10:34:38 org.apache.catalina.cluster.tcp.ReplicationValvecreatePrimaryIndicator FINE: Context /outpatient: Primarity of session 76CFC5DD3CF130EA0A10875E7B7C.node02 in request attribute org.apache.catalina.cluster.tcp.isPrimarySession is true. Our cluster setup: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster doClusterLog=true clusterLogName=clusterlog manager.className= org.apache.catalina.cluster.session.DeltaManager manager.expireSessionsOnShutdown=false manager.notifyListenersOnReplication=false manager.notifySessionListenersOnReplication=false manager.sendAllSessions=false manager.sendAllSessionsSize=500 manager.sendAllSessionsWaitTime=20 Membership className= org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastClusterDomain=d10 mcastPort=45564 mcastFrequency=1000 mcastDropTime=1000 recoveryCounter=10 recoveryEnabled=true recoverySleepTime=5000/ Receiver className= org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=9016 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className= org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=fastasyncqueue recoverTimeout=500 stateTransferTimeout=1 recoverCounter=6 doTransmitterProcessingStats=true doProcessingStats=true doWaitAckStats=true queueTimeWait=true queueDoStats=true queueCheckLock=true ackTimeout=1500 waitForAck=true keepAliveTimeout=8
Re: Tomcat Cluster - node02 is invalid, removed or not replicated at this node.
Thanks. Some more questions: -- In a scenario with two nodes, if I shutdown one, the other is instantly ready to receive and respond to requests, or it is necessary to wait a while? In a procuction scenario we cannot wait, because requests are frequently. -- The 35 seconds refers to the initial time? -- Is there any recommended configuration (basically If one tomcat crashes I want that the other responds immediatly to the requests)? Thanks a lot On Fri, Feb 22, 2008 at 1:38 PM, Peter Rossbach [EMAIL PROTECTED] wrote: HI Andrew, Your mcastDropTime=1000 is to low. Please set it to 3 and it is true that you must wait 35 sec before you can restart a cluster node. Use the Java Service Wrapper or add this to your start scripts to configure this. Peter Am 22.02.2008 um 11:48 schrieb Andrew Hole: Hello guys! We are trying to test Tomcat clustering but we are getting some problems. Sometimes (Log2) everything works fine but in other cases the cluster doesn't work (Log1). The only difference is the time that we wait after we shutdown a node. When we make a request after shutdown a node, cluster doesn't work, but if we wait more time (1 minute more or less), the cluster works fine and we can proceed making requests. Log 1: 22/Fev/2008 10:31:11 org.apache.catalina.cluster.tcp.ReplicationValvecreatePrimaryIndicator FINE: Context /outpatient: Primarity of session 1E4B56ED32E80A15EE5B40E5C83FB49E.node02 in request attribute org.apache.catalina.cluster.tcp.isPrimarySession is false. 22/Fev/2008 10:31:11 org.apache.catalina.cluster.tcp.SimpleTcpClusterlogSendMessage INFO: SEND 22/Fev/2008:10:31:11 16 - 1E4B56ED32E80A15EE5B40E5C83FB49E.node02#-#localhost#-#/outpatient#- #0#-#1203676271418 22/Fev/2008 10:31:13 org.apache.catalina.cluster.tcp.ReplicationValveresetDeltaRequest FINE: Cluster is standalone: reset Session Request Delta at context /outpatient 22/Fev/2008 10:31:15 org.apache.catalina.cluster.tcp.ReplicationValvecreatePrimaryIndicator FINE: Context /outpatient: Requested session 1E4B56ED32E80A15EE5B40E5C83FB49E.node02 is invalid, removed or not replicated at this node. Log 2: 22/Fev/2008 10:34:08 org.apache.catalina.cluster.tcp.ReplicationValvecreatePrimaryIndicator FINE: Context /outpatient: Primarity of session 76CFC5DD3CF130EA0A10875E7B7C.node01 in request attribute org.apache.catalina.cluster.tcp.isPrimarySession is false. 22/Fev/2008 10:34:08 org.apache.catalina.cluster.tcp.SimpleTcpClusterlogSendMessage INFO: SEND 22/Fev/2008:10:34:08 2 - 76CFC5DD3CF130EA0A10875E7B7C.node01#-#localhost#-#/outpatient#- #0#-#1203676448864 22/Fev/2008 10:34:10 org.apache.catalina.cluster.tcp.ReplicationValveresetDeltaRequest FINE: Cluster is standalone: reset Session Request Delta at context /outpatient 22/Fev/2008 10:34:38 org.apache.catalina.cluster.tcp.ReplicationValvecreatePrimaryIndicator FINE: Context /outpatient: Primarity of session 76CFC5DD3CF130EA0A10875E7B7C.node02 in request attribute org.apache.catalina.cluster.tcp.isPrimarySession is true. Our cluster setup: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster doClusterLog=true clusterLogName=clusterlog manager.className= org.apache.catalina.cluster.session.DeltaManager manager.expireSessionsOnShutdown=false manager.notifyListenersOnReplication=false manager.notifySessionListenersOnReplication=false manager.sendAllSessions=false manager.sendAllSessionsSize=500 manager.sendAllSessionsWaitTime=20 Membership className= org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastClusterDomain=d10 mcastPort=45564 mcastFrequency=1000 mcastDropTime=1000 recoveryCounter=10 recoveryEnabled=true recoverySleepTime=5000/ Receiver className= org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=9016 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className= org.apache.catalina.cluster.tcp.ReplicationTransmitter
Apache2 adn/or Tomcat6?
Apache2 listens to port 80 and Tomcat6 to 8080 by default. I KNOW that browsing an IP http://xxx.xxx.xxx.xxx takes me to the Apache welcome page if the Apache service is running irrespective of Tomcat is enabled or not. If I stop the Apache service I get Unable to connect even if Tomcat is enabled. Conclusion (am I right or wrong?): http://xxx.xxx.xxx.xxx is equivalent with http://xxx.xxx.xxx.xxx:80 but never with http://xxx.xxx.xxx.xxx:8080 i.e. I can never browse http://xxx.xxx.xxx.xxx and utilize Tomcat as a web server, I must tell the world You must hit http://xxx.xxx.xxx.xxx:8080 in order to come to the xxx.xxx.xxx.xxx homepage. /dan - 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: Apache2 adn/or Tomcat6?
On Fri, Feb 22, 2008 at 7:08 AM, elvberg [EMAIL PROTECTED] wrote: Conclusion (am I right or wrong?): http://xxx.xxx.xxx.xxx is equivalent with http://xxx.xxx.xxx.xxx:80 but never with http://xxx.xxx.xxx.xxx:8080 i.e. I can never browse http://xxx.xxx.xxx.xxx and utilize Tomcat as a web server Absolutely wrong -- you just need to change the Tomcat Connector to listen on port 80, rather than 8080. -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache2 adn/or Tomcat6?
2008/2/22, Hassan Schroeder [EMAIL PROTECTED]: On Fri, Feb 22, 2008 at 7:08 AM, elvberg [EMAIL PROTECTED] wrote: Conclusion (am I right or wrong?): http://xxx.xxx.xxx.xxx is equivalent with http://xxx.xxx.xxx.xxx:80 but never with http://xxx.xxx.xxx.xxx:8080 i.e. I can never browse http://xxx.xxx.xxx.xxx and utilize Tomcat as a web server Absolutely wrong -- you just need to change the Tomcat Connector to listen on port 80, rather than 8080. Or put Apache 2 in front of your Tomcat, as it is usually done in production environment. Antonio
Re: Apache2 adn/or Tomcat6?
On Fri, Feb 22, 2008 at 7:18 AM, Antonio Petrelli [EMAIL PROTECTED] wrote: Or put Apache 2 in front of your Tomcat, as it is usually done in production environment. I don't know if you have statistics to substantiate that opinion, but it doesn't answer the question, eh? :-) There are definitely people on this list, including me, running Tomcat standalone in production. -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: do I need to install Binary Distributions or Source Code Distributions for tomcat5.5
Sounds like your pretty new to this. Go with the binary version. Bookmark the documentation page too. It helped me get pretty far. It should help you too. On Fri, 2008-02-22 at 10:36 +, Sneha Manohar wrote: Hi , I am new to tomcat. I have window vista OS jdk1.6. Which version of tomcat 5.5 i.e Binary Distributions or Source Code Distributions. Please help me . Thank you sneha - Unlimited freedom, unlimited storage. Get it now - 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: NIO Java or TC - What are u using it 4?
you're subject has an or in it, what are you actually asking? Filip Johnny Kewl wrote: Cant contain my curiousity anymore? What practical applications is this been used for? I see theres a lot of control over the socket etc... but what are you guys actually doing with it? Trying to get rule of thumb for when one would move to it? --- HARBOR: http://coolharbor.100free.com/index.htm The most powerful application server on earth. The only real POJO Application Server. Making the Java dream come true. --- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.20.9/1293 - Release Date: 2/22/2008 9:21 AM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 6.0 and JSF 1.2
Tomcat : 6 Java : JDK SUN 1.6.0_04 Hi everybody, I would like to work with JSF 1.2 embedded in Tomcat 6.0 Where can I find an How-to ? I 've tried to do the exercices from the Marty Hall site (coresrvlets) but I failed Many thanks Best Regards Jean-Louis Matéo - 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: Custom URL handlers in Tomcat web app
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 MK, MK wrote: | I have the following problem: | My Web application needs to handle Lotus Notes URLs which use the scheme | notes. However, since Java does not know this protocol by default, it throws a | MalformedUrlException when I construct a java.net.URL from a notes:// URL-string. | | So, I read up on custom URL handlers and as far as I understand, you have to | code a custom URLStreamHandler class and a custom URLConnection class. You really only need a custom URLStreamHandler... if there's a URLConnection that you can re-use, you are welcome to do that. | Okay, no | big deal. However, there are three ways to register your new handler: | | 1) put it in the sun.net.www.protocol.yourprotocol package Don't do that. You probably can't do it anyway, since the JAR defining the package is likely to be sealed. | 2) put it in a custom package and declare that package to the JRE using the | java.protocol.handler.pkgs system property This is how I do it in my TestURLConnection package (http://sourceforge.net/projects/tuc). | 3) register a custom URLStreamHandlerFactory using URL.setUrlStreamHandlerFactory This might not work, since the javadoc says it may only be called once for a given JVM -- and Tomcat (or something else) might have don it before you get the chance to do so. | problem is, none of these approaches work in Tomcat 5.5. For 1), this simply | didn't have any effect for me. 2) neither, maybe Tomcat simply ignores that | property? How did you set the property? | 3) doesn't work because Tomcat already registers its own factory, and | for some reason I can't quite put my hands on you are not allowed to call that | method twice per JVM instance. Yeah, that's not surprising at all. | This issue is also discussed on Sun's Java issue tracker: | http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4648098 | | The ticket has been opened six years ago and still no fix! That is also not surprising. Bugs in Java seem to take forever to get fixed, if they ever get fixed. It's a shame, really. | Does Tomcat meanwhile have some workaround for this? I mean, I don't even need | an actual URL connection, I just want to pass custom URL strings, which should | be perfectly fine if they are valid URLs, no?! Do you have the opportunity to intercept these URL objects, or are they always handled somewhere that you can't inspect them. I'm wondering if you can convert a notes:// URL into, say, an http:// URL before attempting to call URL.openConnection. I don't know anything about notes://, so maybe it isn't even HTTP-compatible. I'm sure there's a way around this. Give us some more information and we'll see what we can do. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAke+9tYACgkQ9CaO5/Lv0PCu+QCfZR8fi+RMARH22QPpcZDjl4/o gUUAoL3sKYTDL6jznTmFu3QdOMZLX73N =Moqk -END PGP SIGNATURE- - 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: Problem during starting tomcat-Exception in thread main java.lang.NoClassDefFoundError: org/apache/catalina/s
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sneha, Sneha Manohar wrote: | I have installed tomcat6.x. I have set the path of tomcat_home java_home. | when I start server , screen closes.I have used catalina out , I get follwing error | Exception in thread main java.lang.NoClassDefFoundError: org/apache/catalina/s | tartup/Bootstrap. How are you trying to start Tomcat? It sounds like you're trying to run it from the command-line, using one of the startup scripts. Have you modified the CLASSPATH or anything like that? Also, what OS are you running? If you're on *NIX, are you using a package-managed version of Tomcat, or did you download and install it yourself from tomcat.apache.org? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAke+9y0ACgkQ9CaO5/Lv0PCbdACePdfX9jjVmjxBFUPht8mogeDH +WUAn1RtSQfUPfSIhZMpdwSrEjecoQHT =Wy4O -END PGP SIGNATURE- - 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 + HTTP Push problems
I have created a Servlet that uses multipart/x-mixed-replace to push out data. ( See: http://www.servlets.com/jservlet2/examples/ch06/#ex06_13 ) This works perfectly fine between tomcat 5.5 and Firefox. When tomcat is front-ended with httpd + mod_jk, the live push no longer works. Is this a known deficiency in mod_jk or would this be a bug ? -Thanks Steve More - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why is session unbound called after cluster failover?
Hi! Why is session unbound called after cluster failover? Two more questions: -- In a scenario with two nodes, if I shutdown one, the other is instantly ready to receive and respond to requests, or it is necessary to wait a while? In a procuction scenario we cannot wait, because requests are frequently. -- Is there any recommended configuration (basically If one tomcat crashes I want that the other responds immediatly to the requests)? Thanks a lot A
JDBC driver JARs in a shared production environment
Hi everybody, Question: if you cannot place the JDBC driver jars in CATALINA_HOME/commons/lib, where can you put them? Here is the context of my question: * A production environment where each application runs in a separate instance of Tomcat * Each application has it's own $CATALINA_BASE and pointing to same $CATALINA_HOME. * OS is RH Red Hat Enterprise Linux 4 * Tomcat 5.5.* is used as bundled by RH. Last but not least: * Deploying the JDCB drivers used by each applications to $CATALINA_HOME/commons/lib is not possible. So my question is, what is the better alternative: 1) Place the JDBC jars in $CATALINA_BASE/jdbc and modify the start-up script to include these jars on the CLASSPATH? 2) Deploy the JDBC jars in the WAR file (e.g. WEB-INF/lib/jdbc) and modify the start-up script to include these jar on the CLASSPATH? 3) Deploy the JDBC jars and commons-dbcp.jar in the WAR in WEB-INF/lib? 4) other? This is a real problem we're faced with and I would really appreciate some input on the best possible alternative. Thanks, Florian This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5 security policie read jar content
Hi, How can I specify in catalina.policy (tomcat 5.5) that a webapp can read the contents of any jar file within WEB-INF/lib/ ? (namely, read xml files within jar files) cheers -- Filipe David Manana, [EMAIL PROTECTED] Obvious facts are like secrets to those not trained to see them.
Re: Apache2 adn/or Tomcat6?
Or put Apache 2 in front of your Tomcat, as it is usually done in production environment. ...and how do I do that? /dan On Fri, 2008-02-22 at 16:18 +0100, Antonio Petrelli wrote: 2008/2/22, Hassan Schroeder [EMAIL PROTECTED]: On Fri, Feb 22, 2008 at 7:08 AM, elvberg [EMAIL PROTECTED] wrote: Conclusion (am I right or wrong?): http://xxx.xxx.xxx.xxx is equivalent with http://xxx.xxx.xxx.xxx:80 but never with http://xxx.xxx.xxx.xxx:8080 i.e. I can never browse http://xxx.xxx.xxx.xxx and utilize Tomcat as a web server Absolutely wrong -- you just need to change the Tomcat Connector to listen on port 80, rather than 8080. Or put Apache 2 in front of your Tomcat, as it is usually done in production environment. Antonio - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: Certification Issue in production Tomcat server...
Hello Folks, I am getting the security certification problem in a J2EE based application which is running on our production Tomcat server. The Web applications main functionality is to update user's details in Authentication Directory and reset users password, and we are getting error while resetting password. The application uses SSL communication while resetting password in AD and the rest of the things are done through non-SSL communication. NOTE: Our application is based on Struts framework JVM: j2re1.4.1_06 Tomcat: Tomcat 4.1 Windows: Windows 2000 SP4 Following are the error summary which I got after resetting user portal password. Please have a look into this. 20 Feb 2008 17:34:27,130 DEBUG :java.naming.factory.initial = com.sun.jndi.ldap.LdapCtxFactory [com.sunchemical.ldapapi.LDAPConnection] 20 Feb 2008 17:34:27,130 DEBUG :com.sunchemical.ldap.ads.port = 636 [com.sunchemical.ldapapi.LDAPConnection] 20 Feb 2008 17:34:27,130 DEBUG : com.sunchemical.ldap.ads.security.principal = [EMAIL PROTECTED] [com.sunchemical.ldapapi.LDAPConnection] 20 Feb 2008 17:34:27,130 DEBUG :java.naming.security.principal = [EMAIL PROTECTED] [com.sunchemical.ldapapi.LDAPConnection] 20 Feb 2008 17:34:27,130 DEBUG : com.sunchemical.ldap.ads.security.credentials = [com.sunchemical.ldapapi.LDAPConnection] 20 Feb 2008 17:34:27,130 DEBUG :java.naming.provider.url = ldap://10.156.34.140:636/dc=sunchem,dc=com [com.sunchemical.ldapapi.LDAPConnection] 20 Feb 2008 17:34:27,130 DEBUG : com.sunchemical.ldap.ads.security.authentication = simple [com.sunchemical.ldapapi.LDAPConnection] 20 Feb 2008 17:34:27,130 DEBUG :com.sunchemical.ldap.ads.host = 10.156.34.140 [com.sunchemical.ldapapi.LDAPConnection] 20 Feb 2008 17:34:27,130 DEBUG :com.sunchemical.ldap.ads.base.dn = dc=sunchem,dc=com [com.sunchemical.ldapapi.LDAPConnection] 20 Feb 2008 17:34:27,130 DEBUG :java.naming.security.protocol = ssl [com.sunchemical.ldapapi.LDAPConnection] 20 Feb 2008 17:34:27,130 DEBUG : com.sunchemical.ldap.ads.security.protocol = ssl [com.sunchemical.ldapapi.LDAPConnection] 20 Feb 2008 17:34:27,130 DEBUG :java.naming.security.credentials = [com.sunchemical.ldapapi.LDAPConnection] 20 Feb 2008 17:34:27,146 ERROR : Error in invoker.execute() [com.sunchemical.ldapapi.LDAPActionInvoker] javax.naming.CommunicationException: simple bind failed: 10.156.34.140:636. Root exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Could not find trusted certificate at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127) at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:390) at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:334) at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:193) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2597) at com.sun.jndi.ldap.LdapCtx.init(LdapCtx.java:275) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:173) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:191) at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java: 136) at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:6 6) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243) at javax.naming.InitialContext.init(InitialContext.java:219) at javax.naming.InitialContext.init(InitialContext.java:195) at javax.naming.directory.InitialDirContext.init(InitialDirContext.java:8 0) at com.sunchemical.ldapapi.LDAPConnection.createContext(Unknown Source) at com.sunchemical.ldapapi.LDAPActionInvoker.execute(Unknown Source) at com.sunchemical.admanagement.struts.controller.user.ResetUserPasswordAct ion.execute(ResetUserPasswordAction.java:61) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:484)
RE: Apache2 adn/or Tomcat6?
From: elvberg [mailto:[EMAIL PROTECTED] Subject: Re: Apache2 adn/or Tomcat6? ...and how do I do that? Unless you have an distinct need for httpd or you want to make your life much more complex, don't do it. Just configure Tomcat to use port 80 (and 443 for HTTPS, if you're using that), and you're done. Look in the conf/server.xml file. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JDBC driver JARs in a shared production environment
From: Kirchhoff, Florian [mailto:[EMAIL PROTECTED] Subject: JDBC driver JARs in a shared production environment Question: if you cannot place the JDBC driver jars in CATALINA_HOME/commons/lib, where can you put them? 1) Place the JDBC jars in $CATALINA_BASE/jdbc and modify the start-up script to include these jars on the CLASSPATH? 2) Deploy the JDBC jars in the WAR file (e.g. WEB-INF/lib/jdbc) and modify the start-up script to include these jar on the CLASSPATH? NEVER, NEVER, NEVER set CLASSPATH for use with Tomcat. 3) Deploy the JDBC jars and commons-dbcp.jar in the WAR in WEB-INF/lib? Yes. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FW: Certification Issue in production Tomcat server...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pranab, [EMAIL PROTECTED] wrote: | I am getting the security certification problem in a J2EE based | application which is running on our production Tomcat server [while attempting to contact LDAP server over SSL]. [snip] | Caused by: java.security.cert.CertificateException: Could not find | trusted certificate | | at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.a(DashoA6275) It may be that the internal checking code for Java has changed since I last encountered it, or you may be using JCE or something like that, but you used to be able to run code similar to the following to disable cert checking. I have this in a CVS repository that sometimes has to connect to servers with self-signed SSL certs: This code was written and tested on JDK 1.4.2_09. You need to execute this code before you attempt to make an SSL connection. ~import java.security.KeyManagementException; ~import java.security.NoSuchAlgorithmException; ~import javax.net.ssl.SSLContext; ~import javax.net.ssl.TrustManager; ~import javax.net.ssl.X509TrustManager; ~import javax.net.ssl.HttpsURLConnection; ~public static void disableSSLCertificateChecking() ~{ ~TrustManager[] trustAllCerts = new TrustManager[] { ~new X509TrustManager() { ~public X509Certificate[] getAcceptedIssuers() { ~return null; ~} ~public void checkClientTrusted(X509Certificate[] certs, ~ String authType) { ~} ~public void checkServerTrusted(X509Certificate[] certs, ~ String authType) { ~} ~} ~}; ~try ~{ ~SSLContext sc = SSLContext.getInstance(SSL); ~sc.init(null, trustAllCerts, new java.security.SecureRandom()); HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); ~} ~catch (KeyManagementException kme) ~{ ~kme.printStackTrace(); ~} ~catch (NoSuchAlgorithmException nsae) ~{ ~nsae.printStackTrace(); ~} ~} If you have access to the individial HttpURLConnection objects that will be used to make SSL connections, you can disable them on a per-instance basis by using HttpURLConnection.setSocketFactory(sc.getSocketFactory()) instead of using HttpURLConnection.setDefaultSSLSocketFactory and changing the socket factory globally. I hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAke/C8MACgkQ9CaO5/Lv0PByyACfTbdWkk20hU/gE6ny9yTfsPZw uIgAoIugkSSp/WElPDOxFhJl6lBTD0EV =Ozrr -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk + HTTP Push problems
See FlushPackets in http://tomcat.apache.org/connectors-doc/reference/apache.html Regards, Rainer Stephen More schrieb: I have created a Servlet that uses multipart/x-mixed-replace to push out data. ( See: http://www.servlets.com/jservlet2/examples/ch06/#ex06_13 ) This works perfectly fine between tomcat 5.5 and Firefox. When tomcat is front-ended with httpd + mod_jk, the live push no longer works. Is this a known deficiency in mod_jk or would this be a bug ? -Thanks Steve More - 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: JDBC driver JARs in a shared production environment
It makes sense to put the JDBC driver jars in the war but I had problems when I had a resource like the following in my context.xml: Resource name=jdbc/database url=jdbc:mysql://localhost:3306/art driverClassName=com.mysql.jdbc.Driver username=art password=art validationQuery=select 1 type=javax.sql.DataSource maxIdle=2 maxWait=5000 maxActive=4 / And doing a JNDI lookup for the Datasource. I ended up getting Class Not Found exceptions until I moved the Jar files into the Common Tomcat Lib directory. This was with Tomcat 6.0.14 and it was about 4-6 months ago. I've never got back into looking at it closer. Just food for thought. jfk -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Friday, February 22, 2008 12:30 PM To: Tomcat Users List Subject: RE: JDBC driver JARs in a shared production environment From: Kirchhoff, Florian [mailto:[EMAIL PROTECTED] Subject: JDBC driver JARs in a shared production environment Question: if you cannot place the JDBC driver jars in CATALINA_HOME/commons/lib, where can you put them? 1) Place the JDBC jars in $CATALINA_BASE/jdbc and modify the start-up script to include these jars on the CLASSPATH? 2) Deploy the JDBC jars in the WAR file (e.g. WEB-INF/lib/jdbc) and modify the start-up script to include these jar on the CLASSPATH? NEVER, NEVER, NEVER set CLASSPATH for use with Tomcat. 3) Deploy the JDBC jars and commons-dbcp.jar in the WAR in WEB-INF/lib? Yes. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JDBC driver JARs in a shared production environment
jfk, thank you for the feedback. What I found out is that the only way to get the JDBC driver in WEB-INF/lib to be found by the classloader is if you also place a copy of commons-dbcp.jar in your WAR AND you modify your context.xml to include this attribute: factory=org.apache.commons.dbcp.BasicDataSourceFactory I guess this scenario is exactly why the Tomcat dev team has to repackage the DBCP code into naming-factory-dbcp.jar. BTW the RH distribution of Tomcat also omits naming-factory-dbcp.jar, forcing you to use the factory attribute above, even when you don't include commons-dbcp.jar in your WAR. Florian -Original Message- From: Katilie, John [mailto:[EMAIL PROTECTED] Sent: Friday, February 22, 2008 2:20 PM To: Tomcat Users List Subject: RE: JDBC driver JARs in a shared production environment It makes sense to put the JDBC driver jars in the war but I had problems when I had a resource like the following in my context.xml: Resource name=jdbc/database url=jdbc:mysql://localhost:3306/art driverClassName=com.mysql.jdbc.Driver username=art password=art validationQuery=select 1 type=javax.sql.DataSource maxIdle=2 maxWait=5000 maxActive=4 / And doing a JNDI lookup for the Datasource. I ended up getting Class Not Found exceptions until I moved the Jar files into the Common Tomcat Lib directory. This was with Tomcat 6.0.14 and it was about 4-6 months ago. I've never got back into looking at it closer. Just food for thought. jfk -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Friday, February 22, 2008 12:30 PM To: Tomcat Users List Subject: RE: JDBC driver JARs in a shared production environment From: Kirchhoff, Florian [mailto:[EMAIL PROTECTED] Subject: JDBC driver JARs in a shared production environment Question: if you cannot place the JDBC driver jars in CATALINA_HOME/commons/lib, where can you put them? 1) Place the JDBC jars in $CATALINA_BASE/jdbc and modify the start-up script to include these jars on the CLASSPATH? 2) Deploy the JDBC jars in the WAR file (e.g. WEB-INF/lib/jdbc) and modify the start-up script to include these jar on the CLASSPATH? NEVER, NEVER, NEVER set CLASSPATH for use with Tomcat. 3) Deploy the JDBC jars and commons-dbcp.jar in the WAR in WEB-INF/lib? Yes. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JDBC driver JARs in a shared production environment
Chuck, thank you for your prompt feedback. I have a couple of follow-up questions below: 3) Deploy the JDBC jars and commons-dbcp.jar in the WAR in WEB-INF/lib? Yes. Great, that's what'll do. But is there anything one must be careful about in this case? For example should a particular version of DBCP be used for a given version of Tomcat? Question: if you cannot place the JDBC driver jars in CATALINA_HOME/commons/lib, where can you put them? 1) Place the JDBC jars in $CATALINA_BASE/jdbc and modify the start-up script to include these jars on the CLASSPATH? 2) Deploy the JDBC jars in the WAR file (e.g. WEB-INF/lib/jdbc) and modify the start-up script to include these jar on the CLASSPATH? NEVER, NEVER, NEVER set CLASSPATH for use with Tomcat. Although I know this to be a bad idea; I've seen many post telling users NOT to change the CP, however I want to be able to justify why this shouldn't be done (convince ops folks). Do you know of any documented discussion (the classpath how-to doesn't seem to address this). Thanks, Florian THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache2 adn/or Tomcat6?
I must've missed the place in the documentation where it explains how to get Tomcat to start as root, then drop privileges after opening listening sockets on low-numbered ports that are only accessible by root, like Apache HTTPD does. On most Unix-alikes, you have to choose: o tell people to use port 8080 or whatever nonprivileged port you configured; o use a packet-mangling firewall rule to remap port 80 to port 8080 or whatever; o place a proxy (such as Apache HTTPD) in front of Tomcat to forward port 80 traffic; o run Tomcat as root, allowing buggy app.s to make arbitrary changes anywhere on your server. If I ever have time to do something about that, I'll be sure to submit a patch. -- Mark H. Wood, Lead System Programmer [EMAIL PROTECTED] Typically when a software vendor says that a product is intuitive he means the exact opposite. pgpCDIbpZ5Mr3.pgp Description: PGP signature
Re: Apache2 adn/or Tomcat6?
Or as I mentioned in a recent email, you can run something like jsvc and set the user to 'tomcat' which allows you to bind to the port and then changes the user. Regards Alan Mark H. Wood wrote: I must've missed the place in the documentation where it explains how to get Tomcat to start as root, then drop privileges after opening listening sockets on low-numbered ports that are only accessible by root, like Apache HTTPD does. On most Unix-alikes, you have to choose: o tell people to use port 8080 or whatever nonprivileged port you configured; o use a packet-mangling firewall rule to remap port 80 to port 8080 or whatever; o place a proxy (such as Apache HTTPD) in front of Tomcat to forward port 80 traffic; o run Tomcat as root, allowing buggy app.s to make arbitrary changes anywhere on your server. If I ever have time to do something about that, I'll be sure to submit a patch. !DSPAM:47bf361642361264652389! - 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: JDBC driver JARs in a shared production environment
Florian, Thanks for the feedback. I'll give it a try! jfk -Original Message- From: Kirchhoff, Florian [mailto:[EMAIL PROTECTED] Sent: Friday, February 22, 2008 2:52 PM To: Tomcat Users List Subject: RE: JDBC driver JARs in a shared production environment jfk, thank you for the feedback. What I found out is that the only way to get the JDBC driver in WEB-INF/lib to be found by the classloader is if you also place a copy of commons-dbcp.jar in your WAR AND you modify your context.xml to include this attribute: factory=org.apache.commons.dbcp.BasicDataSourceFactory I guess this scenario is exactly why the Tomcat dev team has to repackage the DBCP code into naming-factory-dbcp.jar. BTW the RH distribution of Tomcat also omits naming-factory-dbcp.jar, forcing you to use the factory attribute above, even when you don't include commons-dbcp.jar in your WAR. Florian -Original Message- From: Katilie, John [mailto:[EMAIL PROTECTED] Sent: Friday, February 22, 2008 2:20 PM To: Tomcat Users List Subject: RE: JDBC driver JARs in a shared production environment It makes sense to put the JDBC driver jars in the war but I had problems when I had a resource like the following in my context.xml: Resource name=jdbc/database url=jdbc:mysql://localhost:3306/art driverClassName=com.mysql.jdbc.Driver username=art password=art validationQuery=select 1 type=javax.sql.DataSource maxIdle=2 maxWait=5000 maxActive=4 / And doing a JNDI lookup for the Datasource. I ended up getting Class Not Found exceptions until I moved the Jar files into the Common Tomcat Lib directory. This was with Tomcat 6.0.14 and it was about 4-6 months ago. I've never got back into looking at it closer. Just food for thought. jfk -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Friday, February 22, 2008 12:30 PM To: Tomcat Users List Subject: RE: JDBC driver JARs in a shared production environment From: Kirchhoff, Florian [mailto:[EMAIL PROTECTED] Subject: JDBC driver JARs in a shared production environment Question: if you cannot place the JDBC driver jars in CATALINA_HOME/commons/lib, where can you put them? 1) Place the JDBC jars in $CATALINA_BASE/jdbc and modify the start-up script to include these jars on the CLASSPATH? 2) Deploy the JDBC jars in the WAR file (e.g. WEB-INF/lib/jdbc) and modify the start-up script to include these jar on the CLASSPATH? NEVER, NEVER, NEVER set CLASSPATH for use with Tomcat. 3) Deploy the JDBC jars and commons-dbcp.jar in the WAR in WEB-INF/lib? Yes. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache2 adn/or Tomcat6?
I must've missed the place in the documentation where it explains how to get Tomcat to start as root, then drop privileges after opening listening sockets on low-numbered ports that are only accessible by root, like Apache HTTPD does. It's called the commons-daemon project. The linux compiled runtime of this project is jsvc. http://commons.apache.org/daemon/ --David Mark H. Wood wrote: I must've missed the place in the documentation where it explains how to get Tomcat to start as root, then drop privileges after opening listening sockets on low-numbered ports that are only accessible by root, like Apache HTTPD does. On most Unix-alikes, you have to choose: o tell people to use port 8080 or whatever nonprivileged port you configured; o use a packet-mangling firewall rule to remap port 80 to port 8080 or whatever; o place a proxy (such as Apache HTTPD) in front of Tomcat to forward port 80 traffic; o run Tomcat as root, allowing buggy app.s to make arbitrary changes anywhere on your server. If I ever have time to do something about that, I'll be sure to submit a patch. - 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: NIO Java or TC - What are u using it 4?
- Original Message - From: Filip Hanik - Dev Lists [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, February 22, 2008 5:59 PM Subject: Re: NIO Java or TC - What are u using it 4? you're subject has an or in it, what are you actually asking? What kind of projects make one want to move away from normal HttpServlets and start using the NIO stuff that TC has... I understand that it gives one all sorts of async control over the servlet... but I just cant think of examples of when one would use it. Occasionally I see a question or two here, and I'm wondering what practical things designers are using these power sockets for. There are lots of articles like this one http://www.ibm.com/developerworks/library/j-nioserver/ They espouse the power side... but no concrete examples of applications... Its not like people are all diving at it... so I'm wondering if there are times when its the only way to go... Also in TC there is another APR handler, how does that relate to NIO, when will one want to use any of these over the normal, and when APR and when NIO? Just trying to understand it... practical examples sounds like a good way to start... Thanks... Filip Johnny Kewl wrote: Cant contain my curiousity anymore? What practical applications is this been used for? I see theres a lot of control over the socket etc... but what are you guys actually doing with it? Trying to get rule of thumb for when one would move to it? --- HARBOR: http://coolharbor.100free.com/index.htm The most powerful application server on earth. The only real POJO Application Server. Making the Java dream come true. --- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.20.9/1293 - Release Date: 2/22/2008 9:21 AM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5 security policie read jar content
Filipe David Manana wrote: Hi, How can I specify in catalina.policy (tomcat 5.5) that a webapp can read the contents of any jar file within WEB-INF/lib/ ? (namely, read xml files within jar files) Webapps have this permission by default. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Http server + Tomcat
Hi, I am newbie to HTTP-server and tomcat installation and setup and thus requesting help in setting up a multi-tier web-server for my experimentation. The setup I want to do is as follows: 1.) one dedicated machine for http-server 2.) another machine for tomcat server I wanted to know which http server version to download and install and how to setup so that it calls the applications installed in the tomcat server. I have read that mod_jk module was used previously but am not sure if it is still required for the newer versions of http-server; if yes, then where to download it from. I have downloaded and compiled tomcat-5.5.25 (the latest version was giving me compilation problem). Thanks, -upendra _ Post ads for free - to sell, rent or even buy.www.yello.in http://ss1.richmedia.in/recurl.asp?pid=186
Http server + Tomcat
Hi, I am newbie to HTTP-server and tomcat installation and setup and thus requesting help in setting up a multi-tier web-server for my experimentation. The setup I want to do is as follows: 1.) one dedicated machine for http-server 2.) another machine for tomcat server I wanted to know which http server version to download and install and how to setup so that it calls the applications installed in the tomcat server. I have read that mod_jk module was used previously but am not sure if it is still required for the newer versions of http-server; if yes, then where to download it from. I have downloaded and compiled tomcat-5.5.25 (the latest version was giving me compilation problem). Thanks, -upendra _ Post free property ads on Yello Classifieds now! www.yello.in http://ss1.richmedia.in/recurl.asp?pid=220
Re: NIO Java or TC - What are u using it 4?
Well, you need it for Comet (unless you use the APR Connector which has similar functionality). I have a project that hasn't moved to Comet yet, but probably will do sometime this year, since the prototypes show a lot of promise. With Comet, you are basically setting up long-lived connections with the option of server-push (so you have some protocol wrapped in HTTP, e.g. SOAP), that needs to run for a long time before producing results. You also get 'sendfile' support, so if your site sends a lot of very large static files, you can win this way (mostly the reason to use it on Windows). Even with conventional Servlets, you can get a benifit for high-volume sites. But this depends on your OS, how much hardware you want to give it, and your Java vendor. Using the NIO Connector means that threads aren't tied up waiting on HTTP Keep-Alives, so if the cost of having 5000 threads blocking on input is high for you (e.g. true for Linux systems with older kernals), then the NIO Connector can lower your cost. For Solaris with Sun's JVM, Sun has implemented NIO better than APR has, so it should be a no-brainer. Like with most things, profile it against the app that you are actually using. That is the only way to know for sure if it is right for you ;). Johnny Kewl [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Cant contain my curiousity anymore? What practical applications is this been used for? I see theres a lot of control over the socket etc... but what are you guys actually doing with it? Trying to get rule of thumb for when one would move to it? --- HARBOR: http://coolharbor.100free.com/index.htm The most powerful application server on earth. The only real POJO Application Server. Making the Java dream come true. --- - 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: Custom URL handlers in Tomcat web app
Christopher Schultz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 MK, MK wrote: | I have the following problem: | My Web application needs to handle Lotus Notes URLs which use the scheme | notes. However, since Java does not know this protocol by default, it throws a | MalformedUrlException when I construct a java.net.URL from a notes:// URL-string. | | So, I read up on custom URL handlers and as far as I understand, you have to | code a custom URLStreamHandler class and a custom URLConnection class. You really only need a custom URLStreamHandler... if there's a URLConnection that you can re-use, you are welcome to do that. | Okay, no | big deal. However, there are three ways to register your new handler: | | 1) put it in the sun.net.www.protocol.yourprotocol package Don't do that. You probably can't do it anyway, since the JAR defining the package is likely to be sealed. | 2) put it in a custom package and declare that package to the JRE using the | java.protocol.handler.pkgs system property This is how I do it in my TestURLConnection package (http://sourceforge.net/projects/tuc). | 3) register a custom URLStreamHandlerFactory using URL.setUrlStreamHandlerFactory This might not work, since the javadoc says it may only be called once for a given JVM -- and Tomcat (or something else) might have don it before you get the chance to do so. Yes, TC registers one early on in the init phase to handle jndi://. | problem is, none of these approaches work in Tomcat 5.5. For 1), this simply | didn't have any effect for me. 2) neither, maybe Tomcat simply ignores that | property? How did you set the property? | 3) doesn't work because Tomcat already registers its own factory, and | for some reason I can't quite put my hands on you are not allowed to call that | method twice per JVM instance. Yeah, that's not surprising at all. | This issue is also discussed on Sun's Java issue tracker: | http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4648098 | | The ticket has been opened six years ago and still no fix! That is also not surprising. Bugs in Java seem to take forever to get fixed, if they ever get fixed. It's a shame, really. | Does Tomcat meanwhile have some workaround for this? I mean, I don't even need | an actual URL connection, I just want to pass custom URL strings, which should | be perfectly fine if they are valid URLs, no?! Do you have the opportunity to intercept these URL objects, or are they always handled somewhere that you can't inspect them. I'm wondering if you can convert a notes:// URL into, say, an http:// URL before attempting to call URL.openConnection. I don't know anything about notes://, so maybe it isn't even HTTP-compatible. I'm sure there's a way around this. Give us some more information and we'll see what we can do. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAke+9tYACgkQ9CaO5/Lv0PCu+QCfZR8fi+RMARH22QPpcZDjl4/o gUUAoL3sKYTDL6jznTmFu3QdOMZLX73N =Moqk -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NIO Java or TC - What are u using it 4?
Thanks Bill... ok I can kinda see it... ha ha I imagine a SP would look at it very carefully, more so than our typical application which is intranet and nowhere near massive volumes... The holding connections is interesting heres possibly a crazy scenariao, do you think this is possible and because I'm throwing it out there maybe one has to assume its on a generic servlet... If say one had remote video camera's pumping out IP packets... and a number of security surveillance stations... so the camera's are continously pumping packets, and users can connect and view that breaks the typical Http type model with these NIO sockets... possible do you think? ie holding the input sockets and feeding the users sockets as fast as possible, perhaps sometimes dropping packets on purpose... monitoring buffers etc... there I can see the threads are controlled directly and the connections are still held? Could TC NIO do that... taking for granted protocols? ... This NIO gives me a piping feel... if you know what I mean... I look at it and think, well if I emulate the buffer control that TC does damn well already... what for, but if I need to bridge things... it looks kinda cool... or if the client or server deviates too much from question - answer - which I think is what you also saying with the soap thing... maybe? - Original Message - From: Bill Barker [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Saturday, February 23, 2008 5:58 AM Subject: Re: NIO Java or TC - What are u using it 4? Well, you need it for Comet (unless you use the APR Connector which has similar functionality). I have a project that hasn't moved to Comet yet, but probably will do sometime this year, since the prototypes show a lot of promise. With Comet, you are basically setting up long-lived connections with the option of server-push (so you have some protocol wrapped in HTTP, e.g. SOAP), that needs to run for a long time before producing results. You also get 'sendfile' support, so if your site sends a lot of very large static files, you can win this way (mostly the reason to use it on Windows). Even with conventional Servlets, you can get a benifit for high-volume sites. But this depends on your OS, how much hardware you want to give it, and your Java vendor. Using the NIO Connector means that threads aren't tied up waiting on HTTP Keep-Alives, so if the cost of having 5000 threads blocking on input is high for you (e.g. true for Linux systems with older kernals), then the NIO Connector can lower your cost. For Solaris with Sun's JVM, Sun has implemented NIO better than APR has, so it should be a no-brainer. Like with most things, profile it against the app that you are actually using. That is the only way to know for sure if it is right for you ;). Johnny Kewl [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Cant contain my curiousity anymore? What practical applications is this been used for? I see theres a lot of control over the socket etc... but what are you guys actually doing with it? Trying to get rule of thumb for when one would move to it? --- HARBOR: http://coolharbor.100free.com/index.htm The most powerful application server on earth. The only real POJO Application Server. Making the Java dream come true. --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache2 adn/or Tomcat6?
you can run something like jsvc and set the user to 'tomcat' which allows you to bind Howto? /dan On Fri, 2008-02-22 at 12:57 -0800, Alan Chaney wrote: Or as I mentioned in a recent email, you can run something like jsvc and set the user to 'tomcat' which allows you to bind to the port and then changes the user. Regards Alan Mark H. Wood wrote: I must've missed the place in the documentation where it explains how to get Tomcat to start as root, then drop privileges after opening listening sockets on low-numbered ports that are only accessible by root, like Apache HTTPD does. On most Unix-alikes, you have to choose: o tell people to use port 8080 or whatever nonprivileged port you configured; o use a packet-mangling firewall rule to remap port 80 to port 8080 or whatever; o place a proxy (such as Apache HTTPD) in front of Tomcat to forward port 80 traffic; o run Tomcat as root, allowing buggy app.s to make arbitrary changes anywhere on your server. If I ever have time to do something about that, I'll be sure to submit a patch. !DSPAM:47bf361642361264652389! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Dan Östberg Berg Prästgården 840 40 SVENSTAVIK Sweden +46 730 48 36 39 Small Is Beautiful - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]