request.getSession(false) incorrectly creates a session
Hi, When I deploy my web app and call request.getSession(false), according to the javadoc, if a session does not exist null is returned. However I'm getting an object returned when I have not created a session myself. The object is an instance of this class - org.apache.catalina.session.StandardSessionFacade As a result my unit tests, using mock objects, all work fine, but when I deploy my application it breaks because a session is created incorrectly, it seems to me. I'm using Tomcat 5.5. Anybody care to enlighten me? Thanks, Andy. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: request.getSession(false) incorrectly creates a session
Len - Ahh, nice to know it's not my imagination. Well never mind, I just wrote a kludge to work around it for now. Tim - Thanks for the reply but I test stuff using Spring's mock objects so no actual JSP's are involved, anyway seems it is broke in some cases. Andy. -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 15 November 2005 11:56 To: Tomcat Users List Subject: Re: request.getSession(false) incorrectly creates a session If you are using jsp - you need <[EMAIL PROTECTED] session='false'%> in your page otherwise - a session is created for your whether you use it or not. -Tim Andy wrote: > Hi, > > When I deploy my web app and call request.getSession(false), according to > the > javadoc, if a session does not exist null is returned. However I'm getting > an > object returned when I have not created a session myself. > > The object is an instance of this class - > > org.apache.catalina.session.StandardSessionFacade > > As a result my unit tests, using mock objects, all work fine, but when I > deploy my application it breaks because a session is created incorrectly, > it seems to me. > > I'm using Tomcat 5.5. Anybody care to enlighten me? - 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: WELCOME to users@tomcat.apache.org
Hi there, We have recently switched to tomcat-5.5, on SuSE 9.3, and I ran into a strange problem that was not there before. I am using a custom script from catalina.out rotation. It works much the same way as cronolog, except it is much simpler and does more (if anyone wants to see/use it, let me know ;) ). The script is invoked using the same approach, from catalina.sh: I replace >> "$CATALINA_BASE"/logs/catalina.out 2>&1 & with | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 & This used to work perfectly. But with ver.5.5, some startup and shutdown messages "escape" to the terminal. The rest goes to the script as before. It seems that for those messages, tomcat explicitly uses a file descriptor that corresponds to the terminal, or some such thing. Anyone has an idea why this is happening, and how I can capture the runaways? Any help would be greatly appreciated. Regards, Andy Tsouladze Escaping startup messages: May 8, 2007 5:45:41 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jre1.5.0_11/lib/amd64/server:/usr/java/jre1.5.0_11/lib/amd64:/usr/ java/jre1.5.0_11/../lib/amd64 May 8, 2007 5:45:41 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 8, 2007 5:45:42 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8443 May 8, 2007 5:45:42 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1776 ms May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.17 May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/axis] startup failed due to previous errors May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8443 May 8, 2007 5:45:44 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 May 8, 2007 5:45:44 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/82 config=null May 8, 2007 5:45:44 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource May 8, 2007 5:45:44 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 2181 ms Escaping shutdown messages: May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8080 May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8443 csapp02:/u00/jakarta/bin # May 8, 2007 5:47:26 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8080 May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8443 May 8, 2007 5:47:26 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: Failed shutdown of Apache Portable Runtime - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Runaway catalina.out logging
This is a correction of the Subject: which I failed to set properly in my original message. Sorry... Hi there, We have recently switched to tomcat-5.5, on SuSE 9.3, and I ran into a strange problem that was not there before. I am using a custom script from catalina.out rotation. It works much the same way as cronolog, except it is much simpler and does more (if anyone wants to see/use it, let me know ;) ). The script is invoked using the same approach, from catalina.sh: I replace >> "$CATALINA_BASE"/logs/catalina.out 2>&1 & with | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 & This used to work perfectly. But with ver.5.5, some startup and shutdown messages "escape" to the terminal. The rest goes to the script as before. It seems that for those messages, tomcat explicitly uses a file descriptor that corresponds to the terminal, or some such thing. Anyone has an idea why this is happening, and how I can capture the runaways? Any help would be greatly appreciated. Regards, Andy Tsouladze Escaping startup messages: May 8, 2007 5:45:41 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jre1.5.0_11/lib/amd64/server:/usr/java/jre1.5.0_11/lib/amd64:/usr/ java/jre1.5.0_11/../lib/amd64 May 8, 2007 5:45:41 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 8, 2007 5:45:42 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8443 May 8, 2007 5:45:42 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1776 ms May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.17 May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/axis] startup failed due to previous errors May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8443 May 8, 2007 5:45:44 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 May 8, 2007 5:45:44 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/82 config=null May 8, 2007 5:45:44 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource May 8, 2007 5:45:44 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 2181 ms Escaping shutdown messages: May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8080 May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8443 csapp02:/u00/jakarta/bin # May 8, 2007 5:47:26 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8080 May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8443 May 8, 2007 5:47:26 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: Failed shutdown of Apache Portable Runtime - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Runaway catalina.out logging
Martin, This is from catalina.sh, since it is Unix: JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties" As you see, it is functionally identical to your settings. Regards, Andy On Tue, 8 May 2007, Martin Gainty wrote: Andy- in your startup file $CATALINA_HOME/bin/catalina.bat please confirm java.util.logging.config.file as in this example set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties" then display contents of $CATALINA_HOME/conf/logging.properties M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Andy" <[EMAIL PROTECTED]> To: Sent: Tuesday, May 08, 2007 8:12 PM Subject: Runaway catalina.out logging This is a correction of the Subject: which I failed to set properly in my original message. Sorry... Hi there, We have recently switched to tomcat-5.5, on SuSE 9.3, and I ran into a strange problem that was not there before. I am using a custom script from catalina.out rotation. It works much the same way as cronolog, except it is much simpler and does more (if anyone wants to see/use it, let me know ;) ). The script is invoked using the same approach, from catalina.sh: I replace >> "$CATALINA_BASE"/logs/catalina.out 2>&1 & with | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 & This used to work perfectly. But with ver.5.5, some startup and shutdown messages "escape" to the terminal. The rest goes to the script as before. It seems that for those messages, tomcat explicitly uses a file descriptor that corresponds to the terminal, or some such thing. Anyone has an idea why this is happening, and how I can capture the runaways? Any help would be greatly appreciated. Regards, Andy Tsouladze Escaping startup messages: May 8, 2007 5:45:41 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jre1.5.0_11/lib/amd64/server:/usr/java/jre1.5.0_11/lib/amd64:/usr/ java/jre1.5.0_11/../lib/amd64 May 8, 2007 5:45:41 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 8, 2007 5:45:42 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8443 May 8, 2007 5:45:42 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1776 ms May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.17 May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/axis] startup failed due to previous errors May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8443 May 8, 2007 5:45:44 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 May 8, 2007 5:45:44 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/82 config=null May 8, 2007 5:45:44 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource May 8, 2007 5:45:44 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 2181 ms Escaping shutdown messages: May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8080 May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8443 csapp02:/u00/jakarta/bin # May 8, 2007 5:47:26 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8080 May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8443 May 8, 2007 5:47:2
Re: Runaway catalina.out logging
Filip, This works, thanks, although I am still not sure why the original failed. Too many players in a single command... Regards, Andy On Wed, 9 May 2007, Filip Hanik - Dev Lists wrote: change | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 & to 2>&1 | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 & ie, redirect stderr into stdout before passing it into the logger Filip Andy wrote: This is a correction of the Subject: which I failed to set properly in my original message. Sorry... Hi there, We have recently switched to tomcat-5.5, on SuSE 9.3, and I ran into a strange problem that was not there before. I am using a custom script from catalina.out rotation. It works much the same way as cronolog, except it is much simpler and does more (if anyone wants to see/use it, let me know ;) ). The script is invoked using the same approach, from catalina.sh: I replace >> "$CATALINA_BASE"/logs/catalina.out 2>&1 & with | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 & This used to work perfectly. But with ver.5.5, some startup and shutdown messages "escape" to the terminal. The rest goes to the script as before. It seems that for those messages, tomcat explicitly uses a file descriptor that corresponds to the terminal, or some such thing. Anyone has an idea why this is happening, and how I can capture the runaways? Any help would be greatly appreciated. Regards, Andy Tsouladze Escaping startup messages: May 8, 2007 5:45:41 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jre1.5.0_11/lib/amd64/server:/usr/java/jre1.5.0_11/lib/amd64:/usr/ java/jre1.5.0_11/../lib/amd64 May 8, 2007 5:45:41 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 8, 2007 5:45:42 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8443 > May 8, 2007 5:45:42 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1776 ms May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.17 May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/axis] startup failed due to previous errors May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8443 May 8, 2007 5:45:44 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 May 8, 2007 5:45:44 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/82 config=null May 8, 2007 5:45:44 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource May 8, 2007 5:45:44 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 2181 ms Escaping shutdown messages: May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8080 May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8443 csapp02:/u00/jakarta/bin # May 8, 2007 5:47:26 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8080 May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8443 May 8, 2007 5:47:26 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: Failed shutdown of Apache Portable Runtime - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Runaway catalina.out logging
You are right. To generalize this: It is all a matter of shell precedences. Pipe (|) has a higher precedence than angle redirect (>) which is why redirect is needed on both sides. However, grouping two commands with parentheses overrides this behavior, again because parentheses have even higher precedence. I guess I have worded it very awkwardly, so here is a set of examples: # Errors from two commands, both sent to stderr bash-2.05b$ ls /aaa | sort -q sort: invalid option -- q Try `sort --help' for more information. ls: /aaa: No such file or directory # Error from the first command suppressed, error from the second shows bash-2.05b$ ls /aaa >/dev/null 2>&1 | sort -q sort: invalid option -- q Try `sort --help' for more information. # Error from the first command shows, error from the second suppressed bash-2.05b$ ls /aaa | sort -q >/dev/null 2>&1 ls: /aaa: No such file or directory # Errors from both commands suppressed independently bash-2.05b$ ls /aaa >/dev/null 2>&1 | sort -q >/dev/null 2>&1 # Errors from both commands suppressed together bash-2.05b$ (ls /aaa | sort -q) >/dev/null 2>&1 Regards, Andy On Wed, 9 May 2007, Fargusson.Alan wrote: At the risk of over explaining, this is one of those slightly tricky areas of shell syntax. The general form of the command below would be something like: ls -l | pr > Out Now there are two commands that might generate errors to the terminal. So you do this: ls -l | pr > Out 2>&1 Now you might still see errors output to the terminal. The above redirects the output of the pr command, but not the ls command. So you have to do this: ls -l 2>&1 | pr > Out 2>&1 The first 2>&1 redirects the stderr of the ls command into the pipe. The second 2>&1 redirects the output of pr to the file named Out. The syntax for redirecting stderr to a pipe is a little odd, but in order to get this right it needs to be something like this. -Original Message- From: Andy [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 7:11 PM To: Tomcat Users List Subject: Re: Runaway catalina.out logging Filip, This works, thanks, although I am still not sure why the original failed. Too many players in a single command... Regards, Andy On Wed, 9 May 2007, Filip Hanik - Dev Lists wrote: change | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 & to 2>&1 | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 & ie, redirect stderr into stdout before passing it into the logger Filip Andy wrote: This is a correction of the Subject: which I failed to set properly in my original message. Sorry... Hi there, We have recently switched to tomcat-5.5, on SuSE 9.3, and I ran into a strange problem that was not there before. I am using a custom script from catalina.out rotation. It works much the same way as cronolog, except it is much simpler and does more (if anyone wants to see/use it, let me know ;) ). The script is invoked using the same approach, from catalina.sh: I replace >> "$CATALINA_BASE"/logs/catalina.out 2>&1 & with | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 & This used to work perfectly. But with ver.5.5, some startup and shutdown messages "escape" to the terminal. The rest goes to the script as before. It seems that for those messages, tomcat explicitly uses a file descriptor that corresponds to the terminal, or some such thing. Anyone has an idea why this is happening, and how I can capture the runaways? Any help would be greatly appreciated. Regards, Andy Tsouladze Escaping startup messages: May 8, 2007 5:45:41 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jre1.5.0_11/lib/amd64/server:/usr/java/jre1.5.0_11/lib/amd64:/usr/ java/jre1.5.0_11/../lib/amd64 May 8, 2007 5:45:41 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 8, 2007 5:45:42 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8443 May 8, 2007 5:45:42 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1776 ms May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.17 May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardC
Forwarding request to a different servlet
Hello! We have a commercial application that runs under Tomcat 8.5.65 (on Windows Server 2019). In the tomcat/webapps directory there are the following three directories (names changed): backend frontend ROOT The “frontend” directory contains the UI for the commercial application and is, as far as I can tell, all just HTML, JavaScript, etc. The “backend” directory contains the parts of the system that do the bulk of the work and appear to be mainly .jsp files. Amongst other things, the “backend” handles a URL https:///backend/rest/abc/xx where “xx” represents a number that tells it what to act upon. I have started developing a new servlet which handles POST requests to the URL: https:///plugins/abc/xx. In some cases (based on a values in the request body), the servlet will process things itself and generate its own response. For certain cases it just needs to forward the request on to corresponding “backend” URL and then pass the response back. I assumed that .forward(request, response) on a RequestDispatcher would be what I needed to use. I have tried every combination of getServletContext() and getRequestDispatcher() I can think of or have found on the internet but it always fails with an HTTP error 404. This is because the URL that it is being forwarded to always has a rogue “plugins” in it, i.e. https:///plugins/backend/rest/abc/xx. I suspect the solution is simple but I am new to Tomcat and developing servlets and probably missing something obvious. Any guidance would be much appreciated. -Andy. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Forwarding request to a different servlet
Mark wrote... RequestDispatcher operates within a given ServletContext (web application). You are trying to do a cross-context dispatch - i.e. to another web application. To do this you will need to: - enable cross-context dispatch for the /plugins web application https://tomcat.apache.org/tomcat-8.5-doc/config/context.html look for crossContext - then use code something like this: ServletContext current = request.getServletContext(); ServletContext backend = current.getContext("/backend"); RequestDispatcher rd = backend.getRequestDispatcher("/rest/abc/xx"); rd.forward(request,response); Progress of sorts! The request is now returning 302 instead of 404! Looking in the log files for the backend, it has a message that says “Robot requests must be rejected” and the 302 response is due to a redirect to a permission denied page. My understanding was the .forward() method didn’t change anything on route in either direction. -Andy. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Forwarding request to a different servlet
I wrote... Progress of sorts! The request is now returning 302 instead of 404! Looking in the log files for the backend, it has a message that says “Robot requests must be rejected” and the 302 response is due to a redirect to a permission denied page. My understanding was the .forward() method didn’t change anything on route in either direction. Using JD-GUI I have looked at the class that is generates the above error message and it appears as the result of a check on the “user-agent” setting. I am now puzzled as what is being received by the backend servlet is the same as if it is called directly without me intercepting it. The class I looked at contains a definition of a valid non-robot user-agent string. Is it possible to modify the request to use this before forwarding it? If not, am I better creating a new request for the backend and copy HTTP header and body content around as needed? -Andy. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Forwarding request to a different servlet
Chris wrote… The .forward() should keep all request headers (and many other things) in-tact. You might want to log some things in plugins/whatever to see what is being done. You should be using the *same objects* your servlet got for the request and response when calling RequestDispatcher.forward(). You can "wrap" them if necessary to make certain modifications. I have put the relevant parts of the source code onto PasteBin [1]. If anyone spots any stupid mistakes then please do let me know! My code has some logging output in it but it doesn’t appear to be being added into the log files which are owned and created by the existing “backend”. That is probably just down to me not having the correct logger context. Yes, but I think you should not have to. What are the possible reasons for that specific 302 response? Are you *sure* it's complaining about the User-Agent string? The log file from the backend records which Java class the mesage has come from so I am fairly confident I am looking in the correct class. There appear to be two functions that output the error in the log and which endup redirecting to permissionDenied.do [2]. I’m not sure which one is being called but the check and end result appear to be the same in both. The UserAgent class that it references is complex (IMO) but as far as I can tell it is only looking at the “user-agent” header. -Andy. 1 - https://pastebin.com/yGmxtx6V 2 - https://pastebin.com/4q88V7Pp - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Forwarding request to a different servlet
Chris wrote... So it looks like the backend service IS being called, but rejecting the request because of the "UserAgent" object complaining about it. I would log the User-Agent header from the request in your front-end before the RequestDispatcher.forward() call, and if possible, also log it in your backend service just before the "return false”. I created (copied from the internet) a logging filter implementation for dumping the request and everything in that looked correct. I then went for the option of potentially upsetting the user base by enabling all logging options on all of the backend’s classes. It appears that it was down to me being an idiot! In my servlet there is code that says: ServletContext myContext = request.getServletContext(); ServletContext backendContext = myContext.getContext(“/backend”); When I was creating the RequestDispatcher to forward the request I was including the “/backend” on the front of the URL. Turns out it wasn’t needed and was upsetting some URL filtering! -Andy. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Unable to get local issuer certificate
Hello, I am receiving the above error when a GitLab webhook tries to call my servlet. The full text of the error states: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate). If I try to access any of the servlets running in the same Tomcat server from a web browser then the certificate is OK and the padlock icon appears as expected. The certificate that is used by Tomcat is a domain wildcard certificate issued by Go-Daddy. Any ideas on what isn’t being correctly sent in response to the GitLab webhook? Thanks, Andy. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to get local issuer certificate
Thomas wrote… This means, the calling program can't verify the certificate. Check whether all the intermediates are delivered by tomcat. Furthermore, the calling program must know the root-certificate of your webserver certificate. If I look at a random website using 'openssl s_client -showcerts -connect’ then I get the server certificate plus two others: depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1 verify return:1 depth=1 C = US, O = Let's Encrypt, CN = R3 verify return:1 depth=0 CN = xxx.mydomain.com If I use the same command with the Tomcat servlet then it gives the following: verify error:num=20:unable to get local issuer certificate verify return:1 verify error:num=21:unable to verify the first certificate verify return:1 The chain should be “Go Daddy Secure Certificate Authority - G2” and “Go Daddy Root Certificate Authority - G2” according to the browser. My guess is that the .pfx file that Tomcat is using doesn’t include them. -Andy. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
JVM crashing with caCertificatePath in server.xml
Hi, just ran into this today. The JVM is crashing when caCertificatePath is added to server.xml. I tried the latest Zulu JRE 8 and 11 but still had the crash. ENVIRONMENT Tomcat: 9.0.89 (64-bit Windows zip) OS: Windows Server 2019 JVM: openjdk version "1.8.0_322" OpenJDK Runtime Environment (Zulu 8.60.0.21-CA-win64) (build 1.8.0_322-b06) OpenJDK 64-Bit Server VM (Zulu 8.60.0.21-CA-win64) (build 25.322-b06, mixed mode) CRASH INFO When caCertificatePath is present in server.xml and points to a valid directory (empty or with PEM files) the JVM crashes during Tomcat startup. This is the JVM console output: 14-May-2024 17:34:58.443 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-openssl-nio2-1.2.3.4-443"] # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x0001800ccd10, pid=1244, tid=0x0ab0 # # JRE version: OpenJDK Runtime Environment (Zulu 8.60.0.21-CA-win64) (8.0_322-b06) (build 1.8.0_322-b06) # Java VM: OpenJDK 64-Bit Server VM (25.322-b06 mixed mode windows-amd64 compressed oops) # Problematic frame: # C [tcnative-1.dll+0xccd10] # # Core dump written. Default location: D:\Program Files\apache-tomcat\bin\hs_err_pid1244.mdmp # # An error report file with more information is saved as: # D:\Program Files\apache-tomcat\bin\hs_err_pid1244.log # # If you would like to submit a bug report, please visit: # http://www.azul.com/support/ # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # CONFIG INFO Here’s the server.xml that causes the JVM crash. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JVM crashing with caCertificatePath in server.xml
Sure thing - ADDITIONAL ENVIRONMENT INFO: libtcnative: tcnative-1.dll is included in the Tomcat 9.0.89 64-bit Windows zip download, not sure about the version... OpenSSL version: 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024) (with FIPS 140-2) Regarding expecting a directory of certificate hash files, I wasn’t aware of this, assumed it would pick up CA cert PEM files in a directory. I would however not expect this or an empty directory to crash the JVM however… -Andy On May 14, 2024, at 2:53 PM, Michael Osipov wrote: Please provide the log file, the OpenSSL version used and the libtcnative version used. Please note that caCertificatePath expects a directory with certificate hash files. Plain certs won't work. M
Re: JVM crashing with caCertificatePath in server.xml
ADDITIONAL ENVIRONMENT INFO UPDATE: libtcnative: org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.3.0] using APR version [1.7.4]. CRASH LOG See enclosed: hs_err_pid4464.log c_rehash.pl I didn’t have perl, tried strawberry perl, it didn’t seem to create symlinks on Windows so I do it with a powershell using "openssl x509 -subject_hash -fingerprint -noout -in " making symlinks in the same directory for each CA cert PEM e.g. a655d288.0 (link) -> cert.pem (file). This didn’t seem to make a difference though, JVM still crashed. -Andy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JVM crashing with caCertificatePath in server.xml
Ah wasn’t sure if attachments worked, log content information below. Yea the docs just say directory for trusted CA PEM certificates. TOMCAT DOCS https://tomcat.apache.org/tomcat-9.0-doc/config/http.html: caCertificatePath (OpenSSL only) Name of the directory that contains the certificates for the trusted certificate authorities. The format is PEM-encoded. CATALINA LOG FINE LEVEL CONTENT 15-May-2024 01:37:45.569 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.89 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: May 3 2024 20:22:11 UTC 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.89.0 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows Server 2019 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: D:\Program Files\Java\jre 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_322-b06 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Azul Systems, Inc. 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: D:\Program Files\apache-tomcat 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\Program Files\apache-tomcat 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=D:\Program Files\apache-tomcat\conf\logging.properties 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs= 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=D:\Program Files\apache-tomcat 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\Program Files\apache-tomcat 15-May-2024 01:37:45.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\Program Files\apache-tomcat\temp 15-May-2024 01:37:45.600 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.3.0] using APR version [1.7.4]. 15-May-2024 01:37:45.600 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true]. 15-May-2024 01:37:45.600 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 15-May-2024 01:37:45.647 FINE [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL Current FIPS mode: [1] 15-May-2024 01:37:45.647 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL Using OpenSSL with the FIPS provider as the default provider 15-May-2024 01:37:45.647 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 3.0.13 30 Jan 2024] 15-May-2024 01:37:45.756 FINE [main] org.apache.tomcat.util.modeler.Registry.getMBeanServer Created MBeanServer 15-May-2024 01:37:46.069 FINE [main] org.apache.catalina.util.LifecycleBase.setStateInternal Setting state for [org.apache.catalina.deploy.NamingResourcesImpl@5e955596] to [INITIALIZING] 15-May-2024 01:37:46.084 FINE [main] org.apache.catalina.util.LifecycleBase.setStateInternal Setting state for [org.apache.catalina.deploy.NamingResourcesImpl@5e955596] to [INITIALIZED] 15-May-2024 01:37:46.116 FINE [main] org.apache.catalina.util.LifecycleBase.setStateInternal Setting state for [StandardService[Catalina]] to [INITIALIZING] 15-May-2024 01:37:46.116 FINE [main] org.apache.catalina.util.LifecycleBase.setStateInternal Setting state for [StandardEngine[Catalin
Re: JVM crashing with caCertificatePath in server.xml
Ok great! Thank you for taking the time and making the effort to look into this Michael, much appreciated! -Andy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JVM crashing with caCertificatePath in server.xml
Hi Micheal, you had asked to try these - http://home.apache.org/~michaelo/issues/tomcat/openssl-crash/. I replaced my files with these but Tomcat failed to start at this point with this message - 22-May-2024 00:02:30.808 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-openssl-nio2-10.232.115.117-443"] OPENSSL_Uplink(7FFEEBF10C88,08): no OPENSSL_Applink -Andy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JVM crashing with caCertificatePath in server.xml
Michael, good news, it’s working now. Issue was on my end, was using a custom OpenSSL installer that was built with FIPS and it had also put the two openssl lib DLLs in Window System32, after fixing that Tomcat started without JVM crash with caCertificatePath set in server.xml. Thanks! -Andy
Re: JVM crashing with caCertificatePath in server.xml
Hi Michael, After re-reading my previous message, I realized it might have been ambiguous regarding whether I observed caCertificatePath working with or without your first posted file set from http://home.apache.org/~michaelo/issues/tomcat/openssl-crash/. To clarify, it was indeed your first posted file set that made it work. The issue I initially encountered on my end was due to some unnecessary copies of the original OpenSSL binaries elsewhere in the system path. These copies were likely causing different results as they were being loaded without my awareness. After removing them I observed Tomcat startup with caCertificatePath in server.xml without JVM crash using the original binaries you provided. I hope this clears up any ambiguity from my previous message. Thanks! -Andy
learning tomcat 7 on Linux
Hi, I have set up a Linux CentOS 7 host, and have installed Tomcat 7... [root@db3 ROOT]# /sbin/tomcat version Server version: Apache Tomcat/7.0.76 Server built: Mar 17 2020 23:48:55 UTC Server number: 7.0.76.0 OS Name:Linux OS Version: 3.10.0-1062.12.1.el7.x86_64 Architecture: amd64 JVM Version:1.8.0_242-b08 JVM Vendor: Oracle Corporation I would like to learn how to develop webapps. This is just for a hobby - I'll never sell anything I write, and will never be a dev. I currently work doing UNIXy stuff for a big US multinational. This is just a thing on the side, like learning to play guitar. Can someone please suggest some resources? Many thanks.
Re: learning tomcat 7 on Linux
OK, so I'm going to have a look at that, since there's a 10-day free trial. :-) On Wed, 8 Apr 2020 at 14:11, Richard Monson-Haefel wrote: > Hi, > > A bit of self-promotion here. > > I just released a course, "Tomcat for Java Development" less than two weeks > ago which includes coverage of Tomcat on Linux. I'm also releasing - later > this week - a complementary course, "Java Application Development with > Tomcat". The first course teaches how to install, configure, troubleshoot, > and secure Tomcat. The second course focuses on the development of web > applications using servlets and JSPs on Tomcat. Both are introductory > level courses but they are very current and I think pretty good. They are > also pretty short - less than 2 hours each. > > You can find "Tomcat for Java Development" on Pluralsight.com today and > "Java Application Development with Tomcat" later in the week. > > Good luck! > > Richard > > > On Wed, Apr 8, 2020 at 7:56 AM Andy Sloane > wrote: > > > Hi, > > I have set up a Linux CentOS 7 host, and have installed Tomcat 7... > > > > [root@db3 ROOT]# /sbin/tomcat version > > Server version: Apache Tomcat/7.0.76 > > Server built: Mar 17 2020 23:48:55 UTC > > Server number: 7.0.76.0 > > OS Name:Linux > > OS Version: 3.10.0-1062.12.1.el7.x86_64 > > Architecture: amd64 > > JVM Version:1.8.0_242-b08 > > JVM Vendor: Oracle Corporation > > > > I would like to learn how to develop webapps. > > > > This is just for a hobby - I'll never sell anything I write, and will > never > > be a dev. I currently work doing UNIXy stuff for a big US multinational. > > This is just a thing on the side, like learning to play guitar. Can > > someone please suggest some resources? > > > > Many thanks. > > > > > -- > Richard Monson-Haefel > https://twitter.com/rmonson > https://www.linkedin.com/in/monsonhaefel/ >
Re: learning tomcat 7 on Linux
OK then. So Tomcat installed, and I start learning tomorrow. Thank you, folks. :-) [image: tom.png] On Wed, 8 Apr 2020 at 17:59, Richard Monson-Haefel wrote: > I agree with Olaf. My courses are for Tomcat 9. I would upgrade to 9. My > course shows you in detail how to install 9 on Linux (although I use > LinuxMint its all done with the bash shell so its should work just as as > well on CentOSO) > > On Wed, Apr 8, 2020 at 11:50 AM Olaf Kock wrote: > > > > > On 08.04.20 14:55, Andy Sloane wrote: > > > Hi, > > > I have set up a Linux CentOS 7 host, and have installed Tomcat 7... > > > > > > ... > > > I would like to learn how to develop webapps. > > > > > I see no particular reason to start with Tomcat 7. Most of the code that > > you will learn will be version independent, and the End of Life for > > Tomcat 7 is already set to March 2021. I'd recommend to go with Tomcat > > 9. Installation - especially for development purposes - will be trivial > > and is easier for development anyway. > > > > I'm assuming you're running the old version, because that's what the > > CenOS repositories hold. For development: No need to do this. > > > > I don't know Richard's course, but I assume that he'll talk about a > > development environment and installing a new dev environment as well: > > Use that, rather than whatever comes with CentOS. Access permissions on > > the files of a development server are far simpler than on fully > > public-server-enabled installs. > > > > Olaf > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > > -- > Richard Monson-Haefel > https://twitter.com/rmonson > https://www.linkedin.com/in/monsonhaefel/ >
Initial configuration problems
I have been monitoring the emails on this list and have tried to interpret the documentation for Tomcat 5.5.17 on the web, but I am a total novice with Java and Apache. I am trying to test run an opensource application on my laptop and have managed to get close, but cannot seem to make it work. I'm working with the OpenMRS medical record for Africa, and am running on Windows XP with MySql 5. After installing the various software elements, adding the environment variables, modifying the tomcat-users file to include a manager password, and starting the service, I still cannot access Manager. I do not get prompted for a username and password... all I get is a 404 message saying the requested resource is not available. Does anyone know of a simpler, step-by-step, document which will ensure that I have made the necessary configuration modifications? I am pretty computer savvy and this has stumped me for a week! (Also, if there is anyone at the Univ of Cambridge (UK) who is monitoring this list and might be of help for me at Wolfson, I'd be forever grateful). - Andrew S. Kanter, MD MPH [EMAIL PROTECTED] [EMAIL PROTECTED]
Login failing on Tomcat4 container managed login ( through Apache )
Hi, I'm using Tomcat 4 through Apache to handle jsps etc and have Tomcat configured to handle login. Frequently, although I know the login supplied is correct, the login page will either be redisplayed or the login error page if specified is brought up. The second time it then takes it ok. Is this a problem anyone else has encountered? Many thanks. Andy
Apache2.048/Tomcat4.1.29 config problem for ArcIMS install
Hi everyone, I'm trying to install and configure Apache 2.048 and Tomcat4.1.29 in order to Install ArcIMS. After installation in order to configure the two I downloaded two files. A module mod_ssl.so and copied it to my apache2/module directory A config file workers2.properties and copied it to my aoache2/config directory It now states in the instructions to edit the Apache httpd.conf file. To add "LoadModule jk2_modules/mod_jk2.so" right below the line #LoadModule jk2_modukles/mod_jk2.so So it reads: #LoadModule jk2_modukles/mod_jk2.so LoadModule jk2_modules/mod_jk2.so After doing that I cannot start the Apache2 service. Get the "service-specific error code 1" error. So I thought it might have been a typo and added the # sign infront of my added line so it reads: #LoadModule jk2_modukles/mod_jk2.so #LoadModule jk2_modules/mod_jk2.so This allowed me to start the service however I still don't get the desired test page http:///examples/servlet/HelloWorldExample Does anyone know what I'm doing wrong? I also have Java2 SDK Version 1.4.2 under C:\Program Files\Java\j2re1.4.2 C:\Apache\Apache2 C:\Tomcat\Tomcat41 Thanks for the help Andy
Re: Tomcat Startup
I am wondering about that extra slash for your temp directory. could the slash at the end of your base and home be causing tomcat to look for the CONF/server xml in a non-existent place. hope this helps - andy feilong <[EMAIL PROTECTED]> wrote: Hi, My Catalina_Home: C:\Programme\jakarta-tomcat-5.0.30\ JAVA_HOME: C:\Programme\JBuilderX\jdk1.4 C:\Programme\jakarta-tomcat-5.0.30\bin>catalina run Using CATALINA_BASE: C:\Programme\jakarta-tomcat-5.0.30\ Using CATALINA_HOME: C:\Programme\jakarta-tomcat-5.0.30\ Using CATALINA_TMPDIR: C:\Programme\jakarta-tomcat-5.0.30\\temp Using JAVA_HOME: C:\Programme\JBuilderX\jdk1.4\ Can't load server.xml Can't load server.xml Oct 28, 2005 10:43:18 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 0 ms java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) Caused by: java.lang.NullPointerException at org.apache.catalina.startup.Catalina.await(Catalina.java:619) at org.apache.catalina.startup.Catalina.start(Catalina.java:579) ... 6 more Best Feilong - Yahoo! FareChase - Search multiple travel sites in one click.
Re: FileLogger setting in server.xml?
http://tomcat.apache.org/tomcat-5.0-doc/config/logger.html Setting it up according to your requirements in 5.5 is easy as Tomcat has moved ahead and uses log4J. If yours is a new installation, any reason why you aren't using 5.5.x? Satish Talim <[EMAIL PROTECTED]> wrote: I am a newbie and my first post here. I am using Apache 1.3.33 and Tomcat 5.0.28. I want to redirect my stderr and stdout messages to a file in my application context, rather than the standard catalina.out. What changes do I need to do in my server.xml file? All help appreciated. - Yahoo! FareChase - Search multiple travel sites in one click.
finalize question
I have a webapp that causes Tomcat to die with an OutOfMemoryError due to PermGen after about 10 reloads. I am trying to determine if there is a memory leak in my code or maybe even one of our 3rd-party libraries. I am using AspectJ to log whenever any object's finalize method is called. Problem is, I'm not seeing any finalize methods being called. I have a ServletContextListener that calls System.gc to help force collection (though I realize that's not guaranteed). As far as Tomcat is concerned, when would objects in a webapp be finalized? On app stop? On reload? On undeploy? Any suggestions on how to isolate this memory leak? thx andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: finalize question
>> From: Andy Kriger [mailto:[EMAIL PROTECTED] >> Subject: finalize question >> >> Problem is, I'm not seeing any finalize methods being called. > > Reliance on finalizers is a sign of extremely poor application design. > First, it can be a significant performance hit, since objects with > finalizers have to be handled specially both by allocation and garbage > collection. Second, there's no guarantee that a finalizer will _ever_ > be called, so if you're dependent on that happening, you're in trouble > right from the start. Much better to design your app with discrete > event handling and not leave it up to the whims of the garbage > collector. > > - Chuck I must not have been clear in my original message - I'm not relying on finalizers in my application design. I don't use them at all generally. I was hoping that I could use AOP to log whenever a finalizer was called so I could see if there were any glaring instances of an object not getting gc'd. This is purely a debugging situation. thx andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: finalize question
> See ... > http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669 > > (I really need to update the FAQ on this one) > > -Tim Thanks for the info. A followup question... "The second one is where the application has ThreadLocal data that is attached to a container thread. In tomcat this thread will be part of the thread pool, so it will never be garbage collected." We use ThreadLocal to handle our Hibernate Session. In ServletContextListener.contextDestroyed, I call a destroy method on the class doing the handling that cleans up the Hibernate Sessions and nulls out the ThreadLocal. Will this allow it to be gc'd or will Tomcat still hold onto a reference? thx andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 5.5 logging
Placing the jars in the common/lib directory makes them available for all web apps and catalina itself. Placing log4j properties in the common/classes lib defines log4j behavior for all web apps (cross context). Placing log4j properties in web-inf/classes overrides cross context log4j properties for a specific web app. What is the purpose of the commons-logging.properties file ? There is no requirement for this file according to the 5.5 doc. hope this helps. - andy pc leung <[EMAIL PROTECTED]> wrote: http://tomcat.apache.org/tomcat-5.5-doc/logging.html The above page shows that logging-log4j.jar and commong-logging.jar needs to put in $CATALINA_HOME/common/lib. If I have two files of jar already in my struts webapp lib, Why do I still need to place them in $CATALINA_HOME/common/lib? In addition, the tomcat doc web page shows the log4j.properties only, is the common-logging.properties not necessary? Thanks - Yahoo! FareChase - Search multiple travel sites in one click.
Re: tomcat 5.5 logging
you can put the two log jar files in your web app web-inf/lib directory and the log4j properties in your web app classes directory. make sure your web app log4j properties file specifies its own log file and log file location. Its useful and may be good practice to place all log files in the tomcat log directory, each web app with its own log file in that directory. i do not yet understand the need for the other properties file. But it may be needed. I have a configuration without it, with cross context logging and specific web app logging. hope this helps pc leung <[EMAIL PROTECTED]> wrote: I have done something according to http://www.oracle.com/technology/products/jdev/tips/mills/Struts-logging.html I do not put the 2 jars in tomcat common lib. Instead I keep them in my webapp lib. The result is lots of error message in tomcat log dir. If I put a log4j.properties in web-inf/classes and still keep the 2 jars in my webapp lib only, is the log.debug() prints message in tomcat log dir? thanks On 11/3/05, andy gordon wrote: > > Placing the jars in the common/lib directory makes them available for all > web apps and catalina itself. Placing log4j properties in the common/classes > lib defines log4j behavior for all web apps (cross context). Placing log4j > properties in web-inf/classes overrides cross context log4j properties for a > specific web app. > > What is the purpose of the commons-logging.properties file ? There is no > requirement for this file according to the 5.5 doc. > > hope this helps. > > - andy > pc leung < [EMAIL PROTECTED]> wrote: > http://tomcat.apache.org/tomcat-5.5-doc/logging.html > The above page shows that logging-log4j.jar and commong-logging.jar > needs to put in $CATALINA_HOME/common/lib. > If I have two files of jar already in my struts webapp lib, > Why do I still need to place them in $CATALINA_HOME/common/lib? > In addition, the tomcat doc web page shows the log4j.properties only, > is the common-logging.properties not necessary? > Thanks > > > - > Yahoo! FareChase - Search multiple travel sites in one click. > - Yahoo! FareChase - Search multiple travel sites in one click.
contextDestroyed and getRealPath question
I am trying to do something in contextDestroyed that requires the filesystem directory of the web application. However, once contextDestroyed has been called that path no longer exists. public void contextDestroyed(ServletContextEvent event) { String path = event.getServletContext().getRealPath("/"); System.out.println(path); File file = new File(path); System.out.println("exists? " + (file.exists())); // returns false System.out.println("directory? " + (file.isDirectory())); // returns false System.out.println("readable? " + (file.canRead())); // returns false } Is there a way to access the webapp when the application is reloaded/stopped/undeployed but before Tomcat cleans up the temporary directory that contains app? thx andy For more info on what I'm trying to see http://forum.hibernate.org/viewtopic.php?t=935948&postdays=0&postorder=asc&highlight=webapp+reload&start=150&sid=d772baa08d3390eb5232ed4164d81125 (it's the post w the code in it and I'm just trying to test it out in my own app and see if it fixes anything) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing context info for other running apps?
Good Response! I add to that, that if its needed programmatically, you do this programmatically using JMX. The JMXPROXY servlet could be your guide. Martin Gainty <[EMAIL PROTECTED]> wrote: Good Afternoon check out http://tomcat.apache.org/tomcat-5.0-doc/manager-howto.html#List%20OS%20and%20JVM%20Properties You can use the JMX Query Command from the JMX Proxy Servlet to acquire RequestProcessor return all loaded servlets look for specific Mbean given name=MBeanName Anyone else ? Martin- You can - Original Message - From: "JWM" To: "'Tomcat Users List'" Sent: Saturday, November 19, 2005 12:24 PM Subject: Accessing context info for other running apps? > From one webapp, I need to find out if another webapp is installed, and if > so, what its context root is. I know the Tomcat manager app has access to > info on all running apps. Is that info accessible by other apps. If so, > where would I find the documentation on classes, etc.? > > Thanks. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! FareChase - Search multiple travel sites in one click.
Re: RE: admin module for Tomcat 5
In addition, The admin app needs to be placed into the same directory as the manager app. i.e. C:\Apache\Tomcat 5.5\server\webapps Hope this helps, andy gordon [EMAIL PROTECTED] wrote: Ah. Unzip it into the same folder into which you've installed Tomcat. You'll need to edit Tomcat-Users.xml in the conf folder to include a user with the "admin" role to access the app. Restart Tomcat and it should work. > > From: "Scott Purcell" > Date: 2005/11/23 Wed AM 10:16:46 EST > To: "Tomcat Users List" > Subject: RE: admin module for Tomcat 5 > > XP > > Scott K Purcell | Developer | VERTIS | > 555 Washington Ave. 4th Floor | St. Louis, MO 63101 | > 314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com > > Vertis is the premier provider of targeted advertising, media, and > marketing services that drive consumers to marketers more effectively. > > > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 23, 2005 9:09 AM > To: Tomcat Users List > Subject: Re: admin module for Tomcat 5 > > > What operating system are you using? > > > > From: "Scott Purcell" > > Date: 2005/11/23 Wed AM 09:17:01 EST > > To: > > Subject: admin module for Tomcat 5 > > > > Hello, > > I am running Tomcat 5, and I have been having troubles configuring a > > web-app in a virtual environment. Anyway, I see there is an admin module, > > and I believe it may assist in this. > > > > I downloaded the admin module for Tomcat 5, but do not know where or how to > > install it. I tried unzipping it under webapps/ROOT but that did not do the > > trick. I googled for info, but it appears to be slim. > > > > Anyone? > > > > > > > > - > > 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] - Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
RE: How to test connection pooling
Show Processlist will show the number of initial connections at start but does it show what subsystem a connection is bound to? what if there are multiple tomcat's connected to one database. How do you differentiate? "Lucuk, Pete" <[EMAIL PROTECTED]> wrote: Manisha, I do not know how you check in MSSQL. But, just an FYI If you setup your connection to ten, ten do not automatically get created, only one, and as your app requires more connections, more connections will be created up to a max of ten. Took me a couple days to figure out that one >-Original Message- >From: Manisha Sathe [mailto:[EMAIL PROTECTED] >Sent: Tuesday, November 29, 2005 10:45 AM >To: users@tomcat.apache.org >Subject: How to test connection pooling > >I am on tomcat 4.1 > >I am using JDBC connection pooling for MSSQL and singleton >class for JNDI lookup (only once) and get connection. > >Everything is working file. But how to test that connection >pool for 10 (where initial size specified is 10) has been created ? > >I know for mysql it is 'show processlist' and this gives out >initial number of connections at start. Same thing how can i >do it for mssql ? > >regards >Manisha > > > > > > >__ >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] - Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
Re: Newbie install & run question
try going to the bin directory in tomcat and executing STARTUP.SH Mário Gamito <[EMAIL PROTECTED]> wrote: Hi, I've just installed Tomcat 5.5 for Linux following the instructions on its web page: 1) downloaded and installed apache-ant; 2) downloaded the Tomcat tarball, uncompressed it and on the top source code directory ran "ant". I got: BUILD SUCCESSFUL Total time: 1 minute 11 seconds. My question now is how to start it and how to access it. It seems that the Tomcat page explaining how to run it as a UNIX daemon must be outdated(?) or out of context(?). Any help would be apreciated. Warm Regards, Mário Gamito - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Personals Skip the bars and set-ups and start using Yahoo! Personals for free
RE: How to access webapps class path as env variable.
If you need more than Chuck's suggestion, all the configuration information about webapps (i.e. directories where classes, files, and and documents live) is already available via Tomcat MBeans. This will eliminate the need for an environment variable and create flexibility. You can use JConsole (if you are using Java 5) to understand how to find your directory programmatically. hth andy "Caldarale, Charles R" <[EMAIL PROTECTED]> wrote: > From: Saha Rabindra N [mailto:[EMAIL PROTECTED] > Subject: How to access webapps class path as env variable. > > I have a ini file placed in my webapps class folder which I > need to read at runtime. If there is no such environment > variable available, then can you please tell me if there is > any workaround. Don't try for the classpath; the ClassLoader.getResourceAsStream() method should do what you want. This is discussed fairly often in this mailing list. - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Shopping Find Great Deals on Holiday Gifts at Yahoo! Shopping
RE: starting and stopping Tomcat from Java code
There is an MBean for the Server and I believe that you can specify the command there. Oleg Lebedev <[EMAIL PROTECTED]> wrote: Great, sending that shutdown command to a Tomcat server started with server.xml file on the disk worked. But how can I specify what the server shutdown command is when I start the server in embedded mode on a certain port? (See code below) private static void startTomcat(){ String hostName = "localhost"; int port = ; String commonPath = "C:/myapp"; String catalinaHome = commonPath + "/tomcat"; System.setProperty("catalina.home", catalinaHome); Embedded embedded = new Embedded(); MemoryRealm memRealm = new MemoryRealm(); embedded.setRealm(memRealm); Engine engine = embedded.createEngine(); Host host = embedded.createHost(hostName, ""); engine.addChild(host); Context rootCtx = embedded.createContext("", "/"); rootCtx.setPrivileged(true); host.addChild(rootCtx); embedded.addEngine(engine); Connector httpConnector = embedded.createConnector( (java.net.InetAddress) null, port, false); embedded.addConnector(httpConnector); embedded.start(); } -Original Message- From: Iannis Hanen [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 5:35 PM To: Tomcat Users List Cc: Iannis Hanen Subject: RE: starting and stopping Tomcat from Java code Hi Oleg, The piece of code you just mentioned is what lies behind the tag in the server.xml file. You can set the tag this way: If you connect to port 1234 on the tomcat machine and type in the "myShutdown" password, tomcat will shutdown. However, I am pretty sure that this port is opened only for callers from localhost. So, if you intend to stop it remotely, this may not be possible. You may have to use a proxy of some kind to relay your call so that tomcat believes the call comes from localhost. Iannis -Original Message- From: Oleg Lebedev [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 4:27 PM To: Tomcat Users List Subject: RE: starting and stopping Tomcat from Java code Thanks, Wendy. I looked at cargo and it seems that it requires the container to be installed on the local machine in order to be able to start or stop it. In my case I have Tomcat running on some machine with a known IP address and port number. I need to be able to send a shutdown command to that Tomcat instance and have it stutdown itself. I just noticed this piece of code in Catalina.stopServer(String[]): Socket socket = new Socket("127.0.0.1", server.getPort()); OutputStream stream = socket.getOutputStream(); String shutdown = server.getShutdown(); for (int i = 0; i < shutdown.length(); i++) stream.write(shutdown.charAt(i)); stream.flush(); stream.close(); socket.close(); This may be what I need to use in my Java class to shut down the local Tomcat instance. Any ideas on whether this is the right way to shut down a stand-alone Tomcat instance? Thanks. Oleg -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 4:44 PM To: Tomcat Users List Subject: Re: starting and stopping Tomcat from Java code On 12/14/05, Oleg Lebedev wrote: > I am trying to configure, start and then shutdown Tomcat from my Java > class. No idea if it will do what you want, but that requirement made me think of Cargo: http://cargo.codehaus.org/ -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. If you have questions about this email, please contact the IT Help Desk. Mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. If you have questions about this email, please contact the IT Help Desk. Mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Shopping Find Great Deals on Holiday Gifts at Yahoo! Shopping
RE: Re: starting and stopping Tomcat from Java code
Oleg, Have you looked into managing the tomcat instance with MBeans. All you need to do is establish a connection to the other JVM with an MBeanServerConnection instance. This does require a port to be exposed from Tomcat for remote monitoring. But once you have the connection you can do what you want with the remote Tomcat. Just look at how JConsole monitors/manages remote JVM applications for an example. HTH - andy Oleg Lebedev <[EMAIL PROTECTED]> wrote: Yes, that would work if I had a handle to the embedded instance. The thing is that embedded tomcat is running in a separate VM and I need to be able to shut it down. I don't really need to use Embedded class if only I could get Bootstrap or Catalina classes to work without having to have the whole tomcat directory on disk. -Original Message- From: news on behalf of Bill Barker Sent: Wed 12/14/2005 8:14 PM To: users@tomcat.apache.org Subject: Re: starting and stopping Tomcat from Java code Urm, something like: tomcat.stop(); where 'tomcat' is your Embedded instance? "Oleg Lebedev" wrote in message news:[EMAIL PROTECTED] Hello, I am trying to configure, start and then shutdown Tomcat from my Java class. I am planning to have all the jars required by Tomcat on the classpath and I would like to be able to specify the port number and host using method calls. I would prefer not to ship Tomcat configuration files, such as server.xml with my application and be able to configure Tomcat from code before starting it. I tried using Boostrap class, but it requires catalina.home and catalina.base, which I would like to avoid using. I tried using Embed class and it worked, but I still had to set catalina.home so that it can find tomcat-users.xml. But, this is acceptable. I have not been able to shut Tomcat down from my Java code. Note that I won't have a handle to the Catalina instance started, because Tomcat needs to be started before my application starts in a separate VM, and then killed when my application exists. I would appreciate any feedback on how to do this or what Tomcat classes I should take a look at. Thanks. Oleg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. If you have questions about this email, please contact the IT Help Desk. Mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Shopping Find Great Deals on Holiday Gifts at Yahoo! Shopping
Re: Question configurung JBDCRealm (Tomcat 5.5.9)
Peter, If I understand what you described, it looks like your database is ok but your specification to tomcat is ever so slightly off. Change your server.xml in a way so that the role elements reference the role table and not users table. HTH - andy [EMAIL PROTECTED] wrote: Hi all! I have got a question regarding setup of a JBDCRealm. I read the HOW-TO on Tomcat homepage, and I am wondering about the database structure. I have an existing application, and the database it uses has got a table 'users' with the follwing columns: login, password, roleid,... where the roleid is a foreign key to the table 'roles' which has columns 'id' and 'rolename'. It is sufficient for me because every user can only have one role. Is there a way to use this database structure with JDBCRealm? Or do I have to add more tables as described in the HOW-TO? My database structure already contains all information, so it would be overhead to produce an extra table, I think. I tried the following: debug="99" driverName="org.postgresql.Driver" connectionURL="jdbc:postgresql://localhost:5432/ testwebapp?user=login&password=pwd" userTable="users" userNameCol="login" userCredCol="password" userRoleTable="users" roleNameCol="roleid" /> but I got problems on roleNameCol="roleid". How can I get the rolename from table roles? Perhaps I missed something, and someone has an idea. Thanks Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: AW: Question configurung JBDCRealm (Tomcat 5.5.9)
Peter, Have you tried the following? I placed arrows pointing to my suggestions. debug="99" driverName="org.postgresql.Driver" connectionURL="jdbc:postgresql://localhost:5432/ testwebapp?user=login&password=pwd" userTable="users" userNameCol="login" userCredCol="password" userRoleTable="roles"<--- roleNameCol="rolename" /> <--- hth - andy [EMAIL PROTECTED] wrote: Hi andy! As in the HOW-TO described you need two tables, one table 'users' that holds the username and the password, and one table that holds the username and the roles the user is given (it is a mapping from users to roles). My database has also two tables, but the first table holds username, password AND roles, and the second table only is a collection of role names, assigned with an id. So my tables look like this: table users username(login) | password | roleid peter | secret | 0 andy | terces | 1 table roles id | rolename 0 | admin 1 | someuser I tried several combinations of tables/columnnames in my realm config, but none worked. Thanks Peter -Ursprüngliche Nachricht- Von: andy gordon [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 21. Dezember 2005 12:51 An: Tomcat Users List Betreff: Re: Question configurung JBDCRealm (Tomcat 5.5.9) Peter, If I understand what you described, it looks like your database is ok but your specification to tomcat is ever so slightly off. Change your server.xml in a way so that the role elements reference the role table and not users table. HTH - andy [EMAIL PROTECTED] wrote: Hi all! I have got a question regarding setup of a JBDCRealm. I read the HOW-TO on Tomcat homepage, and I am wondering about the database structure. I have an existing application, and the database it uses has got a table 'users' with the follwing columns: login, password, roleid,... where the roleid is a foreign key to the table 'roles' which has columns 'id' and 'rolename'. It is sufficient for me because every user can only have one role. Is there a way to use this database structure with JDBCRealm? Or do I have to add more tables as described in the HOW-TO? My database structure already contains all information, so it would be overhead to produce an extra table, I think. I tried the following: debug="99" driverName="org.postgresql.Driver" connectionURL="jdbc:postgresql://localhost:5432/ testwebapp?user=login&password=pwd" userTable="users" userNameCol="login" userCredCol="password" userRoleTable="users" roleNameCol="roleid" /> but I got problems on roleNameCol="roleid". How can I get the rolename from table roles? Perhaps I missed something, and someone has an idea. Thanks Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ 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] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: I can't install TomCat in my computer
What does the log say? Which version are you running? Patricio Silva <[EMAIL PROTECTED]> wrote: Hi, I installed TomCat in my pc but it can't get started. I receive a message "TomCat started but stopped.Some services do it when they don't have anything to do in system" or something like that. May you help me? -- Obrigado. Patricio. - Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP.
How do you programmatically determine Tomcat Version
All, Is there are way to determine the version of tomcat that is running from an application that is connecting to tomcat via JSR 160 on a local machine. I would like to be able to find the tomcat version from an MBean if possible. Thank you - andy gordon - Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
Re: I can't install TomCat in my computer
There is a logs directory under your main tomcat directory and look at the log files and see if there is an message that describes the problem. There likely is. Have you looked at the setup instructions on the tomcat website? Patricio Silva <[EMAIL PROTECTED]> wrote: I tried TomCat 4.1 and 5.* .I tried too a version without installer, that you have to go to dos prompt and type startup.bat in bin directory I guess it is 5.0.28 or something. I'm sorry but I'm a dummy in tomcat, what are you meaning when you said "What does the log say?"Thanks 2006/1/16, andy gordon : > > What does the log say? Which version are you running? > > Patricio Silva < [EMAIL PROTECTED]> wrote: Hi, > I installed TomCat in my pc but it can't get started. I receive a message > "TomCat started but stopped.Some services do it when they don't have > anything to do in system" or something like that. > May you help me? > > -- > Obrigado. > Patricio. > > > > > - > Yahoo! Photos > Got holiday prints? See all the ways to get quality prints in your hands > ASAP. > -- Obrigado. Patricio. - Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
Re:2nd Request: How do you programmatically determine Tomcat Version
All, Surprising no one responded the first time. Looking at the source, I noticed a org.apache.catalina.util.ServerInfo class in that does access version information but it is local to the server and not available from an MBean. I need to access version information over RMI (JSR 160). Any suggestions? Should an enhancement request be entered? Does it make sense for this kind of information be available from the Service or Server MBean? How would you programmatically determine that you were running Tomcat 5.5.9 versus 5.08 or Tomcat 4.x for instance? Any thougts would be helpful? Thanks Andy Gordon andy gordon <[EMAIL PROTECTED]> wrote: All, Is there are way to determine the version of tomcat that is running from an application that is connecting to tomcat via JSR 160 on a local machine. I would like to be able to find the tomcat version from an MBean if possible. Thank you - andy gordon - Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever. - Yahoo! Photos Showcase holiday pictures in hardcover Photo Books. You design it and well bind it!
Re: 2nd Request: How do you programmatically determine Tomcat Version
Peter, Thanks This is great! I am not sure of the policy but if you don't mind me asking, is there anyway to add this functionality to earlier releases of Tomca such as 5.5.x, 5.0x, or 4.x? Again Thank you , this is great. - andy Peter Rossbach <[EMAIL PROTECTED]> wrote: OK, this is a very useful information and I add this to this information to the Server mbean. The fix included at 5.5.16. Thanks peter Am 18.01.2006 um 09:53 schrieb Rodrigo Ruiz: > Hi Andy, I agree with you. The application version seems to be a > relevant information piece. > I guess "Catalina/Server" MBean would be a good place. > > Regards, > Rodrigo Ruiz > > - > 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] - Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP.
Re: 2nd Request: How do you programmatically determine Tomcat Version
thank you! Mark Thomas <[EMAIL PROTECTED]> wrote: Mark Thomas wrote: > 4.1.x - I'll take a look at porting the patch. If it is easy, then > I'll do it. I have just committed this to svn for 4.1.x Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
Re: Architecture question for all you gurus out there
Have you looked into aspect oriented programming? You should be able accomplish your objectives using it. One example open source effort is the Spring framework. Good luck. - andy John MccLain <[EMAIL PROTECTED]> wrote: We have a fairly large client/server app that we converted to a java webapp. The original app was in powerbuilder. there were 2 types of rules applied to field rendering: 1) any rule that could be handled when the screen loaded was handled via screen level events, e.g., if a screen had fields with default values, or hidden fields under certain conditions, then these would be applied at screen entry via an onchange event for the screen 2) computed fields were handled via onChange events on the field, e.g., if field x changes, change field y The 'field rules' could be any valid powerscript expression What we have done is mimicked this in java. we process the same way as above, except we dynamically convert (very painfully) the powerscript into java syntax, then run the rules as above, by passing the converted rules to an embedded java interpreter (BeanShell) The problem is if you have sophisticated rules, or rules which affect many different fields, e.g., if field x changes, change field y, but if field y changes, change field z, etc... This becomes very slow - up to 15 seconds for a screen to render or change completely. Not to mention the complexity of the rules management. Is there a better way??? John McClain Senior Software Engineer TCS Healthcare [EMAIL PROTECTED] (530)886-1700x235 "Skepticism is the first step toward truth" - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Installing a SSL under Tomcat 5
Evening, I have been reading about installing the SSL certificate for my server and when I when to download the JSSE (from Sun), it said that that version did not support versions 1.4 and 1.5 of the JDK. I am on 1.5, so what do I do? Thank you in advance, Andy
RE: Installing a SSL under Tomcat 5
Ah, great... thank you for the info... -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 08, 2006 9:49 PM To: Tomcat Users List Subject: Re: Installing a SSL under Tomcat 5 Andy Tipton wrote: > Evening, > > I have been reading about installing the SSL certificate for my > server and when I when to download the JSSE (from Sun), it said that that > version did not support versions 1.4 and 1.5 of the JDK. I am on 1.5, so > what do I do? Nothing! JSSE is included in JDK 1.4 onwards. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Installing my SSL Certificate.
I am up to the point of importing my certificate with the command (where filename is the name of the domain.): C:\Program Files\Java\jdk1.5.0_05\bin>keytool -import -alias tomcat.keystore -trustcacerts -file filename.crt But I get this error when I run it: keytool error: java.lang.Exception: Failed to establish chain from reply What am I doing wrong? Thank you in advance, Andy
Certificate not showing as trusted...
All, When I access the server from the browser (https), it tell me that it is not a trusted certificate. "This CA Root certificate is not trusted because it is not in the Trusted Root Certification Authorities store." I purchased the certificate, downloaded it and installed, but why is it not trusted? Thank you Andy
Need help w/ installing certificate.
Afternoon, I have my real certificate downloaded. I am trying to install it into my keystore so that is the one to be used. however, I am can't get it to work. Please help!! I am running these commands but I cannot get the keystore to look at the new certificate.. C:\Program Files\Java\jdk1.5.0_05\bin>keytool -import -alias intermed -keystore .keystore -trustcacerts -file sf_issuing.crt C:\Program Files\Java\jdk1.5.0_05\bin>keytool -import -alias tomcat5 -keystore .keystore -trustcacerts -file www.anythingphotos.com.crt I have tried creating a new '.keystore', but no luck. Could someone please help!! I am running out of ideas.
Need help w/ installing certificate continued...
I have read all through the documentation and can't find what I am doing wrong. The only thing that I didn't do was the importing of the valicert_class2_root.crt file because I wasn't given one when I downloaded my certificate. I imported the real one after I imported the intermediate crt. C:\Program Files\Java\jdk1.5.0_05\bin>keytool -list -keystore .keystore Enter keystore password: changeit Keystore type: jks Keystore provider: SUN Your keystore contains 1 entry intermed, Nov 13, 2006, trustedCertEntry, Certificate fingerprint (MD5): 7A:A5:BA:4F:BC:0A:C5:3C:56:E9:50:A0:13:6A:88:A9 C:\Program Files\Java\jdk1.5.0_05\bin>keytool -import -alias tomcat5 -keystore . keystore -file www.anythingphotos.com.crt Enter keystore password: changeit Owner: CN=www.anythingphotos.com, OU=Domain Control Validated, O=www.anythingpho tos.com Issuer: [EMAIL PROTECTED], CN=Starfield Secure Certificat ion Authority, OU=http://www.starfieldtech.com/repository, O="Starfield Technolo gies, Inc.", L=Scottsdale, ST=Arizona, C=US Serial number: 3ed340 Valid from: Sat Nov 11 10:38:24 EST 2006 until: Sun Nov 11 10:38:24 EST 2007 Certificate fingerprints: MD5: 73:EA:94:A1:38:C8:9A:5D:65:44:7C:C7:65:A7:01:5F SHA1: 5B:C3:AF:32:92:08:6A:C4:5A:37:81:B0:89:74:57:52:CD:5E:D1:B9 Trust this certificate? [no]: yes So now I have this: C:\Program Files\Java\jdk1.5.0_05\bin>keytool -list -keystore .keystore Enter keystore password: changeit Keystore type: jks Keystore provider: SUN Your keystore contains 2 entries tomcat5, Nov 13, 2006, trustedCertEntry, Certificate fingerprint (MD5): 73:EA:94:A1:38:C8:9A:5D:65:44:7C:C7:65:A7:01:5F intermed, Nov 13, 2006, trustedCertEntry, Certificate fingerprint (MD5): 7A:A5:BA:4F:BC:0A:C5:3C:56:E9:50:A0:13:6A:88:A9 C:\Program Files\Java\jdk1.5.0_05\bin> Could it have to do with the alias? I am can't figure out what it could be. I just get a 'page cannot be displayed' when trying to access it. I have been reading, but can't find anywhere that really explains who the keystore and certificate relate to each other. if the alias matters. I really need some help here.
RE: Need help w/ installing certificate continued...
I have done the following... (I am running Tomcat 5 on a Windows 2003 Server) - Recreated the .keystore many different times trying to get one to work... - Tried different aliases with my domain crt (does the alias matter?) - Installed the crts in Windows and everthing shows fine there when viewing the crt. - Set my config in the server.xml (I have tried SSL and TLS): - Imported the certificates into my keystore in the following order: root, intermed, tomcat. C:\Program Files\Java\jdk1.5.0_05\bin>keytool -list -keystore tomcat.keystore Enter keystore password: changeit Keystore type: jks Keystore provider: SUN Your keystore contains 3 entries root, Nov 13, 2006, trustedCertEntry, Certificate fingerprint (MD5): A9:23:75:9B:BA:49:36:6E:31:C2:DB:F2:E7:66:BA:87 tomcat, Nov 13, 2006, trustedCertEntry, Certificate fingerprint (MD5): 73:EA:94:A1:38:C8:9A:5D:65:44:7C:C7:65:A7:01:5F intermed, Nov 13, 2006, trustedCertEntry, Certificate fingerprint (MD5): 7A:A5:BA:4F:BC:0A:C5:3C:56:E9:50:A0:13:6A:88:A9 C:\Program Files\Java\jdk1.5.0_05\bin> - When I installed the root crt it said that there was already a system wide root crt installed, do I want to continue to import it into the keystore and I said 'yes'. - All I get is a 'Page cannot be displayed' when trying to access the browser 'https:' - If I create a keystore without importing the real crt, then it works, but just says that the crt it to trusted. What am I missing? I can't get it to work... -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Saravana Kumar Sent: Wednesday, November 15, 2006 5:07 AM To: users@tomcat.apache.org Subject: Re: Need help w/ installing certificate continued... Andy Tipton wrote: > I have read all through the documentation and can't find what I am doing > wrong. The only thing that I didn't do was the importing of the > valicert_class2_root.crt file because I wasn't given one when I downloaded > my certificate. I imported the real one after I imported the intermediate > crt. Did you get any error during this step ie., importing intermediate crt after root? > So now I have this: > > C:\Program Files\Java\jdk1.5.0_05\bin>keytool -list -keystore .keystore > Enter keystore password: changeit > > Keystore type: jks > Keystore provider: SUN > > Your keystore contains 2 entries > > tomcat5, Nov 13, 2006, trustedCertEntry, > Certificate fingerprint (MD5): > 73:EA:94:A1:38:C8:9A:5D:65:44:7C:C7:65:A7:01:5F > intermed, Nov 13, 2006, trustedCertEntry, > Certificate fingerprint (MD5): > 7A:A5:BA:4F:BC:0A:C5:3C:56:E9:50:A0:13:6A:88:A9 > > C:\Program Files\Java\jdk1.5.0_05\bin> > > Could it have to do with the alias? I am can't figure out what it could > be. I am not sure of whether this could be the problem with alias. > I just get a 'page cannot be displayed' when trying to access it. I have > been reading, but can't find anywhere that really explains who the > keystore and certificate relate to each other. if the alias matters. > > I really need some help here. Below are the steps i did in one of my Linux box(must work in windows too). First i generated tomcat.key & CSR with: $ keytool -genkey -alias tomcat -keyalg RSA -keystore tomcat.key $ keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr -keystore tomcat.key Got the certs from our CA(Files sf_issuing.crt & _mydomain.crt). Copied the CA's intermediate cert to valicert_class2_root.crt First import the CA's intermediate certificate to root, like this: $ keytool -import -alias root -keystore tomcat.key -trustcacerts -file valicert_class2_root.crt Then import issuing cert to intermed: $ keytool -import -alias intermed -keystore tomcat.key -trustcacerts -file sf_issuing.crt Last is to import your domain's cert to tomcat alias: $ keytool -import -alias tomcat -keystore tomcat.key -trustcacerts -file _mydomain.crt The above steps worked perfectly for me. I had to just point the correct key file in server.xml and https started working. Let me know if that helped you out. Regds, SK - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fwd: failure notice
Would someone please remove me from the list. Every time I try to leave the list, I either get and error because the email it gets rejected as spam. thank you for your help. My email address is [EMAIL PROTECTED] <[EMAIL PROTECTED]>: 140.211.11.133 failed after I sent the message. Remote host said: 552 spam score (5.9) exceeded threshold <[EMAIL PROTECTED]>: 140.211.11.133 failed after I sent the message. Remote host said: 552 spam score (6.1) exceeded threshold Note: forwarded message attached. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --- Begin Message --- Hi. This is the qmail-send program at yahoo.com. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. <[EMAIL PROTECTED]>: 140.211.11.133 failed after I sent the message. Remote host said: 552 spam score (5.9) exceeded threshold --- Below this line is a copy of the message. Return-Path: <[EMAIL PROTECTED]> Received: (qmail 78159 invoked by uid 60001); 7 Jan 2007 16:45:21 - DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=mqhf8lu2zwm8HokQzTo1YLNRujUP0OjOj6/2xDizv9xEbGHWGXxFezDSVR50qm/4fex6fMO+GWwA20Xwhzw+JxZ5Y0DNBdcwcD4cAiiva0higq6+DJqArkiAQM4uBWUWaOf4qnO1XCmFPjshHaf/LetOWxzojqfOJMKy3YmvKWw=; X-YMail-OSG: 4q1CzzUVM1mER165xy81iSDfe6suB2tOOn7ZzFljC2U78V8KnxHQryqW2QVR5lz7uUtHrWMfIHzW0L3BdwXS9Zf4A_vyJWPw1_G_6qQuVd4QC5C4vKNC15wHGhQZic_BOubYJP6nvwEwGO8- Received: from [66.225.251.101] by web36804.mail.mud.yahoo.com via HTTP; Sun, 07 Jan 2007 08:45:21 PST Date: Sun, 7 Jan 2007 08:45:21 -0800 (PST) From: andy gordon <[EMAIL PROTECTED]> Subject: [EMAIL PROTECTED] To: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1986357998-1168188321=:76247" Content-Transfer-Encoding: 8bit Message-ID: <[EMAIL PROTECTED]> --0-1986357998-1168188321=:76247 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --0-1986357998-1168188321=:76247 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --0-1986357998-1168188321=:76247-- --- End Message --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 4.x (Major Problem)
Hi All, I have a strange problem that I think Tomcat is causing it, and I need to confirm if my assumptions are correct. We have a Tomcat-Standalone (Apache Tomcat/4.0.3) running as a service, we have been working with that version of tomcat for quite sometime with different applications. Most of the applications we used that server for were client server applications that do not perform much data updates (mostly about data pulls and display), and with limited number of concurrent users. However, the recent application that de deployed on the same Tomcat version had a major difference in which there are high frequency of concurrent users and also high rate of data manipulations. The application did not show problems initially, but after couple of months of actual usage, we started noticing strange database discrepancy problems. For example: there are two tables with one to many relationship, the records should be (A1, B1_1), (A1, B1_2) / (A2, B2_1), (A2, B2_2)…etc. For an unknown reason, There are occasional mal-updates that create wrong relationships in the database, so the records might look like (A1, B2_1), (A3, B1_2) We tried to tackle the problem from different perspectives. We performed code inspections, application design inspections, The JDBC Data Bridge used and the database software. The static checks all passed and the semantics appeared ok, it must be some runtime behavior that results in this. I started suspecting Tomcat for the next reason: a bug was reported about an operation that failed to insert in the database. While debugging the database query logs, the reason was that the field type is integer, while the passed value was a "string", we went and inspected the code design and semantics and it was an impossible case that the used "Variable" could have been used in that SQL query. For some reason, at the runtime, a variable reference was switched in the JVM, which suggests a memory leak and a HUGE problem with that version of Tomcat, and that also confirmed to a certain extent the discrepancy problem that occurs with a high volume of user sessions in the recent application. I would appreciate it if someone confirms that suspicion, and whether Tomcat is a reliable server for a high demanding application. Thank you, Andy
Reinstalling Tomcat after screwing up first install
I installed Tomcat for IIS 6 and screwed up the install so I had to uninstall it. However when I uninstalled it, the the tomcat service was not removed but it got disabled. I have tried a couple of times to reinstall tomcat but I keep getting an error message. I have not been able to reinstall tomcat since. I have been trying to clean up my past installs of the software and start from scratch but I just can't figure out how to get that done.How do I go about getting rid of the current traces of Tomcat I have on my server and install tomcat again. Any help from you experts will be appreciated Cheap talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. http://voice.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4.x (Major Problem)
This is the current environment: JVM: Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode) OS: Windows 2003 server (Version 5.2.3790) Database: Oracle 9i (Release 9.2.0.1.0) JDBC Driver: Netdirect JDataServer Version 2.20.1 Web/application server: Tomcat-Standalone (Apache Tomcat/4.0.3) / hosts 4 active applications the jsp page contains these exact lines of code. - String commonName = (String)session.getAttribute("commonName"); String[] value1 = (request.getParameterValues("value_1") != null) ? request.getParameterValues("value_1") : new String[0]; String[] value2 = (request.getParameterValues("value_2") != null) ? request.getParameterValues("value_2") : new String[0]; if (value1.length > 0 && value2.length > 0) { connection= obj.createConnection(); stmt= connection.createStatement(); String query= ""; for (int i= 0; i < value1.length; i++) { String singleVal1= value1[i]; for (int j= 0; j < value2.length; j++) { try { query= "insert into sample_table(id,val1,common_name,val2)" + " values (sequence.nextVal," + singleVal1 + ",'" + commonName + "','" + val2[j] + "')"; System.out.println(query); stmt.executeUpdate(query); } catch (Exception e) { e.printStackTrace(); } } } } - Where sample_table (id number, val1 number, common_name varchar2, val2 varchar2) - Assume the runtime values are: commonName: nameA value1: [111] value2: [valueB1] - The expected query printout should be: "insert into sample_table(id,val1,common_name,val2) values( sequence.nextVal,111,'nameA','valueB1')" However, the actual query printout (that cause an exception, and the behavior I cannot justify) "insert into sample_table(id,val1,common_name,val2) values( sequence.nextVal,nameB,'nameA','valueB1')" Where the value "nameB" is the "commonName" session attribute value from a a different session. - The code is simple, and the query is printed on the stdout before it is executed, that was the reason I suspected Tomcat as the reason for the problem having a session leak somehow. The application assumes about 25 concurrent sessions with heavy use of session variables. I hope this can help. Thank you, Andy - On 1/19/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > From: Andy Moller [mailto:[EMAIL PROTECTED] > Subject: Tomcat 4.x (Major Problem) > > I have a strange problem that I think Tomcat is causing it, > and I need to confirm if my assumptions are correct. We obviously don't have access to all the data you have available, but from what's been stated, your conclusions are not justified. It would be nearly impossible for Tomcat (even the five-year-old, horribly out of date version you're running) to cause this kind of problem. It is much, much more likely to be something subtle in your app, such as inadvertent data sharing via static or singleton variables or storing data in the wrong scope (e.g., request-specific items stored in a Session object). There is a very small chance that the problem could be any of the following, but you didn't bother to tell us what they are: 1) JVM (what level & vendor?) 2) OS (what level & vendor?) 3) data base (what level & vendor?) 4) JDBC driver (what level & vendor?) Since you used the term "JDBC Data Bridge", I fear you may be using the ancient ODBC bridge to some flavor of Microsoft data base (Access?). If so, both ODBC and Access have long been proven to be completely inadequate for any form of production use. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4.x (Major Problem)
On 1/22/07, Christopher Schultz <[EMAIL PROTECTED]> wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andy, Andy Moller wrote: > String commonName = (String)session.getAttribute("commonName"); > String[] value1 = (request.getParameterValues("value_1") != null) >? request.getParameterValues("value_1") >: new String[0]; > > String[] value2 = >(request.getParameterValues("value_2") != null) >? request.getParameterValues("value_2") >: new String[0]; [snip] >query= >"insert into sample_table(id,val1,common_name,val2)" >+ " values (sequence.nextVal," >+ singleVal1 >+ ",'" >+ commonName >+ "','" >+ val2[j] >+ "')"; A few notes: 1. You are using the array "val2" here instead of "value2". Is that intentional? Or, were you somewhat obfuscating your code for publication on the list? Andy: It is a mistake while changing the variable naming, the variable name should be "val2" not "value2", i have to alter the namings 2. You really should be using PreparedStatements instead of string concatenation for parameter replacement. Andy: you are right, but this is one "way" to do it, It has performance and other issues but it should not affect the final results. 3. These is no evidence that "commonName" ever had the value that you expected. Your initial claim was that the value was being taken from the session and, between that time and the issue of the SQL query, the value was being changed. Andy: the value of the "commonName" is set ONLY ONCE at the session initalization, and not updated during the session life, you can think about it as an application specific session ID. A filter ensures the existance of a valid "commonName" with each request, otherwise the access to the JSP page is not permitted So... what's going on here? During the processing of this request, can you ever see session.getAttribute("commonName") returning the correct value? Or, has the session really been polluted somehow, or have you really "swtiched" sessions somehow? Andy: (same note as above) Where the value "nameB" is the "commonName" session attribute value from > a different session. Is there any relationship whatsoever between the session you should have and the session that you are apparently getting? Are you /sure/ that there is another session containing that value, or are you assuming that since it's not the expected value that you must be looking at another session. Andy: I am sure there is another session with the "nameB" at the same time i had that incident, the application has a filter that keep track of the session requests and activities, it keeps a log with requests and operations for every session from start to end. Is your entire application written in JSP? I'm wondering if you ever try to manage sessions yourself in any way. Try this: create an HttpSesssionBindingListener and implement the valueBound method like this: public void valueBound(HttpSessionBindingEvent esbe) { if("commonName".equals(esbe.getName())) { System.out.println("Setting session[" + esbe.getSession().getId() + "].commonName=" + esbe.getValue()); new Throwable().printStackTrace(System.out); } } This will put a full stack trace into stdout whenever the value of commonName for a session is changed. I'm assuming that you have a test plan that is reproducing this error in development, so you can watch the logs as you move through your application. Login and watch the logs. You can see when a value is poked into the session, and what that value is. If you see that the value is changing in your session (and it shouldn't be), then you'll see the stack trace of the code that's doing it. You can install this listener using a element in your web.xml like this: your.package.ComonNameSessionBindingListener This goes after any and elements and before any elements. Andy: I have not attempted a similar check, though the filter I mentioned earlier logs the session variables with each request. I was not suspecting session variables until I stumbled upon that statement in the error log. We tried to simulate random sessions and perform similar operations per each session to overload the JDBC drivers but all operations went ok. That issue occurs on relatively far intervals and in a random fashion; w
Re: Tomcat 4.x (Major Problem)
On 1/22/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > From: Andy Moller [mailto:[EMAIL PROTECTED] > Subject: Re: Tomcat 4.x (Major Problem) > String[] value1 = (request.getParameterValues("value_1") != null) > ? request.getParameterValues("value_1") > : new String[0]; > String singleVal1= value1[i]; > query= > "insert into sample_table(id,val1,common_name,val2)" > + " values (sequence.nextVal," > + singleVal1 > + ",'" > + commonName > + "','" > + val2[j] > + "')"; > However, the actual query printout (that cause an exception, and the > behavior I cannot justify) > "insert into sample_table(id,val1,common_name,val2) values( > sequence.nextVal,nameB,'nameA','valueB1')" There's nothing in your code that checks the value_1 parameter set for being numeric or having other inappropriate values; consequently, you're at the mercy of the client to submit valid data. No evidence here of anything but insufficiently robust programming. - Chuck Andy: this is a premature judgment based on an isolated piece of code. Your argument suggests that the client has control on the data that is being sent while as it is not. The code assumes valid data and errors were trapped on the database level when the statement is executed. The programming tip is appreciated although it is out of context. thanks, Andy THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: where is "catalina.out" defined and enabled?
Philip, Great Question! Go look at http://tomcat.apache.org/tomcat-5.5-doc/logging.html This should help. The Tomcat folks have implemented log4j which you can use to redirect the output from the CMD window to a log file. Give this a try. Its easy to set up. There may be others ways to accomplish this but I think this will work for you. - andy Philip Chang <[EMAIL PROTECTED]> wrote: My Tomcat 5.0.28 running on Windows 2000 Pro is not dumping to $CATALINA_HOME\logs\catalina.out at all. $CATALINA_HOME\conf\server.xml contains the following, but no reference to catalina.out: prefix="catalina_log." suffix=".txt" timestamp="true"/> directory="logs" prefix="localhost_log." suffix=".txt" timestamp="true"/> Tomcat is dumping out some traces to the above two files, but the traces that Tomcat dumps to console/stdout/Windows Command Prompt are not dumped to "catalina.out" or any other file at all. How do I tell Tomcat to dump the traces to console/stdout to also dump to file "catalina.out"? Thanks for all pointers! Philip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
Re: Unable to open Tomcat Manager?
hi, If you are intending on using MySQL and a JDBC Realm for access control, then the Tomcat-users.xml file is not used. I am wondering if in your role table you have two rows for user name admin? if not then this could be your problem as there has to be one row for each role a specific user name performs. - andy ±ç¬±³õ <[EMAIL PROTECTED]> wrote: My tomcat-users.xml > My tomcat-users.xml > > > > > > > > > > > My server.xml driverName="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://localhost:3306/erp" connectionName="root" connectionPassword="abc123" digest="MD5" userTable="user_profile" userNameCol="usernm" userCredCol="passwd" userRoleTable="user_role" roleNameCol="role_name" /> I have inputted username and user role in tables. Still receive this message HTTP Status 403 - Access to the requested resource has been denied - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! FareChase - Search multiple travel sites in one click.
Re: Unable to open Tomcat Manager?
Just a couple of other thoughts... I presume you are using tomcat 5.5x THere is a default resource definition under global naming resources for an in memory database that points to conf/tomcat-users.xml. Without having testing myself, if it still exists in you server.xml file i am wondering if it is getting in your way. There is a resource link in manager.xml that points to the resource definition in the server.xml. There is also a resource-env-ref that references the userdatabase in the web.xml for the manager. Both those files are under the manager webapp directory. Hope this helps. also have been able to reach MySQL in general from Tomcat? - andy ±ç¬±³õ <[EMAIL PROTECTED]> wrote: Yes, Andy. I use MySQL and JDBCRealm. If tomcat-users.xml is ignored, it is fine. But I have entered records in table of user and user role. I have tried input the password in both plain text and MD5 encrypted in user table. Still not okay. 2005/10/21, Caldarale, Charles R : > > From: Giorgio Clavelli [mailto:[EMAIL PROTECTED] > > Subject: Re: Unable to open Tomcat Manager? > > > > I solved it by deleting the all Server files and re-unzip > > them back in the same location (possibly not required this > > deletion but who knows?). > > I seriously doubt that had anything to do with it. Note that you cannot > manually edit tomcat-users.xml while Tomcat is running, since Tomcat > rewrites it at some point (probably at termination, but I haven't > verified that). You can update it on the fly with the Admin app; of > course you have to login with a userid that has the admin role to do so. > > - 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! FareChase - Search multiple travel sites in one click.
Re: Unable to open Tomcat Manager?
Confine to a certain directory: yes since that is a context. i noticed the connection url you are using is different than mine. Mine is from the 5.5. doc and includes the password and user name in it.I am presuming the database with your users and users_roles tables is named ERP. I am also presuming the userid and password for the connection is not supposed to come from ERP. some additional thoughts and questions if you haven't already solved the problem: In the server xml where did you place the realm statement? if you placed it in the at the engine level then did did you comment out the realm statement for the userdatabaserealm in the engine level. if userdatabasrealm comes after jdbc realm then it take precedence over jdbc. hope this helps -andy ±ç¬±³õ <[EMAIL PROTECTED]> wrote: I have server.xml, no resource-env-ref nor manager.xml My context.xml is within meta-inf directory. The problem still persists. Can I confine the prompt of username and password of JDBCRealm to certain directory only? such as http://localhost:8080/welcome.jsp, does not prompt http://localhost:8080/erp, prompt http://localhost:8080/quotation, does not prompt Thanks 2005/10/21, Paul Singleton : > Caldarale, Charles R wrote: > > > ... Note that you cannot > > manually edit tomcat-users.xml while Tomcat is running, since Tomcat > > rewrites it at some point (probably at termination, but I haven't > > verified that). > > Does anyone else find that 5.5.9 rewrites it with these > permissions under Linux? > > -rw-rw-r-- 1 tomcat tomcat 439 Oct 2 20:01 tomcat-users.xml > > Since it contains a plaintext password this is a security > risk. > > Paul Singleton > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.344 / Virus Database: 267.12.4/143 - Release Date: 19/Oct/2005 > > > - > 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] - Yahoo! FareChase - Search multiple travel sites in one click.
RE: Undeploy/Deploy problem
Alllistair, If you don't mind providing a clarifcation, becuase when I looked at the definition of antijarlocking there is another attribute called antiResourceLocking whose definition is as follows and seems to be exactly the problem Jan is experiencing. antiResourceLocking definition from 5.5 server config reference says "If true, Tomcat will prevent any file locking. This will significantly impact startup time of applications, but allows full webapp hot deploy and undeploy on platforms or configurations where file locking can occur. If not specified, the default value is false." Thank you in advance for contrasting the difference. - andy Allistair Crossley <[EMAIL PROTECTED]> wrote: > -Original Message- > From: Jan Pernica [mailto:[EMAIL PROTECTED] > Sent: 24 October 2005 14:34 > To: users@tomcat.apache.org > Subject: Undeploy/Deploy problem > > > We have problem with Undeploy war and deploy again. Tomcat does not > remove folder under webapps and leaves some jars in the WEB-INF/lib. > These jars are tomahawk.jar and ehcache.jar. Any sugestions > how to avoid > this problem?: > > Thank you > > Jan > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- Disclaimer: The information contained within this e-mail is confidential and may be privileged. This email is intended solely for the named recipient only; if you are not authorised you must not disclose, copy, distribute, or retain this message or any part of it. If you have received this message in error please contact the sender at once so that we may take the appropriate action and avoid troubling you further. Any views expressed in this message are those of the individual sender. QAS Limited has the right lawfully to record, monitor and inspect messages between its employees and any third party. Your messages shall be subject to such lawful supervision as QAS Limited deems to be necessary in order to protect its information, its interests and its reputation. Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS Limited cannot guarantee that attachments are virus free or compatible with your systems and does not accept any liability in respect of viruses or computer problems experienced. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! FareChase - Search multiple travel sites in one click.
Re: how to empty tomcat cache ?
Which cache are you referring to? Frederic D <[EMAIL PROTECTED]> wrote:Hi ! Is it possible to empty tomcat cache without restarting tomcat ? Thanks. Frederic ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! FareChase - Search multiple travel sites in one click.
Informing Tomcat of proxy base URL?
I have a Tomcat server providing an application via an Apache proxy. User HTTP requests to http://myserver.example.com/server/ on port 80 get mapped by the proxy to http://localhost:8082, which is set up as a valid Tomcat provider for Apache. So far so good. However, I've noticed problems using Tapestry and DWR (though I don't think they're responsible for the problem), where auto-generated paths from Tomcat apps will look like /foo/bar - this works fine if pointing a browser directly at Tomcat on port 8080, but since the proxy already has a URL path prefix of /server/, these links don't work through the proxy interface. Is there a standard way of informing Tomcat that when accessed on port 8082 it should consider itself either to have a base path starting with /server or to use a base URL of http://myserver.example.com/server? I've already seen references to mod_proxy_html as an Apache module which can do some HTML URL re-writing, but I'm not sure if this is sufficient, since JavaScript libraries like DWR seem to also get some base path information from Tomcat and this is unlikely to be properly handled by mod_proxy_html. Any help would be very welcome - I hope there's a standard solution that I've just been unable to find with Google! Cheers, Andy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Informing Tomcat of proxy base URL?
Thought I'd send this again in case anyone knows an answer - I suspect that once a day's worth of posts have gone by, unanswered posts will probably never be answered :) If there's no mechanism for solving this (i.e. passing the proxy base path to Tomcat), it'd be useful to know: I can always configure the proxy such that there is no base path, but if I don't have to, it'd be even better! Cheers, Andy Andy Buckley wrote: I have a Tomcat server providing an application via an Apache proxy. User HTTP requests to http://myserver.example.com/server/ on port 80 get mapped by the proxy to http://localhost:8082, which is set up as a valid Tomcat provider for Apache. So far so good. However, I've noticed problems using Tapestry and DWR (though I don't think they're responsible for the problem), where auto-generated paths from Tomcat apps will look like /foo/bar - this works fine if pointing a browser directly at Tomcat on port 8080, but since the proxy already has a URL path prefix of /server/, these links don't work through the proxy interface. Is there a standard way of informing Tomcat that when accessed on port 8082 it should consider itself either to have a base path starting with /server or to use a base URL of http://myserver.example.com/server? I've already seen references to mod_proxy_html as an Apache module which can do some HTML URL re-writing, but I'm not sure if this is sufficient, since JavaScript libraries like DWR seem to also get some base path information from Tomcat and this is unlikely to be properly handled by mod_proxy_html. Any help would be very welcome - I hope there's a standard solution that I've just been unable to find with Google! Cheers, Andy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and Axis Logging delay
Hi all, We're very confused. We have a webservice that is using Axis1.4 and running under Apache tomcat-5.0.27. We have an apache2 modjk connector in it that's forwarding requests to the tomcat. We use java.util.logging in our code, and are using Java 5. Now we have a webapp that has some servlets/jsps and an axis webservice in the same war. We have logging set up on tomcat to use the tags as follows... In directory.. /usr/local/tomcat/conf/Catalina/ourapp.ourdomain.com we have.. ourapp.xml which contains The problem we're seeing is that the logs for the servlets etc all come out fine. and immediately, but the logs for the webservice seem not to come out straight away. It is sometimes taking hours for the logs to appear e.g. 2007-03-29 04:30:25 28-Mar-2007 17:17:51 com.ourcompany.es.ourapp.webservice.server.OurService send INFO: Webservice Called 28-Mar-2007 17:17:51 com.ourcompany.es.ourapp.database.dao.ContactDAO getInsertSQL The element seems to be putting in this 2007-03-29 04:30:25 Then the rest of the log which is at 28-Mar-2007 17:17:51 We're all very confused, The webservice *was definately" called at 17:17 on the 28th, but did not appear in the log file until 04:30 the following morning. Anyone got any ideas?? Thanks Andy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and Axis Logging delay
Hi all, We're very confused. We have a webservice that is using Axis1.4 and running under Apache tomcat-5.0.27. We have an apache2 modjk connector in it that's forwarding requests to the tomcat. We use java.util.logging in our code, and are using Java 5. Now we have a webapp that has some servlets/jsps and an axis webservice in the same war. We have logging set up on tomcat to use the tags as follows... In directory.. /usr/local/tomcat/conf/Catalina/ourapp.ourdomain.com we have.. ourapp.xml which contains The problem we're seeing is that the logs for the servlets etc all come out fine. and immediately, but the logs for the webservice seem not to come out straight away. It is sometimes taking hours for the logs to appear e.g. 2007-03-29 04:30:25 28-Mar-2007 17:17:51 com.ourcompany.es.ourapp.webservice.server.OurService send INFO: Webservice Called 28-Mar-2007 17:17:51 com.ourcompany.es.ourapp.database.dao.ContactDAO getInsertSQL The element seems to be putting in this 2007-03-29 04:30:25 Then the rest of the log which is at 28-Mar-2007 17:17:51 We're all very confused, The webservice *was definately" called at 17:17 on the 28th, but did not appear in the log file until 04:30 the following morning. Anyone got any ideas?? Thanks Andy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and Axis Logging delay
Hi all, Apologies if this email has come through already... We're very confused. We have a webservice that is using Axis1.4 and running under Apache tomcat-5.0.27. We have an apache2 modjk connector in it that's forwarding requests to the tomcat. We use java.util.logging in our code, and are using Java 5. Now we have a webapp that has some servlets/jsps and an axis webservice in the same war. We have logging set up on tomcat to use the tags as follows... In directory.. /usr/local/tomcat/conf/Catalina/ourapp.ourdomain.com we have.. ourapp.xml which contains The problem we're seeing is that the logs for the servlets etc all come out fine. and immediately, but the logs for the webservice seem not to come out straight away. It is sometimes taking hours for the logs to appear e.g. 2007-03-29 04:30:25 28-Mar-2007 17:17:51 com.ourcompany.es.ourapp.webservice.server.OurService send INFO: Webservice Called 28-Mar-2007 17:17:51 com.ourcompany.es.ourapp.database.dao.ContactDAO getInsertSQL The element seems to be putting in this 2007-03-29 04:30:25 Then the rest of the log which is at 28-Mar-2007 17:17:51 We're all very confused, The webservice *was definately" called at 17:17 on the 28th, but did not appear in the log file until 04:30 the following morning. Anyone got any ideas?? Thanks Andy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
httpd cant talk to tomcat workers
Hi list, I'm new to tomcat and am trying to get apache to talk via mod_jk. I am using httpd 2.2.8 compiled from source mod_jk 1.2.26 from source and tomcat 5.5.23 from Alfresco 2.9B community. So far I have created a workers.properties based on the example file included with tomcat 5.5 source (just corrected the paths and set for UNIX) and added the following to my apache httpd.conf: # Load mod_jk module LoadModulejk_module modules/mod_jk.so # Declare the module for (remove this line on Apache 2.0.x) #AddModule mod_jk.c # Where to find workers.properties JkWorkersFile /opt/alfresco/tomcat/conf/workers.properties # Where to put jk shared memory JkShmFile /var/log/httpd/mod_jk.shm # Where to put jk logs JkLogFile /var/log/httpd/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevelinfo # Select the timestamp log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " JkMount /* ajp13 # Send servlet for context /examples to worker named worker1 #JkMount /alfresco/servlet/* worker1 # Send JSPs for context /examples to worker named worker1 #JkMount /alfresco/*.jsp worker1 #JkOptions +ForwardURICompatUnparsed When I try and connect via a browser to http://hostname/alfresco I get the error: Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. And in the mod_jk logs I see: [Wed Mar 26 14:33:01 2008] [5617:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.class_path' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5617:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.cmd_line' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5617:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.jvm_lib' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5617:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.stdout' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5617:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.stderr' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5617:3086026976] [info] init_jk::mod_jk.c (2825): mod_jk/1.2.26 initialized [Wed Mar 26 14:33:01 2008] [5619:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.class_path' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5619:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.cmd_line' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5619:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.jvm_lib' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5619:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.stdout' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5619:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.stderr' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5619:3086026976] [info] init_jk::mod_jk.c (2825): mod_jk/1.2.26 initialized [Wed Mar 26 14:33:07 2008] [5620:3086026976] [info] jk_open_socket::jk_connect.c (566): connect to 127.0.0.1:8009 failed (errno=111) [Wed Mar 26 14:33:07 2008] [5620:3086026976] [info] ajp_connect_to_endpoint::jk_ajp_common.c (869): Failed opening socket to (127.0.0.1:8009) (errno=111) [Wed Mar 26 14:33:07 2008] [5620:3086026976] [error] ajp_send_request::jk_ajp_common.c (1359): (ajp13) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111) [Wed Mar 26 14:33:07 2008] [5620:3086026976] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1) One thing Im not getting my head round is which configuration files tomcat looks in at startup and whether I should be seeing a java process listening on 8009 (i assume yes). How can I troubleshoot this further? I dont see any errors from tomcat regarding not being able to start a process listening on 8009, where is this normally done? thanks for any help! Andy.
Re: httpd cant talk to tomcat workers
Hi Peter, hey thanks a lot, got it working! As I had a number of files in the conf directory I was a bit confused and was also not reading what where comments and what where not very accuarately in the XML! :P So I just uncommented the connection in server.xml and straight off httpd can talk to tomcat :D Actually enabling the AJP in server.xml initially broke the app, Alfresco, which I manage to fix by adding this to the JAVA_OPTS in the startup script: -Djava.rmi.server.hostname=myhostname.net Not sure exactly why I needed that as it wasnt needed before, but hey! thanks for your help! cheers Andy. PS Can't claim to be a Mancunian but will confess to working with them ;) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bending Jasper to My Will
I have been going through the Jasper source code to figure out how to make it do what I want but have been unsuccessful. So I thought I would ask the experts. (Please let me know if there is a better forum for this particular question.) I want Jasper to look for JSP and Tag files in a specific location (e.g. based on a request param); and then fall back to a default location if the file is not found. This would be extremely useful for skinning a webapp. Any ideas? -AndyC - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bending Jasper to My Will
Pid wrote: Andy Clark wrote: I want Jasper to look for JSP and Tag files in a >> specific location (e.g. based on a request param); >> and then fall back to a default location if the >> file is not found. This would be extremely useful for skinning a webapp. Cascading Style Sheets are an even more useful, > practical and easier to implement solution for > skinning a webapp. > > Failing that, programmatically customising the HTML > output of a common set of tag files would be easier. CSS and DHTML only applies to the client-side and does not allow server-side customizations. We need to go beyond simple color changes or even changing the HTML layout; we need to be able to override any or all tags and JSP files in parallel. In other words, multiple versions of the code is deployed and we want to control which application code to use based on the user's settings. Our application allows users to host multiple domains and different user levels, each of which can have a different skin. And we currently allow simple changes to color, etc via CSS. But if the skin author wants to change the functionality or layout, they must modify the base JSP files/tags. Which means that *all* of the skins see the changes. Not what we want. For our customers, it is important to be able to brand each skin independently and even control which features are exposed via the interface. And we have no way of knowing all the different ways in which the customer wants to modify the application. And... they should be able to do all of this without modifying the web.xml file. So what I would like to be able to do (transparently from the user) is to, on a request-by-request basis, determine which tags/JSP files to use based on that user's skin preference. For example, if the user's skin is set to "Foo", then I want to look for tag and JSP file overrides in the skins/Foo/ directory and use those; if I don't find them there, I want to fallback and use the tags/JSP files in the default directory. I'll use a more precise example. Say that I have the following files in my webapp: WEB-INF/tags/view.tag WEB-INF/tags/button.tag skins/Foo/tags/view.tag skins/Bar/tags/button.tag with these contents: <%-- file: WEB-INF/tags/view.tag --%> Hello World <%-- file: WEB-INF/tags/button.tag --%> <%@ attribute name='text' required='true' %> ${text} <%-- file: skins/Foo/tags/view.tag --%> Welcome to Clicky McClicker's Clicktastic Emporium <%-- file: skins/Bar/tags/button.tag --%> <%@ attribute name='text' required='true' %> ${text} If there are three users whose skin preference is set to , Foo, and Bar, respectively, then the interface they see is completely different when the JSP they hit uses in the page. User 1 sees: Hello World Click Me User 2 sees: Welcome to Clicky McClicker's Clicktastic Emporium Clickity Click User 3 sees: Hello World Click Me In essence, I need to control Jasper internally to do two things: 1) resolve all requests for tag/JSP files at the requested location to look for the same file in the user's skin directory; and 2) failing to find the file in the first location, try again at the default location. I hope this sheds some more light on what I need to do. And I really hope there are some Jasper experts on the list that can point me in the right direction (even if it means patching the Jasper source). Customising a web app by implementing different sets > of tag files seems like the hardest possible route. True, but it's what I need to do. Unless there's some other JSP trick that I'm missing... -AndyC - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bending Jasper to My Will
Thanks for everyone with their quick responses to my query regarding how to override tags/JSP files. My initial posts on the subject can be found here: http://mail-archives.apache.org/mod_mbox/tomcat-users/200804.mbox/[EMAIL PROTECTED] http://mail-archives.apache.org/mod_mbox/tomcat-users/200804.mbox/[EMAIL PROTECTED] Many people suggested that I try various frameworks for the application because they contain template engines that may work for my purpose. Unfortunately, I think that this is a non-starter because the app is already written (quite nicely, I might add) in straight JSPs. I took a quick look through the various projects' websites and documentation. It seems like they all do roughly the same thing and that many of them are like JSPs but with their own custom syntax. That aside, I didn't see anything about how to skin the app at the level that I want. I saw mechanisms to use different templates for entire responses but nothing about overriding individual parts of those templates. Granted, I could be completely wrong about any and all of these points because I don't have first-hand experience with these frameworks. Anyway, I'd like to clarify my needs a little further because it didn't seem that the example in my second post was clear. First, my requirement are that it use straight JSPs. Second, I must be able to override any tag or JSP included from another tag/JSP file, not just whole response pages. Let me use a more complex example. Say I have the following response page and source files: [created just for discussion and edited for brevity] <%-- file: response.jsp --%> <%-- file: /WEB-INF/tags/table.tag --%> <%-- file: /WEB-INF/tags/header.tag --%> <%@ attribute name='cols' type='java.util.List' %> <%-- file: /WEB-INF/tags/headerCell.tag --%> <%@ attribute name='data' type='java.lang.Object' %> ${data} <%-- file: /WEB-INF/tags/body.tag --%> <%@ attribute name='rows' type='java.util.List' %> <%-- file: /WEB-INF/tags/rowCell.tag --%> <%@ attribute name='data' type='java.lang.Object' %> ${data} Looking at the result, the contents of the page are the result of the composition of all of these JSPs and tags, structured like so: response.jsp /WEB-INF/tags/table.tag /WEB-INF/tags/header.tag /WEB-INF/tags/headerCell.tag ... /WEB-INF/tags/body.tag /WEB-INF/tags/rowCell.tag ... What I need is the ability to override any one of these parts independently and based on a user pref. Given User 1, 2, and 3 who have skin preference of , "Foo", and "Bar", respectively, the output they each see for response.jsp can be different. The base case, User 1, that does not have a skin specified would see the response as structured like I illustrated above. However, skin "Foo" may replace the response.jsp file but leave the rest in place. And skin "Bar" may just replace headerCell.tag and rowCell.tag. For skin "Foo", the response page should be different but should continue to use all of the default tags. Whereas for skin "Bar", the response page table, header, and body tags stay the same; but the custom header cell and row cell tags are used instead of their defaults. In the last case, the structure of the response should look like this: response.jsp /WEB-INF/tags/table.tag /WEB-INF/tags/header.tag /skins/Foo/tags/headerCell.tag ... /WEB-INF/tags/body.tag /skins/Foo/tags/rowCell.tag ... Notice that the JSP/tag files that compose the response are a mixture of the default ones and the custom ones that the skin overrides. Skin authors should not have to make complete copies of the default skin tree in order to edit only a handful of files; the system should make that transparent to them. Does this make it any clearer? My apologies if the frameworks mention do exactly this and I just didn't notice from their documentation. But since the app is already written, it would make a massive change to introduce an additional dependency. As I mentioned in my first post, I browsed through the Jasper source but didn't see any way to hook into the JSP/tag file resolution mechanism. I figured that I could extend a factory class or register some kind of resolver that would allow me to achieve the results I need. Unfortunately many things were final and didn't provide hooks for extension. I'm going to be looking for reasonable workarounds if there's no way to extend Jasper. But if anyone know of anything else given my requirements, it would be greatly appreciated. Thanks! -AndyC - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bending Jasper to My Will
Hassan wrote: I think that this is a non-starter because the app is already written (quite nicely, I might add) in straight JSPs. If it's already "quite nicely" written, why doesn't > it do what you want? :-) Excellent point! But ultimately there are limitations in the extensibility of the engine that limit what we can do. We're often pushing the boundaries of what the technology can handle. Oh well... nothing is perfect. -AndyC - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bending Jasper to My Will
Lucas wrote: To answer the original question, there is a > mechanism that Tomcat provides to handle the > specific thing you want to achieve. The solution > is very Tomcat specific, so I do not really > recommend it, anyhow, if you really _need_to_have > _this_ then the way to achieve it is the following: [...] Thanks for the suggestion but I think I am out of luck because we're using a different web container. Even though there's a ton of different web containers, they all seem to use Jasper so that's where I was attempting to tackle the problem. But, referring to your specific suggestion, I wonder if there would be a problem. When I was browsing the Jasper source, I noticed that it caches the resolved JSP/tag files. Which means that if I only change the resolution mechanism, it won't work. Because unless I am also able to modify the cache ID, then whichever source file is resolved first for a specific JSP/tag, then that one will be cached and be returned the next time it's referenced, even if the user's skin is different. (If that makes any sense.) PS: This will make yous web app not 100% standard, > and if you have to migrate this behavior to other > web containers, it might get trickier, so be sure > that you really need this. Understood. Which is also why I'm hoping that the Jasper developers would be open to patches that allow it to be extended in this way. Ahh, just one more thing, do not even try to > modify Jasper itself unless you know what you > are doing; Most people experimenting with Jasper end up in nothing. That way leads madness. Got it. :) -AndyC - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Bending Jasper to My Will
Alan Chaney wrote: Correct me if I am wrong but you want to have a > level of configuration which is more than just > appearance. It's mostly for appearance but that also ties in with functionality. For example, if a page displays the preferences that a user can change, a skin author can change which preferences are "available" by rewriting the prefs page to not include those elements. But these changes are specific to a class of users that are assigned (or have chosen) that skin. The next thing which isn't clear to me is at who > will choose the feature set. Is this going to be > a runtime thing or a startup configuration thing? > Will your end-users be able to configure things > or will it be the result of specific programming > work? These changes will be made by customers themselves or professional services. We provide a tag library that exposes all of the functionality of our web application. We use this tag library to build the default skin of the app but customers often want to tweak the appearance in ways that go beyond simple CSS changes. In addition, right now there is no way for them to localize their changes to a particular skin. If they make changes to a presentation tag (or JSP) then all other skins see those changes. And one of my primary goals is to allow users to create custom skins without any configuration changes to the web container. Just drop in the skin and it works. I'm currently exploring ways to work around the problem within the confines of what JSPs allow. But I'm having limited success with that route... -AndyC - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JVM goes away
dmesg check if the linux out of memory kill struck you :) Andy On 01/11/2010 04:37 PM, Carl wrote: > This is a new server, a Dell T110 with a Xeon 3440 processor and 4GB memory. > I have turned off both the turbo mode and hyperthreading. > > The environment: > > 64 bit Slackware Linux > > java version "1.6.0_17" > Java(TM) SE Runtime Environment (build 1.6.0_17-b04) > Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode) > > Tomcat: apache-tomcat-6.0.20 > > JAVA_OPTS="-Xms2400m -Xmx2400m -XX:PermSize=512m -XX:MaxPermSize=512m" > > I have watched observed the memory usage and general performance with Java > VisualVM and have seen nothing strange. GC seems to be performing well and > the memory rarely gets anywhere near the max. > > The server runs well, idling along at 2-5% load, serving jsp's, etc. at a > reasonable speed. Without warning and with no tracks in any log (Tomcat or > system) or to the console, the JVM will just go away, disappear. Sometimes, > the system will run for a week, sometimes for only several hours. Initially, > I thought the problem was the turbo or hyperthreading but, no, the problem > persists. > > When the JVM goes away, the memory that it held is still being held (as seen > from top) but it is nowhere near the machine physical memory. > > The application has been running on an older server (Dell 600SC, 32 bit > Slackware, 2GB memory) for several years and, while the application will > throw exceptions now and then, it never crashed the JVM. This leads me to > believe the problem has something to do with the 64 bit JVM but, with errors, > I can't be certain and don't know what I can do about it except go back to 32 > bit. > > I plan to reinstall Java tonight but, it would seem if the JVM were > corrupted, it simply would not run. > > Any ideas are welcome. > > TIA, > > Carl > > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JVM goes away
I assume $GB means 4GB :) With that kind of memory use it doesn't sound entirely like the OOM killer. Have you looked around the filesystem for hs_err[pid].pid files? This usually is written to the cwd of the java process. That might give you ideas if it's a native crash. If so, it'll have the java stack, and other native information that might shed some light. Otherwise, if the Tomcat JVM isn't running as a daemon, is it nohup'ed? Andy On 01/11/2010 05:33 PM, Carl wrote: > Peter and Andy, > > Thanks for your quick responses. > > Memory: Physical - $GB >Used - 2.4GB to 3.0 GB (according to top... have never > seen it above 3GB) >Swap - 19GB, none ever used (or, at least I have never > seen any used.) > > The above are all from top. > > The 2.4GB is after the JVM just crashed (after running less than an > hour after having run for five days with nary a blip) and I just > restarted Tomcat (customers are running right now) so it is a little > higher than normal because it has perhaps .5GB+ unrecovered from the > point at which the JVM crashed. > > I checked dmsg but saw nothing that looked out of the ordinary. > > I will cut back on the heap and permgen tonight (gonna be a long one.) > > Any ideas are welcome. > > Thanks, > > Carl > > > - Original Message - From: "Peter Crowther" > > To: "Tomcat Users List" > Sent: Monday, January 11, 2010 6:06 PM > Subject: Re: JVM goes away > > > 2010/1/11 Carl : >> This is a new server, a Dell T110 with a Xeon 3440 processor and 4GB >> memory. I have turned off both the turbo mode and hyperthreading. >> >> The environment: >> >> 64 bit Slackware Linux >> >> java version "1.6.0_17" >> Java(TM) SE Runtime Environment (build 1.6.0_17-b04) >> Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode) >> >> Tomcat: apache-tomcat-6.0.20 >> >> JAVA_OPTS="-Xms2400m -Xmx2400m -XX:PermSize=512m -XX:MaxPermSize=512m" >> >> I have watched observed the memory usage and general performance with >> Java VisualVM and have seen nothing strange. GC seems to be >> performing well and the memory rarely gets anywhere near the max. >> >> The server runs well, idling along at 2-5% load, serving jsp's, etc. >> at a reasonable speed. Without warning and with no tracks in any log >> (Tomcat or system) or to the console, the JVM will just go away, >> disappear. Sometimes, the system will run for a week, sometimes for >> only several hours. Initially, I thought the problem was the turbo or >> hyperthreading but, no, the problem persists. >> >> When the JVM goes away, the memory that it held is still being held >> (as seen from top) but it is nowhere near the machine physical memory. >> >> The application has been running on an older server (Dell 600SC, 32 >> bit Slackware, 2GB memory) for several years and, while the >> application will throw exceptions now and then, it never crashed the >> JVM. This leads me to believe the problem has something to do with >> the 64 bit JVM but, with errors, I can't be certain and don't know >> what I can do about it except go back to 32 bit. >> >> I plan to reinstall Java tonight but, it would seem if the JVM were >> corrupted, it simply would not run. >> >> Any ideas are welcome. > > I'm with Andy: the Linux OOM killer would show those symptoms. With > those settings, you're not leaving a lot of memory for the OS. How > much swap do you have, and does the same thing happen if you reduce > the Java heap and permgen space? > > - Peter > > - > 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 > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat dies suddenly
Hai, Tomcat has a bug at Linux OS. you need to added LD_LIBRARY_KERNEL to your profile. it mean that you should know what version that your OS is using -- Regards, Andy Susanto,S.Kom == CV : http://www.linkedin.com/pub/andy-susanto/7/533/baa On Thu, Feb 4, 2010 at 8:07 AM, Carl wrote: > Chris, > > Interesting idea. I tried over the weekend to force that situation with > JMeter hitting a simple jsp that did some data stuff and created a small > display. I pushed it to the point that there were entries in the log > stating it was out of memory (when attempting to GC, I think) but it just > slowed way down and never crashed. I could see from VisualJVM that it had > used the entire heap but, again, I could never get it to crash. > > Strange because it doesn't have the classic signs (slowing down or throwing > out of memory exceptions or freezing), it just disappears without any > tracks. I am certain there is a reason somewhere, I just haven't found it > yet. > > Thanks for your suggestions, > > Carl > > - Original Message - From: "Christopher Schultz" > > To: "Tomcat Users List" > Sent: Wednesday, February 03, 2010 5:45 PM > Subject: Re: Tomcat dies suddenly > > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Chuck, >> >> On 2/3/2010 5:00 PM, Caldarale, Charles R wrote: >>>> >>>> From: Carl [mailto:c...@etrak-plus.com] >>>> Subject: Re: Tomcat dies suddenly >>> >>>> I am hoping I can see failure at the point of failure >>>> with the heap dump options >>> >>> That won't have any effect on the Linux OOM killer. If it is the OOM >>> killer taking out Tomcat, the JVM will not receive any notification - all >>> threads will just be terminated with extreme prejudice. There won't be a >>> chance for the heap dump to happen. >> >> Maybe what Carl should try is to actually cause an OOME without >> triggering the "OOM Killer". >> >> Carl: you said that everything is copacetic when you run with a smaller >> heap, right? Well, run with that smaller heap, but then write a simply >> servlet/JSP/whatever that just allocates huge, say, byte[] buffers until >> it gets an OOME and verify that you get a heap dump when that happens. >> >> - -chris >> -BEGIN PGP SIGNATURE- >> Version: GnuPG v1.4.10 (MingW32) >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ >> >> iEYEARECAAYFAktp/JEACgkQ9CaO5/Lv0PBI0ACgmDLJVxM5xDiN5UIFsqqKRj7i >> 2J8AoL8ENGsYxwudtFrLy+tZTzmr/rxC >> =4yC9 >> -END PGP SIGNATURE- >> >> - >> 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 > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Multi-Level Context Paths
Dear All, I need an urgent help, and I hope you will shed some light to it. I have recently installed Apache Tomcat version 6.0.20. I copied my project file (test.war) under /usr/local/apache-tomcat-6.0.20/webapps/ and it deployed successfully. I can access the site via the URL of <http://localhost:8080/ms3/> http://localhost:8080/test/. For this example, the context path simply follows the filename of the war file. There is a new requirement to setup multi-level context path as in I need the URL to be <http://localhost:8080/sg/server/test/> http://localhost:8080/sg/server/test/ instead. I read up your site and confirmed that adding Context path within server.xml is not recommended. I went ahead to make a copy of the existing test.xml to sg#server#test.xml under /usr/local/apache-tomcat-6.0.20/conf/Catalina/localhost/. Then I restarted Tomcat. The content of sg#server#test is: I restarted Tomcat but it gives errors under Catalina.out Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:14 2) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java :4048) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7 91) 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.deployDescriptor(HostConfig.java:630) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556 ) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491) 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(LifecycleSuppor t.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 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.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext start SEVERE: Error in resourceStart() Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext start SEVERE: Error getConfigured Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/sg/server/test] startup failed due to previous errors Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/sg/server/te st] has not been started Aug 17, 2009 5:54:43 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-6060 Aug 17, 2009 5:54:43 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-6443 Aug 17, 2009 5:54:43 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:6009 Aug 17, 2009 5:54:43 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/40 config=null Aug 17, 2009 5:54:43 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 18859 ms I have searched the Internet and couldn't find any posts with solutions to such issue. It seems that setting up multi-level context path in Tomcat 6 is not so straight-forwarded. Please kindly help, thanks. Best Regards, Andy Ee
RE: Multi-Level Context Paths
cessorImpl.newInstance(NativeConstructorAcces sorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc torAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.opensymphony.module.sitemesh.Factory.getInstance(Factory.java:52) at com.opensymphony.module.sitemesh.filter.PageFilter.init(PageFilter.java:86) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter Config.java:275) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil terConfig.java:397) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterCon fig.java:108) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:38 00) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4450) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7 91) 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.check(HostConfig.java:1274) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:119) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java: 1337) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC hildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC hildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(Cont ainerBase.java:1590) at java.lang.Thread.run(Thread.java:619) Caused by: com.opensymphony.module.sitemesh.factory.FactoryException: Could not read config file : /WEB-INF/sitemesh.xml: java.io.FileNotFoundException: /usr/local/apache-tomcat/webapps/sg (No such file or directory) at com.opensymphony.module.sitemesh.Factory.report(Factory.java:87) at com.opensymphony.module.sitemesh.factory.DefaultFactory.loadConfig(DefaultFa ctory.java:131) at com.opensymphony.module.sitemesh.factory.DefaultFactory.(DefaultFactor y.java:57) ... 25 more Aug 17, 2009 6:57:44 PM org.apache.catalina.core.ApplicationContext log INFO: Closing Spring root WebApplicationContext Any idea? Thanks. Best Regards, Andy Ee -Original Message- From: Ognjen Blagojevic [mailto:ogn...@etf.bg.ac.rs] Sent: Monday, August 17, 2009 7:00 PM To: Tomcat Users List Subject: Re: Multi-Level Context Paths Hi Andy, Try to undeploy the old application. Rename the test.war to sg#server#test.war, and deploy it. Regards, Ognjen Andy Ee wrote: > > > Dear All, > > > > I need an urgent help, and I hope you will shed some light to it. > > > > I have recently installed Apache Tomcat version 6.0.20. I copied my project > file (test.war) under /usr/local/apache-tomcat-6.0.20/webapps/ and it > deployed successfully. I can access the site via the URL of > <http://localhost:8080/ms3/> http://localhost:8080/test/. For this example, > the context path simply follows the filename of the war file. > > > > There is a new requirement to setup multi-level context path as in I need > the URL to be <http://localhost:8080/sg/server/test/> > http://localhost:8080/sg/server/test/ instead. I read up your site and > confirmed that adding Context path within server.xml is not recommended. I > went ahead to make a copy of the existing test.xml to sg#server#test.xml > under /usr/local/apache-tomcat-6.0.20/conf/Catalina/localhost/. Then I > restarted Tomcat. > > > > The content of sg#server#test is: > > > > > antiJARLocking="true" antiResourceLocking="false"> > > > > > > > > > > I restarted Tomcat but it gives errors under Catalina.out > > > > Aug 17, 2009 5:54:43 PM org.apache.catalina.core.StandardContext > resourcesStart > > SEVERE: Error starting static Resources > > java.lang.IllegalArgumentException: Document base > /usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a > readable directory > > at > org.apache.naming.resources.FileDirContext.setDoc
RE: Multi-Level Context Paths
Hi Ognjen, Are you able to advice the mailing list for sitemesh? Is it under Tomcat as well? Best Regards, Andy Ee -Original Message- From: Ognjen Blagojevic [mailto:ogn...@etf.bg.ac.rs] Sent: Monday, August 17, 2009 7:31 PM To: Tomcat Users List Subject: Re: Multi-Level Context Paths Hi Andy, On Tomcat side everything seems to work just fine. It seems that sitemash (wrongly) assumes the location of the file config file. Try on sitemesh forum/mailing list. > Caused by: com.opensymphony.module.sitemesh.factory.FactoryException: Could > not read config file : /WEB-INF/sitemesh.xml: java.io.FileNotFoundException: > /usr/local/apache-tomcat/webapps/sg (No such file or directory) Regards, Ognjen Andy Ee wrote: > Hi Ognjen, > > > > Thank you for your quick response! > > > > I have undeployed the old application (test.war) under Tomcat Manager, as > well as renamed test.war to sg#server#test.war under webapps. Without the > need to restart Tomcat, I saw the new project directory created under > /webapps/sg#server#test after awhile. > > > > I tried to access http://localhost:8080/sg/server/test but it doesn't work. > > > > Under catalina.out log: > > > > INFO: Undeploying context [/test] > > Aug 17, 2009 6:57:24 PM org.apache.catalina.startup.HostConfig deployWAR > > INFO: Deploying web application archive sg#server#test.war > > [test] DEBUG [ContainerBackgroundProcessor[StandardEngine[Catalina]]] > StartupListener.contextInitialized(44) | initializing context... > > AbandonedObjectPool is used > (org.apache.commons.dbcp.abandonedobjectp...@169be56) > >LogAbandoned: false > >RemoveAbandoned: true > >RemoveAbandonedTimeout: 60 > > [test] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] > DefaultValidatorFactory.setValidationConfigLocations(78) | Loading > validation configurations from [ServletContext resource > [/WEB-INF/validation.xml],ServletContext resource > [/WEB-INF/validator-rules.xml],ServletContext resource > [/WEB-INF/validator-rules-custom.xml]] > > [test] DEBUG [ContainerBackgroundProcessor[StandardEngine[Catalina]]] > MS3Crypto.initParams(53) | Initializing crypto parameters. > > [test] DEBUG [ContainerBackgroundProcessor[StandardEngine[Catalina]]] > MS3Crypto.initParams(80) | Raw Seed : [...@87c801 > > [test] DEBUG [ContainerBackgroundProcessor[StandardEngine[Catalina]]] > StartupListener.contextInitialized(95) | Remember Me Enabled? null > > [test] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] > LocaleFilter.init(152) | Initializing filter 'localeFilter' > > [test] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] > LocaleFilter.init(177) | Filter 'localeFilter' configured successfully > > [test] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] > GZIPFilter.init(152) | Initializing filter 'compressionFilter' > > [test] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] > GZIPFilter.init(177) | Filter 'compressionFilter' configured successfully > > Aug 17, 2009 6:57:44 PM org.apache.catalina.core.StandardContext start > > SEVERE: Error filterStart > > Aug 17, 2009 6:57:44 PM org.apache.catalina.core.StandardContext start > > SEVERE: Context [/singapore/dbs/test] startup failed due to previous errors > > > > Under localhost log: > > > > Aug 17, 2009 6:57:44 PM org.apache.catalina.core.StandardContext filterStart > > SEVERE: Exception starting filter sitemesh > > com.opensymphony.module.sitemesh.factory.FactoryException: Cannot construct > Factory : com.opensymphony.module.sitemesh.factory.DefaultFactory: > java.lang.reflect.InvocationTargetException > > at com.opensymphony.module.sitemesh.Factory.report(Factory.java:87) > > at > com.opensymphony.module.sitemesh.Factory.getInstance(Factory.java:56) > > at > com.opensymphony.module.sitemesh.filter.PageFilter.init(PageFilter.java:86) > > at > org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter > Config.java:275) > > at > org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil > terConfig.java:397) > > at > org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterCon > fig.java:108) > > at > org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:38 > 00) > > at > org.apache.catalina.core.StandardContext.start(StandardContext.java:4450) > > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7 > 91) >
RE: Multi-Level Context Paths
Hi Mark, Please see my responses below. Thanks. Best Regards, Andy Ee -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Monday, August 17, 2009 7:04 PM To: Tomcat Users List Subject: Re: Multi-Level Context Paths Andy Ee wrote: > There is a new requirement to setup multi-level context path as in I need > the URL to be <http://localhost:8080/sg/server/test/> Remove all the old files you no longer want: $CATALINA_BASE/webapps/test.war $CATALINA_BASE/conf/Catalina/localhost/test.xml $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml Andy: Yes, I have deleted all the unnecessary war files as well as the xml files. Rename your WAR to sg#server#test.war Place your renamed war in: $CATALINA_BASE/webapps/ Any META-INF/context.xml will be extracted to: $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml Andy: Yes, there is a file under my unpackaged sg#server#test.war. The file is /usr/local/apache-tomcat/webapps/sg#server#test/META-INF/context.xml and its content is: I noticed that the context path is still /test. I have removed path="/test" from the Context element. I done the same for /usr/local/apache-tomcat/conf/Catalina/localhost/sg#server#test.xml and restarted Tomcat. Under catalina.log, I saw new errors: INFO: Undeploying context [/sg/server/test] Aug 17, 2009 7:30:09 PM org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:14 2) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java :4048) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7 91) 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.deployDescriptor(HostConfig.java:630) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556 ) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1274) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:119) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java: 1337) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC hildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC hildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(Cont ainerBase.java:1590) at java.lang.Thread.run(Thread.java:619) Aug 17, 2009 7:30:09 PM org.apache.catalina.core.StandardContext start SEVERE: Error in resourceStart() Aug 17, 2009 7:30:09 PM org.apache.catalina.core.StandardContext start SEVERE: Error getConfigured Aug 17, 2009 7:30:09 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/sg/server/test] startup failed due to previous errors Aug 17, 2009 7:30:09 PM org.apache.catalina.core.StandardContext stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/sg/server/te st] has not been started Error occurred during initialization of VM java.lang.Error: Properties init: Could not determine current working directory. at java.lang.System.initProperties(Native Method) at java.lang.System.initializeSystemClass(System.java:1070) > java.lang.IllegalArgumentException: Document base > /usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a > readable directory If Tomcat finds: $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml It expects to find a matching war $CATALINA_BASE/webapps/sg#server#test.war or directory $CATALINA_BASE/webapps/sg#server#test 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: Multi-Level Context Paths
Hi Mark, Before I prepare my .war file, there is an existing META-INF/context.xml and the content is, Should I remove the path parameter and prepare the war file again? With the path specified as /test, I am worried it will conflict how I setup Multi-Level path. Best Regards, Andy Ee -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Monday, August 17, 2009 7:04 PM To: Tomcat Users List Subject: Re: Multi-Level Context Paths Andy Ee wrote: > There is a new requirement to setup multi-level context path as in I need > the URL to be <http://localhost:8080/sg/server/test/> Remove all the old files you no longer want: $CATALINA_BASE/webapps/test.war $CATALINA_BASE/conf/Catalina/localhost/test.xml $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml Rename your WAR to sg#server#test.war Place your renamed war in: $CATALINA_BASE/webapps/ Any META-INF/context.xml will be extracted to: $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml > java.lang.IllegalArgumentException: Document base > /usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a > readable directory If Tomcat finds: $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml It expects to find a matching war $CATALINA_BASE/webapps/sg#server#test.war or directory $CATALINA_BASE/webapps/sg#server#test 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: Multi-Level Context Paths
Hi David, I will try to remove that path attribute from the Context element. Other 2 questions: 1) Can I exclude the META-INF/context.xml file in the war file? This context.xml that will be copied to conf/Catalina/localhost after deployment, so that I can be sure this is not the problem to the setup of multi-level context path? 2) When we say renaming test.war into sg#server#test to achieve multi-level context path (http://localhost:8080/sg/server/test), are we talking about using the rename command in Solaris (mv test.war sg#server#test.war)? Or do I have to re-tar the project files into sg#server#test.war again? Thank you. Best Regards, Andy Ee -Original Message- From: David Smith [mailto:d...@cornell.edu] Sent: Monday, August 17, 2009 8:37 PM To: Tomcat Users List Subject: Re: Multi-Level Context Paths Drop the path attribute from your ... definition. The path should ideally be driven by the name of the war file, not explicitly called out in config unless your webapp is outside the webapps directory. --David Andy Ee wrote: > Hi Mark, > > Before I prepare my .war file, there is an existing META-INF/context.xml and > the content is, > > antiJARLocking="true" antiResourceLocking="false"> > > > > > > Should I remove the path parameter and prepare the war file again? > > With the path specified as /test, I am worried it will conflict how I setup > Multi-Level path. > > Best Regards, > Andy Ee > > > > -Original Message- > From: Mark Thomas [mailto:ma...@apache.org] > Sent: Monday, August 17, 2009 7:04 PM > To: Tomcat Users List > Subject: Re: Multi-Level Context Paths > > Andy Ee wrote: > >> There is a new requirement to setup multi-level context path as in I need >> the URL to be <http://localhost:8080/sg/server/test/> >> > > Remove all the old files you no longer want: > $CATALINA_BASE/webapps/test.war > $CATALINA_BASE/conf/Catalina/localhost/test.xml > $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml > > Rename your WAR to sg#server#test.war > > Place your renamed war in: > $CATALINA_BASE/webapps/ > > Any META-INF/context.xml will be extracted to: > $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml > > >> > > > As stated in the docs for the context element, you should not specify > the path attribute in this case. > > >> java.lang.IllegalArgumentException: Document base >> /usr/local/apache-tomcat/webapps/sg#server#test does not exist or is not a >> readable directory >> > > If Tomcat finds: > $CATALINA_BASE/conf/Catalina/localhost/sg#server#test.xml > > It expects to find a matching war > $CATALINA_BASE/webapps/sg#server#test.war > or directory > $CATALINA_BASE/webapps/sg#server#test > > 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: Multi-Level Context Paths
Dear all, I reported having problem deploying my war file with multi-level context path on Tomcat 6.0.20. Beside the sitemesh issue, is it possible that the problem be due to JDK 1.5 or Java 5, that has issue understanding the symbol '#' in war filename. Ref: https://issues.apache.org/bugzilla/show_bug.cgi?id=43150 The bug is said to be fixed from v6.0.17 onwards though. I would appreciate if anybody can tell if he/she has successfully deployed with multi-level context path. I tried having the context element (given below) inside server.xml and the multi-level context path works! However, Tomcat 6 deploys the war file twice every time it starts up. It could be due to context element being defined under server.xml and Catalina/localhost/xxx.xml. So this method needs tweaking afterall. Thank you. Best Regards, Andy Ee -Original Message- From: Ognjen Blagojevic [mailto:ogn...@etf.bg.ac.rs] Sent: Monday, August 17, 2009 7:54 PM To: Tomcat Users List Subject: Re: Multi-Level Context Paths Try here: http://www.opensymphony.com/sitemesh/userForums.action Regards, Ognjen Andy Ee wrote: > Hi Ognjen, > > Are you able to advice the mailing list for sitemesh? Is it under Tomcat as > well? > > Best Regards, > Andy Ee > > > > -Original Message- > From: Ognjen Blagojevic [mailto:ogn...@etf.bg.ac.rs] > Sent: Monday, August 17, 2009 7:31 PM > To: Tomcat Users List > Subject: Re: Multi-Level Context Paths > > Hi Andy, > > On Tomcat side everything seems to work just fine. > > It seems that sitemash (wrongly) assumes the location of the file config > file. Try on sitemesh forum/mailing list. > > > Caused by: com.opensymphony.module.sitemesh.factory.FactoryException: > Could > > not read config file : /WEB-INF/sitemesh.xml: > java.io.FileNotFoundException: > > /usr/local/apache-tomcat/webapps/sg (No such file or directory) > > Regards, > Ognjen > > > Andy Ee wrote: >> Hi Ognjen, >> >> >> >> Thank you for your quick response! >> >> >> >> I have undeployed the old application (test.war) under Tomcat Manager, as >> well as renamed test.war to sg#server#test.war under webapps. Without the >> need to restart Tomcat, I saw the new project directory created under >> /webapps/sg#server#test after awhile. >> >> >> >> I tried to access http://localhost:8080/sg/server/test but it doesn't > work. >> >> >> Under catalina.out log: >> >> >> >> INFO: Undeploying context [/test] >> >> Aug 17, 2009 6:57:24 PM org.apache.catalina.startup.HostConfig deployWAR >> >> INFO: Deploying web application archive sg#server#test.war >> >> [test] DEBUG [ContainerBackgroundProcessor[StandardEngine[Catalina]]] >> StartupListener.contextInitialized(44) | initializing context... >> >> AbandonedObjectPool is used >> (org.apache.commons.dbcp.abandonedobjectp...@169be56) >> >>LogAbandoned: false >> >>RemoveAbandoned: true >> >>RemoveAbandonedTimeout: 60 >> >> [test] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] >> DefaultValidatorFactory.setValidationConfigLocations(78) | Loading >> validation configurations from [ServletContext resource >> [/WEB-INF/validation.xml],ServletContext resource >> [/WEB-INF/validator-rules.xml],ServletContext resource >> [/WEB-INF/validator-rules-custom.xml]] >> >> [test] DEBUG [ContainerBackgroundProcessor[StandardEngine[Catalina]]] >> MS3Crypto.initParams(53) | Initializing crypto parameters. >> >> [test] DEBUG [ContainerBackgroundProcessor[StandardEngine[Catalina]]] >> MS3Crypto.initParams(80) | Raw Seed : [...@87c801 >> >> [test] DEBUG [ContainerBackgroundProcessor[StandardEngine[Catalina]]] >> StartupListener.contextInitialized(95) | Remember Me Enabled? null >> >> [test] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] >> LocaleFilter.init(152) | Initializing filter 'localeFilter' >> >> [test] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] >> LocaleFilter.init(177) | Filter 'localeFilter' configured successfully >> >> [test] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] >> GZIPFilter.init(152) | Initializing filter 'compressionFilter' >> >> [test] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] >> GZIPFilter.init(177) | Filter 'compressionFilter' configured successfully >> >> Aug 17, 2009 6:57:44 PM org.apache.catalina.core.StandardContext start >> >> SEVERE: Error filterStart >
RE: Multi-Level Context Paths
Hi Mark, Thank you and I will try disabling both the autoDeploy and deployOnStartup. I actually created sg#server#test.xml under Catalina/localhost/ and points docBase="/usr/local/apache-tomcat/sg#server#test.war". After I started up Tomcat, it deployed the war file and created sg#server#test folder under webapps/. However, the context path sg#server#test.xml failed to startup, with the following errors under catalina.out Aug 19, 2009 12:35:45 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Aug 19, 2009 12:35:45 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/sg/server/test] startup failed due to previous errors I checked localhost log and saw, Caused by: com.opensymphony.module.sitemesh.factory.FactoryException: Could not read config file : /WEB-INF/sitemesh.xml: java.io.FileNotFoundException: /usr/local/apache-tomcat/webapps/sg (No such file or directory) Assuming # symbol not recognized by Java utilities or sitemesh under Solaris 10. I will check more about sitemesh... Best Regards, Andy Ee -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Wednesday, August 19, 2009 12:23 AM To: Tomcat Users List Subject: Re: Multi-Level Context Paths Andy Ee wrote: > I would appreciate if anybody can tell if he/she has successfully deployed > with multi-level context path. Yep. Works like a charm in 6.0.18 and 6.0.20. > I tried having the context element (given below) inside server.xml and the > multi-level context path works! > > crossContext="false" allowLinking="true" /> > > However, Tomcat 6 deploys the war file twice every time it starts up. It > could be due to context element being defined under server.xml and > Catalina/localhost/xxx.xml. So this method needs tweaking afterall. Nope. It is because you have autoDeploy and deployOnStartup enabled for the host. You could: - disable those - move the WAR file outside of the host's appBase - just rename the WAR file 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: Multi-Level Context Paths
Hi Martin, Under WEB-INF/sitemesh.xml: Best Regards, Andy Ee -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Wednesday, August 19, 2009 5:20 AM To: Tomcat Users List Subject: RE: Multi-Level Context Paths Andy can you display contents of WEB-INF/sitemesh.xml thanks, 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. > Date: Tue, 18 Aug 2009 21:46:46 +0100 > From: ma...@apache.org > To: users@tomcat.apache.org > Subject: Re: Multi-Level Context Paths > > Andy Ee wrote: > > Hi Mark, > > > > Thank you and I will try disabling both the autoDeploy and deployOnStartup. > > > > I actually created sg#server#test.xml under Catalina/localhost/ and points > > docBase="/usr/local/apache-tomcat/sg#server#test.war". After I started up > > Tomcat, it deployed the war file and created sg#server#test folder under > > webapps/. > > > > However, the context path sg#server#test.xml failed to startup, with the > > following errors under catalina.out > > > > Aug 19, 2009 12:35:45 AM org.apache.catalina.core.StandardContext start > > SEVERE: Error filterStart > > Aug 19, 2009 12:35:45 AM org.apache.catalina.core.StandardContext start > > SEVERE: Context [/sg/server/test] startup failed due to previous errors > > > > I checked localhost log and saw, > > > > Caused by: com.opensymphony.module.sitemesh.factory.FactoryException: Could > > not read config file : /WEB-INF/sitemesh.xml: java.io.FileNotFoundException: > > /usr/local/apache-tomcat/webapps/sg (No such file or directory) > > > > Assuming # symbol not recognized by Java utilities or sitemesh under Solaris > > 10. I will check more about sitemesh... > > Yeah, that looks like a sitemesh issue. It is probably caused by trying > to access the file system directly. Not sure if any of the options I > suggested will work in this case. > > Mark > > > > > - > 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Multi-Level Context Paths
Hi Martin, My sg#server#test.xml deployed the sg#server#test.war file and created the project dir as /webapps/sg#server#test/ instead of /webapps/sg#server#test/ Under /webapps/sg#server#test/WEB-INF/decorators.xml /resources/* /registration_demo.html /sendmoney_demo.html /* Under /webapps/sg#server#test/WEB-INF/sitemesh.xml: Best Regards, Andy Ee -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Wednesday, August 19, 2009 9:59 AM To: Tomcat Users List Subject: RE: Multi-Level Context Paths did you check both of these files exist? /usr/local/apache-tomcat/webapps/sg/WEB-INF/sitemesh.xml/usr/local/apache-to mcat/webapps/sg/WEB-INF/decorators.xml if so please display contents of /usr/local/apache-tomcat/webapps/sg/WEB-INF/decorators.xml thanks, Martin Gainty __ Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Ez az üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet tartalma miatt. 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: and...@sysatwork.com > To: users@tomcat.apache.org > Subject: RE: Multi-Level Context Paths > Date: Wed, 19 Aug 2009 09:25:02 +0800 > > Hi Martin, > > Under WEB-INF/sitemesh.xml: > > > > > > class="com.opensymphony.module.sitemesh.parser.HTMLPageParser"/> > class="com.opensymphony.module.sitemesh.parser.HTMLPageParser"/> > class="com.opensymphony.module.sitemesh.parser.HTMLPageParser"/> > > > > class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper"> > > > > > > Best Regards, > Andy Ee > > > -Original Message----- > From: Martin Gainty [mailto:mgai...@hotmail.com] > Sent: Wednesday, August 19, 2009 5:20 AM > To: Tomcat Users List > Subject: RE: Multi-Level Context Paths > > > Andy > can you display contents of WEB-INF/sitemesh.xml > thanks, > 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. > > > > > > Date: Tue, 18 Aug 2009 21:46:46 +0100 > > From: ma...@apache.org > > To: users@tomcat.apache.org > > Subject: Re: Multi-Level Context Paths > > > > Andy Ee wrote: > > > Hi Mark, > > > > > > Thank you and I
RE: Multi-Level Context Paths
Hi Chunk, Sorry about it. I meant the project dir created /webapps/sg#server#test/ instead of /webapps/sg/server/test/ Anyways, I got the issues resolved by specifying context elements under server.xml and turned off startupDeploy to prevent double deployment. That is the best way out for me for now until sitemesh is better supported on my system. Thanks all. Best Regards, Andy Ee -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Wednesday, August 19, 2009 12:28 PM To: Tomcat Users List Subject: RE: Multi-Level Context Paths > From: Andy Ee [mailto:and...@sysatwork.com] > Subject: RE: Multi-Level Context Paths > > My sg#server#test.xml deployed the sg#server#test.war file and > created the project dir as /webapps/sg#server#test/ instead of > /webapps/sg#server#test/ I know my eyes are getting old, but those sure look the same to me... - 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
IIS isapi_redirect.dll chunked encoding option
What are the general thoughts on the stability of the enable_chunked_encoding option for the IIS isapi redirector for tomcat and IIS? We're running into a scenario where something is causing IIS to not send down the complete response. Haven't figured out exactly the cause yet, but the symptoms are the browser never acknowledges a response was complete even though tomcat has fully written the response out through to the web server. Wireshark captures show the last few packets not being sent so the response is just a little short of what's to be expected. One thing we noticed was setting enable_chunked_encoding (with a redirectory built for chunked encoding of course) made everything work fine so I wanted to get a feel for just how experimental this really is and what the general consensus is on it's stability. Thanks, Andy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: IIS isapi_redirect.dll chunked encoding option
Sorry, forgot to mention that. We're at the latest and greatest tomcat-connector version: 1.2.28. Thanks, Andy Peter Crowther wrote: 2009/8/21 Andy Wang : What are the general thoughts on the stability of the enable_chunked_encoding option for the IIS isapi redirector for tomcat and IIS? I suspect it depends on the version ;-). What are you using? - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org