tomcat url rewrite
I get a problem with the URL. My application has url rewrite for SEO. I use this format http://mydomain/item.html for display. There is an error that if the item name like LF/123, then the url become http://mydomain/LF/123.html. Because of the name include / character. I got the error like tomcat think i has a directory named LF under my application root directory. I dont know this question belong tomcat or url rewrite. -- View this message in context: http://www.nabble.com/tomcat---url-rewrite-tp25395691p25395691.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
WILLIAMer wrote: I get a problem with the URL. My application has url rewrite for SEO. I use this format http://mydomain/item.html for display. There is an error that if the item name like LF/123, then the url become http://mydomain/LF/123.html. Because of the name include / character. I got the error like tomcat think i has a directory named LF under my application root directory. I dont know this question belong tomcat or url rewrite. William, Tomcat is right. I think it is the concept of your application that needs to be revisited. The / character is *universally* considered as a path separator under HTTP, and as a directory separator under most OS (including Windows). You may be able to find some solution that will work in some cases, but you will anyway have problems with this sooner or later somwhere else. I suggest that you change your item names, rather than trying to patch this stuff left and right. You will save yourself a lot of trouble in the long run. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
On 11/09/2009 08:07, André Warnier wrote: WILLIAMer wrote: I get a problem with the URL. My application has url rewrite for SEO. I use this format http://mydomain/item.html for display. There is an error that if the item name like LF/123, then the url become http://mydomain/LF/123.html. Because of the name include / character. I got the error like tomcat think i has a directory named LF under my application root directory. I dont know this question belong tomcat or url rewrite. William, Tomcat is right. I think it is the concept of your application that needs to be revisited. The / character is *universally* considered as a path separator under HTTP, and as a directory separator under most OS (including Windows). You may be able to find some solution that will work in some cases, but you will anyway have problems with this sooner or later somwhere else. I suggest that you change your item names, rather than trying to patch this stuff left and right. You will save yourself a lot of trouble in the long run. As a wise* old man once said: SEO - 'tis the very Devil's work m'lord. This type of problem falls firmly into the try-and-build-properly rather-than-fix-it-with-solutions-that-use-constantly-moving-goalposts. Is it all static content, or are you loading from a database? p * Or possibly, a wizened old man. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
3 question for the form
Hi 3 question for the form 1) Under What condition the MaxThreads should be increased in server.xml? maxThreads=150 when SSL is Configured with APACHE2x / Tomcat 6.0.2.0 setup 2) Is there a Process / Command to constantly monitor maxThreads this thread activity? 3) Does this same rules applies for TOMCAT embedded within JBOSS 4.2.1 Appserver? With regards Karthik
Re: 3 question for the form
Karthik Nanjangude wrote: Hi 3 question for the form 1) Under What condition the MaxThreads should be increased in server.xml? maxThreads=150 when SSL is Configured with APACHE2x / Tomcat 6.0.2.0 setup 2) Is there a Process / Command to constantly monitor maxThreads this thread activity? 3) Does this same rules applies for TOMCAT embedded within JBOSS 4.2.1 Appserver? Hi. I suggest you search this forum's archives (or Google), because there are lots of threads related to these issues. In particular, there is a recent thread here, entitled : mod_jk fails to forward request on high traffic The OP also pointed out a good document to get a basic understanding of these issues : http://kbase.redhat.com/faq/docs/DOC-15866 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Does CVE-2007-0450 (Directory Traversal) affect standalone Tomcat
Tadelkar, Gauravsagar (Gaurav) wrote: Thanks for the reply, Mark. If possible, can you please point to any references/docs which would help me convince others about the directory traversal vulnerability not impacting a standalone tomcat? Even an explanation would help. I would have thought the phrase When Tomcat is used behind a proxy... was pretty self explanatory. Mark I personally do agree that upgrading the tomcat is surely the thing to do rather than looking for alternatives, but this is something beyond my powers in this case :-) Thanks once again. Gaurav -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Wednesday, September 09, 2009 1:49 PM To: Tomcat Users List Subject: Re: Does CVE-2007-0450 (Directory Traversal) affect standalone Tomcat Tadelkar, Gauravsagar (Gaurav) wrote: I have a tomcat at version 5.5.15 in a standalone mode and due to some compulsions cannot upgrade it. Does the directory traversal vulnerability affect tomcat in a standalone mode (the 5.5.15 ver does not have a fix to this vulnerability)? No it doesn't. However, there are plenty of other vulnerabilities (eg CVE-2008-5515) that do. Alternately, is there a way I can secure/work around this vulnerability without upgrading? You'd have to look at each vulnerability on a case by case basis. Upgrading to 5.5.28 is likely to be less painful than any of the alternatives. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: 3 question for the form
Hi Thx for the quick reply Googled / yahooed :( But need some satisfying answers Please do the need full With regards Karthik -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Friday, September 11, 2009 1:28 PM To: Tomcat Users List Subject: Re: 3 question for the form Karthik Nanjangude wrote: Hi 3 question for the form 1) Under What condition the MaxThreads should be increased in server.xml? maxThreads=150 when SSL is Configured with APACHE2x / Tomcat 6.0.2.0 setup 2) Is there a Process / Command to constantly monitor maxThreads this thread activity? 3) Does this same rules applies for TOMCAT embedded within JBOSS 4.2.1 Appserver? Hi. I suggest you search this forum's archives (or Google), because there are lots of threads related to these issues. In particular, there is a recent thread here, entitled : mod_jk fails to forward request on high traffic The OP also pointed out a good document to get a basic understanding of these issues : http://kbase.redhat.com/faq/docs/DOC-15866 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Shared jars
Tim Berglund wrote: I'm trying to enable the shared classloader on Tomcat 6.0.20 (Java 1.6.0_15 on Mac OSX 10.6). I've put this line in conf/catalina.properties: shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar I've dumped a few dozen jars in the shared/lib directory. These are found when I start Tomcat, but the jars in a deployed WAR are not found. The problem manifests itself as a ClassNotFoundException on on org.hibernate.SessionFactory, which is located in the web app's WEB-INF/lib directory, and not the shared/lib directory. As a test, I added the web app's lib dir to the shared loader, like this: shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar,${catalina.base}/webapps/WorkList/WEB-INF/lib/*.jar That's obviously bad as an actual fix, but the app loads in that configuration. Any ideas? What I'd like is the shared class loader as a supplement to the webapp classloader. At a guess, something in shared depends on hibernate. The shared loader is visible to the web app but the web app loader is not visible to shared. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 3 question for the form
Karthik Nanjangude wrote: Hi 3 question for the form 1) Under What condition the MaxThreads should be increased in server.xml? When the current load utilises all threads and you want to handle a higher load. 2) Is there a Process / Command to constantly monitor maxThreads this thread activity? Yes. Several. JVisualVM is rather nice. 3) Does this same rules applies for TOMCAT embedded within JBOSS 4.2.1 Appserver? Yes. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat fail to start : Socket bind failed: [22] Invalid argument
Hi, I've a tomcat (6.0.18) running on an ubuntu 9.04 (64bit) that run a Jira and a personnal webapp that somehow stop to works. I didn't change anything to the tomcat configuration or webapps. Tomcat was using APR and is linked to Apache 2 with modjk. One day I noticed that tomcat was not running, so I try to start it and I get this error : Sep 2, 2009 3:42:25 PM org.apache.coyote.http11.Http11AprProtocol init SEVERE: Error initializing endpoint java.lang.Exception:* Socket bind failed: [22] Invalid argument* at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:623) at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107) at org.apache.catalina.connector.Connector.initialize(Connector.java:1058) at org.apache.catalina.core.StandardService.initialize(StandardService.java:677) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795) at org.apache.catalina.startup.Catalina.load(Catalina.java:535) at org.apache.catalina.startup.Catalina.load(Catalina.java:555) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412) Sep 2, 2009 3:42:25 PM org.apache.catalina.startup.Catalina load SEVERE: Catalina.start L*ifecycleException: Protocol handler initialization failed: java.lang.Exception: Socket bind failed: [22] Invalid argument* at org.apache.catalina.connector.Connector.initialize(Connector.java:1060) at org.apache.catalina.core.StandardService.initialize(StandardService.java:677) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795) at org.apache.catalina.startup.Catalina.load(Catalina.java:535) at org.apache.catalina.startup.Catalina.load(Catalina.java:555) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412) Sep 2, 2009 3:42:25 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1340 ms Sep 2, 2009 3:42:25 PM org.apache.catalina.core.StandardService start I've googled and find only old post related to APR. APR has been compiled this way : sudo aptitude install make gcc gcc-4.2 gcc-4.2-locales gcc-4.2-multilib libapr1-dev cd /usr/local/apache-tomcat-6.0.18/bin/ tar zxf tomcat-native.tar.gz cd /usr/local/apache-tomcat-6.0.18/bin/tomcat-native-1.1.14-src/jni/native ./configure --with-apr=/usr/bin/apr-config; make; sudo make install cd /usr/lib sudo ln -s /usr/local/apr/lib/libtcnative-1.so.0.1.14 libtcnative-1.so and, it was working : tho...@home:/home/special/tomcat/logs$ cat catalina.out Oct 18, 2008 9:13:02 PM org.apache.catalina.core.AprLifecycleListener init *INFO: Loaded APR based Apache Tomcat Native library 1.1.14.* Oct 18, 2008 9:13:02 PM org.apache.catalina.core.AprLifecycleListener init *INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].* Oct 18, 2008 9:13:02 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: Failed to initialize the SSLEngine. Oct 18, 2008 9:13:02 PM org.apache.coyote.http11.Http11AprProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Oct 18, 2008 9:13:02 PM org.apache.coyote.ajp.AjpAprProtocol init INFO: Initializing Coyote AJP/1.3 on ajp-8009 Oct 18, 2008 9:13:02 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 708 ms So I've tryed to upgrade to tomcat 6.0.20 without APR installed, no change. (I'm still using this version now) Regarding the port bind issue : tho...@home:/home/special/tomcat/conf$ grep port server.xml Server port=8005 shutdown=SHUTDOWN !-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -- Define a non-SSL HTTP/1.1 Connector on port 8080 Connector port=8080 protocol=HTTP/1.1 port=8080 protocol=HTTP/1.1 !-- Define a SSL HTTP/1.1 Connector on port 8443 Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true !-- Define an AJP 1.3 Connector on port 8009 -- !--Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /-- !-- You should set jvmRoute to support load-balancing via AJP ie : *Standart ports configured : 8080, 8005, 8009* tho...@home:/home/special/tomcat/logs$ /bin/ps -ef | grep java thomas 12628 10333 0 10:21 pts/000:00:00 grep --color=auto java *no java running*
Re: Tomcat fail to start : Socket bind failed: [22] Invalid argument
Thomas Manson wrote: any ideas? You are still using APR (references to org.apache.coyote.http11.Http11AprProtocol in the logs) and hitting the ipv6 bug. You need to do one of the following: - disable APR - disable ipv6 - use 6.0.20 with tc native 1.1.16 Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to configure Tomcat 6.0 with JAAS?
Hi , Can you give me details of configuring Custom LoginModule in Tomcat6.0.18. Where exactly did you place the custom LoginModuleImpl and principle classes? I tried to configure it but i am getting the following exception. javax.security.auth.login.LoginException: unable to find LoginModule class: com.test.loginmodule.SampleLoginModule at javax.security.auth.login.LoginContext.invoke(LoginContext.java:808) at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186) at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680) at javax.security.auth.login.LoginContext.login(LoginContext.java:579) at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:399) at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:323) at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) dahoffer wrote: Thanks, if possible could you/someone send some examples of how to configure JAAS with JBoss? I have it working with Tomcat but need the minimum configuration to do the same for JBoss. Note, I have a servlet that at startup sets the JAAS configuration, i.e. Configuration.setConfiguration(configuration) which sets the LoginModule to use. I just need to know how to configure JBoss to work with this LoginModule. -Dave On Tue, May 12, 2009 at 10:56 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: How to configure Tomcat 6.0 with JAAS? ... though JBoss uses Tomcat as its default servlet container Unfortunately, JBoss does not use Tomcat's authentication - it has its own. When we wrote JAAS modules for use on our proprietary OS, we had to do separate implemenations for JBoss and Tomcat. - 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. -- View this message in context: http://www.nabble.com/How-to-configure-Tomcat-6.0-with-JAAS--tp23489670p25398035.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
Thanks for replies. To awarnier: Change the item name will lost the SEO for this item. To Pid-6: It is dynamic page and item data are from database. I use url rewrite for looking like static page. So the tomcat is right. I must think another way. Thanks all. -- View this message in context: http://www.nabble.com/tomcat---url-rewrite-tp25395691p25398479.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: 3 question for the form
Hi Thx for the quick reply When the current load utilizes all threads and you want to handle a higher load Does this mean the Container Complaint's via some logged o/p during the max load ? If yes What would the be the exception typos. With regards Karthik -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Friday, September 11, 2009 2:11 PM To: Tomcat Users List Subject: Re: 3 question for the form Karthik Nanjangude wrote: Hi 3 question for the form 1) Under What condition the MaxThreads should be increased in server.xml? When the current load utilises all threads and you want to handle a higher load. 2) Is there a Process / Command to constantly monitor maxThreads this thread activity? Yes. Several. JVisualVM is rather nice. 3) Does this same rules applies for TOMCAT embedded within JBOSS 4.2.1 Appserver? Yes. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
reply_timeout
Hi there, I have a webservice running in Apache-Tomcat (6.0.16) on a Windows 2003 server. It's running fine for quite a while now. The WS is a process that generates PDF documents. Today we experienced a reply timeout, because the process of generating the PDF took more time than usual. The PDF was created successfully, but the client-app got the timeout error. Is there a way of increasing the value of the reply-timeout? Kind regards, Vivian Pieters -- View this message in context: http://www.nabble.com/reply_timeout-tp25398902p25398902.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
On 11/09/2009 11:18, WILLIAMer wrote: Thanks for replies. To awarnier: Change the item name will lost the SEO for this item. To Pid-6: It is dynamic page and item data are from database. I use url rewrite for looking like static page. Why not just make the URLs in such a way that you can look them up in the database? A servlet Filter could perform the same task in one go that your rewrite db lookup is doing. /some/path/to/file.ext Parse the URL, look up the page or object in the DB and then perform a forward using a RequestDispatcher. p So the tomcat is right. I must think another way. Thanks all. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problem Servlets (again?)
How do I get servlets to work on tomcat 6.0.20 ? HTML and JSPs are working for me. Ok, I know it seems that this question turns up a lot (for previous releases), having Googled and read many sites over the last week. But none of the advice works for me. So, I am turning to the list. Detaisl fo what i have been trying to do follow Followed a tutorial on the javaboutique web site; actually seems to be for tomcat 4, but I did not believe this basic servlet test would have changed (??) Note that I shutdown/started between each step below (many times actually). 1. I downloaded and installed Tomcat 6.0.20 on my own id, Linux Red Hat 5 system, started the server on port 8080, checked access to the Tomcat supplied pages - all ok. Also installed Sun JDK 1.5 onto my own id and point JAVA_HOME and JRE_HOME at it. Initially was running using rocket 64 bit JRE. 2. Created Hello.html and Hello.jsp as per tutorial, in sub-directory INSTALLATION_DIR/webapps/ROOT/Hello Pointed my browser (IE 7) at these and they WORK fine. 3. Compiled servlet HelloServlet as per tutorial and placed into sub-directory INSTALLATION_DIR/webapps/ROOT/WEB-INF/classes 4. Initially pointed my browser at http://my_web_address:8080/servlet/HelloServlet and got the well known HTTP 404 message 5. Tried editing INSTALLION_DIR/ROOT/WEB-INF/web.xml to set in particular the url-pattern but still got the 404 message. 6.Then edited the INSTALLATION_DIR/conf/server.xml file to uncomment the INVOKER servlet option. When trying to access http://my_web_address:8080/servlet/HelloServlet I not longer get the 404 message but a message from IE 7 staying that it could contact the web site but more or less that the file was not available. 7. I do notice in the catalina.out log file that there is an exception being thrown wit a a message regarding Security exception - that the Invoker is a privileged mode and that the examples directory cannot be handled. Needless to say I have not touched the examples directory. Thanks in advance. Charles. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 3 question for the form
Karthik Nanjangude wrote: Hi Thx for the quick reply When the current load utilizes all threads and you want to handle a higher load Does this mean the Container Complaint's via some logged o/p during the max load ? Yes. If yes What would the be the exception typos. Off the top of my head I can't remember. You'd have to look at the source code or run a load test that forces maxThreads to be used. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: reply_timeout
Vyv wrote: Hi there, I have a webservice running in Apache-Tomcat (6.0.16) on a Windows 2003 server. It's running fine for quite a while now. The WS is a process that generates PDF documents. Today we experienced a reply timeout, because the process of generating the PDF took more time than usual. The PDF was created successfully, but the client-app got the timeout error. Is there a way of increasing the value of the reply-timeout? Don't know. That would be a client-app setting, not a Tomcat one. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem Servlets (again?)
Charles Gillan wrote: Ok, I know it seems that this question turns up a lot (for previous releases) Only when folks ignore the Servlet specification and/or the Tomcat documentation. Followed a tutorial on the javaboutique web site; actually seems to be for tomcat 4, but I did not believe this basic servlet test would have changed (??) That tutorial is wrong on so many levels I don't know where to start. I guess one step at a time... 1. I downloaded and installed Tomcat 6.0.20 on my own id, Linux Red Hat 5 system, Good - no issues here. 2. Created Hello.html and Hello.jsp as per tutorial, in sub-directory INSTALLATION_DIR/webapps/ROOT/Hello Not how I'd do it. You really should be creating a new webapp rather than adding to the ROOT web application but it will work. 3. Compiled servlet HelloServlet as per tutorial and placed into sub-directory INSTALLATION_DIR/webapps/ROOT/WEB-INF/classes Now things are really heading the wrong way. Packageless classes are a bad idea on so many levels and are not permitted in some cases (I forget which - check the Servlet and/or JSP specifications for the exact details). 4. Initially pointed my browser at http://my_web_address:8080/servlet/HelloServlet And it gets worse. That looks like you are trying to use the invoker servlet - something that is so fundamentally flawed it has been disabled/deprecated as long as I can remember and has been removed entirely for Tomcat 7. 5. Tried editing INSTALLION_DIR/ROOT/WEB-INF/web.xml to set in particular the url-pattern but still got the 404 message. Without knowing what you edited it is hard to comment. 6.Then edited the INSTALLATION_DIR/conf/server.xml file to uncomment the INVOKER servlet option. It it wasn't clear already, Invoker == bad idea. And as an aside, if you really want to shoot yourself in the foot badly enough to want to use the invoker, server.xml isn't the file you edit. 7. I do notice in the catalina.out log file that there is an exception being thrown wit a a message regarding Security exception - that the Invoker is a privileged mode and that the examples directory cannot be handled. Good. The logs contain lots of useful information. It is always better to post the entire exception message. Paraphrasing it could lead to people giving you the wrong advice. Thanks in advance. Hopefully you have spotted some common themes here: - don't use the invoker - read the specs - read the Tomcat docs In particular, I'd strongly recommend this: http://tomcat.apache.org/tomcat-6.0-doc/appdev/index.html Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: reply_timeout
//assume you have releaseNotes2document.xsl stylesheet ?xml version=1.0? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xsl:param name=versionNumber/ xsl:include href=changes2document.xsl/ !-- Calculate path to site root, eg '../../' -- xsl:variable name=root xsl:call-template name=dotdots xsl:with-param name=path select=$path/ /xsl:call-template /xsl:variable !-- FIXME (JJP): bugzilla is hardwired -- xsl:variable name=bugzilla select='http://issues.apache.org/bugzilla/buglist.cgi?bug_id='/ xsl:param name=bugtracking-url select=$bugzilla/ xsl:template match=/ xsl:apply-templates select=//changes/ /xsl:template xsl:template match=changes document header title xsl:choose xsl:when test=@title!='' xsl:value-of select=@title/ /xsl:when xsl:otherwise xsl:textRelease Notes for Apache FOP /xsl:textxsl:value-of select=$versionNumber/ /xsl:otherwise /xsl:choose /title /header body xsl:if test=contains($versionNumber, 'dev') warningVersion xsl:value-of select=$versionNumber/ is a development release, these notes are therefore not complete, they are intended to be an indicator of the major features that are so far included in this version./warning /xsl:if xsl:if test=relea...@version=$versionnumber]/notes xsl:apply-templates select=relea...@version=$versionnumber]/notes/ /xsl:if xsl:apply-templates select=relea...@version=$versionnumber]/ /body /document /xsl:template xsl:template match=release section id=versio...@version} titleMajor Changes in Version xsl:value-of select=@version//title noteThis is not a complete list of changes, a full list of changes in this release a href=changes_{$versionNumber}.htmlis available/a./note xsl:if test=acti...@context='Code' and @importance='high'] section titleImportant Changes Code Base/title ul xsl:apply-templates select=acti...@context='Code' and @importance='high'] xsl:sort select=@type/ /xsl:apply-templates /ul /section /xsl:if xsl:if test=acti...@context='docs' and @importance='high'] section titleImportant Changes Documentation/title ul xsl:apply-templates select=acti...@context='docs' and @importance='high'] xsl:sort select=@type/ /xsl:apply-templates /ul /section /xsl:if xsl:if test=acti...@context='admin' and @importance='high'] section titleImportant Changes Project Administration/title ul xsl:apply-templates select=acti...@context='admin' and @importance='high'] xsl:sort select=@type/ /xsl:apply-templates /ul /section /xsl:if xsl:if test=acti...@context='design' and @importance='high'] section titleImportant Changes Design/title ul xsl:apply-templates select=acti...@context='design' and @importance='high'] xsl:sort select=@type/ /xsl:apply-templates /ul /section /xsl:if xsl:if test=acti...@context='build' and @importance='high'] section titleImportant Changes Build/title ul xsl:apply-templates select=acti...@context='build' and @importance='high'] xsl:sort select=@type/ /xsl:apply-templates /ul /section /xsl:if /section /xsl:template /xsl:stylesheet //assume the C:/Dev/FOP/temp/page-x-of-y.xml input ?xml version=1.0 encoding=UTF-8? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,
Inconsistent Horizontal Tomcat Cluster with Apache Load-Balancing (Windows)
Environment: Windows Server 2003 Tomcat 6.0.20 Apache HTTP Server 2.2.11 JK 1.2.28 Connector The goal is to have horizontal clustering with load balancing and failover (session persistence). The load balancing aspect works as expected. The issue I've been having is that when ServerA crashes, it will swap over to ServerB and the session will persist; however, if ServerB crashes, it will swap over to ServerA but lose the session. In the log files for ServerB: INFO: Manager [/test-app]: skipping state transfer. No members active in cluster group. I've been struggling with making this work over the past couple months with no luck. I've found several resources on the web, but they have a lot of conflicting information even when they say they are accomplishing the same end result. Thank you for your time. -Alexander
Re: reply_timeout
On 11/09/2009 15:28, Martin Gainty wrote: //assume you have releaseNotes2document.xsl stylesheet ?xml version=1.0? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xsl:param name=versionNumber/ xsl:include href=changes2document.xsl/ !-- Calculate path to site root, eg '../../' -- xsl:variable name=root xsl:call-template name=dotdots xsl:with-param name=path select=$path/ /xsl:call-template /xsl:variable !-- FIXME (JJP): bugzilla is hardwired -- xsl:variable name=bugzilla select='http://issues.apache.org/bugzilla/buglist.cgi?bug_id='/ xsl:param name=bugtracking-url select=$bugzilla/ xsl:template match=/ xsl:apply-templates select=//changes/ /xsl:template xsl:template match=changes document header title xsl:choose xsl:when test=@title!='' xsl:value-of select=@title/ /xsl:when xsl:otherwise xsl:textRelease Notes for Apache FOP/xsl:textxsl:value-of select=$versionNumber/ /xsl:otherwise /xsl:choose /title /header body xsl:if test=contains($versionNumber, 'dev') warningVersionxsl:value-of select=$versionNumber/ is a development release, these notes are therefore not complete, they are intended to be an indicator of the major features that are so far included in this version./warning /xsl:if xsl:if test=relea...@version=$versionnumber]/notes xsl:apply-templates select=relea...@version=$versionnumber]/notes/ /xsl:if xsl:apply-templates select=relea...@version=$versionnumber]/ /body /document /xsl:template xsl:template match=release section id=versio...@version} titleMajor Changes in Versionxsl:value-of select=@version//title noteThis is not a complete list of changes, a full list of changes in this release a href=changes_{$versionNumber}.htmlis available/a./note xsl:if test=acti...@context='Code' and @importance='high'] section titleImportant Changes Code Base/title ul xsl:apply-templates select=acti...@context='Code' and @importance='high'] xsl:sort select=@type/ /xsl:apply-templates /ul /section /xsl:if xsl:if test=acti...@context='docs' and @importance='high'] section titleImportant Changes Documentation/title ul xsl:apply-templates select=acti...@context='docs' and @importance='high'] xsl:sort select=@type/ /xsl:apply-templates /ul /section /xsl:if xsl:if test=acti...@context='admin' and @importance='high'] section titleImportant Changes Project Administration/title ul xsl:apply-templates select=acti...@context='admin' and @importance='high'] xsl:sort select=@type/ /xsl:apply-templates /ul /section /xsl:if xsl:if test=acti...@context='design' and @importance='high'] section titleImportant Changes Design/title ul xsl:apply-templates select=acti...@context='design' and @importance='high'] xsl:sort select=@type/ /xsl:apply-templates /ul /section /xsl:if xsl:if test=acti...@context='build' and @importance='high'] section titleImportant Changes Build/title ul xsl:apply-templates select=acti...@context='build' and @importance='high'] xsl:sort select=@type/ /xsl:apply-templates /ul /section /xsl:if /section /xsl:template /xsl:stylesheet //assume the C:/Dev/FOP/temp/page-x-of-y.xml input ?xml version=1.0 encoding=UTF-8? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may
Re: tomcat url rewrite
On Fri, Sep 11, 2009 at 4:01 AM, Pid p...@pidster.com wrote: Why not just make the URLs in such a way that you can look them up in the database? A servlet Filter could perform the same task in one go that your rewrite db lookup is doing. Exactly -- your URL is only a problem if you're passing the request unaltered to the default servlet -- so don't do that. :-) /some/path/to/file.ext And I have to ask -- why are you deliberately adding the ugly and meaningless .html to the end? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
404 Error troubleshooting
I have a webapp, which shows up in the manager, but gives a 404 error every time I try to access it. Can someone let me know how to turn on debugging and see what exactly is going on? It's an XMLRPC app (not that it makes a difference), and I have my web.xml servlet filter setup properly (according to the documentation). Thanks, Mike. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: 404 Error troubleshooting
you can see the posted request and response as well as the entire DOM tree with firebug plugin for firefox http://getfirebug.com hth Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. From: list-subscripti...@secmgmt.com To: users@tomcat.apache.org Subject: 404 Error troubleshooting Date: Fri, 11 Sep 2009 11:09:04 -0400 I have a webapp, which shows up in the manager, but gives a 404 error every time I try to access it. Can someone let me know how to turn on debugging and see what exactly is going on? It's an XMLRPC app (not that it makes a difference), and I have my web.xml servlet filter setup properly (according to the documentation). Thanks, Mike. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ With Windows Live, you can organize, edit, and share your photos. http://www.windowslive.com/Desktop/PhotoGallery
RE: 404 Error troubleshooting
From: Mike Baranski [mailto:list-subscripti...@secmgmt.com] Subject: 404 Error troubleshooting I have a webapp, which shows up in the manager, but gives a 404 error every time I try to access it. When posting questions, provide some real information: 1) Tomcat version? 2) Any front end on Tomcat, or is it running standalone? 3) JRE/JDK version? 4) Platform you're running on? 5) The URL you're using? 6) Contents of WEB-INF/web.xml? 7) Contents of any Context element you have for the webapp? 8) Any errors recorded in the Tomcat logs? Can someone let me know how to turn on debugging and see what exactly is going on? The default Tomcat configuration logs all errors. Modify conf/logging.properties if you want more detail. However, start by enabling the AccessLogValve in conf/server.xml to see what requests Tomcat is actually getting. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Installing Servlets
Thanks to Mark for the response to my initial e-mail on my problem with servlets. I have now followed the TomCat manual and have created a build environment using ant. The problem I now have is that I get an exception thown at ant install nd this is associated with HTTP response code: 401 for URL One thing that I did have to do was to change the REALM given in the conf/server.xml which came with my download of tomcat. It was Userdatabase, and I changed this to MemoryRealm in order to pick up the tomcat-users.xml file. Initially I could not actually activate the TomCat Manager link under Administration on the front page. Once I assigned user tomcat to have the manager role this changed and I can access that link. In my build.properties file I have set manager.username=tomcat manager.password=tomcat I just can't see what is going wrong. Thanks, again. Charles --- COMPILE is OK. -bash-3.2$ ant all Buildfile: build.xml Trying to override old definition of datatype resources clean: [delete] Deleting directory /users/cgillan/Hello/build [delete] Deleting directory /users/cgillan/Hello/dist prepare: [mkdir] Created dir: /users/cgillan/Hello/build [mkdir] Created dir: /users/cgillan/Hello/build/WEB-INF [mkdir] Created dir: /users/cgillan/Hello/build/WEB-INF/classes [copy] Copying 3 files to /users/cgillan/Hello/build [copy] Copied 1 empty directory to 1 empty directory under /users/cgillan/Hello/build compile: [javac] Compiling 1 source file to /users/cgillan/Hello/build/WEB-INF/classes all: BUILD SUCCESSFUL Total time: 0 seconds Try to INSTALL -bash-3.2$ ant install Buildfile: build.xml Trying to override old definition of datatype resources prepare: compile: install: BUILD FAILED java.io.IOException: Server returned HTTP response code: 401 for URL: http://lawrencium.ecit.qub.ac.uk:8080/manager/deploy?path=%2FHellowar=file%3A%2F%2F%2Fusers%2Fcgillan%2FHello%2Fbuild at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1153) at org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.java:223) at org.apache.catalina.ant.DeployTask.execute(DeployTask.java:201) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.apache.tools.ant.Main.runBuild(Main.java:758) at org.apache.tools.ant.Main.startAnt(Main.java:217) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) Total time: 0 seconds -bash-3.2$ ---
tomcat and access valve
All, i have a question regarding the access valve component and following pattern code. %D - Time taken to process the request, in millis we are troubleshooting performance issue and hence have enabled access log with above pattern code. in one of the server, a test jsp was logged with 1224 milliseconds as the execution time. the test jsp was monitoring each operation and the over all time was about 183 milliseconds. So the question i have is, is what was happening for 1041 milliseconds? 1. the tomcat version is 6.0.16 2. we have JNDI - AD authentication enabled 3. the jsp could have been compiled at runtime on first access. Does the 2 and 3 steps included in the execution time or the execution time is purely the code execution time? thank you dan
Re: tomcat and access valve
daniel steel wrote: All, i have a question regarding the access valve component and following pattern code. %D - Time taken to process the request, in millis we are troubleshooting performance issue and hence have enabled access log with above pattern code. in one of the server, a test jsp was logged with 1224 milliseconds as the execution time. the test jsp was monitoring each operation and the over all time was about 183 milliseconds. So the question i have is, is what was happening for 1041 milliseconds? 1. the tomcat version is 6.0.16 2. we have JNDI - AD authentication enabled 3. the jsp could have been compiled at runtime on first access. Does the 2 and 3 steps included in the execution time or the execution time is purely the code execution time? The access log valve will include 2 3. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Placement of custom resource factories
We have a custom factory that derive from org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory. We have it inside our war, we're plug it in inside application's context.xml as Resource name=jdbc/db auth=Container type=javax.sql.DataSource dsProps=properties.file removeAbandoned=true username=user password=pass driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://test-db.parnet:3306/ibox_UA_test?useUnicode=trueamp;characterEncoding=UTF-8 factory=ru.ibox.processing.commons.ParnetDataSourceFactory / On Fri, Sep 11, 2009 at 6:57 PM, Mark Thomas ma...@apache.org wrote: Kirill Vasiliev wrote: Tomcat-5.5.27 Java 1.5.17 Win XP SP2 In the documentation about custom resource factories ( http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html) I read following: When you are through, place the factory class (and the corresponding bean class) unpacked under $CATALINA_HOME/common/classes, or in a JAR file inside $CATALINA_HOME/common/lib. In this way, the required class files are visible to both Catalina internal resources and your web application. Does it mean that I must ALWAYS put it in common, or I must put it in common if I want it visible to Tomcat? I.e. can I put custom factory to WEB-INF/lib of my application if I don't want it to be visible to Tomcat? You can, but if it isn't visible to Tomcat it isn't going to work via JNDI. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Placement of custom resource factories
Sorry, previous message was incomplete. We have a custom factory that derive from org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory. We have it inside our war, we're plug it in inside application's context.xml as Resource name=jdbc/db auth=Container type=javax.sql.DataSource dsProps=properties.file removeAbandoned=true username=user password=pass driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://url factory=our.package.FactoryClass / So when we're trying to get jdbc/db by calling DataSource dataSource = ( DataSource )( new InitialContext () ).lookup( java:/comp/env/jdbc/db ); our FactoryClass is actually called instead. So it is actually working via JNDI. On Fri, Sep 11, 2009 at 6:57 PM, Mark Thomas ma...@apache.org wrote: Kirill Vasiliev wrote: Tomcat-5.5.27 Java 1.5.17 Win XP SP2 In the documentation about custom resource factories ( http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html) I read following: When you are through, place the factory class (and the corresponding bean class) unpacked under $CATALINA_HOME/common/classes, or in a JAR file inside $CATALINA_HOME/common/lib. In this way, the required class files are visible to both Catalina internal resources and your web application. Does it mean that I must ALWAYS put it in common, or I must put it in common if I want it visible to Tomcat? I.e. can I put custom factory to WEB-INF/lib of my application if I don't want it to be visible to Tomcat? You can, but if it isn't visible to Tomcat it isn't going to work via JNDI. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: 404 Error troubleshooting
-Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Friday, September 11, 2009 11:49 AM To: Tomcat Users List Subject: RE: 404 Error troubleshooting From: Mike Baranski [mailto:list-subscripti...@secmgmt.com] Subject: 404 Error troubleshooting I have a webapp, which shows up in the manager, but gives a 404 error every time I try to access it. When posting questions, provide some real information: 1) Tomcat version? 2) Any front end on Tomcat, or is it running standalone? 3) JRE/JDK version? 4) Platform you're running on? 5) The URL you're using? 6) Contents of WEB-INF/web.xml? 7) Contents of any Context element you have for the webapp? 8) Any errors recorded in the Tomcat logs? Can someone let me know how to turn on debugging and see what exactly is going on? The default Tomcat configuration logs all errors. Modify conf/logging.properties if you want more detail. However, start by enabling the AccessLogValve in conf/server.xml to see what requests Tomcat is actually getting. - Chuck Tomcat 5.5 Linux (FC 7) JDK 1.6 Standalone Web.xml: ?xml version=1.0 encoding=ISO-8859-1? !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 display-nameSecurity Managment Consulting/display-name servlet servlet-nameXmlRpcServlet/servlet-name servlet-classorg.apache.xmlrpc.webserver.XmlRpcServlet/servlet-class /servlet servlet-mapping servlet-nameXmlRpcServlet/servlet-name url-pattern/xmlrpc-status/url-pattern /servlet-mapping /web-app Access Log: 127.0.0.1 - - [11/Sep/2009:12:41:25 -0400] POST /xmlrpc-status/ HTTP/1.0 404 997 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: 404 Error troubleshooting
From: Mike Baranski [mailto:list-subscripti...@secmgmt.com] Subject: RE: 404 Error troubleshooting url-pattern/xmlrpc-status/url-pattern Access Log: 127.0.0.1 - - [11/Sep/2009:12:41:25 -0400] POST /xmlrpc-status/ HTTP/1.0 Your url-pattern doesn't match the submitted URL; change the pattern value to /xmlrpc-status/* (without the quotes). - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: 404 Error troubleshooting
127.0.0.1 - - [11/Sep/2009:12:50:19 -0400] POST /xmlrpc-status/ HTTP/1.0 404 997 ?xml version=1.0 encoding=ISO-8859-1? !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 display-nameSecurity Managment Consulting/display-name servlet servlet-nameXmlRpcServlet/servlet-name servlet-classorg.apache.xmlrpc.webserver.XmlRpcServlet/servlet-class /servlet servlet-mapping servlet-nameXmlRpcServlet/servlet-name url-pattern/xmlrpc-status/*/url-pattern /servlet-mapping /web-app -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Friday, September 11, 2009 12:47 PM To: Tomcat Users List Subject: RE: 404 Error troubleshooting From: Mike Baranski [mailto:list-subscripti...@secmgmt.com] Subject: RE: 404 Error troubleshooting url-pattern/xmlrpc-status/url-pattern Access Log: 127.0.0.1 - - [11/Sep/2009:12:41:25 -0400] POST /xmlrpc-status/ HTTP/1.0 Your url-pattern doesn't match the submitted URL; change the pattern value to /xmlrpc-status/* (without the quotes). - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: 404 Error troubleshooting
From: Mike Baranski [mailto:list-subscripti...@secmgmt.com] Subject: RE: 404 Error troubleshooting 127.0.0.1 - - [11/Sep/2009:12:50:19 -0400] POST /xmlrpc-status/ HTTP/1.0 404 997 Did you reload the webapp or restart Tomcat after making the change? Also, check the logs for deployment errors. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: 404 Error troubleshooting
Yes, restarted Tomcat (I also opened the war and opened the web.xml inside of it to make sure it was what I thought it was). No deploy errors, either. -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Friday, September 11, 2009 12:54 PM To: Tomcat Users List Subject: RE: 404 Error troubleshooting From: Mike Baranski [mailto:list-subscripti...@secmgmt.com] Subject: RE: 404 Error troubleshooting 127.0.0.1 - - [11/Sep/2009:12:50:19 -0400] POST /xmlrpc-status/ HTTP/1.0 404 997 Did you reload the webapp or restart Tomcat after making the change? Also, check the logs for deployment errors. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: 404 Error troubleshooting
From: Mike Baranski [mailto:list-subscripti...@secmgmt.com] Subject: RE: 404 Error troubleshooting Yes, restarted Tomcat (I also opened the war and opened the web.xml inside of it to make sure it was what I thought it was). What is the name of the .war file? Where is it located? The URL you're using requires that the webapp be deployed as ROOT (the default). If you have not deployed it as ROOT, you'll need to include the webapp name in the URL. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 404 Error troubleshooting
On Fri, Sep 11, 2009 at 12:59 PM, Mike Baranski list-subscripti...@secmgmt.com wrote: Yes, restarted Tomcat (I also opened the war and opened the web.xml inside of it to make sure it was what I thought it was). No deploy errors, either. make sure you include the app's context (Path value in manager) in the request... -- Kris Schneider - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 404 Error troubleshooting
On Fri, Sep 11, 2009 at 1:06 PM, Kris Schneider kschnei...@gmail.com wrote: On Fri, Sep 11, 2009 at 12:59 PM, Mike Baranski list-subscripti...@secmgmt.com wrote: Yes, restarted Tomcat (I also opened the war and opened the web.xml inside of it to make sure it was what I thought it was). No deploy errors, either. make sure you include the app's context (Path value in manager) in the request... -- Kris Schneider whoops, didn't notice that Charles had addressed this a couple minutes earlier... -- Kris Schneider - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Installing Servlets
From: Charles Gillan [mailto:c.gil...@ecit.qub.ac.uk] Subject: Installing Servlets I have now followed the TomCat manual It's Tomcat, not TomCat. The problem I now have is that I get an exception thown at ant install Is your ant script something home-grown, or did you borrow it from somewhere? What happens if you use the supported Tomcat Client Deployer? http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html It was Userdatabase, and I changed this to MemoryRealm in order to pick up the tomcat-users.xml file. Unnecessary, since the UserDatabaseRealm utilizes tomcat-users.xml; look at its resourceName attribute and the corresponding Resource element. I'd suggest putting things back the way they were to make sure you didn't accidentally break something else. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat and access valve
thanks mark. that was helpful. From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org Sent: Friday, September 11, 2009 12:23:48 PM Subject: Re: tomcat and access valve daniel steel wrote: All, i have a question regarding the access valve component and following pattern code. %D - Time taken to process the request, in millis we are troubleshooting performance issue and hence have enabled access log with above pattern code. in one of the server, a test jsp was logged with 1224 milliseconds as the execution time. the test jsp was monitoring each operation and the over all time was about 183 milliseconds. So the question i have is, is what was happening for 1041 milliseconds? 1. the tomcat version is 6.0.16 2. we have JNDI - AD authentication enabled 3. the jsp could have been compiled at runtime on first access. Does the 2 and 3 steps included in the execution time or the execution time is purely the code execution time? The access log valve will include 2 3. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
CometProcessor sending duplicate END events in Tomcat 6.0.20
I've noticed that after upgrading from Tomcat 6.0.18 to Tomcat 6.0.20 my comet servlet is now receiving two EventType.END events in a row when a client disconnects. I can duplicate with a simple test case (attached below) and I've verified that it happens in the svn repository under tc6.0.x/trunk as well. I'm running on Windows XP Pro with Sun JDK 1.6.0_15. org.apache.coyote.http11.Http11NioProtocol enabled. Receiving a duplicate END event isn't particularly serious (at least in my application), but I'm seeing a more serious issue that looks related to this problem. It appears that after the first END event is sent, the associated HttpResponse object is immediately recycled and used in another request-response. If the client of this next request starts reads the response quickly enough, then it can encounter a read error when the duplicate END event is processed and the request is re-closed. Of course this secondary problem is harder to reproduce in a small test case, but I do see it consistently in my application. I'm wondering if this is a legitimate bug, there's a work around, or I'm doing something wrong. Test case and output are below. -Brian SimpleCometProcessor.java = package testcase.servlet; import java.io.IOException; import java.io.InputStream; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import org.apache.catalina.CometEvent; import org.apache.catalina.CometProcessor; public class SimpleCometProcessor extends HttpServlet implements CometProcessor { public void event( CometEvent event ) throws IOException, ServletException { String eventTypeStr = event.getEventType().toString(); String eventSubTypeStr = event.getEventSubType() == null ? null : event.getEventSubType().toString(); System.out.println( SimpleCometProcessor.event got event + eventTypeStr + ( eventSubTypeStr == null ? : / + eventSubTypeStr ) ); switch ( event.getEventType() ) { case BEGIN: { event.setTimeout( 60 * 1000 ); event.getHttpServletResponse().setContentType( text/plain ); event.getHttpServletResponse().setHeader( Cache-Control, no-cache ); event.getHttpServletResponse().setHeader( Pragma, no-cache ); event.getHttpServletResponse().getOutputStream().write( initial response... leaving event open.getBytes( UTF-8 ) ); event.getHttpServletResponse().flushBuffer(); break; } case END: { event.close(); break; } case ERROR: { event.close(); break; } case READ: { InputStream is = event.getHttpServletRequest().getInputStream(); byte[] buf = new byte[ 512 ]; do { int n = is.read( buf ); System.out.println( SimpleCometProcessor read returned: + n ); if ( n == -1 ) { throw new IOException( read a -1 from inputstream ); } } while ( is.available() 0 ); break; } } } } Sample Output = client: (issue an HTTP GET to http://servlet/location) server: Sep 11, 2009 10:53:04 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [...] Sep 11, 2009 10:53:04 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFO: Using a shared selector for servlet write/read Sep 11, 2009 10:53:04 AM org.apache.coyote.http11.Http11NioProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Sep 11, 2009 10:53:04 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 388 ms Sep 11, 2009 10:53:04 AM org.apache.catalina.realm.JAASRealm setContainer INFO: Set JAAS app name Catalina Sep 11, 2009 10:53:04 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Sep 11, 2009 10:53:04 AM org.apache.catalina.core.StandardEngine
RE: Installing Servlets
The build script came from the basic one to which the Tomcat documentation refers. I just really changed the name to that of my app Hello. I have now used an alternative deployment method. I copied the build directory created in my application's directory by the ant script. cp -rv build $CATALINA_HOME/webapps/Hello restarted the Tomcat server and the servlet works now! I think this confirms that the ant build mechanism is working ?? Charles. Dr Charles J Gillan Principal Engineer for Telecommunications Software ECIT at the Queen's University of Belfast Innovation Road, Titanic Quarter, Belfast Northern Ireland BT3 9DT United Kingdom See ECIT on the web at: http://www.ecit.qub.ac.uk --- -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: 11 September 2009 19:12 To: Tomcat Users List Subject: RE: Installing Servlets From: Charles Gillan [mailto:c.gil...@ecit.qub.ac.uk] Subject: Installing Servlets I have now followed the TomCat manual It's Tomcat, not TomCat. The problem I now have is that I get an exception thown at ant install Is your ant script something home-grown, or did you borrow it from somewhere? What happens if you use the supported Tomcat Client Deployer? http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html It was Userdatabase, and I changed this to MemoryRealm in order to pick up the tomcat-users.xml file. Unnecessary, since the UserDatabaseRealm utilizes tomcat-users.xml; look at its resourceName attribute and the corresponding Resource element. I'd suggest putting things back the way they were to make sure you didn't accidentally break something else. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Shared jars
I explored that suggestion. The class failing to load is org.hibernate.SessionFactory, and the class attempting to load it is HibernateGrailsPlugin. The former class is confirmed in a jar in WEB-INF/lib, and the latter is a .class file in WEB-INF/classes. It seems like this should work. The details: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [HibernateGrailsPlugin]! at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:850) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:724) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:583) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [HibernateGrailsPlugin]! ... 20 more Caused by: java.lang.NoClassDefFoundError: org/hibernate/SessionFactory at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethods(Class.java:1791) at java.security.AccessController.doPrivileged(Native Method) at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:33) at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:20) at HibernateGrailsPlugin.init(HibernateGrailsPlugin.groovy:43) ... 20 more Caused by: java.lang.ClassNotFoundException: org.hibernate.SessionFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:319) at java.lang.ClassLoader.loadClass(ClassLoader.java:254) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399) ... 27 more Tim On Fri, Sep 11, 2009 at 4:36 AM, Mark Thomas ma...@apache.org wrote: Tim Berglund wrote: I'm trying to enable the shared classloader on Tomcat 6.0.20 (Java 1.6.0_15 on Mac OSX 10.6). I've put this line in conf/catalina.properties: shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar I've dumped a few dozen jars in the shared/lib directory. These are found when I start Tomcat, but the jars in a deployed WAR are not found. The problem manifests itself as a ClassNotFoundException on on org.hibernate.SessionFactory, which is located in the web app's WEB-INF/lib directory, and not the shared/lib directory. As a test, I added the web app's lib dir to the shared loader, like this: shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar,${catalina.base}/webapps/WorkList/WEB-INF/lib/*.jar That's obviously bad as an actual fix, but the app loads in that configuration. Any ideas? What I'd like is the shared class loader as a supplement to the webapp classloader. At a guess, something in shared depends on hibernate. The shared loader is visible to the web app but the web app loader is not visible to shared. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Shared jars
From: Tim Berglund [mailto:tlbergl...@gmail.com] Subject: Re: Shared jars The class failing to load is org.hibernate.SessionFactory Any chance the above class is in more than one place in this branch of the classloader tree? An NCDFE can result from that condition as well as the class simply not being there (or accessible). - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org