RE: Virtual Hosting with WAR files
Thanks to all. This setup has been tested on Apache2+JBoss+mod_jk-1.2.14_for MacOSX. And am sure it will work on other platforms as well. This setup also handles Apache related webapps.. Make the required entries in the DNS webapp.war: Extract the war file using zip and rename the folder with .war extension. Please put it in your deployment folder. mod-jk.so: Obtain the modjk.so library file from www.apache.org and place then in the modules folder. Apache-Virtual Host config -- NameVirtualHost *.*.*.*:80 VirtualHost *.*.*.*:80 ServerName webapp.robosoft.co.in ServerAlias www.webapp.robosoft.co.in ServerAdmin [EMAIL PROTECTED] DocumentRoot /Volumes/Extra/jboss/server/default/deploy/webapp.war JkMount /* loadbalancer DirectoryIndex index.html index.jsp ErrorLog logs/webapp-error_log CustomLog logs/webapp-access_log common /VirtualHost - mod-jk.conf LoadModule jk_module /opt/apache2/modules/mod_jk.so JkWorkersFile /opt/apache2/conf/workers.properties JkLogFile /opt/apache2/logs/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat %w %V %T JkMount /webapp.domain.com/*.jsp loadbalancer JkMountFile /opt/apache2/conf/uriworkermap.properties JkShmFile /opt/apache2/logs/jk.shm Location /jkstatus/ JkMount status Allow from all /Location -- Server.xml - Host name=webapp.domain.com debug=0 appBase=deploy unpackWARs=true Aliaswww.webapp.domain.com/Alias Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=webapp_log1. suffix=.log timestamp=true/ Context path= docBase=${jboss.server.home.dir}/deploy/webapp.war debug=0 reloadable=true/ /Host -- -- uriworkermap.properties /jmx-console=loadbalancer /jmx-console/*=loadbalancer /web-console=loadbalancer /web-console/*=loadbalancer /webapp.domain.com/*.jsp -- -- workers.properties worker.list=loadbalancer,status worker.webapp.port=8009 worker.webapp.host=webapp.domain.com worker.webapp.type=ajp13 worker.webapp.lbfactor=1 worker.webapp.cachesize=10 worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=library worker.loadbalancer.sticky_session=1 worker.loadbalancer.local_worker_only=1 worker.list=loadbalancer worker.status.type=status Regards Thanks Mahesh S Kudva Network Analyst Robosoft Technologies --- Robosoft Technologies - Partners in Product Development - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: virtual host and JkMount with jk1.2.14
Danico Lee wrote: i got tomcat5, apache1.3 and jk1.2.14. i'm very confused with JkMount. in my http.conf, i have: VirtualHost our_server:80 ServerName our_server DocumentRoot ${tomcat_home}/webapps/test1 JkAutoAlias ${tomcat_home}/webapps JkMount /test1/* worker1 /VirtualHost if i go to http://our_server/test1/, it works. but this is not what i want. i want it to be http://test1.our_server/ instead. i got this: Mod_jk can not be used for URL rewriting. It can mount only Tomcat contexts, so you will need to use the mod_rewrite for that. It has been explained here couple of times, so dig the archive :) Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Advice for Hosting Many Individual Webapps?
Hi, I very often deploy client's applications in multiple tomcat instances. It is normal and each application does not affect another. You just need a strong multiprocessor server with a lot of memory to sustain the last :) The only difference is that I often configure a separate apache instance for each tomcat instance. But one apache is also fine. I find this setup very comfortable when it comes to updating the application code or just restarting an application. Also, when one tomcat crashes, others run just fine. A tip here is to write/rewrite startup script so that it handles multiple instances of tomcat. It is also a good idea to create an environment profile file for each instance where you define stuff like JAVA_HOME or JAVA_OPTS for each instance separatelly and store it with the configuration. The development expense may be unneccessary if you only have one setup like that. I hope you are using the $CATALINA_HOME and $CATALINA_BASE variables to separate binaries from runtime/configuration files of each instance and you're not copying the whole tomcat tree. Think about file and process ownerships when web applications belong to different owners. If you want to ensure reliability then clone the machine and put a redirector in front of both. It scales very well and the user impact in case of trouble is not 100%. --Radek W. Seth Ladd wrote: Hello, We are finding outselves hosting more and more individual webapps, all running on Tomcat 5.5.9 w/ JDK 1.5. Each of these webapps is developed and deployed on a separate schedule, and the number and frequency of app deployments is increasing. The frequency is so much that the uptime of all of our applications is affected as we continually take down Tomcat servers in production to deploy a new application (or new version of the application). Because hot deploy does not work (the old favorite OOM error w/ too many redeploys), we bounce the Tomcat server for every redeploy. To avoid taking down all of our applications when we need to redeploy a single app, we've begun to deploy each application to their own Tomcat instance. All of these instances are fronted by a single Apache server handling vhosts, logging, etc. We're just curious how common this setup really is. We know we are in an uncommon position, with so many webapps (approaching 20, and growing very fast). We don't want to put all our eggs in one basket, so to speak, so we've begun to split out individual tomcat instances. Anyone else have to handle numerous webapps, with frequent deploys, and have to keep uptime for all apps as high as possible? We hesitate to put all webapps in one tomcat, because to deploy one app means we have to take down all of our apps. This is becoming unacceptable. (not to mention that a memory leak in one app will bring down all the apps living in that tomcat instance) Any tips or tricks would be really appreciated. Or pointers to previous material (I've found some, but nothing that jumped out at me). Thanks very much in advance, Seth - 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: org.apache.catalina.valves.RemoteHostValve issue
Tony Tomcat wrote: Does the RemoteHostValve work? There are no examples in the Tomcat 5 docs and the tomcat 4 docs have the following.. Valve className=org.apache.catalina.valves.RemoteHostValve allow=*.mycompany.com,www.yourcompany.com/ The docs have been updated for 4 and 5 not to use this example. The problem is that . is a special character in a regular expression and needs to be escaped if you want to match a single . character in your input. The regexp docs are the place to read up on this. The following should work but I haven't tried it. Valve className=org.apache.catalina.valves.RemoteHostValve allow=.*mycompany\.com,www\.yourcompany\.com/ Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Calculating required memory
From: Oleg [mailto:[EMAIL PROTECTED] I am trying to approximate the amount of memory my server will need running tomcat. I understand that a lot depends on how the appication handles resources, however at this point I am trying to figure out what will be the mimimum needed. In my case I have virtual hosting setup, with all hosts sharing the same libraries, so I have struts, hibernate,... all sitting in shared/lib directory of Tomcat. Would I be correct to estimate that Tomcat will atleast need n(number of users/applications) * mb(total size of shared/lib) As Chuck has already pointed out, no (but I'm going to try a slightly different angle on it :-) ). Each class that is loaded from shared/lib will be loaded by the Shared classloader, so you'll only have one copy of the class in your JVM. Jars are compressed, so the sizes of the loaded classes will be larger than the bytes occupied on disk; but not all of the classes from a jar will be loaded, so the sizes will probably be smaller. Note, however, that any classes in the webapp's WEB-INF/lib *will* be loaded once per webapp. If you have large numbers of applications, you may want to put more common libraries in shared/lib, and you may also wish to increase the size of the permanent generation (PermGen) in the JVM's memory model as this is where the classes are stored. Your per-session and per-page data will dwarf the space required for classes; and, as Chuck pointed out, the only way to find out these sizes is to profile the app. This will also make sure that you're not going to fall foul of any other performance limits, such as CPU use or disk bandwidth. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
can't find libjvm.so
Hello, I'm trying to setup java (edition from sun) on a linux(Scientific linux-Redhat Entreprise Edition 3)/intel Xeon 64 bit computer. I am not sure if this problem is related to that, but I'm getting the following problem when I try to startup tomcat: jsvc.exec debug: user changed to 'tomcat' jsvc.exec debug: Using specific JVM in /usr/java/jdk1.5.0_04/jre/lib/i386/server/libjvm.so jsvc.exec debug: Attemtping to load library /usr/java/jdk1.5.0_04/jre/lib/i386/server/libjvm.so jsvc.exec error: Cannot dynamically link to /usr/java/jdk1.5.0_04/jre/lib/i386/server/libjvm.so jsvc.exec error: /usr/java/jdk1.5.0_04/jre/lib/i386/server/libjvm.so: cannot open shared object file: No such file or directory jsvc.exec error: Service exit with a return value of 1 I tried run an example-java-program and it maybe loads the jvm, but not another shared library. The strange thing is that I have the libjvm.so in my /etc/ld.so.cache: ]# ldconfig -p | grep -i jvm libjvm.so (libc6) = /usr/java/jdk1.5.0_04/jre/lib/i386/client/libjvm.so libjvm.so (libc6) = /usr/java/jdk1.5.0_04/jre/lib/i386/server/libjvm.so thanks, Michel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: persistence with sessions distributable attribute
Hi Nishant, where did you read that distributable will *enforce* serializability? AFAIK distributable only means that your sessions can be distributed to different tomcat nodes (i.e. a cluster). It doesn't enforce anything, you have to make sure that your session attributes are serializable by yourself. I've done this for my testing environment with a SessionListener: public class SessionListener implements HttpSessionListener, HttpSessionAttributeListener { private ObjectOutputStream stream = new ObjectOutputStream(new OutputStream() { public void write(int b) {} }); public void attributeAdded(HttpSessionBindingEvent evt) { if (LOCAL_DEBUG) { // try to serialize attribute Object o = evt.getValue(); synchronized (stream) { try { stream.writeObject(o); } catch (IOException e) { System.err.println(evt.getName() + is not serializable: + e.getMessage()); e.printStackTrace(); } } } } ... } I disable LOCAL_DEBUG in the production environment, because trying to serialize every attribute is probably to expensive under heavy load. @Lintang: That wouldn't help any. If you put your attributes (which are not serializable) into a HashMap (which CAN (!) be serializable) the resulting object (map + attribute) still wouldn't be serializable. Serializable is more than just implementing the java.io.Serializable interface. greetings, Christoph Lintang JP wrote: hi Nishant, You might want to put all your session variable inside HashMap or other datatypes that implements Serializable, rather than put it just in a single variable. Refer to the javadocs, what are those Serializable data types are. Or maybe you can build your own class with something like this : public class StoredSessionValue implements Serializable { // your session variable goes here // your setter and getter method for those variables goes here } You did right on your distributable/ tags. On 8/17/05, Nishant Deshpande [EMAIL PROTECTED] wrote: Hoping for some help from the tomcat experts on this list. I want to ensure all objects stored in sessions are serializable. I read that I can put the distributable/ tag in my web.xml file to 'enforce' this. But I don't see any enforcing happening. I assumed it would throw exceptions at runtime when I did 'setAttribute(xxx, SomeNonSerializableObject)'. I have put 'distributable' in web.xml: web-app ... distributable/ ... /web-app I also have the following in server.xml: DefaultContext reloadable=true allowLinking=true Loader className=org.apache.catalina.loader.DevLoader reloadable=true debug=1/ Manager className=org.apache.catalina.session.PersistentManager pathname=/cv/data/tmp debug=5 saveOnRestart=true distributable=true Store className=org.apache.catalina.session.FileStore directory=/cv/data/tmp debug=5/ /Manager /DefaultContext Am I missing something? How is the serializability enforced? Also another question: the serialization does not happen in the directory i specify for Store above, rather it happens in the $CATALINA_HOME/work/Catalina/* directories. Any ideas about this one? Thanks, Nishant - 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.5.9: Resource not found
Hi, I have setup Tomcat 5.5.9 on Linux ES3. Initial configurations are completed. I'm also able to access the HTML files which are under the $CATALINA_HOME/webapps/jsp-examples through the web-server. But, if I put some HTMLs under my own directory under $CATALINA_HOME/webapps , I cannot access those pages. The webserver throws a : HTTP 404. Requested resource (.) not found error. This seems to be a very small problem but Im unable to get it running, Can somebody please help me out.. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.9: Resource not found
Hi Deepak, I had same problem with servlets. That can be resolved by adding servlet and servlet-mapping elements to the web.xml file. But i never faced a problem with the jsp or static content files. With Regards Litty Preeth --- Deepak Joshi [EMAIL PROTECTED] wrote: Hi, I have setup Tomcat 5.5.9 on Linux ES3. Initial configurations are completed. I'm also able to access the HTML files which are under the $CATALINA_HOME/webapps/jsp-examples through the web-server. But, if I put some HTMLs under my own directory under $CATALINA_HOME/webapps , I cannot access those pages. The webserver throws a : HTTP 404. Requested resource (.) not found error. This seems to be a very small problem but Im unable to get it running, Can somebody please help me out.. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.9: Resource not found
You need to configure the server.xml and web.xml file Under conf folder -Original Message- From: Litty Preeth [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 17, 2005 6:26 AM To: Tomcat Users List Subject: Re: Tomcat 5.5.9: Resource not found Hi Deepak, I had same problem with servlets. That can be resolved by adding servlet and servlet-mapping elements to the web.xml file. But i never faced a problem with the jsp or static content files. With Regards Litty Preeth --- Deepak Joshi [EMAIL PROTECTED] wrote: Hi, I have setup Tomcat 5.5.9 on Linux ES3. Initial configurations are completed. I'm also able to access the HTML files which are under the $CATALINA_HOME/webapps/jsp-examples through the web-server. But, if I put some HTMLs under my own directory under $CATALINA_HOME/webapps , I cannot access those pages. The webserver throws a : HTTP 404. Requested resource (.) not found error. This seems to be a very small problem but Im unable to get it running, Can somebody please help me out.. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - 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.5.9: Resource not found
Deepak , I forgot to tell smthing. U wont be able to access the resources directly if u r puttng them in the WEB-INF dir. But u wud be able to access them if u r putting them directly under ur appln dir. --- Litty Preeth [EMAIL PROTECTED] wrote: Hi Deepak, I had same problem with servlets. That can be resolved by adding servlet and servlet-mapping elements to the web.xml file. But i never faced a problem with the jsp or static content files. With Regards Litty Preeth --- Deepak Joshi [EMAIL PROTECTED] wrote: Hi, I have setup Tomcat 5.5.9 on Linux ES3. Initial configurations are completed. I'm also able to access the HTML files which are under the $CATALINA_HOME/webapps/jsp-examples through the web-server. But, if I put some HTMLs under my own directory under $CATALINA_HOME/webapps , I cannot access those pages. The webserver throws a : HTTP 404. Requested resource (.) not found error. This seems to be a very small problem but Im unable to get it running, Can somebody please help me out.. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Yahoo! Mail for Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Enabling CGI/Perl in Tomcat 5.5.9
Hi, I am facing some problems with enabling CGI in Tomcat 5.5.9. I followed the instructions given in the Manual, and renamed the servlets-cgi.renametojar under jakarta-tomcat-5.5.9\server\lib\ to servlets-cgi.jar. Further I modified the web.xml files to uncomment the CGI enabling part. Here they are servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-nameexecutable/param-name param-value/usr/local/bin/perl/param-value /init-param init-param param-namecgiPathPrefix/param-name param-value//param-value /init-param load-on-startup5/load-on-startup /servlet servlet-mapping servlet-namecgi/servlet-name url-pattern/3gcgi/*/url-pattern /servlet-mapping My context.xml file points to a directory outside the tomcat dir structure. It is Context path=/3gflex docBase=/usr/prod/3gflex allowLinking=true debug=0 !-- Default set of monitored resources -- WatchedResourceWEB-INF/web.xml/WatchedResource !-- Uncomment this to disable session persistence across Tomcat restarts -- !-- Manager pathname= / -- Resources className=org.apache.naming.resources.FileDirContext allowLinking=true / /Context The problem I am facing is that whatever perl scripts I have stored under /usr/prob/3gflex/, does not execute. But any perl script under any directory under /usr/prob/3gflex/ executes perfectly. The same if copied one level above fails. The error thrown is given below.. java.lang.StringIndexOutOfBoundsException: String index out of range: -2 java.lang.String.substring(String.java:1480) java.lang.String.substring(String.java:1447) org.apache.catalina.servlets.CGIServlet$CGIEnvironment.findCGI(CGIServlet.ja va:942) org.apache.catalina.servlets.CGIServlet$CGIEnvironment.setCGIEnvironment(CGI Servlet.java:1009) org.apache.catalina.servlets.CGIServlet$CGIEnvironment.init(CGIServlet.jav a:787) org.apache.catalina.servlets.CGIServlet.doGet(CGIServlet.java:591) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Can anyone please hep me on this one.. Thanks Madhusudan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple virtual hosts NEWBIE (UNCLASSIFIED)
Classification: UNCLASSIFIED Caveats: NONE Hey everyone, I am new to this whole thing. I just bought a domain HYPERLINK www.xxx.com www.xxx.com and will start developing my own app/website and will deploy it under Tomcat (The hosting company supports it). Now my friend has a domain HYPERLINK www.yyy.com www.yyy.com registered with yahoo which will be moved to the new company's DNS servers since yahoo doesn't have any support for tomcat. The question is how am I gonna host these two sites on the same tomcat instance ? Is this done through tomcat ? Is it even possible ? The hosting company supports having multiple domains under one main domain. Any suggestions ? Or maybe if you know of a good hosting company that supports tomcat, JSP/Servlets. I appreciate your input -Fadi Classification: UNCLASSIFIED Caveats: NONE
StandardManager EOFException
Hello, I am using Tomcat 5.0.28 which have always run fine but today I stopped tomcat to update my anti-virus and since that update, I am having the following error during tomcat starting: 17 août 2005 12:55:14 org.apache.catalina.session.StandardManager doLoad GRAVE: IOException lors du chargement des sessions persistantes: java.io.EOFException java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source) at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source) at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at java.io.ObjectInputStream.init(Unknown Source) at org.apache.catalina.util.CustomObjectInputStream.init( CustomObjectInputStream.java:56) at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java :384) at org.apache.catalina.session.StandardManager.load(StandardManager.java :343) at org.apache.catalina.session.StandardManager.start(StandardManager.java :657) at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:499) at org.apache.catalina.startup.ContextConfig.managerConfig( ContextConfig.java:315) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:635) at org.apache.catalina.startup.ContextConfig.lifecycleEvent( ContextConfig.java:216) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent( LifecycleSupport.java:119) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4290) at org.apache.catalina.core.ContainerBase.addChildInternal( ContainerBase.java:823) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.addChild( StandardHostDeployer.java:903) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java :216) at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256) at org.apache.commons.digester.Rule.end(Rule.java:276) at org.apache.commons.digester.Digester.endElement(Digester.java:1058) at org.apache.catalina.util.CatalinaDigester.endElement( CatalinaDigester.java:76) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1567) at org.apache.catalina.core.StandardHostDeployer.install( StandardHostDeployer.java:488) at org.apache.catalina.core.StandardHost.install(StandardHost.java:863) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java :483) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java :349) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent( LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) 17 août 2005 12:55:14 org.apache.catalina.session.StandardManager start GRAVE: Exception au chargement des sessions depuis le stockage persistant (persistent storage) java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source) at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source) at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at
Apache and Tomcat on separate hosts?
I finally got Apache2 + mod_jk2 + tomcat 4.1 working with tomcat doing vhosting on my laptop for development. The management said that is great that I should now roll it over to the dev servers before putting it into production. I started setting up everything and was down to creating the vhost in httpd.conf when I realized one fatal problem, Apache and Tomcat are on 2 separate servers. The way that I understand it, Apache finds a jsp page in it's docroot and if the host is in workers2.properties, it gets handed over to tomcat. If the webapp is not on the same box, how do you let apache find it to hand over to tomcat? My first thought was NFS, but the change control board frowns on any sort of filesharing among the servers. It's kind of important to get this properly working, is there any other way? Thanks. Jeff Schroeder Web Administrator Comair, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple virtual hosts NEWBIE (UNCLASSIFIED)
The question is how am I gonna host these two sites on the same tomcat instance ? Is this done through tomcat ? Is it even possible ? The hosting company supports having multiple domains under one main domain. Any suggestions ? Yes -- read the excellent Tomcat Configuration reference for the version of Tomcat you're running. Also, you may find the learning curve shorter if you install that version on your desktop system to experiment with... FWIW! -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache and Tomcat on separate hosts?
You can have the servers on different machines. Look more on mod_jk2 configuration. As I know, mod_jk2 project is no longer maintained so it's better to switch to mod_jk. Viorel Dragomir . .. --- - Original Message - From: Jeff Schroeder To: tomcat-user@jakarta.apache.org Sent: Wednesday, August 17, 2005 15:17 Subject: Apache and Tomcat on separate hosts? I finally got Apache2 + mod_jk2 + tomcat 4.1 working with tomcat doing vhosting on my laptop for development. The management said that is great that I should now roll it over to the dev servers before putting it into production. I started setting up everything and was down to creating the vhost in httpd.conf when I realized one fatal problem, Apache and Tomcat are on 2 separate servers. The way that I understand it, Apache finds a jsp page in it's docroot and if the host is in workers2.properties, it gets handed over to tomcat. If the webapp is not on the same box, how do you let apache find it to hand over to tomcat? My first thought was NFS, but the change control board frowns on any sort of filesharing among the servers. It's kind of important to get this properly working, is there any other way? Thanks. Jeff Schroeder Web Administrator Comair, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache and Tomcat on separate hosts?
Try ... In the workers2.properties Change host=ipaddressoftheremotemachine Regards Guru -Original Message- From: Jeff Schroeder [mailto:[EMAIL PROTECTED] Sent: 17 August 2005 14:17 To: tomcat-user@jakarta.apache.org Subject: Apache and Tomcat on separate hosts? I finally got Apache2 + mod_jk2 + tomcat 4.1 working with tomcat doing vhosting on my laptop for development. The management said that is great that I should now roll it over to the dev servers before putting it into production. I started setting up everything and was down to creating the vhost in httpd.conf when I realized one fatal problem, Apache and Tomcat are on 2 separate servers. The way that I understand it, Apache finds a jsp page in it's docroot and if the host is in workers2.properties, it gets handed over to tomcat. If the webapp is not on the same box, how do you let apache find it to hand over to tomcat? My first thought was NFS, but the change control board frowns on any sort of filesharing among the servers. It's kind of important to get this properly working, is there any other way? Thanks. Jeff Schroeder Web Administrator Comair, Inc. - 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: Re: Apache and Tomcat on separate hosts?
As I know, mod_jk2 project is no longer maintained so it's better to switch to mod_jk. With our java apps, mod_jk has an issue that causes apache to crash every 3-4 days. mod_jk2 does not, so it's doubtful we will be changing. Jeff Schroeder Web Administrator Comair, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple virtual hosts NEWBIE (UNCLASSIFIED)
Classification: UNCLASSIFIED Caveats: NONE Hassan, I appreciate your input. I went onto the site and I can't seem to find what I need. Could anyone please supply me with the URL of a reference manual ? I am using version 5.5.8 Thanks in advance. -Original Message- From: Hassan Schroeder [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 17, 2005 9:23 AM To: Tomcat Users List Subject: Re: Multiple virtual hosts NEWBIE (UNCLASSIFIED) The question is how am I gonna host these two sites on the same tomcat instance ? Is this done through tomcat ? Is it even possible ? The hosting company supports having multiple domains under one main domain. Any suggestions ? Yes -- read the excellent Tomcat Configuration reference for the version of Tomcat you're running. Also, you may find the learning curve shorter if you install that version on your desktop system to experiment with... FWIW! -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Classification: UNCLASSIFIED Caveats: NONE - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TomCat 5.5.9 - 8443
Now TomCat 5.5.9 can run with 8443 that I am so happy but need to have a certificate. I don't have any certificate so is there anyway for us to get free instead of pay to verisign? Paul Kimbrel [EMAIL PROTECTED] wrote: I've only used keytool - and it worked like a charm for me. -Original Message- From: Tom Spence [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 16, 2005 9:23 AM To: Tomcat Users List Subject: Re: TomCat 5.5.9 - 8443 Can I use ikeyman or keytool or both? Cuz, I need to use SSL like 8443 so bad... Paul Kimbrel wrote: Something I forgot to mention. When you are generating your certificate, it will ask for your first and last name. Enter the name of the server your appliation will be running on. In the case of development - this is usally localhost. Otherwise, the certificate will be rejected when your website loads. --PK On 8/15/2005, [EMAIL PROTECTED] wrote: It sounds like you need to set up an SSL certificate for Java. Here's a site that outlines how to do this: http://jasigch.princeton.edu:9000/display/CAS/Solving+SSL+issues To use this example, make sure you have your JAVA_HOME environment variable set properly (or replace it in the example with the appropriate value). Also, the example references %FILE_NAME%. Don't use this - in all the other places in the example, it uses server.crt - use that instead of the FILE_NAME variable. And finally, it will still pop up and ask you for the keystore pass code. Just enter changeit. And don't change it - until you've gotten down the road and figure out how all that works. I tried it once, and things got reallys screwed up. But once, you get that up and running, you should be gold! --PK On 8/15/2005, Tom Spence wrote: I can open http://localhost:8080 but, can't open https://localhost:8443 Any idea why? Of course I did uncomment at 8443 area in server.xml and set up by using keytool. Nothing happened. (__[TomCigar]___~~~ - 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] (__[TomCigar]___~~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] (__[TomCigar]___~~~
Re: Multiple virtual hosts NEWBIE (UNCLASSIFIED)
I appreciate your input. I went onto the site and I can't seem to find what I need. Could anyone please supply me with the URL of a reference manual ? I am using version 5.5.8 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ Good luck, -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TomCat 5.5.9 - 8443
Well, I don't know of any trusted certificate authorities that operate for free, but GoDaddy.com offers them for much less than Verisign (to the tune of $30/year rather than $350/year). On 8/17/2005, Tom Spence [EMAIL PROTECTED] wrote: Now TomCat 5.5.9 can run with 8443 that I am so happy but need to have a certificate. I don't have any certificate so is there anyway for us to get free instead of pay to verisign? Paul Kimbrel [EMAIL PROTECTED] wrote: I've only used keytool - and it worked like a charm for me. -Original Message- From: Tom Spence [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 16, 2005 9:23 AM To: Tomcat Users List Subject: Re: TomCat 5.5.9 - 8443 Can I use ikeyman or keytool or both? Cuz, I need to use SSL like 8443 so bad... Paul Kimbrel wrote: Something I forgot to mention. When you are generating your certificate, it will ask for your first and last name. Enter the name of the server your appliation will be running on. In the case of development - this is usally localhost. Otherwise, the certificate will be rejected when your website loads. --PK On 8/15/2005, [EMAIL PROTECTED] wrote: It sounds like you need to set up an SSL certificate for Java. Here's a site that outlines how to do this: http://jasigch.princeton.edu:9000/display/CAS/Solving+SSL+issues To use this example, make sure you have your JAVA_HOME environment variable set properly (or replace it in the example with the appropriate value). Also, the example references %FILE_NAME%. Don't use this - in all the other places in the example, it uses server.crt - use that instead of the FILE_NAME variable. And finally, it will still pop up and ask you for the keystore pass code. Just enter changeit. And don't change it - until you've gotten down the road and figure out how all that works. I tried it once, and things got reallys screwed up. But once, you get that up and running, you should be gold! --PK On 8/15/2005, Tom Spence wrote: I can open http://localhost:8080 but, can't open https://localhost:8443 Any idea why? Of course I did uncomment at 8443 area in server.xml and set up by using keytool. Nothing happened. (__[TomCigar]___~~~ - 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] (__[TomCigar]___~~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] (__[TomCigar]___~~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple virtual hosts NEWBIE (UNCLASSIFIED)
Start here: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/engine.html Then read the link for host. Simply put, for each website put a host element in for that site. But make sure you understand the default host. Doug - Original Message - From: Hassan Schroeder [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Wednesday, August 17, 2005 10:01 AM Subject: Re: Multiple virtual hosts NEWBIE (UNCLASSIFIED) I appreciate your input. I went onto the site and I can't seem to find what I need. Could anyone please supply me with the URL of a reference manual ? I am using version 5.5.8 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ Good luck, -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - 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: Multiple virtual hosts NEWBIE (UNCLASSIFIED)
Classification: UNCLASSIFIED Caveats: NONE Thanks for all your help. -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 17, 2005 10:21 AM To: Tomcat Users List Subject: Re: Multiple virtual hosts NEWBIE (UNCLASSIFIED) Start here: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/engine.html Then read the link for host. Simply put, for each website put a host element in for that site. But make sure you understand the default host. Doug - Original Message - From: Hassan Schroeder [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Wednesday, August 17, 2005 10:01 AM Subject: Re: Multiple virtual hosts NEWBIE (UNCLASSIFIED) I appreciate your input. I went onto the site and I can't seem to find what I need. Could anyone please supply me with the URL of a reference manual ? I am using version 5.5.8 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ Good luck, -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - 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] Classification: UNCLASSIFIED Caveats: NONE - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: webapp loading order...
Well Tomcat is not likely to do this for you so you would probably need to structure the app2 to wait for a trigger from app1. You could have app1 POST to a servlet in app2 and have that be the trigger for the dependent steps. Or have app1 write to a file that app2 will poll until it sees a trigger value it is set to look for. Joe R. Lindsay wrote: You may be right in a perfect world, but well... I don't think we'll get there this week. I have a 3rd party app that I am dependent on and I'd prefer to avoid the cost of rmi across multiple Tomcat instances. I don't give up easily so I am going to try to use the Tomcat manager app and just script the starting and stopping of applications rather than leave that to the vagaries of Tomcat. I am sure to find this imperfect but being an old ops guy, but control feels more deterministic to me...and I've enough datacenter surprise for this life. If anyone has tried this and gone down in flames, let me know or just have sympathy for me ;) Joe Lindsay email: [EMAIL PROTECTED] From: QM [mailto:[EMAIL PROTECTED] Sent: Tue 8/16/2005 5:30 PM To: Tomcat Users List Subject: Re: webapp loading order... On Tue, Aug 16, 2005 at 03:23:16PM -0700, Joe R. Lindsay wrote: : We have two webapps that communicate via jndi and : we need to have app2 wait for app1 to load before continuing. : Is there a way to force the order in which the webapps : are started? You could run the apps in separate Tomcat instances. In that case, you would explicitly define load order: the start script would start app1 in instance1, then app2 i instance2. That said, the spec doesn't cover this, as well it shouldn't -- apps should be fairly self-sufficient such that load order is irrelevant. -QM -- software -- http://www.brandxdev.net/ tech news -- http://www.RoarNetworX.com/ code scan -- http://www.JxRef.org/ - 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] -- Brian Cook Digital Services Analyst Print Time Inc. [EMAIL PROTECTED] 913.345.8900 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to delete log files (not append) ?
Hi, Hopefully this is an easy one... I'm running tomcat 4.1.31 and would like to have the log files delete each time I restart tomcat. Currently it's just appending to the log files. Here's a snippet of my server.xml is that helps: Server port=8005 shutdown=SHUTDOWN debug=0 Service name=Tomcat-Standalone Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8010 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / Engine name=Standalone defaultHost=localhost debug=0 Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.MemoryRealm/ Host name=localhost debug=0 appBase=c:\work\xerox\clt\trunk\build\webapps unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ Any ideas? Thanks, Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to delete log files (not append) ?
You can gain more control over Tomcat's logging process by using a log4j.properties file. Follow the instructions at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html For generating the log file each time you restart the server, add to the log4j.properties file a new one: log4j.appender.R.append = false Regards, Marius -Original Message- From: Ben Anderson [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 17, 2005 5:34 PM To: Tomcat Users List Subject: how to delete log files (not append) ? Hi, Hopefully this is an easy one... I'm running tomcat 4.1.31 and would like to have the log files delete each time I restart tomcat. Currently it's just appending to the log files. Here's a snippet of my server.xml is that helps: Server port=8005 shutdown=SHUTDOWN debug=0 Service name=Tomcat-Standalone Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8010 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / Engine name=Standalone defaultHost=localhost debug=0 Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.MemoryRealm/ Host name=localhost debug=0 appBase=c:\work\xerox\clt\trunk\build\webapps unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ Any ideas? Thanks, Ben - 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: persistence with sessions distributable attribute
I'm referring to this document on : http://www.onjava.com/pub/a/onjava/2004/04/14/clustering.html?page=2 The words Serializable here would mean for session replication, right ? CMIIW. On 8/17/05, Christoph Kutzinski [EMAIL PROTECTED] wrote: Hi Nishant, where did you read that distributable will *enforce* serializability? AFAIK distributable only means that your sessions can be distributed to different tomcat nodes (i.e. a cluster). It doesn't enforce anything, you have to make sure that your session attributes are serializable by yourself. I've done this for my testing environment with a SessionListener: public class SessionListener implements HttpSessionListener, HttpSessionAttributeListener { private ObjectOutputStream stream = new ObjectOutputStream(new OutputStream() { public void write(int b) {} }); public void attributeAdded(HttpSessionBindingEvent evt) { if (LOCAL_DEBUG) { // try to serialize attribute Object o = evt.getValue(); synchronized (stream) { try { stream.writeObject(o); } catch (IOException e) { System.err.println(evt.getName() + is not serializable: + e.getMessage()); e.printStackTrace(); } } } } ... } I disable LOCAL_DEBUG in the production environment, because trying to serialize every attribute is probably to expensive under heavy load. @Lintang: That wouldn't help any. If you put your attributes (which are not serializable) into a HashMap (which CAN (!) be serializable) the resulting object (map + attribute) still wouldn't be serializable. Serializable is more than just implementing the java.io.Serializable interface. greetings, Christoph Lintang JP wrote: hi Nishant, You might want to put all your session variable inside HashMap or other datatypes that implements Serializable, rather than put it just in a single variable. Refer to the javadocs, what are those Serializable data types are. Or maybe you can build your own class with something like this : public class StoredSessionValue implements Serializable { // your session variable goes here // your setter and getter method for those variables goes here } You did right on your distributable/ tags. On 8/17/05, Nishant Deshpande [EMAIL PROTECTED] wrote: Hoping for some help from the tomcat experts on this list. I want to ensure all objects stored in sessions are serializable. I read that I can put the distributable/ tag in my web.xml file to 'enforce' this. But I don't see any enforcing happening. I assumed it would throw exceptions at runtime when I did 'setAttribute(xxx, SomeNonSerializableObject)'. I have put 'distributable' in web.xml: web-app ... distributable/ ... /web-app I also have the following in server.xml: DefaultContext reloadable=true allowLinking=true Loader className=org.apache.catalina.loader.DevLoader reloadable=true debug=1/ Manager className=org.apache.catalina.session.PersistentManager pathname=/cv/data/tmp debug=5 saveOnRestart=true distributable=true Store className=org.apache.catalina.session.FileStore directory=/cv/data/tmp debug=5/ /Manager /DefaultContext Am I missing something? How is the serializability enforced? Also another question: the serialization does not happen in the directory i specify for Store above, rather it happens in the $CATALINA_HOME/work/Catalina/* directories. Any ideas about this one? Thanks, Nishant - 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] -- --- http://www.psychotazkia.or.id
session problems when using mod_jk (1.2.14) load balancing
Hi - I'm unable to get mod_jk load balancing working. The usual mod_jk setup works just fine, but using a load balancing worker however, is not. [Oddly, my webserver crashed during testing of this, but that could very well be unrelated] The problem is with user sessions. The instances (nodes) do not seem to recognize an already established session with the user and are creating new sessions. It's possible that is a session-stickiness issue, but it appears like the requests are hitting the same instance, just not getting the previously established session. As a result, I can't even reliably login to my application. I created a session listener for debugging purposes and it reports -no- destroyed sessions, but plenty of newly created sessions on both instances that make up the cluster. The session IDs, I noticed, have the jvmRoute name attached to them, which should be a good sign. I have a webserver running Apache (1.3.33), mod_jk (1.2.14), and an application server running the cluster -- 2 instances tomcat (5.0.28) on different ports. I added a unique jvmRoute to both instances in the server.xml: Engine name=Catalina defaultHost=localhost jvmRoute=dev_alexis Engine name=Catalina defaultHost=localhost jvmRoute=noah_alexis My worker.properties loadbalancer settings: worker.list=load_balancer_test worker.load_balancer_test.type=lb worker.load_balancer_test.balance_workers=bl_worker_dev,bl_worker_noah worker.load_balancer_test.sticky_session=true worker.load_balancer_test.sticky_session_force=false worker.bl_worker_dev.type=ajp13 worker.bl_worker_dev.host=alexis worker.bl_worker_dev.port=9003 worker.bl_worker_dev.lbfactor=1 worker.bl_worker_dev.socket_keepalive=1 worker.bl_worker_dev.recycle_timeout=300 worker.bl_worker_noah.type=ajp13 worker.bl_worker_noah.host=alexis worker.bl_worker_noah.port=8063 worker.bl_worker_noah.lbfactor=3 worker.bl_worker_noah.socket_keepalive=1 worker.bl_worker_noah.recycle_timeout=300 Any ideas, things I could try would be much appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: persistence with sessions distributable attribute
I didn't say that distributables don't have to implement java.io.Serializable. In fact they have to. I just had the impression (from your first post) that you thought by putting an non-serializable Attribute into a HashMap, the attribute would become serializable, too. Example: If you want to put a java.net.Socket into the session the session won't be distributable because Socket isn't Serializable. But if you put the Socket object into a java.util.HashMap (which implements Serializable) and put the map into the session, the session still wouldn't be distributable. This is because to serialize the session the HashMap and ALL its fields must be serialized. Because the Socket object is now part of the map, this won't work. Serializable is just a marker interface, i.e. the class just declares that is it serializable. You should read the Java Tutorial (somewhere in the JDK docs). There is explained what Serialization really means. Christoph Lintang JP wrote: I'm referring to this document on : http://www.onjava.com/pub/a/onjava/2004/04/14/clustering.html?page=2 The words Serializable here would mean for session replication, right ? CMIIW. On 8/17/05, Christoph Kutzinski [EMAIL PROTECTED] wrote: Hi Nishant, where did you read that distributable will *enforce* serializability? AFAIK distributable only means that your sessions can be distributed to different tomcat nodes (i.e. a cluster). It doesn't enforce anything, you have to make sure that your session attributes are serializable by yourself. I've done this for my testing environment with a SessionListener: public class SessionListener implements HttpSessionListener, HttpSessionAttributeListener { private ObjectOutputStream stream = new ObjectOutputStream(new OutputStream() { public void write(int b) {} }); public void attributeAdded(HttpSessionBindingEvent evt) { if (LOCAL_DEBUG) { // try to serialize attribute Object o = evt.getValue(); synchronized (stream) { try { stream.writeObject(o); } catch (IOException e) { System.err.println(evt.getName() + is not serializable: + e.getMessage()); e.printStackTrace(); } } } } ... } I disable LOCAL_DEBUG in the production environment, because trying to serialize every attribute is probably to expensive under heavy load. @Lintang: That wouldn't help any. If you put your attributes (which are not serializable) into a HashMap (which CAN (!) be serializable) the resulting object (map + attribute) still wouldn't be serializable. Serializable is more than just implementing the java.io.Serializable interface. greetings, Christoph Lintang JP wrote: hi Nishant, You might want to put all your session variable inside HashMap or other datatypes that implements Serializable, rather than put it just in a single variable. Refer to the javadocs, what are those Serializable data types are. Or maybe you can build your own class with something like this : public class StoredSessionValue implements Serializable { // your session variable goes here // your setter and getter method for those variables goes here } You did right on your distributable/ tags. On 8/17/05, Nishant Deshpande [EMAIL PROTECTED] wrote: Hoping for some help from the tomcat experts on this list. I want to ensure all objects stored in sessions are serializable. I read that I can put the distributable/ tag in my web.xml file to 'enforce' this. But I don't see any enforcing happening. I assumed it would throw exceptions at runtime when I did 'setAttribute(xxx, SomeNonSerializableObject)'. I have put 'distributable' in web.xml: web-app ... distributable/ ... /web-app I also have the following in server.xml: DefaultContext reloadable=true allowLinking=true Loader className=org.apache.catalina.loader.DevLoader reloadable=true debug=1/ Manager className=org.apache.catalina.session.PersistentManager pathname=/cv/data/tmp debug=5 saveOnRestart=true distributable=true Store className=org.apache.catalina.session.FileStore directory=/cv/data/tmp debug=5/ /Manager /DefaultContext Am I missing something? How is the serializability enforced? Also another question: the serialization does not happen in the directory i specify for Store above, rather it happens in the $CATALINA_HOME/work/Catalina/* directories. Any ideas about this one? Thanks, Nishant - 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: session problems when using mod_jk (1.2.14) load balancing
Try adding these two lines to worker.properties: worker.bl_worker_dev.domain=dev_alexis worker.bl_worker_noah.domain=noah_alexis -- Edgar Alves Mott Leroy wrote: Hi - I'm unable to get mod_jk load balancing working. The usual mod_jk setup works just fine, but using a load balancing worker however, is not. [Oddly, my webserver crashed during testing of this, but that could very well be unrelated] The problem is with user sessions. The instances (nodes) do not seem to recognize an already established session with the user and are creating new sessions. It's possible that is a session-stickiness issue, but it appears like the requests are hitting the same instance, just not getting the previously established session. As a result, I can't even reliably login to my application. I created a session listener for debugging purposes and it reports -no- destroyed sessions, but plenty of newly created sessions on both instances that make up the cluster. The session IDs, I noticed, have the jvmRoute name attached to them, which should be a good sign. I have a webserver running Apache (1.3.33), mod_jk (1.2.14), and an application server running the cluster -- 2 instances tomcat (5.0.28) on different ports. I added a unique jvmRoute to both instances in the server.xml: Engine name=Catalina defaultHost=localhost jvmRoute=dev_alexis Engine name=Catalina defaultHost=localhost jvmRoute=noah_alexis My worker.properties loadbalancer settings: worker.list=load_balancer_test worker.load_balancer_test.type=lb worker.load_balancer_test.balance_workers=bl_worker_dev,bl_worker_noah worker.load_balancer_test.sticky_session=true worker.load_balancer_test.sticky_session_force=false worker.bl_worker_dev.type=ajp13 worker.bl_worker_dev.host=alexis worker.bl_worker_dev.port=9003 worker.bl_worker_dev.lbfactor=1 worker.bl_worker_dev.socket_keepalive=1 worker.bl_worker_dev.recycle_timeout=300 worker.bl_worker_noah.type=ajp13 worker.bl_worker_noah.host=alexis worker.bl_worker_noah.port=8063 worker.bl_worker_noah.lbfactor=3 worker.bl_worker_noah.socket_keepalive=1 worker.bl_worker_noah.recycle_timeout=300 Any ideas, things I could try would be much appreciated. - 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: session problems when using mod_jk (1.2.14) load balancing
Beautiful - worked like a charm. That might take the cake as far as longest question to quickest, shortest answer goes. ha. Thanks a bunch. I might have to gripe about doucmentation in a second (nother thread).. Noah Edgar Alves wrote: Try adding these two lines to worker.properties: worker.bl_worker_dev.domain=dev_alexis worker.bl_worker_noah.domain=noah_alexis -- Edgar Alves Mott Leroy wrote: Hi - I'm unable to get mod_jk load balancing working. The usual mod_jk setup works just fine, but using a load balancing worker however, is not. [Oddly, my webserver crashed during testing of this, but that could very well be unrelated] The problem is with user sessions. The instances (nodes) do not seem to recognize an already established session with the user and are creating new sessions. It's possible that is a session-stickiness issue, but it appears like the requests are hitting the same instance, just not getting the previously established session. As a result, I can't even reliably login to my application. I created a session listener for debugging purposes and it reports -no- destroyed sessions, but plenty of newly created sessions on both instances that make up the cluster. The session IDs, I noticed, have the jvmRoute name attached to them, which should be a good sign. I have a webserver running Apache (1.3.33), mod_jk (1.2.14), and an application server running the cluster -- 2 instances tomcat (5.0.28) on different ports. I added a unique jvmRoute to both instances in the server.xml: Engine name=Catalina defaultHost=localhost jvmRoute=dev_alexis Engine name=Catalina defaultHost=localhost jvmRoute=noah_alexis My worker.properties loadbalancer settings: worker.list=load_balancer_test worker.load_balancer_test.type=lb worker.load_balancer_test.balance_workers=bl_worker_dev,bl_worker_noah worker.load_balancer_test.sticky_session=true worker.load_balancer_test.sticky_session_force=false worker.bl_worker_dev.type=ajp13 worker.bl_worker_dev.host=alexis worker.bl_worker_dev.port=9003 worker.bl_worker_dev.lbfactor=1 worker.bl_worker_dev.socket_keepalive=1 worker.bl_worker_dev.recycle_timeout=300 worker.bl_worker_noah.type=ajp13 worker.bl_worker_noah.host=alexis worker.bl_worker_noah.port=8063 worker.bl_worker_noah.lbfactor=3 worker.bl_worker_noah.socket_keepalive=1 worker.bl_worker_noah.recycle_timeout=300 Any ideas, things I could try would be much appreciated. - 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]
mod_jk documentation
Before I go gripe too, too much, let me just say that the mod_jk documentation has improved immensely since I start looking into it. Some of it might be simplied by the fact that I no longer consider jk2 in the picture which seemed to be adding some confusion. I don't know who is responsible for updating the documentation, so thought I'd post here. The documentation that I'm referring to is at: http://jakarta.apache.org/tomcat/connectors-doc/index.html load balancing page: Well, the load balancing page is empty, which is ok, but a link to the majority of load balancing explanation on the worker.properties page would be nice. domain property for a worker. I had to use the domain property on a worker to get load balancing working, which corresponds to the jvmRoute. I didn't see any mention of jvmRoute or domain anywhere however in either the load balancing section or the general worker properties. finally, and this may have annoyed me more than anything else - all throughout the load balancing documentation there are red, bolded lines like These workers should not appear in the worker.list property! in reference to balance_workers. But then in the example, they do exactly what they said should NOT be done: (bottom of this page) http://jakarta.apache.org/tomcat/connectors-doc/howto/workers.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP Precompilation
I am trying to use jasper2 to pre-compile the JSPs as part of build process. The compiler is complaining with the message: ERROR - the file 'blah/blah/jsp' generated the following general exception: java.lang.NullPointerException' After spending some time, i realized that the jsp files which had invalid usage of tags were the culprits. The errors disappeared after tag cleaning. Now this error is only coming for 2 files, and i am positive that there is nothing wrong with tags. What could be other possible reasons ? Is there any way of configuring the compiler to output detailed stacktrace, if it fails at any jsp file compilation. Tomcat version is 4.1. thanks, ramnish. ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What to do if you receive a 554 delivery error when posting
All, I believe I have tracked down and fixed the root cause of this issue. If anyone is still receiving these messages or starts to receive them in the future please forward them as per below. Mark Mark Thomas wrote: If you receive a 554 delivery failure message please forward the message *and the headers* to [EMAIL PROTECTED] or [EMAIL PROTECTED] The headers are particularly important. http://www1.physics.ox.ac.uk/help/spam.html contains information on how to make sure the mail you send me includes the headers. Although this page refers to spam messages I should stress that I do not believe the 554 messages are spam. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session problems when using mod_jk (1.2.14) load balancing
That should not work! The correct way to configure session stickyness is to use jvmRoute (which you already did) and then giving the workers the same names as the jvmRoute. That is instead of bl_worker_dev use dev_alexis and instead of bl_worker_noah use noah_alexis as the worker names. You should check, that the URLs produced by your application include the ;jsessionid=32Characters.jvmRoute or - in case you use cookies - the same info is in your session cookie. mod_jk then automatically strips the jvmRoute part from the session identifier and lloks for a worker of the same name. You will only need to use the domain attribute in case you have a lot of tomcat instances and some of them have the sessions replicated, others not. Then you can give all members of a replication domain the same domain name and mod_jk will know, that in case the correct worker is down, which alternatives are good. Beautiful - worked like a charm. That might take the cake as far as longest question to quickest, shortest answer goes. ha. Thanks a bunch. I might have to gripe about doucmentation in a second (nother thread).. Noah Edgar Alves wrote: Try adding these two lines to worker.properties: worker.bl_worker_dev.domain=dev_alexis worker.bl_worker_noah.domain=noah_alexis -- Edgar Alves Mott Leroy wrote: Hi - I'm unable to get mod_jk load balancing working. The usual mod_jk setup works just fine, but using a load balancing worker however, is not. [Oddly, my webserver crashed during testing of this, but that could very well be unrelated] The problem is with user sessions. The instances (nodes) do not seem to recognize an already established session with the user and are creating new sessions. It's possible that is a session-stickiness issue, but it appears like the requests are hitting the same instance, just not getting the previously established session. As a result, I can't even reliably login to my application. I created a session listener for debugging purposes and it reports -no- destroyed sessions, but plenty of newly created sessions on both instances that make up the cluster. The session IDs, I noticed, have the jvmRoute name attached to them, which should be a good sign. I have a webserver running Apache (1.3.33), mod_jk (1.2.14), and an application server running the cluster -- 2 instances tomcat (5.0.28) on different ports. I added a unique jvmRoute to both instances in the server.xml: Engine name=Catalina defaultHost=localhost jvmRoute=dev_alexis Engine name=Catalina defaultHost=localhost jvmRoute=noah_alexis My worker.properties loadbalancer settings: worker.list=load_balancer_test worker.load_balancer_test.type=lb worker.load_balancer_test.balance_workers=bl_worker_dev,bl_worker_noah worker.load_balancer_test.sticky_session=true worker.load_balancer_test.sticky_session_force=false worker.bl_worker_dev.type=ajp13 worker.bl_worker_dev.host=alexis worker.bl_worker_dev.port=9003 worker.bl_worker_dev.lbfactor=1 worker.bl_worker_dev.socket_keepalive=1 worker.bl_worker_dev.recycle_timeout=300 worker.bl_worker_noah.type=ajp13 worker.bl_worker_noah.host=alexis worker.bl_worker_noah.port=8063 worker.bl_worker_noah.lbfactor=3 worker.bl_worker_noah.socket_keepalive=1 worker.bl_worker_noah.recycle_timeout=300 Any ideas, things I could try would be much appreciated. - 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: session problems when using mod_jk (1.2.14) load balancing
Ok - noted. I changed it. It works without the domain as you noted. Thanks. Rainer Jung wrote: That should not work! The correct way to configure session stickyness is to use jvmRoute (which you already did) and then giving the workers the same names as the jvmRoute. That is instead of bl_worker_dev use dev_alexis and instead of bl_worker_noah use noah_alexis as the worker names. You should check, that the URLs produced by your application include the ;jsessionid=32Characters.jvmRoute or - in case you use cookies - the same info is in your session cookie. mod_jk then automatically strips the jvmRoute part from the session identifier and lloks for a worker of the same name. You will only need to use the domain attribute in case you have a lot of tomcat instances and some of them have the sessions replicated, others not. Then you can give all members of a replication domain the same domain name and mod_jk will know, that in case the correct worker is down, which alternatives are good. Beautiful - worked like a charm. That might take the cake as far as longest question to quickest, shortest answer goes. ha. Thanks a bunch. I might have to gripe about doucmentation in a second (nother thread).. Noah Edgar Alves wrote: Try adding these two lines to worker.properties: worker.bl_worker_dev.domain=dev_alexis worker.bl_worker_noah.domain=noah_alexis -- Edgar Alves Mott Leroy wrote: Hi - I'm unable to get mod_jk load balancing working. The usual mod_jk setup works just fine, but using a load balancing worker however, is not. [Oddly, my webserver crashed during testing of this, but that could very well be unrelated] The problem is with user sessions. The instances (nodes) do not seem to recognize an already established session with the user and are creating new sessions. It's possible that is a session-stickiness issue, but it appears like the requests are hitting the same instance, just not getting the previously established session. As a result, I can't even reliably login to my application. I created a session listener for debugging purposes and it reports -no- destroyed sessions, but plenty of newly created sessions on both instances that make up the cluster. The session IDs, I noticed, have the jvmRoute name attached to them, which should be a good sign. I have a webserver running Apache (1.3.33), mod_jk (1.2.14), and an application server running the cluster -- 2 instances tomcat (5.0.28) on different ports. I added a unique jvmRoute to both instances in the server.xml: Engine name=Catalina defaultHost=localhost jvmRoute=dev_alexis Engine name=Catalina defaultHost=localhost jvmRoute=noah_alexis My worker.properties loadbalancer settings: worker.list=load_balancer_test worker.load_balancer_test.type=lb worker.load_balancer_test.balance_workers=bl_worker_dev,bl_worker_noah worker.load_balancer_test.sticky_session=true worker.load_balancer_test.sticky_session_force=false worker.bl_worker_dev.type=ajp13 worker.bl_worker_dev.host=alexis worker.bl_worker_dev.port=9003 worker.bl_worker_dev.lbfactor=1 worker.bl_worker_dev.socket_keepalive=1 worker.bl_worker_dev.recycle_timeout=300 worker.bl_worker_noah.type=ajp13 worker.bl_worker_noah.host=alexis worker.bl_worker_noah.port=8063 worker.bl_worker_noah.lbfactor=3 worker.bl_worker_noah.socket_keepalive=1 worker.bl_worker_noah.recycle_timeout=300 Any ideas, things I could try would be much appreciated. - 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: Enabling CGI/Perl in Tomcat 5.5.9
I haven't tested any of this, I am working entirely from memory and the documentation. I think you have a security problem. As your system is configured a request for http://foo.bar.com/3gflex/3gcgi/somedir/myscript.cgi will look for the script at /usr/prod/3gflex/somedir/myscript.cgi but a request for http://foo.bar.com/3gflex/somedir/myscript.cgi will return the content of your script. You have two options. 1. Move all your cgi scripts under the WEB-INF directory. 2. Use extension mapping (which is now supported) rather than path mapping. The easiest fix will depend on how your application is structured. Extension mapping will look something like: servlet-mapping servlet-namecgi/servlet-name url-pattern*.cgi/url-pattern /servlet-mapping Mark A Madhusudan-A5324C wrote: Hi, I am facing some problems with enabling CGI in Tomcat 5.5.9. I followed the instructions given in the Manual, and renamed the servlets-cgi.renametojar under jakarta-tomcat-5.5.9\server\lib\ to servlets-cgi.jar. Further I modified the web.xml files to uncomment the CGI enabling part. Here they are servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-nameexecutable/param-name param-value/usr/local/bin/perl/param-value /init-param init-param param-namecgiPathPrefix/param-name param-value//param-value /init-param load-on-startup5/load-on-startup /servlet servlet-mapping servlet-namecgi/servlet-name url-pattern/3gcgi/*/url-pattern /servlet-mapping My context.xml file points to a directory outside the tomcat dir structure. It is Context path=/3gflex docBase=/usr/prod/3gflex allowLinking=true debug=0 !-- Default set of monitored resources -- WatchedResourceWEB-INF/web.xml/WatchedResource !-- Uncomment this to disable session persistence across Tomcat restarts -- !-- Manager pathname= / -- Resources className=org.apache.naming.resources.FileDirContext allowLinking=true / /Context The problem I am facing is that whatever perl scripts I have stored under /usr/prob/3gflex/, does not execute. But any perl script under any directory under /usr/prob/3gflex/ executes perfectly. The same if copied one level above fails. The error thrown is given below.. java.lang.StringIndexOutOfBoundsException: String index out of range: -2 java.lang.String.substring(String.java:1480) java.lang.String.substring(String.java:1447) org.apache.catalina.servlets.CGIServlet$CGIEnvironment.findCGI(CGIServlet.ja va:942) org.apache.catalina.servlets.CGIServlet$CGIEnvironment.setCGIEnvironment(CGI Servlet.java:1009) org.apache.catalina.servlets.CGIServlet$CGIEnvironment.init(CGIServlet.jav a:787) org.apache.catalina.servlets.CGIServlet.doGet(CGIServlet.java:591) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Can anyone please hep me on this one.. Thanks Madhusudan - 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]
Apache2...TC4.1.30...mod_jk odd behavior
Hello I am getting odd behavior w/TC4.1.30 and the configurations below. www.vhost01.com www.vhost01.com/hello.jsp work and as expected www.vhost02.com www.vhost02.com/sb/hello.jsp work NOT as expected. As implied in the server.xml snipette the tomcat serving directory is the typical /webapps/op for vhost01 /webapps/sb for vhost02. (Its a perverse mgt story why they are not vhost01 vhost02). The configs are, afaiks, identical parameterized as needed. www.vhost02.com/hello.jsp should work. Ideas? tia httpd.conf VirtualHost 192.168.2.100 ServerName www.vhost01.com ServerAdmin [EMAIL PROTECTED] DocumentRoot D:/Projects01/vhost01/site ErrorLog D:/Projects01/vhost01/logs/error_log CustomLog D:/Projects01/vhost01/logs/access_log common JkMount /*.jsp connect_cp JkMount /servlet/* connect_cp /VirtualHost VirtualHost 192.168.2.100 ServerName www.vhost02.com ServerAdmin [EMAIL PROTECTED] DocumentRoot D:/Projects01/vhost02/site ErrorLog D:/Projects01/vhost02/logs/error_log CustomLog D:/Projects01/vhost02/logs/access_log common JkMount /*.jsp connect_sb JkMount /servlet/* connect_sb /VirtualHost server.xml Host name=www.vhost01.com debug=0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=op. suffix=.txt timestamp=true/ Context path= docBase=webapps/op debug=1 appBase=webapps/op reloadable=true/ Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=virtual_log. suffix=.txt pattern=common/ /Host Host name=www.vhost02.com debug=0 unpackWARs=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=sb. suffix=.txt timestamp=true/ Context path= docBase=webapps/sb debug=1 appBase=webapps/sb reloadable=true/ Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=virtual_log. suffix=.txt pattern=common/ /Host properties workers.tomcat_home E:\Program Files\Tomcat 4.1 workers.java_home=$JAVA_HOME ps\ worker.list=ajp12, ajp13, connect_cp, connect_sb worker.connect_cp.port=8009 worker.connect_cp.host=www.vhost01.com worker.connect_cp.type=ajp13 worker.connect_sb.port=8009 worker.connect_sb.host=www.vhost02.com worker.connect_sb.type=ajp13 __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Http-status 500 error in Tomcat 4.1
Hello All, I am using Tomcat 4.1. I just started working in it, so this asking may be childish, if so, pls don't mistake me. Here is my webapp structure: 1. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\classes -here i have my servlet classes 2. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\jsp -here i have a sample.htmfile 3. C:\Program Files\Apache Group\Tomcat 4.1\webapps\testapp\WEB-INF -here is the web.xml resides my web.xml entry is like this: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-nameTestServlet/servlet-name servlet-classTestServlet/servlet-class /servlet servlet-mapping servlet-nameTestServlet/servlet-name url-pattern/TestServlet/url-pattern /servlet-mapping /web-app -- the sample.htm has the following entries: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titleUntitled Document/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body pfont color=#99Hello, Welcome!/font /p form action=http:\\localhost:8080\testapp\TestServlet method=post name=form1 target=_self input type=submit name=Submit value=Click Me /form pnbsp; /p /body /html --- Here is what I done: 1. I started the Tomcat server 2. opened the IE browser and http://localhost:8080/testapp/jsp/sample.htm; 3. clicked the button which gives the error HTTP Status 500 - TestServlet is not found Please tell me what is the problem? -- ilu, subi