Re: Fix CVE tomcat 6.0.18 with out upgrade
On 5/8/13 1:17 PM, suresh babu yella wrote: Hi Dan, We might consider for upgrading the tomcat later, due to to supportability concerns from Autonomy we cannot upgrade it to any of the higher version. but right now we are looking to apply the fix for all CVE's we identified, it will be great if you can let me know the procedure. Then upgrade, but keep it within the Tomcat 6.0.x versions. Going up to 6.0.37 should be perfectly safe. Put up a test env and try it. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with tomcat welcome page
Given this is a reoccurring error: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String Looks like you are missing possibly the servlet-api jar file or it's in the wrong place. Fix this error and things should work better. BTW ... where did you place test.html? I'm hoping from the URL you tried it was stored in webapps/ROOT. --David On 5/12/2011 8:11 AM, C0mf0rtably Numb wrote: Hello everyone, I was trying to run tomcat 6.0.32 and after copying the tomcat files to the directory I tried to go to the welcome page localhost:8080 in mozilla firefox but it shows a blank page. I tried making an html page and then went to localhost:8080/test.html but that is also blank. Please tell me what to do, below is the log: May 12, 2011 5:20:17 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_21\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;%CommonProgramFiles%\Microsoft Shared\Windows Live;C:\orant\bin;C:\DevSuiteHome_2\jdk\jre\bin\classic;C:\DevSuiteHome_2\jdk\jre\bin;C:\DevSuiteHome_2\jdk\jre\bin\client;C:\DevSuiteHome_2\jlib;C:\DevSuiteHome_2\bin;C:\DevSuiteHome_2\jre\1.4.2\bin\client;C:\DevSuiteHome_2\jre\1.4.2\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\Lenovo;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\orant\jdk\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Common Files\HP\Digital Imaging\bin;C:\Program Files\HP\Digital Imaging\bin\;C:\Program Files\HP\Digital Imaging\bin\Qt\Qt 4.3.3;C:\cygwin;C:\Program Files\Common Files\Microsoft Shared\Windows Live May 12, 2011 5:20:17 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 12, 2011 5:20:17 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 343 ms May 12, 2011 5:20:17 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 12, 2011 5:20:17 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.32 May 12, 2011 5:20:17 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory docs May 12, 2011 5:20:17 PM org.apache.catalina.startup.HostConfig deployDirectory SEVERE: Error deploying web application directory docs java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String; at org.apache.catalina.core.StandardHost$MemoryLeakTrackingListener.lifecycleEvent(StandardHost.java:616) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4699) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) 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:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) May 12, 2011 5:20:17 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application
Re: What is JAVA_HOME?
Depends on your OS and how you start tomcat (startup script or as a service). --David On 5/3/2011 1:43 PM, Varuna Seneviratna wrote: On 3 May 2011 22:21, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Varuna Seneviratna [mailto:varunasenevira...@gmail.com] Subject: What is JAVA_HOME? What is the use of the Java Home directory to Tomcat.What are the files of the Java installation that Tomcat uses?I am asking this to determine the set of files and their Home directory which should be set as JAVA_HOME Read the doc. To quote from RUNNING.txt: (1) Download and Install the Java SE Runtime Environment (JRE) (1.1) Download the Java SE Runtime Environment (JRE), release version 6.0 or later, from http://www.oracle.com/technetwork/java/javase/downloads/index.html (1.2) Install the JRE according to the instructions included with the release. (1.3) Set an environment variable named JRE_HOME to the pathname of the directory into which you installed the JRE, e.g. c:\jre6.0 or /usr/local/java/jre6.0. NOTE: You may also use the full JDK rather than just the JRE. In this case set your JAVA_HOME environment variable to the pathname of the directory into which you installed the JDK, e.g. c:\jdk6.0 or /usr/local/java/jdk6.0. - 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. How to set environment variables permanently.Without having to set each time it is needed to be used. - 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: Problems deploying a servlet on ubuntu
Sorry, try two. The first reply went directly to Karl because I was in the To field of his message. Please don't send directly to me. Post to the tomcat list and I will see it. Anyway ... this is what I sent to Karl: That looks right Can you post the contents of ch1/WEB-INF/web.xml? Also can you take a look in the tomcat logs (/var/log/tomcat6), posting anything related to the ch1 webapp? --David On 5/1/2011 4:37 AM, Karl Schmitt wrote: Hi folks, Hi David, I use the /var/lib/tomcat6/webapps directory now, http://localhost:8080 is working and http://localhost:8080/ch1/Serv1 is still not working even after restarting tomcat6 or the whole machine :-( here comes a recursive listing of the directory structure: karl@sonoma:/var/lib/tomcat6/webapps$ ls -LRltr .: insgesamt 8 drwxr-xr-x 3 root root 4096 2011-04-17 09:12 ROOT drwxr-xr-x 3 root root 4096 2011-04-22 12:51 ch1 ./ROOT: insgesamt 8 drwxr-xr-x 2 root root 4096 2011-04-17 09:12 META-INF -rw-r--r-- 1 root root 1887 2011-04-17 09:12 index.html ./ROOT/META-INF: insgesamt 4 -rw-r--r-- 1 root root 51 2011-04-17 09:12 context.xml ./ch1: insgesamt 4 drwxr-xr-x 3 root root 4096 2011-04-22 12:51 WEB-INF ./ch1/WEB-INF: insgesamt 8 -rw-r--r-- 1 karl karl 312 2011-04-22 12:44 web.xml drwxr-xr-x 2 root root 4096 2011-04-22 12:51 classes ./ch1/WEB-INF/classes: insgesamt 4 -rw-r--r-- 1 karl karl 931 2011-04-22 12:13 Ch1Servlet.class karl@sonoma:/var/lib/tomcat6/webapps$ Yours, Karl On Mon, Apr 25, 2011 at 2:52 PM, David Smith david.sm...@cornell.edu mailto:david.sm...@cornell.edu wrote: Hi Karl. The tomcat service set's it's own JAVA_HOME and CATALINA_HOME environment variables. Just a quick look in /etc/init.d/tomcat6 will show that. My installation of tomcat 6 on Ubuntu has webapps deployed to /var/lib/tomcat6/webapps, not /usr/share/tomcat6/webapps. The later directory doesn't even exist. Could you take a look at /var/lib/tomcat6/webapps? The ROOT webapp should be there. Put your webapp next to it and make sure it's readable by the tomcat6 user account .. either by setting world readable or make sure tomcat6 is in the group or owner permission fields. Once all that is done, restart tomcat6: sudo service tomcat6 restart --David On 4/25/2011 5:36 AM, Karl Schmitt wrote: Dear Marin, thanks for your reply :-) please verify is one of those environment variable pointing to the wrong place? karl@sonoma:~$ sudo -s [sudo] password for karl: root@sonoma:~# echo $JAVA_HOME /usr/lib/jvm/java-1.6.0-openjdk root@sonoma:~# echo $CATALINA_HOME /usr/share/tomcat6 root@sonoma:~# echo $CATALINA_BASE /usr/share/tomcat6 root@sonoma:~# I do have an error logged in the out file, however, no clue what it means :-( root@sonoma:/var/log/tomcat6# egrep [Ee]rror *.log; egrep [Ee]rror *.out java.util.logging.ErrorManager: 1: FileHandler is closed or not yet initialized, unable to log [22.04.2011 21:45:57 org.apache.coyote.http11.Http11Protocol pause root@sonoma:/var/log/tomcat6# Thanks in advance, Karl On Sun, Apr 24, 2011 at 2:47 PM, Martin Gainty mgai...@hotmail.com mailto:mgai...@hotmail.com wrote: Karl- check .profile and .bashrc for any manipulations of JAVA_HOME or CATALINA_HOME or CATALINA_BASE have you noticed any specific errors in either the logs or stacktrace? Martin __ Verzicht und Vertraulichkeitanmerkung 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. Date: Sun, 24 Apr 2011 11:06:25 +0200 Subject: Re: Problems deploying a servlet on ubuntu From: karlschmitt1...@googlemail.com mailto:karlschmitt1...@googlemail.com To: users@tomcat.apache.org mailto:users@tomcat.apache.org Thanks Andre, for answering my call for help, I tried to answer you questions as best as I could below: Tomcat was installed using the synaptic packet management I just ticked tomcat6 and hit the apply button, and tomcat and all its dependencies were installed and http://locaclhost:8080 started to work, that was the easy part :-) karl@sonoma:/usr/share/tomcat6/bin$ ./version.sh Using
Re: Problems deploying a servlet on ubuntu
Hi Karl. The tomcat service set's it's own JAVA_HOME and CATALINA_HOME environment variables. Just a quick look in /etc/init.d/tomcat6 will show that. My installation of tomcat 6 on Ubuntu has webapps deployed to /var/lib/tomcat6/webapps, not /usr/share/tomcat6/webapps. The later directory doesn't even exist. Could you take a look at /var/lib/tomcat6/webapps? The ROOT webapp should be there. Put your webapp next to it and make sure it's readable by the tomcat6 user account .. either by setting world readable or make sure tomcat6 is in the group or owner permission fields. Once all that is done, restart tomcat6: sudo service tomcat6 restart --David On 4/25/2011 5:36 AM, Karl Schmitt wrote: Dear Marin, thanks for your reply :-) please verify is one of those environment variable pointing to the wrong place? karl@sonoma:~$ sudo -s [sudo] password for karl: root@sonoma:~# echo $JAVA_HOME /usr/lib/jvm/java-1.6.0-openjdk root@sonoma:~# echo $CATALINA_HOME /usr/share/tomcat6 root@sonoma:~# echo $CATALINA_BASE /usr/share/tomcat6 root@sonoma:~# I do have an error logged in the out file, however, no clue what it means :-( root@sonoma:/var/log/tomcat6# egrep [Ee]rror *.log; egrep [Ee]rror *.out java.util.logging.ErrorManager: 1: FileHandler is closed or not yet initialized, unable to log [22.04.2011 21:45:57 org.apache.coyote.http11.Http11Protocol pause root@sonoma:/var/log/tomcat6# Thanks in advance, Karl On Sun, Apr 24, 2011 at 2:47 PM, Martin Gainty mgai...@hotmail.com wrote: Karl- check .profile and .bashrc for any manipulations of JAVA_HOME or CATALINA_HOME or CATALINA_BASE have you noticed any specific errors in either the logs or stacktrace? Martin __ Verzicht und Vertraulichkeitanmerkung 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. Date: Sun, 24 Apr 2011 11:06:25 +0200 Subject: Re: Problems deploying a servlet on ubuntu From: karlschmitt1...@googlemail.com To: users@tomcat.apache.org Thanks Andre, for answering my call for help, I tried to answer you questions as best as I could below: Tomcat was installed using the synaptic packet management I just ticked tomcat6 and hit the apply button, and tomcat and all its dependencies were installed and http://locaclhost:8080 started to work, that was the easy part :-) karl@sonoma:/usr/share/tomcat6/bin$ ./version.sh Using CATALINA_BASE: /usr/share/tomcat6 Using CATALINA_HOME: /usr/share/tomcat6 Using CATALINA_TMPDIR: /usr/share/tomcat6/temp Using JRE_HOME:/usr/lib/jvm/java-1.6.0-openjdk Using CLASSPATH: /usr/share/tomcat6/bin/bootstrap.jar Server version: Apache Tomcat/6.0.24 Server built: March 24 2011 1829 Server number: ...0 OS Name:Linux OS Version: 2.6.32-31-generic Architecture: i386 JVM Version:1.6.0_20-b20 JVM Vendor: Sun Microsystems Inc. karl@sonoma:/usr/share/tomcat6/bin$ karl@sonoma:/usr/share/tomcat6/bin$ echo $JAVA_HOME /usr/lib/jvm/java-1.6.0-openjdk karl@sonoma:/usr/share/tomcat6/bin$ java -version java version 1.6.0_20 OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1~10.04.1) OpenJDK Client VM (build 19.0-b09, mixed mode, sharing) My web.xml is located here: karl@sonoma:/usr/share/tomcat6/webapps/ch1/WEB-INF$ ls classes web.xml My servlet is located here: karl@sonoma:/usr/share/tomcat6/webapps/ch1/WEB-INF/classes$ ls Ch1Servlet.class karl@sonoma:/etc/tomcat6$ ls Catalina context.xml policy.dtomcat-users.xml catalina.properties logging.properties server.xml web.xml karl@sonoma:/etc/tomcat6$ --- My grep for host in server.xml: karl@sonoma:/etc/tomcat6$ grep -A 5 [Hh]ost server.xml on to the appropriate Host (virtual host). Documentation at /docs/config/engine.html -- !-- You should set jvmRoute to support load-balancing via AJP ie : Engine name=Catalina defaultHost=localhost jvmRoute=jvm1 -- Engine name=Catalina defaultHost=localhost !--For clustering, please take a look at documentation at: /docs/cluster-howto.html (simple how to) /docs/config/cluster.html (reference documentation) -- !-- -- !-- Define the default virtual host Note: XML Schema validation will not work with Xerces 2.2. -- Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true deployOnStartup=true xmlValidation=false xmlNamespaceAware=false !--
Re: Tomcat manager fails and can't tell why.
On 4/12/2011 11:28 AM, David kerber wrote: On 4/12/2011 11:17 AM, Yucca Nel wrote: Indeed :D, Seems to be an issue when I add an ampersand to the password! That doesn't surprise me a bit. I don't think I've run into any password system that will accept that character, though I guess there must be some since you're using it. D I suspect tomcat would be fine with , and as long as you properly encode them in your tomcat-users.xml file. It is an xml file and requires proper encoding: = amp; = lt; = gt; --David -Original Message- From: David kerber Sent: Tuesday, April 12, 2011 5:07 PM To: Tomcat Users List Subject: Re: Tomcat manager fails and can't tell why. On 4/12/2011 11:04 AM, Yucca Nel wrote: I do.. :) It confuses the heck out of me. Seems to fail because I change to alphanumeric password that is longer than 4 chars long. I also make sure to close all browser tabs so that I Do you close the entire browser? I don't think just closing tabs will clear the session. D - 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat server
Perfectly normal browsers assume port 80 when you don't offer a port number in the url. Your tomcat instance is not listening on port 80 and won't be able to respond when you try to access it there. Solution: change the port number in your tomcat's server.xml file and restart. --David On 3/10/2011 12:13 PM, ken dias wrote: I started the Tomcat webserver. When I keyin localhost:8080, I get the apache-tomcat webpage and can run the examples. however, when i keyin localhost only, i get error. Thanks, Ken - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: programming question
With tomcat's built-in database pooling, just adding a validation query to the resource config should be all that's necessary. On each borrow of a connection, the connection is tested and closed if the test fails. Failed connections are replaced with new ones. --David On 2/24/2011 10:49 AM, János Löbb wrote: Hi, What is the very basic structure of a web application that is connected to a database through a connection pool, but would not require to restart itself or restart Tomcat when the database goes down - let say for maintenance ? Telling otherwise how to write a webapp that would survive a database recycling and would not require human interactions to make it work again. Thanks ahead, János - 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: server running website
Check the logs to find out what happened when you attempted to start the server. Is there something else already running on the ports tomcat is trying to use? What does netstat list as listening ports with and without tomcat running? Also what connectors are configured in your tomcat's server.xml? As you can see way too many questions to offer any suggestions. --David On 2/22/2011 10:44 AM, Joel wrote: So my boss has a Tomcat folder that was running a website at his old job. I don't know how to determine the exact version but in the realease notes there is: $Id: RELEASE-NOTES-4.1.txt,v 1.81 2003/10/27 13:40:27 remm Exp $ he wants to run it on a new machine, the OS is: Mac OS X Server 10.6.5 When I do sudo bash startup.sh I get: Using CATALINA_BASE: /opt/Tomcat Using CATALINA_HOME: /opt/Tomcat Using CATALINA_TMPDIR: /opt/Tomcat/temp Using JAVA_HOME: /Library/Java/Home But when I try to go to the page localhost:8080 or localhost:80 Safari says: Safari can’t open the page “http://function2.basiceng.umr.edu/view” because Safari can’t find the server “function2.basiceng.umr.edu”. When I don't run the server as sudo I get things like Safari can’t open the page “http://www.localhost.com:80/” because the server unexpectedly dropped the connection. This sometimes occurs when the server is busy. Wait for a few minutes, and then try again. Likewise when shutting down the server without sudo: Using CATALINA_BASE: /opt/Tomcat Using CATALINA_HOME: /opt/Tomcat Using CATALINA_TMPDIR: /opt/Tomcat/temp Using JAVA_HOME: /Library/Java/Home Catalina.stop: java.net.ConnectException: Connection refused java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432) at java.net.Socket.connect(Socket.java:529) at java.net.Socket.connect(Socket.java:478) at java.net.Socket.init(Socket.java:375) at java.net.Socket.init(Socket.java:189) at org.apache.catalina.startup.Catalina.stop(Catalina.java:581) at org.apache.catalina.startup.Catalina.execute(Catalina.java:402) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) 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.main(Bootstrap.java:203) I don't mind running the server as root currently (I was just showing that to see if that was a symptom of another problem), but I was wondering how it can obviously find the correct previous web address but not find the server that is running it; is it for some reason trying to go to the previous website even though I told it to go to localhost? I tried changing all the files in the tomcat folder to being owned by my user name but that had no effect (that was impulsive hopefully that won't screw anything up later, let me know if so) I was wondering where I should start looking to resolve these problems. Thanks. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: war app, Tomcat, public IP and port 8080 - remote access
This smells like a router/firewall issue and it only looks like the top level page at 211.210.19.11:8080 works. Some browsers (IE) offer the cached copy when it runs into trouble loading a page fresh. When you do get tomcat home page from your server at an internet cafe, try holding the shift key and reloading. This forces most browsers to throw out cached versions of pages and redownload. I'm wiling to bet it fails to load. Oh yes .. and as someone else said, don't use go2 proxy while testing. Disable it until you have the problem worked out. --David On 01/28/2011 05:14 PM, Amilcar De Leon wrote: I have my server configured with a static public IP like 211.210.19.11 (this is not my real one if you ask). There is another static public IP that came with the routher which is the same than the above, except for the last numer (eg 211.210.19.10). I'm giving this as I don't know if you'd need this info too. So, on my server, if I type, 211.210.19.11:8080/myAPP I can run my app OK. The same if I try from another computer within the same LAN (connected to the same router). When I try to access that same address from another computer out of the LAN (eg an internet coffee), I get the error connection time out. But if I only type 211.210.19.11:8080 I can see a page that says I'm sucessfully installed tomcat and links to the tomcat manager, tomcat documentation and others. An extra note, the first page of my app is a login page, and I can see it if I use the firefox addon calle Go2proxy, but then when I type the login info I gen again the connection time out error. Not sure if this is useful - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat(5.5) Clustering and Load Balancing.
On 12/28/2010 8:33 AM, Pid wrote: On 12/27/10 4:11 AM, Harsimranjit singh Kler wrote: Hi i have testing tomcat clustering on single machine.What i am able to do is i hv 4 tomcat instances 1 work as balancer and 3 as cluster.using Rule.xml in balancer with round robin approach.all requests hits on balancer redirected to on one cluster which is on some different port. when redirecting using sendredirect it display new url that is of cluster.i want some alternate so all request shoud handled at balancer and URL at adress bar not changed. i have tried forward from servelet but that is not accept only realtive URL. I'm sorry, I don't have any idea what you're actually asking. Please read: http://www.catb.org/~esr/faqs/smart-questions.html When you reply, please precisely detail your Tomcat, JVM and OS versions, also include an accurate description of the environment you have created and are trying to create. From what I read in the message, it appears the balancer is sending the browser a redirect (one of the 30x responses) which in turn changes the url in the browser's address bar. The OP (if I understand correctly) would like the url in the browser's address bar not to change at all (no 30x redirect response). The only way I can imagine that working is if the balancer acts as a reverse proxy, sending each request back to a different back-end worker. I think we need to see the balancer's config before we could even begin to offer suggestions. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: HTTP status 404
Looks like you should be requesting /filename/filename.htm instead of filename/ ... that is unless you've set a welcome file in the app's web.xml file. If that doesn't work, also take a look at the tomcat logs for the moment in time you a. started tomcat, b. deployed your app (if different from the time tomcat was started) and c. when you requested the file. --David On 12/9/2010 12:10 PM, Lava Saleem wrote: Hello everyone, Thanks for the replies I really appreciate your feedback I have the structure as the following webapps | filename |- filename.htm *|-*WEB-INF |- web.xml |-META-INF |-context.xml after having this structure,I use the following command CATALINA_BASE/webapps/filename/ jar -cvf filename.war *.* then I deploy the file in the tomcat manager and I have the following error HTTP status 404 description the requested resource (/filename/)is not available I assumed that I don't need the java classes and lib in the WEB-INF since I'm only having single html file with java script, Do you think I need any ? if so how do I know which files I need ? I also extracted the filename.war just to see whats in there and I see only the filename.htm and the META-INF there is no WEB-INF it is disappearing Thanks Lava On Wed, Dec 8, 2010 at 4:35 PM, André Warnier a...@ice-sa.com wrote: Lava Saleem wrote: Hi everyone, I have a single page html file with java script embadded in it, I have created a war file for it and deployed it successfully but when I click on the page I get the below error, the structure of my war file is the following webapp -- filename -- WEB-INF-- filename.htm + web.xml + META-INF + classes + lib I did not modify the web.xml since I don't need the servlets do I need to modify anything? HTTP status 404 description the requested resource (/filename/)is not available Hi. Except the 404 error which your are getting, not much above makes any sense at all. So it is better to forget all that, and start new. You really have to learn to walk before you can run. First, consider the directory structure of a standard Tomcat installation : (CATALINA_HOME) (=CATALINA_BASE) | |- bin (tomcat programs and scripts) |- conf (configuration files) |- lib (global library files) |- logs (logfiles) |- webapps (* web applications *) |- ROOT (the special, top-level, default web application) |- app1 (a web application) |- app2 (another web application) |- ... |- lastapp (another web application) In the above, (CATALINA_HOME) represents the top directory of your Tomcat installation, the one under which the rest of Tomcat is found. For example, on your system it may be C:\tomcat or C:\program files\Apache Software Foundation\tomcat6.0 or /usr/share/tomcat6 or /usr/local/tomcat6 or whatever. The webapps sub-directory is what is important for you now. That is where you will put web applications, composed of static html pages (with or without javascript in them), JSP pages (special html pages with embedded Java code), java servlets (compiled java applications), etc.. The ROOT web application is special. It is the default application. When you use a URL like : http://yourserver.yourcompany.com/abc.html Tomcat is going to look for abc.html under the webapps/ROOT directory. The other subdirectories under webapps are each one separate web application. To access for example the application named app1, you will have to use a URL starting with http://yourserver.yourcompany.com/app1/; For example, if you place a html page named xyz.html in the subdirectory (CATALINA_HOME)/webapps/app1, then the URL to call it up will be http://yourserver.yourcompany.com/app1/xyz.html Under such a web application directory like ../webapps/app1, there is also a structure. It looks like this : (CATALINA_HOME) (=CATALINA_BASE) |- webapps (* dir, top of all web applications *) | |- app1 (dir, contains the web application named app1) - public files (html etc..) - WEB-INF (directory) |- files (private) |- web.xml (configuration file for the application) |- classes (dir.) |- compiled java classes, like servlets |- lib (dir) |- java libraries for this webapp - META-INF (dir.) |- context.xml (more settings for the application) Basically everything under app1 is optional. Tomcat will supply a default if needed. Of course, you will want at least one file under there, to make the execise meaningful. What is in the sub-directories WEB-INF and META-INF, can never be obtained directly by a browser. Tomcat will not allow it. So if you enter the following URL in the browser :
Re: HTTP status 404
I might be wrong but maybe you need to set something in your web.xml to deliver static files. (basically Tomcat is not designed to run static html files, you can use a combination of Apache serveur + tomcat serveur to do that). Sorry but that's just not correct. Any file in the webapp, but outside of the WEB-INF folder can be delivered by the default servlet without any special settings in web.xml or anywhere else for that matter. --David On 12/8/2010 2:45 PM, Victor Kabdebon wrote: I might be wrong but maybe you need to set something in your web.xml to deliver static files. (basically Tomcat is not designed to run static html files, you can use a combination of Apache serveur + tomcat serveur to do that). I strongely recommand you to use an IDE such as Netbeans, create a new Java Web Application project, put your html file in the project build it. Netbeans will generate a correct [YourProjectName].war, that you can deploy or extract to see exactly how it was build, what you need to set etc... Victor http://www.voxnucleus.fr 2010/12/8 Lava Saleem lnsal...@ualr.edu Hi everyone, I have a single page html file with java script embadded in it, I have created a war file for it and deployed it successfully but when I click on the page I get the below error, the structure of my war file is the following webapp -- filename -- WEB-INF-- filename.htm + web.xml + META-INF + classes + lib I did not modify the web.xml since I don't need the servlets do I need to modify anything? HTTP status 404 description the requested resource (/filename/)is not available Thanks for the feedback Lava - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: HTTP status 404
webapp -- filename -- WEB-INF-- filename.htm + web.xml + META-INF + classes + lib If I read this right, 'filename.htm' is being stored in webapp/filename/WEB-INF/filename.htm inside your .war file. FWIW, WEB-INF has no special meaning except in the top level of your .war archive A .war archive built like this will most likely deploy as a static html folder and everything in it will be available as static files. HTTP status 404 description the requested resource (/filename/)is not available If you wanted to get filename.htm with the structure I think you are describing, you should be requesting /$WEBAPP/webapp/filename/WEB-INF/filename.htm where $WEBAPP is the context your war file is deployed under. Usually $WEBAPP is the name of the war file. For instance if the .war file is myapp.war, the request path to filename.htm under tomcat would most likely be myapp/webapp/filename/WEB-INF/filename.htm To fix a *lot* of problems right off the bat, your war archive should look more like: filename.htm WEB-INF web.xml classes lib META-INF (what ever lives under here) Then the request path (again assuming the war file is named myapp.war) would be /myapp/filename.htm --David On 12/8/2010 2:39 PM, Lava Saleem wrote: Hi everyone, I have a single page html file with java script embadded in it, I have created a war file for it and deployed it successfully but when I click on the page I get the below error, the structure of my war file is the following webapp -- filename -- WEB-INF-- filename.htm + web.xml + META-INF + classes + lib I did not modify the web.xml since I don't need the servlets do I need to modify anything? HTTP status 404 description the requested resource (/filename/)is not available Thanks for the feedback Lava - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't access tomcat manager
Ok ... checklist time ... - Comments around the role / and user ... / elements have been removed. From what I could tell in your original post this is taken care of. - The tomcat server has been restarted since the last time tomcat-users.xml has been edited. - You are accessing the manager app using the path /manger/html on the end of your tomcat urls. - You are sure tomcat is listening on the port specified in your URLs (if not specified, default is 80 for http, 443 for https) - Other apps are working in this tomcat instance and you can reach them. - Check your logs for messages during startup and the timestamp when you accessed the manager app - Please describe what you get instead of the expected manager app (login dialog, 403 response, 404 response, etc., ...) Checking back over this thread, I don't see enough detail to figure anything out. Please paint the picture for us. --David On 12/2/2010 9:43 AM, Lava Saleem wrote: Hi everyone, Thanks for the replies yeah I have checked the tomcat user xml file and there are no missing comments brackets or anything so is there any other reason for this to happen ? do I need to modify anything else ? Thank you Lava On Thu, Dec 2, 2010 at 3:52 AM, Pid p...@pidster.com wrote: On 12/1/10 10:05 PM, Lava Saleem wrote: Hi, I have installed apache tomcat 7.0.4 on a centos linux box, 7.0.5 has just been released. p -- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Why an email list, and not a forum?
But I'm too lazy to go fishing for questions I could answer ... I like them showing up in my inbox. If there in a web forum I'm not going to go looking for them. When I'm looking for an answer to one of my questions, google is my first stop and the tomcat list is archived online. --David On 9/24/2010 3:01 AM, Brian wrote: At least someone thinks the same way I do! From: m.h.g.emme...@dnb.nl [mailto:m.h.g.emme...@dnb.nl] Sent: Friday, September 24, 2010 12:48 AM To: Tomcat Users List Subject: Re: Why an email list, and not a forum? I agree. A forum would be more practical. It is much easier reading all postings on a topic. I find myself clearing my tomcat users list inbox every morning, while on forums I visit I check out the new or updated topics. The forums these days let you subscribe to topics or complete forums and send you a notification when a new topic gets started or updated. regards, Milko Brian bbprefix-m...@yahoo.com 24-09-2010 02:19 Please respond to Tomcat Users List users@tomcat.apache.org To users@tomcat.apache.org cc Subject Why an email list, and not a forum? Hi, Just a thought: Why is this support taking place in an email list, instead aof a web based forum? Please consider the environment before printing this email. De informatie verzonden met dit e-mailbericht is vertrouwelijk en uitsluitend bestemd voor de geadresseerde. Indien u als niet-geadresseerde dit bericht ontvangt, wordt u verzocht direct de afzender hierover te informeren en het bericht te vernietigen. Gebruik van informatie door onbevoegden, openbaarmaking of vermenigvuldiging is verboden en kan leiden tot aansprakelijkheid. De afzender is niet aansprakelijk in geval van onjuiste overbrenging van het e-mailbericht en/of bij ontijdige ontvangst daarvan. The information transmitted is confidential and intended only for the person or entity to whom or which it is addressed. If you are not the intended recipient of this communication, please inform us immediately and destroy this communication. Unauthorised use, disclosure or copying of information is strictly prohibited and may entail liability. The sender accepts no liability for improper transmission of this communication nor for any delay in its receipt. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Why an email list, and not a forum?
Absolutely. I have no problem parsing and deleting. --David On 9/24/2010 8:18 AM, michel wrote: Sorry, but I don't get why people can't delete emails on topics they aren't interested in; do some people here feel the need to read all the spam they get? Michel - Original Message - From: David kerber dcker...@verizon.net To: users@tomcat.apache.org Sent: Friday, September 24, 2010 8:00 AM Subject: Re: Why an email list, and not a forum? On 9/24/2010 4:06 AM, Wesley Acheson wrote: ... The point is once your involved in something, doing more than just looking for answers a Mailing list is much better, it involves you much more directly. I don't have to check 10 sites for my 10 subscribed mailing lists. The emails are just there all filtered into their own labels (folders). So its probably better for a open source project to use a mailing list. +1. I actually prefer NNTP groups, but mailing lists are a close second. As soon as you need to follow more than one group, e-mail is much more efficient than a web-based forum. The dev list has other special functions you just wouldn't see working with a forum, such as having the commit logs mailed, and the bugs mailed. This doesn't work well with forums as you'd either have one massive topic or spam with several little topics. Having said all that though I woudn't attempt to read these lists with outlook/outlook express or thunderbird. That just wouldn't work for me. T-bird works fine once you set filters to organize the e-mails. D - 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: How to convert WAR application into console application (Making Unicorn has console application)
I tend to agree. All this graphical stuff is making life miserable for most of us web developers. Back before Tim Berners-Lee came up with HTTP and HTML and made things horribly complicated, one could still concentrate on the quintessential meaning of things, rather than spending most of one's time with presentation matters, users clicking all over the place, multiple threads, connection pools and whatnot. This is what the MVC pattern is all about. The model get's implemented in it's own jar and has it's own development lifecycle to handle the backend business logic. As long as it's designed not to have anything to do with the front-end, life is good whether it be in a console java app or a servlet container w/ an html front-end. --David On 8/20/2010 11:30 AM, André Warnier wrote: Caldarale, Charles R wrote: From: Ranjith [mailto:ranjit...@sedin.co.in] Subject: Re: How to convert WAR application into console application (Making Unicorn has console application) No Its working fine but i want to execute it on console that is my project. Let me see if I understand this correctly: You're asking a Tomcat support mailing list about how not to use Tomcat? I think you've got this wrong. The OP just wants to create a console version of the application. I tend to agree. All this graphical stuff is making life miserable for most of us web developers. Back before Tim Berners-Lee came up with HTTP and HTML and made things horribly complicated, one could still concentrate on the quintessential meaning of things, rather than spending most of one's time with presentation matters, users clicking all over the place, multiple threads, connection pools and whatnot. I applaud the OP's project, and would refer him for example to RFC 1436, describing the Gopher protocol. The quintessential elegance and simplicity of this protocol is demonstrated by the following summary, extracted from the Introduction of said document : Quote Users run client software on their desktop systems, connecting to a server and sending the server a selector (a line of text, which may be empty) via a TCP connection at a well- known port. The server responds with a block of text terminated by a period on a line by itself and closes the connection. No state is retained by the server. Unquote Isn't this beautiful ? How many centuries of unproductive programming time, and how many petabytes of RAM and disk would have been saved, if the professional IT world had just stuck to the simple principles outlined above, rather than falling for all these hyper- metaphors ? - 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: DB connection error and broken images while changing webapp context path
HI Astghik 1. Don't put Context ... / elements in server.xml. They should go into files named ROOT.xml in /etc/tomcat6/Catalina/localhost and /etc/tomcat6/Catalina/www.myip.com. While your at it, drop the docbase and path attributes ... they aren't needed when the Context element is in it's own xml file. 2. Rename myapp in /var/lib/tomcat6/webapps from myapp to ROOT. ROOT is a special name for the default webapp and defined in the servlet spec. Between this and the first suggestion, both localhost and www.myip.com should be showing your myapp webapp as the default webapp (no /myapp in the url). 3. Don't point two host elements at the same appBase. Either have two separate appbases, one for each host and keep two copies of the webapp or use an Alias element and have only one Host ... element. See http://tomcat.apache.org/tomcat-6.0-doc/config/host.html for more information on the Alias directive. 4. I don't see anything here that has any impact on database connectivity ... actually don't see any database configuration here at all. Could you include some info on your hibernate setup for myapp? --David On 8/13/10 7:03 AM, Astghik wrote: Hello All. I have Apache Tomcat 6 server running on Ubuntu 9.10. . I've changed my application context path http://myip:8080/myapp to http://myip:8080 by making changes in server.xml. Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=myapp debug=0/ /Host Host name=www.myip.com appBase=/var/lib/tomcat6/webapps Context path= docBase=myapp/ /Host /Engine But I got another problem, all images (there are in /var/lib/tomcat6/webapps/myapp/img dir) are broken and An error occurred: org.springframework.dao.DataAccessResourceFailureE xception: could not execute query; nested exception is org.hibernate.exception.JDBCConnectionException: could not execute query exception is throwing. How to fix those problems? Regards, Astghik - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 2 POST requests to underlying Server
Any chance we could see a snippet of access log showing the two requests? All I really see here is two packet captures that *look* like they are from in between tomcat and iis (or whatever you are running as a front-end web server). Since 10 addresses are not routeable this looks like all internal traffic. Any chance you could verify this is happening (or not) between the client browser and your front-end web server? Maybe you could try a capture from the client system (the one w/ a browser open). --David On 8/11/10 2:08 AM, Karthik Nanjangude wrote: Hi Ok I have copied the wire shark test samples for the 2 Post Requests [ Apache to JBOSS (Tomcat Internal )..This was taken Aug 9, 2010 ~~ 1nd Post Request No. TimeSourceDestination Protocol Info 10022 30.516874 10.151.41.160 10.151.41.163 TCP 33403 8109 [PSH, ACK] Seq=2079 Ack=4544 Win=15600 Len=65 TSV=2265749122 TSER=2977204079 Frame 10022 (131 bytes on wire, 131 bytes captured) Arrival Time: Aug 9, 2010 15:30:35.48564 [Time delta from previous captured frame: 0.24000 seconds] [Time delta from previous displayed frame: 30.516874000 seconds] [Time since reference or first frame: 30.516874000 seconds] Frame Number: 10022 Frame Length: 131 bytes Capture Length: 131 bytes [Frame is marked: True] [Protocols in frame: eth:ip:tcp:data] [Coloring Rule Name: TCP] [Coloring Rule String: tcp] Ethernet II, Src: HewlettP_f8:fc:ea (00:24:81:f8:fc:ea), Dst: HewlettP_f8:7d:9c (00:24:81:f8:7d:9c) Destination: HewlettP_f8:7d:9c (00:24:81:f8:7d:9c) Address: HewlettP_f8:7d:9c (00:24:81:f8:7d:9c) ...0 = IG bit: Individual address (unicast) ..0. = LG bit: Globally unique address (factory default) Source: HewlettP_f8:fc:ea (00:24:81:f8:fc:ea) Address: HewlettP_f8:fc:ea (00:24:81:f8:fc:ea) ...0 = IG bit: Individual address (unicast) ..0. = LG bit: Globally unique address (factory default) Type: IP (0x0800) Internet Protocol, Src: 10.151.41.160 (10.151.41.160), Dst: 10.151.41.163 (10.151.41.163) Version: 4 Header length: 20 bytes Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00) 00.. = Differentiated Services Codepoint: Default (0x00) ..0. = ECN-Capable Transport (ECT): 0 ...0 = ECN-CE: 0 Total Length: 117 Identification: 0x0d18 (3352) Flags: 0x02 (Don't Fragment) 0.. = Reserved bit: Not Set .1. = Don't fragment: Set ..0 = More fragments: Not Set Fragment offset: 0 Time to live: 64 Protocol: TCP (0x06) Header checksum: 0xc4fa [correct] [Good: True] [Bad : False] Source: 10.151.41.160 (10.151.41.160) Destination: 10.151.41.163 (10.151.41.163) Transmission Control Protocol, Src Port: 33403 (33403), Dst Port: 8109 (8109), Seq: 2079, Ack: 4544, Len: 65 Source port: 33403 (33403) Destination port: 8109 (8109) [Stream index: 64] Sequence number: 2079(relative sequence number) [Next sequence number: 2144(relative sequence number)] Acknowledgement number: 4544(relative ack number) Header length: 32 bytes Flags: 0x18 (PSH, ACK) 0... = Congestion Window Reduced (CWR): Not set .0.. = ECN-Echo: Not set ..0. = Urgent: Not set ...1 = Acknowledgement: Set 1... = Push: Set .0.. = Reset: Not set ..0. = Syn: Not set ...0 = Fin: Not set Window size: 15600 (scaled) Checksum: 0x2b50 [validation disabled] [Good Checksum: False] [Bad Checksum: False] Options: (12 bytes) NOP NOP Timestamps: TSval 2265749122, TSecr 2977204079 [SEQ/ACK analysis] [Number of bytes in flight: 1134] Data (65 bytes) 12 34 00 3d 00 3b 73 69 6d 3d 38 39 36 30 31 39 .4.=.;sim=896019 0010 39 39 30 30 32 30 34 32 36 33 37 35 26 63 61 6e 990020426375can 0020 6d 73 69 73 64 6e 3d 31 30 35 32 37 37 37 37 37 msisdn=10527 0030 26 61 63 63 6f 75 6e 74 69 64 3d 36 37 39 37 35 accountid=67975 0040 311 Data: 1234003D003B73696D3D3839363031393939303032303432... [Length: 65] ~~~ 2nd Post Request No. TimeSourceDestination Protocol Info 15548 42.619208 10.151.41.160 10.151.41.163 TCP 33418 8109 [PSH, ACK] Seq=1075 Ack=6 Win=5840 Len=65 TSV=2265761224 TSER=2977216182 Frame 15548 (131 bytes on wire, 131 bytes captured)
Re: 2 POST requests to underlying Server
Let me demonstrate I have read the *entire* thread: You stated on 8/10/2010 at 8:16am EDT: We also made sure there is no traffic /users using the web application during the tcp dump taken. How? Are you absolutely sure *no* client generated the POST request? ... This has happened in spite of blocking multiple button clicks on jsp page using jscript filter. Are you sure? As has been recommended, remove the browser and all it's javascript from the equation. Use wget or curl to manually fire just *one* request and see what happens. My Observation as per TCP dump command, we clearly see multiple request being sent from Apache to web server. Not in question at all... but we've not seen any evidence the requests were sourced from Apache. They could just as easily come from a client brower, a firewall or even a proxy server and passed on by Apache. Stated multiple times in various messages of this thread: For simple test case we used 1 simple transaction Page to do the activity For insertion, but the since 2 request to web server ,we see 2 rows inserted in DB Still have the browser and it's javascript in the equation. Plus I've yet to see any evidence these requests are sourced from httpd or mod_jk. This could easily be the browser or some component between httpd and the client. You stated on 8/11/2010 at 1:07am EDT: The same test performed on the Internal IP (http://ip:port/ABCD), and was observed that the single Post request was observed with single Insertion to DB ... compared to 2 POST request via External IO ( http://ABCD.com ) We have only ever seen a tcp dump in between Apache httpd and jboss and only fragments at that. Certainly not enough to believe the two are requests are in any way related. The POST command, headers, etc., ... are far better evidence. You stated on 8/11/2010 at 6:37am EDT: If needed I can even share the Access Logs of Apache so that the browser details match [ IE 7+ / FFox 3+ ] are as available. I believe at least one of us has already asked for this. Don't make me dig up the quote(s). Let me recap so I am very clear. We have not seen any evidence that these requests are from Apache and/or mod_jk. They could very easily be from: -- a misbehaving client (client in this case is very broad including hack attempts, search crawlers, browsers, etc., ...) -- firewall -- proxy server Just to make matters a little more interesting, client id signatures can easily be faked for any browser you can think of. Just because it claims to be IE doesn't mean it is. A lot of us use mod_jk to connect apache to tomcat. On the rare event this kind of issue has cropped up it seems to always be as a result of something outside apache mod_jk and tomcat. --David On 8/11/10 10:06 AM, Karthik Nanjangude wrote: Hi Maybe you could try a capture from the client system (the one w/ a browser open). As I have already posted the form [ please check last few mails exchanged ] If the Sample test on the web application is performed from Outer side world [http://www.xyx.com/abcd ] Tcp dump captured on Apache Http Server, 2 Post request are clearly visible with 12 sec apart. If the Sample test on the same hosted web application performed from within the internally IP/Port hosted [ http://xyx/abcd ] Tcp dump captured on JBoss [Tomcat Built in ] 1 Post request is visible Both of the samples were verified in 2 Browsers [IE 7+ / FF3 +] more then 6 times and the info is captured via tcp Dump. request with wget rather than browsers Since the Application is in Production and need some Window Time for taking samples. I would definitely get back with the results by EOD 2 morrow With regards Karthik -Original Message- From: David Smith [mailto:d...@cornell.edu] Sent: Wednesday, August 11, 2010 7:23 PM To: Tomcat Users List Subject: Re: 2 POST requests to underlying Server Any chance we could see a snippet of access log showing the two requests? All I really see here is two packet captures that *look* like they are from in between tomcat and iis (or whatever you are running as a front-end web server). Since 10 addresses are not routeable this looks like all internal traffic. Any chance you could verify this is happening (or not) between the client browser and your front-end web server? Maybe you could try a capture from the client system (the one w/ a browser open). --David On 8/11/10 2:08 AM, Karthik Nanjangude wrote: - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Fwd: Re: RE: Unable to start Tomcat 6 on Windows Server 2003
See inline below ... On 6/27/2010 5:24 PM, Pid wrote: On 27/06/2010 22:09, 1destroy...@gmx.de wrote: hi, i already tried this, but here the output: D:\ttestset CLASSPATH=%CATALINA_HOME%\bin\tomcat-juli.jar;%CLASSPATH% D:\ttestcd bin D:\ttest\bincatalina.bat run Using CATALINA_BASE: D:\ttest Using CATALINA_HOME: D:\ttest Using CATALINA_TMPDIR: D:\ttest\temp Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_11 Using CLASSPATH: D:\ttest\bin\bootstrap.jar Exception in thread main java.lang.NoClassDefFoundError: org/apache/juli/loggi ng/LogFactory at org.apache.catalina.startup.Bootstrap.clinit(Bootstrap.java:54) Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 1 more Could not find the main class: org.apache.catalina.startup.Bootstrap. Program w ill exit. D:\ttest\binset ... CLASSPATH=%CATALINA_HOME%\bin\tomcat-juli.jar;%CLASSPATH% ... JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11 ... Why are you setting the CLASSPATH variable? Don't do that. p I'm sure on Martin advice (who replied to wrote to Dessi directly, not on the list -- see below). Martin is wrong by the way ... classpath should NEVER be set under any circumstances. Tomcat's own scripts will set it correctly. And the output I see shows it did exactly as expected, ignoring the externally set classpath in favor of it's own. :-) I'm not seeing anything here explicitly wrong except maybe some kind of permissions issue. I think Dessi is right in that this appears to be some kind of domain issue. Process Monitor (I've posted a link earlier) should be able to show where permission was denied. It just takes a little work to weed through it's log file to figure where the problem is. --David D:\ttest\binset CLASSPATH=D:\ttest\bin\tomcat-juli.jar;%CLASSPATH% D:\ttest\binset ... CLASSPATH=D:\ttest\bin\tomcat-juli.jar;%CATALINA_HOME%\bin\tomcat-juli.jar;%CLAS SPATH% ... JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11 ... D:\ttest\bincatalina.bat run Using CATALINA_BASE: D:\ttest Using CATALINA_HOME: D:\ttest Using CATALINA_TMPDIR: D:\ttest\temp Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_11 Using CLASSPATH: D:\ttest\bin\bootstrap.jar Exception in thread main java.lang.NoClassDefFoundError: org/apache/juli/loggi ng/LogFactory at org.apache.catalina.startup.Bootstrap.clinit(Bootstrap.java:54) Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 1 more Could not find the main class: org.apache.catalina.startup.Bootstrap. Program w ill exit. D:\ttest\bindir Volume in drive D is DataDrive Volume Serial Number is 78F8-015F Directory of D:\ttest\bin 06/27/2010 08:41 AMDIR . 06/27/2010 08:41 AMDIR .. 06/25/2010 07:54 PM22,110 bootstrap.jar 06/25/2010 07:54 PM 2,374 catalina-tasks.xml 06/25/2010 08:27 PM11,399 catalina.bat 06/25/2010 08:14 PM11,399 catalina.bat.org.txt 06/25/2010 07:54 PM15,582 catalina.sh 06/25/2010 07:54 PM 9,341 commons-daemon.jar 06/25/2010 07:54 PM 1,342 cpappend.bat 06/25/2010 07:54 PM 2,108 digest.bat 06/25/2010 07:54 PM 1,624 digest.sh 06/25/2010 07:54 PM74,398 jsvc.tar.gz 06/25/2010 06:56 PM 348,160 msvcr71.dll 06/25/2010 07:54 PM 5,062 service.bat 06/25/2010 07:54 PM 3,150 setclasspath.bat 06/25/2010 07:54 PM 4,114 setclasspath.sh 06/25/2010 07:54 PM 2,108 shutdown.bat 06/25/2010 07:54 PM 1,563 shutdown.sh 06/25/2010 07:54 PM 2,109 startup.bat 06/25/2010 07:54 PM 1,956 startup.sh 06/25/2010 07:54 PM 868,352 tcnative-1.dll 06/25/2010 07:54 PM26,484 tomcat-juli.jar 06/25/2010 07:54 PM 241,274 tomcat-native.tar.gz 06/25/2010 07:54 PM
Re: Unable to start Tomcat 6 on Windows Server 2003
On 6/26/2010 3:33 PM, 1destroy...@gmx.de wrote: hi, as already written: The Tomcat do not start with „catalina.bat run“ in the box is written that he can not find Class org/apache/juli/logging/LogFactory... The file is definitely there... kind regards, dessi Please post the whole stack trace including any root causes, obscuring passwords and usernames. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to start Tomcat 6 on Windows Server 2003
On 6/26/2010 12:19 PM, 1destroy...@gmx.de wrote: What happens if you run startup.bat? A second dos box shortly appear and is closing immediately... Start a command prompt first, then manually type the startup.bat command - don't double click the file to run it. What does the error message say exactly? i started startup.bat in a command box - all env variables are shown, no failures, and pathes are correct and a second command box shortly appear and immediatly closed again. no chance to read it out :) A second command prompt window?? I've never seen tomcat do such a thing. What did the main window show? If left as is, can you access tomcat via a browser? Anything in catalina.out? Anything in the event log? If all that fails to produce anything, I highly recommend process monitor to trace the what tomcat/jvm is trying to do and where it's failing: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' AGAIN!
I do not see the mistake that you see I didn't say I saw a mistake ... just listing stuff to look at in diagnosing this issue. The file permission issue can definitely contribute to what you were seeing. Other comments inline --David On 6/21/2010 8:32 AM, yucca...@live.co.za wrote: -- From: Martin Gainty mgai...@hotmail.com Sent: Monday, June 21, 2010 1:16 PM To: Tomcat Users List users@tomcat.apache.org Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' AGAIN! if you took time to look at tomcat-users archive you would've come across this post by david smith..the answer is just as good now as when originally posted On 6/19/2010 1:31 PM, yucca...@live.co.za wrote: I have no choice left but to not let hibernate use my tomcat datasource. This is not good. I have even moved host provider in hope that it was previous fult tomcat install from dailyrazor (tomcat 6 does not hav common/lib) and is meant to have tomcat/lib I can say that my new container is correct and that I am 100% sure that all mus jdbc configuration is correct in zml after having gone though it at least 20 times and checked the wiki that was linked here earlier and still have issues. Yes mysql jdbc bin is in tomcat/lib so that is not cause of the error. /the error is very weird though as I have another point that uses hibernate without error on the same database. It is not possible for me to use hibernate to use tomcat datasource sadly. Many thanks for all the help though. DS If you put the following into a jsp and call the jsp, does it work? %...@page import=java.sql.Connection% %...@page import=java.sql.DriverManager% %...@page import=java.sql.SQLException% % Class.forName(com.mysql.jdbc.Driver).newInstance(); conn = DriverManager.getConnection(jdbc:mysql://localhost/test? + user=montypassword=greatsqldb); out.println( The connection worked!! ) ; Did this and it works , I even made this page my welcome page at thejarbar.org Great! That's one giant step in the right direction. % If that works then your jdbc driver is available and installed properly (I trust there is only one copy of that jar in your entire tomcat install ... right?). I do not see or find another copy of the driver Now check to see if there's an xml in tomcat/conf/Catalina/localhost there isn't one Ok ... this is one of a couple of places a Context ... / element can be. It maybe in one of the others I mentioned like your webapp's META-INF folder. The one that might be in tomcat/conf/Catalina/localhost will take precedence over any in your webapp's META-INF folder. People have been bitten before changing the one in META-INF, not realizing there was an old copy in tomcat/conf/Catalina/localhost. matching your webapp's deployed name. For instance if you access your webapp as http://localhost:8088/mywebapp, there should be a mywebapp.xml file there. Take a look at it for the Resource ... / or ResourceLink ... / (which ever you setup) and make sure they are correct. If this file is not available, take a look at context.xml in your webapp's META-INF folder (same process). If it's not there, then the Context ... element for your webapp is in server.xml and it should NOT be there. It's bad practice and requires a full tomcat restart to make I did not do this If you mean restart, it's not necessary as long as the Context ... /Context element defining your app to tomcat is not in server.xml. changes. Did this and it works , I even made this page my welcome page at thejarbar.org ??? I'm confused here. What did you do at this point that works? Lastly, case matters. Be sure everything is typed correctly including whether it's upper or lower case. Now take a look at the logs and post any relevant messages including complete stacktraces of exceptions w/o edits except to protect usernames and passwords. I have checked this several times and see no syntax errors, further, if there were url syntax errors (because they can only be url errors due to it not being an accessdenied exception from mysql, it ould show on my test environment as I use same database names and table names. In fact I would say that because I am able to do that test page with success it proves my driver is in place and can be found . Excellent. (on the lack of syntax errors). Are there any exceptions during startup of your webapp in the logs or other messages relating to the database pooling? I do not see the mistake that you see --David /DS From: yucca...@live.co.za To: users@tomcat.apache.org Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' AGAIN! Date: Mon, 21 Jun 2010 10:49:41 +0200 Ok I
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' AGAIN!
On 6/19/2010 1:31 PM, yucca...@live.co.za wrote: I have no choice left but to not let hibernate use my tomcat datasource. This is not good. I have even moved host provider in hope that it was previous fult tomcat install from dailyrazor (tomcat 6 does not hav common/lib) and is meant to have tomcat/lib I can say that my new container is correct and that I am 100% sure that all mus jdbc configuration is correct in zml after having gone though it at least 20 times and checked the wiki that was linked here earlier and still have issues. Yes mysql jdbc bin is in tomcat/lib so that is not cause of the error. /the error is very weird though as I have another point that uses hibernate without error on the same database. It is not possible for me to use hibernate to use tomcat datasource sadly. Many thanks for all the help though. If you put the following into a jsp and call the jsp, does it work? %...@page import=java.sql.Connection% %...@page import=java.sql.DriverManager% %...@page import=java.sql.SQLException% % Class.forName(com.mysql.jdbc.Driver).newInstance(); conn = DriverManager.getConnection(jdbc:mysql://localhost/test? + user=montypassword=greatsqldb); out.println( The connection worked!! ) ; % If that works then your jdbc driver is available and installed properly (I trust there is only one copy of that jar in your entire tomcat install ... right?). Now check to see if there's an xml in tomcat/conf/Catalina/localhost matching your webapp's deployed name. For instance if you access your webapp as http://localhost:8088/mywebapp, there should be a mywebapp.xml file there. Take a look at it for the Resource ... / or ResourceLink ... / (which ever you setup) and make sure they are correct. If this file is not available, take a look at context.xml in your webapp's META-INF folder (same process). If it's not there, then the Context ... element for your webapp is in server.xml and it should NOT be there. It's bad practice and requires a full tomcat restart to make changes. Lastly, case matters. Be sure everything is typed correctly including whether it's upper or lower case. Now take a look at the logs and post any relevant messages including complete stacktraces of exceptions w/o edits except to protect usernames and passwords. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Hi. Could you please post a version of server.xml without the comments. They are very helpful as documentation but make the file extremely difficult to read. Also, I would check to see if the problem is because the driver jar could not be found or because of some other problem. It's easy enough to try a connection directly (no jdbc pool) just to see if the jar is found. Lastly (and maybe I missed it in the thread), could you post a complete stack trace including any root causes and related exceptions from when the webapp was started? --David On 6/16/10 7:08 AM, yucca...@live.co.za wrote: I manually added the lib dir to root of production server and am still stuck with same exception I now have also remove mysql connector as provider instructed me t because there is already a connector on server-side... My last hope, it would appear is that I missed something in config files so I am posting all 3 here in hope of moving on. SERVER: ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- Note: A Server is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/server.html -- Server port=8005 shutdown=SHUTDOWN !--APR library loader. Documentation at /docs/apr.html -- Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / !--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -- Listener className=org.apache.catalina.core.JasperListener / !-- Prevent memory leaks due to use of particular java/javax APIs-- Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener / !-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / !-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html -- GlobalNamingResources !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=jdbc/auth description=The Jar Bar user authentication type=javax.sql.DataSource auth=Container driverClassName=com.mysql.jdbc.Driver maxActive=30 maxIdle=10 maxWait=1 password=pookie123 url=jdbc:mysql://localhost:3306/yucca123_thejarbar validationQuery=/* ping */ SELECT 1 username=yucca123_tom/ /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container Note: A Service is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/service.html -- Service name=Catalina !--The connectors can use a shared executor, you can define one or more named thread pools-- !-- Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=150 minSpareThreads=4/ -- !-- A Connector represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / !-- A Connector using the shared thread pool-- !-- Connector executor=tomcatThreadPool port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / -- !-- Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the JSSE configuration, when using APR, the connector should be using the OpenSSL style configuration described in the APR documentation -- !-- Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true maxThreads=150
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
It can also (and frequently does) happen when there is some mismatch between where the resource is defined and where it's used. Maybe the context.xml file you think tomcat is using for your webapp isn't being used at all. --David On 6/16/10 7:33 AM, yucca...@live.co.za wrote: The bottom line for me is that this exception from what I have read usually happens when container can not find the mysql connector. Gonna ask them to reinstall my tomcat instance and take it from there. -- From: Pid p...@pidster.com Sent: Wednesday, June 16, 2010 1:18 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' - 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: Glassfish overriding Tomcat 6.0.24 installation?
The true problem even after resolving connector port conflicts is that tomat is not compatible with Java EE. Java EE has a copy of the servlet-api which conflicts with the servlet-api distributed with tomcat. If you want to use Java EE, you end up using Glassfish. If you want to use tomcat, you end up using the JDK. --David On 6/15/2010 7:52 AM, j jj wrote: Hi David You have some different choice one of them is in below go to Tom Cat installation path/Apache Software Foundation/Tomcat 6.X\conf in this path you can see file with name server.xml in it you can see the tag Connector port=8080 , you can change it or find out the picked up port that Tom Cat now listening on it Regards, Pouya From: Josh Gooding josh.good...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Tue, June 15, 2010 4:14:01 PM Subject: Re: Glassfish overriding Tomcat 6.0.24 installation? Thanks David, I did that and it seemed to work. :: thumbs up :: - Josh On Thu, May 27, 2010 at 2:02 PM, David Smith david.sm...@cornell.eduwrote: On 5/27/2010 1:44 PM, Josh Gooding wrote: Hey guys (and gals). Interesting enough, I installed the Jave EE 5 JDK for windows. I then installed Tomcat 6.0.24, when I navigate to htp://localhost:8080 (which should be the default of Tomcat) I am getting the glassfish junk. How can I remove the glassfish? I don't believe that there is an option to not install glassfish. Any help would be greatly appreciated. - Josh Drop Java EE 5 and install a current version of the java SDK. --David - 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: problems at thejarbar.org
Don't use that ... it still throws an error, reconnecting only after the exception is thrown. If using the db pooling in tomcat, it's better to include a validationQuery attribute in the Resource ... / element in your app's context.xml file. If on the other hand you are directly connecting the database on your own then just trap the exception, open a new connection and try again. --David On 5/30/2010 1:53 PM, Yucca Nel wrote: Ok I need to keep connection open to avoid exceeption but have found this is deprecated autoReconnect=true can someone provide up to date strategy for dealing with this? -- From: Jeff jwi...@cox.net Sent: Sunday, May 30, 2010 5:54 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: problems at thejarbar.org would this help? http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Common%20Problems On 5/30/2010 10:08 AM, Yucca Nel wrote: The following is becoming a common and serious problem and I am unable to find a google solution for it... I have never seen sych an error and it does not appear to be common enough to get many google hits but when it happens, no one is able to register at my site... Stck trace: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 4,290,127 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3052) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2938) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3481) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2228) at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:550) ... 15 more Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2497) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2949) ... 23 more ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - Communications link failure The last packet successfully received from the server was 4,299,820 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.apache.catalina.core.ContainerBase.[Catalina].[thejarbar.org].[/].[Faces Servlet]The registration code that leads to error is as follows: Form:!--Created by IntelliJ IDEA.User: ownerDate: 02.mai.2010Time: 14:07:31To change this template use File | Settings | File Templates.--%...@page contentType=text/html language=java %%...@page pageEncoding=UTF-8%%...@taglib uri=http://java.sun.com/jsf/core; prefix=f %%@ taglib prefix=h
Re: Glassfish overriding Tomcat 6.0.24 installation?
On 5/27/2010 1:44 PM, Josh Gooding wrote: Hey guys (and gals). Interesting enough, I installed the Jave EE 5 JDK for windows. I then installed Tomcat 6.0.24, when I navigate to htp://localhost:8080 (which should be the default of Tomcat) I am getting the glassfish junk. How can I remove the glassfish? I don't believe that there is an option to not install glassfish. Any help would be greatly appreciated. - Josh Drop Java EE 5 and install a current version of the java SDK. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: FW: General / Special cause under which TOMCAT Crash been noticed
If your tomcat instance crashes, it'll be sudden and not anything the tomcat instance itself can do anything about. Try looking into a cron script or some other scheduled task external to tomcat. The script could make a request of tomcat every minute or so and restart it if it's down. Generally if doing this via cron script, the standard output of the script can be automatically emailed to anyone you wish. --David On 5/3/2010 12:44 AM, Karthik Nanjangude wrote: Hi As I have indicated that my Web application would be installed /run remotely with out any monitoring factor (for reasons) I was validating in such situations ,if any known reasons for Tomcat Crash happens ...How to restart automatically with mail notification as the only form of offline monitor for status. With regards karthik -Original Message- From: Gregor Schneider [mailto:rc4...@googlemail.com] Sent: Friday, April 30, 2010 4:38 PM To: Tomcat Users List Subject: Re: FW: General / Special cause under which TOMCAT Crash been noticed Karthik, *If* any OutOfMemoryError occurs within Tomcat, the reason for said error will be some faulty webapp, meaning it is likely to crash any other servlet-container, too. Therefore, stick to the rules I pointed out above, and you'll be fine: Make sure you have some solutions ready in case of DDoS, see that your OS is stable and on a current patchlevel and scrutinize the software you're installing into Tomcat (aka Webapps) thoroughly - that's about it. Rgds Gregor -- just because you're paranoid, don't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 @ http://pgp.mit.edu:11371/ skype:rc46fi - 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: changing tomcat-users.xml makes tomcat unresponsive
You might want to check the file permissions before and after you edit it. Something about this smells like a permissions issue. I have a Ubuntu 9.10 installed tomcat and it works perfect. Admittedly I didn't upgrade from 8.4 but w/ editing tomcat-user.xml being the only change, there are only a couple of things to cause your issue: 1. File permissions changed 2. The edited xml file doesn't validate as xml. There are a number of xml editors out that can also validate. --David On 5/2/2010 1:37 PM, paul geer wrote: Thank you for the reply. Do you mean the original installation of ubuntu or tomcat? I restored the tomcat settings back to the original state, but cannot see that an examples app is pre-installed. If it's something I need to deploy myself, I'm not sure how to do that without access to the management console. If you meant the original 8.4 ubuntu, I was hoping to try other solutions before doing that. I'm completely willing to, as I'm not attached to anything I've done, but since it's inconvenient I would rather wait. On Sat, May 1, 2010 at 2:49 PM, Pid p...@pidster.com wrote: On 01/05/2010 18:19, paul geer wrote: Hello all, I had an installation of ubuntu 8.04 that I recently upgraded to 9.10. I barely used it before the upgrade so the system was very close to a fresh install of 8.04 before the upgrade. I installed tomcat6 with apt-get. After setting everything up, I checked that I could access the It works default page from both inside my home network and would accept outside connections. Clicking the link for the manager console prompted me for a username and password, but since I had not yet made changes to tomcat-users.xml, it failed as expected. I edited the file (/etc/tomcat6/tomcat-users.xml), uncommented the existing users and added a manager role and a manager user with that role. Upon restarting the server, any attempt to connect to the server locally or externally causes the browser to spin as if loading a page but with no results. I will sit and spin for hours if I let it (I have) without timing out. I have tried various permutations of users in the file, such as uncommenting the original ones and not adding a manager role or user, adding the role to one of the default users, etc, but the only way to get the index page to actually load again is to comment out all users. Web searches of this issue have only turned up instances of people not realizing the users were commented out and editing the file anyway. Also, /var/logs/tomcat6 does not contain any logs. I've used updatedb and locate to verify that there aren't other tomcat-users files elsewhere. I've also been unable to locate an alternate log directory. Thanks for any help the community can offer. Enjoy your weekend, If you revert to the original installation, does the /examples app work? Does using the examples app generate log files in the expected location? p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Connector to Apache 2.2
Personally I highly recommend the Firebug plugin for Firefox to diagnose this stuff. It does an amazing job of showing parameters, headers, responses, everything. --David On 5/2/2010 12:42 PM, André Warnier wrote: Hi. Jie Sheng Chua wrote: Hi André and Juha, I edit my tomcat server.xml as describe. my tomcat and apache listed that the connector is started as in the log. But when i access (http://192.168.1.68/examples/index.html) with IE, The webpage cannot be found error is displayed. Do yourself a favor, and in IE, in the settings, unclick the option for use friendly error messages. This way, you will see the page really sent back by the server, and not the internal built-in IE friendly error page, which is useless. When i access http://192.168.1.68:8080/examples/index.html;, the page can be display. Ok. This means that at least Tomcat can find the page. Your Apache/mod_jk configuration also looks ok to me. ... --- *apache2: error.log* [Sun May 02 23:02:33 2010] [notice] Apache/2.2.14 (Ubuntu) mod_jk/1.2.28 configured -- resuming normal operations [Sun May 02 23:04:27 2010] [error] [client 192.168.1.66] File does not exist: /var/www/examples The above can be 2 things : a) either Apache is not even trying to pass this request to mod_jk or b) Apache passes the request to mod_jk, but mod_jk returns the request to Apache with the code DECLINE. This would mean that mod_jk has examined the URL of the request, determined that it does not match any of its JkMount, and decided this request is not for him and should be handled by Apache itself. Then Apache tries to find (himself) the requested document under its own DocumentRoot, and it fails, so it returns a 404 Not Found response. To find out more, increase the log level of mod_jk : # Set the jk log level [debug/error/info] JkLogLevelinfo to JkLogLevel debug Then retry and look at /var/log/apache2/mod_jk.log. It will tell you, step by step, how it tries to match the request URL to one of its JkMount mappings. Or it will tell nothing, and in that case we are in case (a) above. One question : is does not look that way from the configuration you posted, but are you using VirtualHost(s) in Apache ? If yes, then make sure that your JkMount directives are in the VirtualHost configuration section, or lookup the JkMountCopy directive. (JkMount's are not automatically inherited by VirtualHost sections, from the main httpd section). - 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: Httpd Configuration Clarification
Adjust your script to check http://hostname:443/... An SSL cert is tied to a hostname and will probably fail due to certificate issues if you attempt to access via localhost. Some http script libraries can be rather draconian on this issue. --David On 4/29/2010 3:35 AM, Anisha Parveen wrote: Thank you for the response. That was a type error. https://hostname:443/cns/ser/CTConfigServicehttps://hostname/cns/ser/CTConfigService On Thu, Apr 29, 2010 at 12:54 PM, Pid p...@pidster.com wrote: On 29/04/2010 07:24, Anisha Parveen -X (anparvee - Infosys at Cisco) wrote: Hi, I am facing a problem with my configuration. Problem basically is that I am able to access the WebServices URL Say http://hostname:443/cns/ser/CTConfigService through the browser. Your SSL config is probably broken, if you're using port 443 without https. However, the script running on the machine checks an url https://localhost:443/cns/ser/CTConfigServicehttps://localhost/cns/ser/CTConfigService . The webservice url is not accessible through localhost from the same box. I have attached my httpd.conf and mod_jk.conf-cns files. The list often strips attachments. Kindly let me know what changes need to be done, such that the URL is accessible through localhost from the same machine And through hostname from the browser in other machines. Any pointers or tutorials on configuration would be hihgly useful. There's no clue that this is a Tomcat related question, perhaps you're in the wrong place. If you're looking for the Apache HTTPD users list, it's here: http://httpd.apache.org/lists.html p Thanks in advance, Anisha - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't login to Tomcat manager pages
On 4/21/2010 1:14 PM, Luís de Sousa wrote: Dear all, Tomcat 6.0.20 on Ubuntu 9.10. I can't login to the manager pages (http://localhost:8080/manager/html). I set a new user and a few roles in the /etc/tomcat6/tomcat-users.xml file, restarted Tomcat but can't possibly login. I browsed through a number of threads with similar issues but couldn't solve it so far. Note that I uncommented the users section in the file, it is reproduced below. Thanks for you time, Luís -- ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=admin/ role rolename=manager/ role rolename=standard/ user username=admin password=admin roles=admin,standard,manager/ /tomcat-users I have a Ubuntu 9.10 system and did exactly what you've posted above. It works like a charm. Have you altered anything else? Change permission inadvertently on tomcat-users.xml? Mine is read/write by root, read-only by tomcat6. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't login to Tomcat manager pages
Here's my system's tomcat-user.xml as listed w/ ls -l: -rw-r- 1 root tomcat6 1202 2010-04-22 08:15 /etc/tomcat6/tomcat-users.xml As you can see, user and group permissions are set, but the other permissions are all blank. This is the way it should be since it contains password information. --David On 4/22/2010 9:07 AM, Luís de Sousa wrote: On Thu, Apr 22, 2010 at 1:29 PM, David Smith david.sm...@cornell.edu I have a Ubuntu 9.10 system and did exactly what you've posted above. It works like a charm. Have you altered anything else? Change permission inadvertently on tomcat-users.xml? Mine is read/write by root, read-only by tomcat6. Well David you figured it. By some reason the tomcat-users.xml had blank permissions for the 'all' group. I have no idea how it ended up that way, and doubt I'd do such thing out of my own will. Go figure. I think I'll run a test install on another machine to see if this is set by default. Thanks to all for your help, Luís - 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: loading properties file from WEB-INF instead of WEB-INF/classes
An alternative exists in the ServletContext class -- ServletContext.getResource( path ) takes path as relative to the current webapp and returns a URL for opening the resource or null if the resource was not found. also there is -- ServletContext.getResourceAsStream( path ) takes a path as relative to the current webapp and returns an i/o stream for reading the file. For example, using this within a servlet: try { java.io.InputStream res_stream = this.getServletContext().getResourceAsStream('/WEB-INF/my-config.ini') ; // read the data } catch (java.io.IOException ioe) { // handle the problem } both of these are well documented in the servlet spec. --David On 4/19/2010 2:02 PM, Yucca Nel wrote: props file can be placed in src package and then placed along with classes in the Web-INF directory when compiling with the destination flag .This method has been used since jdk 1 for internationalization and is understood by new and old devs. On a side not perhaps someone can help me with a related question regarding how we intwenationalize images? or a link:P -- From: Harry Metske harry.met...@gmail.com Sent: Sunday, April 18, 2010 7:32 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: loading properties file from WEB-INF instead of WEB-INF/classes 2010/4/17 Thufir hawat.thu...@gmail.com getPropsFromWebINF works so long as the properties file is within the package of the class (/. However, I'd like to put the properties file under WEB-INF: public void getPropsFromWebINF() throws IOException { Properties p = new Properties(); InputStream is; is = getClass().getResourceAsStream(sqljdbc4.properties); p.load(is); log(p.toString()); } Class.getResourceAsStream() will delegate to the classloader to find the resource (searches the classpath) , see http://java.sun.com/javase/6/docs/api/java/lang/Class.html#getResourceAsStream(java.lang.String) The tomcat site has an excellent description of Tomcat's classloading : http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html , this should bring you to the conclusion that the above won't work. You should put your sqljdbc4.properties file in WEB-INF/classes, or in WEB-INF/lib if packaged in a jar file. If you reference it from your application, make sure you prepend a / (or it will search in your servlet's package) . I've seen mention of using: System.getenv(APP_PROPERTIES); in conjunction with a context (context.xml under META-INF) along the lines of: ?xml version=1.0 encoding=UTF-8? Context antiJARLocking=true path=/A00720398sat Environment name=APP_PROPERTIES description=The APP Properties File override=false type=java.lang.String value=/WEB-INF/app.properties / /Context however, I'm not able to get the environment, I just get a null value. can you be a bit more specific where you get a null value (show some lines of code)... although the above won't bring you to the content of the property file, you only have defined a key/value pair. regards, Harry What's the correct, and simple, idiom? (Staying away from jndi and dbcp for now, and, oddly enough, servlets in this case.) Actually, I suppose in a sense it's in WEB-INF: dtc01l0376-06:~ a00720398$ dtc01l0376-06:~ a00720398$ jar -tfv NetBeansProjects/A00720398sat/dist/A00720398sat.war | grep sql 498 Sat Apr 17 14:36:14 PDT 2010 WEB-INF/classes/controller/sqljdbc4.properties however, I'd like to move it from WEB-INF/classes up to just WEB-INF. thanks, Thufir - 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: URLs with '../' and 404s
I strongly advocate server relative URLs which get rid of the whole problem. All that means is the URL becomes everything after the servername port in a full absolute URL. That way it just plain works and even minimizes the browser's understanding of how to compute an absolute URL from a relative one. It's even super easy to create them ... request.getContextPath() + '/app/rel/path/to/myresource.blah' It even takes into account if the app is deployed multiple times in multiple contexts. ie it's always the context in the current request. --David On 4/8/10 4:03 PM, Nikita Tovstoles wrote: Response.java in Tomcat src: http://kickjava.com/src/org/apache/catalina/connector/Response.java.htm On Thu, Apr 8, 2010 at 12:52 PM, Christopher Schultz ch...@christopherschultz.net wrote: Nikita, On 4/8/2010 11:14 AM, Nikita Tovstoles wrote: We use Wicket that periodically redirects to relative URLs starting with '../'. I realize that's against the RFC (which says redirects are supposed to be absolute), but I am not clear on why doesn't Tomcat collapse those URLs in Response.toAbsolute()? I see no toAbsolute method in the HttpServletResponse class. Are you talking about some other toolkit? -assume client is at http://localhost/app/home -app responds to a request with 302 '../home.0' -Response.toAbsolute() rewrites Location as http://localhost/app/home/. . /home.0 (spaces added to avoid spam filter) What does the response actually look like to the browser? But, if client then issues a GET with exactly that URL - and not http://localhost/app/home.0, Tomcat will issue a 404. Which URL? In other words, toAbsolute() produces a URL that Tomcat cannot service. Why the asymmetry? Again, where does toAbsolute come from? -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org ---
Re: Error connecting to MySQL
Communications link failure Suggests either a) the mysql server isn't running or b) it isn't listening on port 3306 of your localhost adapter. --David On 3/22/2010 12:31 AM, Roman Sokolyuk wrote: Hi, I am running Tomcat 6.0 on windows 7. I am also running MySQL as a service and I am getting the following exception when trying to connect to the database: org.apache.jasper.JasperException: javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.) org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) *root cause* javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.) org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791) org.apache.jsp.pages.welcome_jsp._jspService(welcome_jsp.java:109) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) *root cause* org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.) org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) com.paranormal.dao.SignDao.getAllSigns(SignDao.java:27) org.apache.jsp.pages.welcome_jsp._jspService(welcome_jsp.java:69) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) *root cause* com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) com.mysql.jdbc.Util.handleNewInstance(Util.java:409) com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1122) com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2260) com.mysql.jdbc.ConnectionImpl.init(ConnectionImpl.java:787) com.mysql.jdbc.JDBC4Connection.init(JDBC4Connection.java:49) sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) com.mysql.jdbc.Util.handleNewInstance(Util.java:409) com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:357) com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285) org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
Re: Multiple SSL certificates on same server
On 3/8/2010 6:46 PM, Richard Huntrods wrote: Does anyone know if it is possible, or has anyone done this: I have two applications running on a single server. The applications use different domains and URLs, so the single Tomcat instance can easily tell them apart. (Note: this part is currently working just fine). https://domain1/application1 https://domain2/application2 Again, both domains point to the same static IP, and yes, it is possible for someone to access either application from either domain. Normally, that is not an issue with the clients. However, I currently have only one SSL certificate on the server - this is for domain1. So if you use domain1 to access application1, it's all fine. The security cert comes up green and all that. BUT - if you try and access application2 via domain2, you get the red security cert (wrong domain / server name). I would like to purchase a second certificate for the second domain, and am wondering if this can be done, and how one would tell Tomcat (in server.xml) to acknowledge the second certificate. Currently the stuff in server.xml looks like this: Connector port=443 protocol=HTTP/1.1 SSLEnabled=true maxThreads=150 enableLookups=false scheme=https secure=true keystoreFile=./keys/.keystore keystorePass=myPassword clientAuth=false sslProtocol=TLS / I have a bad feeling it's not possible, but wanted to ask anyway. Thanks in advance. -R Seems like you should be able to get another certificate and have two Connector elements, each configured with a different ssl cert (diff. keystore?). Each will also have to have an address attribute to bind it to a specific IP. I've never actually ever messed with SSL on tomcat so you may want to look at the tomcat docs and howtos on the subject. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: can not start tomcat and the jre_home var error
On 3/4/2010 8:00 AM, maven apache wrote: Hi: I am using Ubuntu9.10. I have install jdk1.6 in /home/kk/ProgramFiles/jdk1.6 , also I have set up a permanent environment variable JAVA_HOME which link to the jdk directory. I just downloaded apache-tomcat-6.0.24.tar.gz and extact it to /home/kk/ProgramFiles/apache-tomcat-6.0.24, since the JAVA_HOME env var existed, so I run the startup.sh directly,however I can not enter the http://localhost:8080; and I got the following message: Using CATALINA_BASE: /home/kk/ProgramFiles/apache-tomcat-6.0.24 Using CATALINA_HOME: /home/kk/ProgramFiles/apache-tomcat-6.0.24 Using CATALINA_TMPDIR: /home/kk/ProgramFiles/apache-tomcat-6.0.24/temp Using JRE_HOME:/usr Using CLASSPATH: /home/kk/ProgramFiles/apache-tomcat-6.0.24/bin/bootstrap.jar It seems that tomcat did not identify the JAVA_HOME var, so how to do next in my case? How exactly are you starting tomcat? It's important to understand where tomcat is getting it's environment from. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: When I link to a *.do I get Page not found
On 2/27/2010 8:31 AM, Søren Blidorf wrote: I have made a struts application and it works just fine on my testserver. I have now uploaded it to my hosted webserver and struts does not work. When I link to a *.do I get “Page not found” Could it be a Tomcat config problem. Placing the jars and classes ect. Struts 1.2 // Tomcat 5.5 Soren You'll have to look at your logs. It could be a lot of things causing a 404 response including an error that prevents the servlet from being initialized. Are you sure your test environment matches the hosted server's version of tomcat and jvm? --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deploying
On 2/10/2010 11:47 AM, Telles Nobrega wrote: Im working with some webapp, and they were suppose to be running on tomcat, i got all together, put it all into the webapp folder, some worker, some didnt. can anyone explain the reason for that? Only the tomcat logs know ... you might want to consult them and post details if they don't provide the answer. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: can't call my servlet on Tomcat 6 (Error 404)
On 1/31/2010 5:36 PM, hbral wrote: Hi everyone. I have a serlvet that reads a file from disk and then starts streaming the file. i have mapped the servlet to url in the web.xml file. it works perfect on my local machine (i'm using gwt with eclipse which uses jetty i think) but when i deploy it on my tomcat server i can't call that url that is mapped to the servlet instead i get a page with the 404 error (the requested resource was not found). thank you Help us help you. We need to see the logs for the moment your webapp was deployed and the moment you requested the servlet. Also some details on your system -- os, jvm, tomcat version, etc., ... would help all the more. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Administration Tool
On 1/31/2010 5:46 PM, Charles Ohana wrote: Hello guys, I just installed tomcat 6 on my machine (yup it's my first time). I realized it does not come with the Administration Tool. I've been looking to download it but cannot find it anywhere. Can anyone points me to the right direction? Thank you There is no administration tool for tomcat 6. It was buggy even in the last release to include it and not maintained for some time. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: can't call my servlet on Tomcat 6 (Error 404)
On 1/31/2010 6:15 PM, hbral wrote: David Smith-2 wrote: On 1/31/2010 5:36 PM, hbral wrote: Hi everyone. I have a serlvet that reads a file from disk and then starts streaming the file. i have mapped the servlet to url in the web.xml file. it works perfect on my local machine (i'm using gwt with eclipse which uses jetty i think) but when i deploy it on my tomcat server i can't call that url that is mapped to the servlet instead i get a page with the 404 error (the requested resource was not found). thank you Help us help you. We need to see the logs for the moment your webapp was deployed and the moment you requested the servlet. Also some details on your system -- os, jvm, tomcat version, etc., ... would help all the more. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org sorry about that. tomcat: 6.0.24 os: debian linux 2.6.12.6-xenU jvm: 1.6.0_12-b04 log files contain nothing use full other than that i successfully deployed the war file regards Then I'm guessing your servlet isn't getting hit on the production environment. I would add some logging so even successful attempts show up in the log file and test w/ your server env. again. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: the context.xml is not preserved
On 1/28/10 9:46 AM, LI Daobing wrote: Hello, in http://tomcat.apache.org/tomcat-6.0-doc/config/context.html, there is a statement: Once this file exists, it will not be replaced if a new WAR with a newer /META-INF/context.xml is placed in the host's appBase. but, in my practice, this file is always be replaced, I need help on this point, thanks. my system: Ubuntu 9.04, x86_64, tomcat 6.0.18, thanks. -- Best Regards LI Daobing I think conf/Catalina/localhost/myAppName.xml wouldn't be replace. webapps/myAppName/META-INF/context.xml would be replaced. Which one are you referring to? --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem starting connection pooling
Mark Witczak wrote: I'm very new to Tomcat, connection pooling, JSP, etc. and I've been banging my head against a wall for two weeks trying to get a simple program to connect to a MySQL database. *Vital Stats:* Ubuntu 9.10, Java 1.6.0_0, Java Servelet 2.5, Java Server Pages 2.1, JSTL 1.2, Apache2, Tomcat 6.0.20, MySQL 5.1.41 5.0.67 MySQL Connector/J 5.1.11 (also 5.1.10) - in $CATALINA_HOME/lib dbcp 1.2.1 - in $CATALINA_HOME/lib (all standard Ubuntu issue) *testapp/WEB-INF/web.xml:* ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 description Servlet and JSP Examples. /description display-nameServlet and JSP Examples/display-name resource-ref descriptionDB Connection/description res-ref-namejdbc/mydatabase/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app *testapp/META-INF/context.xml:* ?xml version=1.0 encoding=UTF-8? Context path=/junk docBase=junk debug=5 reloadable=true crossContext=true Resource name=jdbc/mydatabase auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=foo password=bar driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://test.hostname.com:3306/database_test1/ /Context *testapp/testapp.jsp:* %@ page contentType=text/html % %-- These libraries are required for the c and sql tags --% %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % %@ taglib prefix=sql uri=http://java.sun.com/jsp/jstl/sql; % meta http-equiv=Content-Type content=text/html; charset=UTF-8 html head titleJNDI DBCP Test Page/title /head body h1JNDI DBCP Test Page/h1 br/Executing the query ... br/ %-- Note: Enter a query that is valid for your database here --% sql:query var=result dataSource=jdbc/mydatabase SELECT company FROM manuals /sql:query /body /html I create the WAR (jar cvf testapp.war *), undeploy the old version and redeploy the new one through Tomcat Web Application Manager. Then restart Tomcat (sudo /etc/init.d/tomcat restart). The result is: Jan 21, 2010 9:40:35 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Jan 21, 2010 9:40:35 PM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Jan 21, 2010 9:43:06 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.) at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unknown Source) at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknown Source) at org.apache.jsp.test_jsp._jspx_meth_sql_005fquery_005f0(test_jsp.java:188) at org.apache.jsp.test_jsp._jspService(test_jsp.java:138) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) Blah, Blah, Blah *More info: *The connection to MySQL tested successfully using the command line 'mysql'. There are no firewalls, that I can find, between the servers. What is going on here? What am I missing? What is going on here? How do I fix it? -Do I need to create a foo user in the tomcat-users.xml? -Do I have to mess with the policy files? or security? Thanks for your help. Mark What options did you use with the mysql command to test MySQL? Be careful as the command line will use unix sockets instead of tcp/ip by default. The JDBC driver won't be able to do that. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cyclos Webapp Trouble (404)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure To me this looks like it's outside of tomcat. Check that mysql is up, listening on tcp port 3306 (the standard mysql port) and there aren't any firewalls causing problems between tomcat and mysql. If you can on the Ubuntu box, su to the tomcat user acct and try connecting with mysql using the client program: mysql -P 3306 -h [mysql server hostname] -p -u [username for cyclos]. Replace the [...] in the command with real data and see what happens. --David Rick Bragg wrote: On Sun, 2010-01-17 at 21:55 -0600, Caldarale, Charles R wrote: From: Rick Bragg [mailto:li...@gmnet.net] Subject: Cyclos Webapp Trouble (404) After following these steps, and restarting tomcat6 I get a 404 error, Also, the database remains empty. As stated before, using a real Tomcat download from tomcat.apache.org, installing the most recent GA version of MySQL (5.1.42), and the current cyclos (3.5.5), it all works fine. The problem you are now having appears to be due to the use of a security manager; either turn that off, or update the appropriate properties file to include all the necessary entries to allow cyclos to work. I have no idea where Ubuntu places (or even names) the security properties file, and certainly no idea what needs to be added to make cyclos work with one. Again, I would strongly recommend that you uninstall the Ubuntu 3rd-party version, and put in a real Tomcat, so we can all be looking at a common setup. - 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. Hi, Thanks Chuck, One could argue to not use a package manager at all, however I would rather use the package manager for this to make things easier down the road. I did manage to get a bit further, and you are right about the security manager. I got rid of the errors in the previous post by setting privileges for the classes and libs (see below), but now I'm stuck on mysql Here is a brief snip from my error log Jan 18, 2010 2:05:07 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [nl/strohalm/cyclos/spring/persistence.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Error connecting to database at jdbc:mysql://localhost/cyclos3?useUnicode=truecharacterEncoding=utf8 Caused by: java.lang.RuntimeException: Error connecting to database at jdbc:mysql://localhost/cyclos3?useUnicode=truecharacterEncoding=utf8 at nl.strohalm.cyclos.setup.DataBaseConfiguration.validateConnection(DataBaseConfiguration.java:342) at nl.strohalm.cyclos.setup.DataBaseConfiguration.run(DataBaseConfiguration.java:107) ... Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure I have the following policies in: vi /etc/tomcat6/policy.d/50local.policy // The permissions granted to the context WEB-INF/classes and lib directories grant codeBase file:${catalina.base}/webapps/cyclos/WEB-INF/classes/- { permission java.security.AllPermission; }; grant codeBase file:${catalina.base}/webapps/cyclos/WEB-INF/lib/- { permission java.security.AllPermission; }; // The permission granted to your JDBC driver grant codeBase jar:file:${catalina.base}/webapps/cyclos/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar!/- { permission java.net.SocketPermission localhost:3306, connect; }; I think maybe my JDBC permissions are not quite right, or there is something with the driver, but I'm not sure... Anybody have any ideas? Thanks again! Rick - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cyclos Webapp Trouble (404)
Rick Bragg wrote: On Mon, 2010-01-18 at 07:39 -0500, David Smith wrote: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure To me this looks like it's outside of tomcat. Check that mysql is up, listening on tcp port 3306 (the standard mysql port) and there aren't any firewalls causing problems between tomcat and mysql. If you can on the Ubuntu box, su to the tomcat user acct and try connecting with mysql using the client program: mysql -P 3306 -h [mysql server hostname] -p -u [username for cyclos]. Replace the [...] in the command with real data and see what happens. --David OK, It is NOT security related. I set TOMCAT6_SECURITY=no in /etc/default/tomcat6. I noticed that the user tomcat6 has no shell in /etc/passwd tomcat6:x:119:126::/usr/share/tomcat6:/bin/false Should I give this user the ability to shell (/bin/bash)? Rick No... it doesn't need one. There are a number of user accounts in any linux system that do not have shells. They are just there for access control purposes limiting what different daemons and processes can do. Make sure tomcat can reach the mysql server and that should go a long ways towards fixing the issue. Also what Chuck said about the discrepancy in docs vs. config although I think that's a separate issue. Communications link failure is a network issue. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cyclos Webapp Trouble (404)
Rick Bragg wrote: On Mon, 2010-01-18 at 08:23 -0600, Caldarale, Charles R wrote: From: Rick Bragg [mailto:li...@gmnet.net] Subject: RE: Cyclos Webapp Trouble (404) Yes I notices that as well, I forgot to post my cyclos.properies Here is the mysql section... hibernate.connection.url = jdbc:mysql://127.0.0.1:3306/cyclos The above doesn't jibe with the error message displayed at runtime: jdbc:mysql://localhost/cyclos3?useUnicode=truecharacterEncoding=utf8 Note the use of localhost instead of 127.0.0.1, the lack of explicit port number, and the database name. What you posted is not what you're actually running with. - 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. Sorry, that must have been one of my variations... To be clear, here are the files as of now. cyclos.properties (MySQL section) ### MySQL hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect hibernate.connection.driver_class = com.mysql.jdbc.Driver hibernate.connection.url = jdbc:mysql://127.0.0.1:3306/cyclos hibernate.connection.username = cyclos hibernate.connection.password = ### Connection provider properties hibernate.connection.provider_class = org.hibernate.connection.C3P0ConnectionProvider hibernate.c3p0.minPoolSize = 1 hibernate.c3p0.maxPoolSize = 100 hibernate.c3p0.acquireIncrement = 1 hibernate.c3p0.maxIdleTime = 21600 hibernate.c3p0.testConnectionOnCheckout = true hibernate.c3p0.preferredTestQuery = select 1 hibernate.c3p0.acquireRetryAttempts = 5 hibernate.c3p0.numHelperThreads = 3 and error log: Jan 18, 2010 8:22:42 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextDestroyed() Jan 18, 2010 8:22:42 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextDestroyed() Jan 18, 2010 8:22:50 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Jan 18, 2010 8:22:50 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Jan 18, 2010 8:22:51 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Jan 18, 2010 8:22:56 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [nl/strohalm/cyclos/spring/persistence.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Error connecting to database at jdbc:mysql://127.0.0.1:3306/cyclos?useUnicode=truecharacterEncoding=utf8 Caused by: java.lang.RuntimeException: Error connecting to database at jdbc:mysql://127.0.0.1:3306/cyclos?useUnicode=truecharacterEncoding=utf8 at nl.strohalm.cyclos.setup.DataBaseConfiguration.validateConnection(DataBaseConfiguration.java:342) at nl.strohalm.cyclos.setup.DataBaseConfiguration.run(DataBaseConfiguration.java:107) at nl.strohalm.cyclos.spring.CustomSessionFactoryBean.newSessionFactory(CustomSessionFactoryBean.java:42) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745) ... Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure ... Last packet sent to the server was 0 ms ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:335) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2043) ... 56 more Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:525) at java.net.Socket.connect(Socket.java:475) at java.net.Socket.init(Socket.java:372) at java.net.Socket.init(Socket.java:215) at
Re: Servlets in web-inf/lib
1. It's WEB-INF, not web-inf. Case matters. 2. If the classes are in .jar files, yes. Otherwise they will have to be in WEB-INF/classes --David Clay McCoy wrote: I have some servlets that are in jars in web-inf/lib and Tomcat does not see them. I know that it is typical to have servlets in web-inf/classes, but it is an existing application. Is there a way to get Tomcat to use these Servlets without moving them to web-inf/classes? They are mapped in the web.xml, but I get 404s when I browse to them. Thanks - - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Config Question
I'm assuming your docBase for this app is not inside tomcat's webapps folder and in that case, you're right to wonder how tomcat finds the context.xml file. The Context ... .../Context element can also be in it's own file named after the path attribute - i.e. alti.xml in conf/Catalina/localhost. Replace 'Catalina' with your tomcat's Service name from server.xml and 'localhost' with your Host name, again from server.xml. Tomcat looks there as well for the webapp's Context .../Context element and you can remove the path attribute. --David steflik wrote: Chuck, I'm a little bit hesitant as a number of the students are still struggleing to get their JSP project done. Right now the server is running and the Context statements that define where the apps are are right at the end of server.xml. This is an example of a Context ststement as they are currently in server.xml: Context docBase=/home/alti/public_html/alti path=/alti debug=0 reloadable=true crossContext=true/Context If this is moved out of server.xml and into /home/alti/public_html/alti/META_INF/ how will Tomcat know where the alti app is; I always thought that Tomcat followed the paths it found in server.xml to figure out where all of the apps were.? If this is where it goes what name does the file get context.xml or alti.xml? Dick Steflik Binghamton University Pid Ster wrote: On 15/12/2009 04:17, steflik wrote: Chuck, OK, I've read the document several times and still can't figure out what it is you are trying to tell me. I'm not using WARs so /META-INF/? doesn't come into play. If theContext statements don't go in to server.xml where should I put them, context.xml doesn't seem to be the appropriate place? A web app in the form of a directory is just an exploded/uncompressed WAR. Putting a META-INF directory inside the app dir still applies. Try it and see. (The manager host-manager apps preinstalled in Tomcat also use a META-INF directory.) p Dick Steflik Binghamton University Caldarale, Charles R wrote: From: steflik [mailto:stef...@binghamton.edu] Subject: Re: Tomcat Config Question Do I just move thecontext statements out of server.xml and into context.xml? It'sContext notcontext - case matters. or is there something else I have to do. Reading the doc would be a good first step: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [Solved+Question]SessionListener not being invoked
Caldarale, Charles R wrote: From: Ken Bowen [mailto:kbo...@als.com] Subject: Re: [Solved+Question]SessionListener not being invoked This project has been sputtering along for a fair number of years, and my context.xml almost certainly began life inside conf/server.xml. Once upon a time, I believe Context elements had to be in server.xml, but that predates my Tomcat experience. - 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. Tomcat 3 did it that way. I think the idea of moving the context elements out to their own file started in tomcat 4 but that was a long time ago and my memory is a little fuzzy. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat does not respect the HTTP RFCs !
André Warnier wrote: Konstantin Kolinko wrote: 2009/11/29 Bill Barker billwbar...@verizon.net: André Warnier a...@ice-sa.com wrote in message news:4b119016.2020...@ice-sa.com... Pid wrote: On 28/11/2009 12:56, André Warnier wrote: ;-) I just wanted, once, to use a subject line with capitals and an exclamation mark. It seems however that in this particular case, neither Tomcat nor Apache httpd follow the rules, when they default to the .. default virtual host in the case where they cannot find a match between the Host: header and one of their defined virtual hosts. Doesn't the following say that they MUST return a 400 status ? http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.2 An origin server that does not allow resources to differ by the requested host MAY ignore the Host header field value when determining the resource identified by an HTTP/1.1 request ? You are quoting selectively. The same line continues with (But see section 19.6.1.1 for other requirements on Host support in HTTP/1.1.) which section 19.6.1.1 is quite stern about the fact that HTTP 1.1 servers MUST support the Host: header properly. So I persist. Well, for IP-based VHosts (common for httpd), Pid is correct since the server uses the IP address that recieved the request to determine where it goes. For name-based VHosts (the default for Tomcat), both Tomcat and httpd are still in the clear since every host is valid on the server (the ones not explicitly configured match the default host). spec-quote spec=rfc2616 section=5.2 3. If the host as determined by rule 1 or 2 is not a valid host on the server, the response MUST be a 400 (Bad Request) error message. /spec-quote You can always configure your default host to respond with response.sendError(400); for every request. Same answer as the one I posted on the Apache forum : My original post was more like a jest or a provocation, rather than a real question. But is is interesting to see how in the end, a document such as RFC2616 which is meant to specify a relatively strict set of rules, and of which I am sure the phrasing is examined carefully and repeatedly (it being after all a revision of an earlier document on the same topic), still leaves areas open to interpretation, or downright inconsistent. What is for example, in this case, a hostname which is /invalid/ on this host ? If the request reached this host, then it must be that for the DNS system, the hostname resolved to one of this physical host's IP addresses. In that sense, any HTTP request which reaches the host could be deemed to address a valid hostname. Yet the HTTP server listening on that host (and port), may be configured to accept requests for several specific hostnames, but not the one mentioned in the request. In that sense, Tomcat's defaulting to a default host whose name does not match the request hostname would be in contravention of the RFC. Yet by the same token, Tomcat's defaulting to the default host and accepting the request, would seem to make the request's hostname valid, since the request is accepted. So basically, the HTTP RFC obliges the server to send a 400 response for an invalid host, but what is an invalid host is decided by the server. Kind of circular as far as arguments go. By the way, Konstantin's response above matches the one given by the Apache httpd gurus : have the default host respond with 400. That would match the RFC. I'm not sure it's a gray area ... it's just up to the admins if their server will answer to anything or just specific hostnames. Most admins I know welcome the traffic no matter what name gets clients there. The RFC does describe what the proper response is if the server config deems the requested hostname as invalid. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Moving the webapps context root or adding a prefix
The super simple answer is deploy your 'ROOT' webapp as 'prefix' instead. --David Jason Pyeron wrote: We are installing TC behind a proxy. The proxy will map all requests of form http(s)://host/prefix/* to tomcat. Is there a config option to change the context root? i.e.: webapps/ROOT = http://localhost/prefix/ webapps/manager = http://localhost/prefix/manager/ webapps/examples = http://localhost/prefix/examples/ Sorry, my choice of keywords have not resulted any fruitful searches. -Jason Pyeron -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat server running but application not running Vista
Take a look at your log for relevant messages and be very detailed in describing what exactly is erroring. -- David On Nov 22, 2009, at 9:04 AM, SRamasamy su...@techie.com wrote: I have developed application with Windows XP it's looks good when try to run Vista and Windows 7 application not running but server running with error, I am using tomcat Binary distribution tomcat version 6. please let me know idea about this issues. -- View this message in context: http://old.nabble.com/Tomcat-server-running-but-application-not-running-Vista-tp26464175p26464175.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: https and port numbers
Your tomcat has to listen on 443 to remove the port number from the URL. This is not a tomcat issue, but rather the browser's expectation. -- David On Nov 17, 2009, at 4:40 AM, Robert Denison r...@blim.org wrote: Hi, I've set up my tomcat server to serve http requests on port 8080 and https on port 8443. My firewall forwards requests for 80 to 8080 and 8443 to 8443. It works fine but as it stands https requests have the form https://mydomain.com:8443 . I would like to set it up so like most secure internet sites there is no port number in the URL even when using https. Can anyone point me in the right direction or at some documentation that will help? Cheers for any help, R. - 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: https and port numbers
Christopher Schultz wrote: David, On 11/17/2009 7:39 AM, David Smith wrote: Your tomcat has to listen on 443 to remove the port number from the URL. This is not a tomcat issue, but rather the browser's expectation. That's not entirely true. If Robert configures his firewall to redirect port 443 - 8443 similar to how he does 80 - 8080, then he can remove the port number from the URL by changing the redirectPort attribute in his Connector to 443. -chris You're talking about proxying the connection with a reverse proxy. That works, but I believe the connector will have to have proxyPort set so generated URLs within the app don't include a port number. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error starting the web server
jdk is 1.3 Ouch! You really should consider an upgrade. What version of tomcat do you have ... it hasn't been recommended that anyone set classpath since tomcat 3 days. And then it was a nightmare trying to engineer classpaths so all the apps and tomcat were happy. More details would be great. --David John McCleskey wrote: I'm running the web server on an iSeries v5r4 and the jdk is 1.3. It appears that the jvm is throwing an exception: java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler java.lang.NoClassDefFoundError: org/apache/struts/legacy/GenericDataSource Guessing my classpath must be incorrect. On Mon, Nov 16, 2009 at 8:08 AM, Pid p...@pidster.com wrote: On 16/11/2009 14:00, John McCleskey wrote: I'm recieving the following errors when starting my Tomcat server. I'm attempting to deploy a web application using a .WAR file and have configured the server to run servlets. Any help would be greatly appreciated. *[jk_jni_worker.c (1028)]: Fail- could not initialize Tomcat * *[jk_worker.c (220)]: wc_create_worker init failed for inprocess * *[jk_worker.c (297)]: build_worker_map failed to create workerinprocess * Some clues as to the HTTPD, Tomcat, mod_jk(presumably?), JVM, OS type and versions would be useful. Your Tomcat server.xml, mod_jk.conf, workers.properties and other pertinent config files are also likely to be useful, as would any other log messages, e.g. catalina.out. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: What different between Apache and Apache Tomcat?
Not always. In the simplest of configurations, just serving out webapps, it's better to go with a standalone Apache Tomcat installation. Putting Httpd in front would just add latency to the request and make the environment more complicated. If you need other features best provided by Httpd, then by all means put it in front. --David Henry Loke wrote: So, it is better to install Apache httpd in front of Tomcat Thanks Guys... -fsloke Konstantin Kolinko wrote: 2009/11/14 Henry Loke fsl...@yahoo.com: I only install Apache Tomcat my Java webapp can work already. So far I know what Apache can do, Apache Tomcat also can do. The common different is Apache Tomcat is for Java program only Apache can support multiple language webapp eg. php, Java , etc etc I a bit confuse the existence of Apache? If my server only run java program, Can I install Apache Tomcat without Apache? http://wiki.apache.org/tomcat/FAQ/Connectors#Q3 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multi-level context starting at ROOT
I'm still wondering why you'd want to do ROOT#multilevelcontext.xml when it's functionally the same as multilevelcontext.xml. What use case do you have for such a thing? --David Maurice Yarrow wrote: Hello Tomcat Users Grp and in particular, Pid and Konstantin Kolinko: Thanks for your replies. However, I evidently did not clearly state the problem I am having: I can define the following context xml files in conf/Catalina/localhost: contextname.xml and contextname#multi-level-contextname.xml and these work as documented, i.e.: http://www.domain.com/contextname/servletname and http://www.domain.com/contextname/multi-level-contextname/servletname I can also create a context xml in conf/Catalina/localhost called ROOT.xml which defines the ROOT web app to be at www.domain.com. This works fine at http://www.domain.com/servletname for example. But when I define a multi-level-context under ROOT with ROOT#multi-level-context.xml a not-found is returned from http://www.domain.com/multi-level-contextname/servletname I believe this is actually one of the (apparently) unsolved threads in the Spring users group, and appears to an issue only with the advent of the # hash sign instead of the _ underscore sign formerly used in earlier Tomcats (I am using 6.0.18). Maurice Yarrow Pid wrote: On 04/11/2009 11:13, Maurice Yarrow wrote: Hello Tomcat Users Group I have no problem configuring a multi-level context originating at the context uri level, e.g.: http://www.domain.com/context/multi-level-sub-context/servletname and I have no problem creating a web-app context at the ROOT level, e.g.: http://www.domain.com/servletname These above have been configured of course using context xml files in conf/Catalina/localhost. Problem: Have not been able to find any correct context xml file configuration (or naming) that will give a multi-level sub context starting at the ROOT level, .e.g.: http://www.domain.com/multi-level-sub-context/servletname It's a separate context, just not a multi-level one. multi-level-sub-context.war p as well as the above http://www.domain.com/servletname So: question is: Can this be done ? How is it configured ? What are the respective context xml files named ? Thanks Maurice Yarrow - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multi-level context starting at ROOT
... but I am not acquainted with multilevelcontext.xml. I'm just using your description as written below w/o the hyphens. ROOT#multi-level-context.xml So what you really want is for your ROOT app and this other app to share the same session. H I so rarely do much of anything with sessions. Maybe someone here can address that question since it appears to be what you really want. --David Maurice Yarrow wrote: Hello Tomcat User Group and in particular, David Smith: My use-case is embedding meshcms inside my primary web app and in a way that they can both share the same session. David, I appear to correctly understand and use the contextname#multi-level-contextname.xml context file, but I am not acquainted with multilevelcontext.xml. How is this implemented (example?) and what is its relationship to a user-defined ROOT context ? Regards, Maurice David Smith wrote: I'm still wondering why you'd want to do ROOT#multilevelcontext.xml when it's functionally the same as multilevelcontext.xml. What use case do you have for such a thing? --David Maurice Yarrow wrote: Hello Tomcat Users Grp and in particular, Pid and Konstantin Kolinko: Thanks for your replies. However, I evidently did not clearly state the problem I am having: I can define the following context xml files in conf/Catalina/localhost: contextname.xml and contextname#multi-level-contextname.xml and these work as documented, i.e.: http://www.domain.com/contextname/servletname and http://www.domain.com/contextname/multi-level-contextname/servletname I can also create a context xml in conf/Catalina/localhost called ROOT.xml which defines the ROOT web app to be at www.domain.com. This works fine at http://www.domain.com/servletname for example. But when I define a multi-level-context under ROOT with ROOT#multi-level-context.xml a not-found is returned from http://www.domain.com/multi-level-contextname/servletname I believe this is actually one of the (apparently) unsolved threads in the Spring users group, and appears to an issue only with the advent of the # hash sign instead of the _ underscore sign formerly used in earlier Tomcats (I am using 6.0.18). Maurice Yarrow Pid wrote: On 04/11/2009 11:13, Maurice Yarrow wrote: Hello Tomcat Users Group I have no problem configuring a multi-level context originating at the context uri level, e.g.: http://www.domain.com/context/multi-level-sub-context/servletname and I have no problem creating a web-app context at the ROOT level, e.g.: http://www.domain.com/servletname These above have been configured of course using context xml files in conf/Catalina/localhost. Problem: Have not been able to find any correct context xml file configuration (or naming) that will give a multi-level sub context starting at the ROOT level, .e.g.: http://www.domain.com/multi-level-sub-context/servletname It's a separate context, just not a multi-level one. multi-level-sub-context.war p as well as the above http://www.domain.com/servletname So: question is: Can this be done ? How is it configured ? What are the respective context xml files named ? Thanks Maurice Yarrow - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Bad file descriptor serving static file
Have you run a filesystem checker on the disk lately? I would expect an error like that to come from the underlying OS. A cheap test would be to rename the file (struts_dojo.js.bad) and put a new one in with it's original name. --David Mitch Claborn wrote: tomcat 6.0.20 Java(TM) SE Runtime Environment (build 1.6.0_16-b01) linux Debian lenny Getting the error below when serving a static file. It is always the same file (/struts/dojo/struts_dojo.js). (Yes, I know that struts normally serves that, but I had to patch one of the struts files, so tomcat is serving it instead.) The file is quite large, around 540KB. Any thoughts or ideas? java.io.IOException: Bad file descriptor at java.io.FileInputStream.readBytes(Native Method) at java.io.FileInputStream.read(Unknown Source) at java.io.BufferedInputStream.read1(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at java.io.FilterInputStream.read(Unknown Source) at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:2009) at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1755) at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:844) at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:332) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:73) at com.mm.server.framework.struts.FilterWrapper.doFilter(FilterWrapper.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.mm.server.framework.lib.stats.StatsFilter.doFilterInternal(StatsFilter.java:72) at com.mm.server.framework.lib.stats.StatsFilter.doFilter(StatsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:361) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Starting web app with properties set
You could implement a ServletContextListener that reads the properties and makes them available however your app needs them. --David Ken T. wrote: I looked around online but couldn't find anything. Is there a way to start a web application under Tomcat with specific properties mappings. Say I wanted to start my app with the property setting: user.database=ProdDB How would I go about doing so? Thank you, - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SEVERE: Error registering Catalina:type=Valve,name=StandardContextValve,path=/test,host=localhost
(java.io.FilePermission /usr/lib/school/services/test/ When I input the url (http://localhost:8180/test/hello.jsp) get the msg as follows : HTTP Status 404 - type Status report message description The requested resource () is not available. Apache Tomcat/5.5 Do you have any experiences? Thanks in advance Andrew -- David Smith Programmer/Analyst College of Agriculture and Life Sciences Cornell University B32 Morrison Hall Ithaca, NY 14853 Phone: (607) 255-4334 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: debugging model classes tied to Tomcat datasources
Eric P wrote: Hi, (Tomcat newb alert) I've got a simple database servlet application that has a few model classes on the back end. I have the model classes pretty well genericized so that they could (almost) be utilized outside of Tomcat by another app, but they do utilize the Tomcat data sources I've set up (via an InitialContext data source lookup). So this makes it impossible (?) to execute the model classes outside of Tomcat. Does anyone have any suggestions about how they would approach this problem so that they could debug and/or utilize these model classes that rely on database access? Thanks for reading. I'm open to any/all ideas. Eric P. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org I'll bet the only thing your code does with a JNDI string is perform the lookup and get a Datasource. You could implement multiple constructors allowing your code to be initialized w/ a JNDI string, DataSource object, or url/username/password. The code utilizing the model classes would simply create them using which ever constructor it has data for. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot set remote address in valve (Tomcat 5.5)
Elli Albek wrote: Hi, We have Tomcat behind a load balancer. The servlet API and tomcat libraries see the load balancer IP as the client IP. I tried to write a simple valve which will extract the IP from HTTP header X-Forwarded-For and continue the valve chain using this IP as the client IP. This will be the first valve in the chain, so everything will work as normal afterwards including log files, IP filter valve, etc. The problem I am facing, is when I try to set the remote IP on the request from my valve, the code does nothing. This is the set method in the class org.apache.catalina.connector.Request: public void setRemoteAddr(String remoteAddr) { // Not used } The variable is protected so I cannot access it directly from my code. Is there any way to implement this Valve? Is there anything already shipped in tomcat to extract the client IP from the header? I DO NOT want to write a servlet filter for various reasons, so I hope there is a way to do it with a valve. Any help appreciated. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org What about just implementing this as a filter and then construct a request wrapper in the filter to read that header and override the getRemoteAddr() method. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5.5.28: Admin Tool login page problem?
Daniel B. Thurman wrote: On 09/23/2009 10:13 AM, Mark Thomas wrote: Daniel B. Thurman wrote: Just wondering if this problem has been reported: URL: http://localhost/admin 1) The Login.jpg image is not appearing, and the Login/Password inputboxes are a bit off center and to the right. 2) After logging in successfully, one is taken to: URL: http://localhost:8080/admin/images/LoginBackgroundTile.gif and a single square tile appears, top-left corner and nothing else appears. Expected to be redirected to admin tool page and that did not happen. 3) After step (2), manually tying in URL: http://localhost/admin routes to URL: http://localhost:8080/admin/frameset.jsp and all of the images are appearing correctly and the admin tool appears to function, but I have not tested the admin tools thoroughly. Seems that the admin login mechanism is somewhat broken? Nope. Looks like your reverse proxy config is broken. Mark Why do I need a reverse proxy? I am running Tomcat as a standalone local server and have no need to run Tomcat behind Apache or some other frontend webserver and I am using Netbeans for development/testing purposes. As far as I can tell, my JSP applications runs fine. It's just that out of curiosity that I looked into admin page and it seems a bit messed up, but once logged in although weirdly, just by reentering the admin at the URL line the second time seems to get correctly routed. Seems strange to me... Thanks, Dan Looking at the URLs ... it's easy to get the impression there is a reverse proxy at work. How did the :8080 creep in there if you are really running tomcat standalone on port 80? --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Why tomcat didn't compile my jsp's
Ok... but what actually ends up in your tomcat's webapps folder? If it's a compressed .war file, it should have been expanded either in the webapps folder or tomcat's work folder. What do you see in there? Essentially I'd like to know what tomcat is given to work with ... not what your source project layout is. --David Rafael Muneton wrote: Hello David. Thanks for your answer. Here are some details: My HelloRafael.war is formed according to this structure: -Dir HelloRafael , under it, (this is the top dir) -Dir docs , docs is empty. -Dir src, inside src i placed HelloRafael.jsp -Dir web, under web there are 2 subdirs, WEB-INF and images(empty). -The build.xml file. Within the WEB-INF dir there are two more subdirs: -Dir classes, for the compiled files. -Dir lib, for the jar files needed. -The web.xml file and again my HelloRafael.jsp(I placed it here and inside the src dir and no avail). Here is the build.xml file structure: === !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- General purpose build script for web applications and web services, including enhanced support for deploying directly to a Tomcat 5 based server. This build script assumes that the source code of your web application is organized into the following subdirectories underneath the source code directory from which you execute the build script: docs Static documentation files to be copied to the docs subdirectory of your distribution. src Java source code (and associated resource files) to be compiled to the WEB-INF/classes subdirectory of your web applicaiton. web Static HTML, JSP, and other content (such as image files), including the WEB-INF subdirectory and its configuration file contents. $Id: build.xml.txt 572161 2007-09-02 21:18:19Z markt $ -- !-- A project describes a set of targets that may be requested when Ant is executed. The default attribute defines the target which is executed if no specific target is requested, and the basedir attribute defines the current working directory from which Ant executes the requested task. This is normally set to the current working directory. -- project name=My Project01 default=compile basedir=. !-- = Property Definitions === -- !-- Each of the following properties are used in the build script. Values for these properties are set by the first place they are defined, from the following list: * Definitions on the ant command line (ant -Dfoo=bar compile). * Definitions from a build.properties file in the top level source directory of this application. * Definitions from a build.properties file in the developer's home directory. * Default definitions in this build.xml file. You will note below that property values can be composed based on the contents of previously defined properties. This is a powerful technique that helps you minimize the number of changes required when your development environment is modified. Note that property composition is allowed within build.properties files as well as in the build.xml script. -- property file=build.properties/ property file=${user.home}/build.properties/ !-- File and Directory Names -- !-- These properties generally define file and directory names (or paths) that affect where the build process stores its outputs. app.name Base name of this application, used to construct filenames and directories. Defaults to myapp. app.path Context path to which this application should be deployed (defaults to / plus the value of the app.name property).
Re: Does tomcat log closed connection
jithu mada wrote: Hi, I am using Tomcat 5.0.27 on AIX. Its abruptly closing a connection after processing a user request successfully. Wanted to know does it log anywhere why is it closing the connection or do we need to change any settings to make it log closed connections. Thanks Jithu We need details to be able to answer you. What do you have configured for your Connectors in server.xml. Please don't post the entire server.xml, comments and all -- just the active (uncommented) Connector ... / elements. Also tell us a little about your client and how you are detecting this connection close. Lastly, if you have Apache Httpd or some other proxy like service in between tomcat and your client, we will need to know that as well. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Does tomcat log closed connection
Ok ... 1. Tomcat version 5.0.x is no longer supported. You should at minimum move to the latest stable 5.5.x if at all possible. 2. According to http://tomcat.apache.org/tomcat-5.5-doc/config/http.html, Tomcat's HTTP connector uses 1.1 protocol by default, falling back to 1.0 if the client doesn't support it. Of course that tomcat 5.5's docs, so your mileage may very a little in 5.0 land. Does your .NET client app support HTTP 1.1 protocol or does it only offer 1.0? It's the only thing I can think of causing connections to drop at the end of a request. 3. You could test briefly w/o SSL and use wireshark to see on the wire what's negotiated between client and server to determine if protocol versions are causing trouble. --David jithu mada wrote: We have increased the debug value to 99. But didn't see any difference in the log files. I have looked at all the log files catalina.log ,catalina.out and localhost access log. Which log we should be looking after increase the debug to 99. we are using HTTP protocol 1.1 and the application is developed on Sun JDK ( did I answer your questions). thanks for your help. On Sat, Sep 19, 2009 at 9:13 PM, Martin Gainty mgai...@hotmail.com wrote: can you crank up the logging debug=99 and send us the log at the point of failure couple of things to check : which version HTTP protocol=1.1 ? are you using IBM JDK before implementing algorithm=IbmX509 http://people.apache.org/~fhanik/http.htmlhttp://people.apache.org/%7Efhanik/http.html 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: Sat, 19 Sep 2009 20:27:25 -0400 Subject: Re: Does tomcat log closed connection From: jithu.m...@gmail.com To: users@tomcat.apache.org And the communication is done on the SSL port 8443. On Sat, Sep 19, 2009 at 8:26 PM, jithu mada jithu.m...@gmail.com wrote: Hi David, these are the connector elements we have in our server.xml file !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector port=8080 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=6 disableUploadTimeout=true / !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -- Connector port=8443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=true disableUploadTimeout=true acceptCount=100 debug=99 scheme=https secure=true clientAuth=false sslProtocol=TLS keystoreFile=conf/keystore algorithm=IbmX509 / The client is a .NET client here is the sequence of communication before the connection is closed 1) The client sends a request to our application to create a session. 2) Tomcat sees the client is not logged in and sends a login.html to login in 3) Client sends a username and password. Client gets authenticated and is redirected to original request 4) Tomcat is receiving this request and our application creates a session for that user 5) After this client says the connection was closed unexpectedly. There are no proxys in between. I appreciate your help. thanks Jithu On Sat, Sep 19, 2009 at 7:38 PM, David Smith d...@cornell.edu wrote: jithu mada wrote: Hi, I am using Tomcat 5.0.27 on AIX. Its abruptly closing a connection after processing a user request successfully. Wanted to know does it log anywhere why is it closing the connection or do we need to change any settings to make it log closed connections. Thanks Jithu We need details to be able to answer you. What do you have configured for your Connectors in server.xml. Please don't post the entire
Re: Why tomcat didn't compile my jsp's
Rafael Muneton wrote: Hello everyone: I’m learning the Struts framework and in my first Web Application, that contains only a JSP with the classic Hello World! Message, I have some problems. I’m using Windows XP SP2 as the OS. Apache Tomcat 5.5 as the web server. Ant 1.7.1 and Java 1.6 SDK. In my first steps I deployed my Hello.jsp into Tomcat using the Tomcat Manager and it seemed OK but the Hello.jsp didn’t compile. So I googled my problem and someone told me that this job could be done by “ANT” not by “TOMCAT”. Therefore I downloaded and installed Ant 1.7.1 and after several attempts it worked! Using the command options “ant compile” or “ant all” created the hierarchy directories to be deployed into Tomcat, but again, my Hello.jsp didn’t compile. So one question is: Is this a job for ANT or for TOMCAT? Somewhere I read that a JSP passes by two steps in the process: The first one translates the Hello.jsp into a Hello.java andthe second one converts the Hello.java into a Hello.class. How can I achieve this using ANT or TOMCAT? Any ideas? Thanks. _ With Windows Live, you can organize, edit, and share your photos. http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx Could you provide some description of your webapp's structure, where this jsp was placed, any log messages, etc., ... Details would be wonderful. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Re : Connection Closed Issue
I am convinced somewhere in code, these connections are never returned to the pool (closed from the app's point of view) and that's why you have this problem . It's out of the pool's control what happens to the connection while it's out on loan. Unfortunately I've never had the chance to look into Hibernate or Spring, so it's hard to offer any help. --David Sharath Babu S S S wrote: Yes i have validation query specified. In developement we are having the same environment and settings there it is working fine without any issues. But in testing environment we are having this issue. Cannot figure it out why throught log files. One more exception we can find in log file is that CONNECTION NEVER CLOSED. With Regards Sharat Babu Shravanam From: Gaurav Lohiya [mailto:gloh...@gmail.com] Sent: Wed 9/16/2009 8:21 AM To: Tomcat Users List Subject: Re: Re : Connection Closed Issue Do you have the validation query specified. I believe putting in the validation query should solve the problem. On Wed, Sep 16, 2009 at 11:17 AM, Chetouani kchet...@yahoo.fr wrote: Hi, I had a similar problem. I was using tomcat and mysql and configured a connection pool using dbcp. The problem was that after some hours the application starts to throw an exception. The exception was : communication link failure The reason is that mysql is destroying the connectionz after some time (8 hours by default) and the connection pool is not aware of that I replaced dbcp by c3p0 and defined the maxConnectionAge to 3600s and the problem was solved --- En date de : Mer 16.9.09, Sharath Babu S S S sharath.b...@solix.com a écrit : De: Sharath Babu S S S sharath.b...@solix.com Objet: Connection Closed Issue À: users@tomcat.apache.org Date: Mercredi 16 Septembre 2009, 11h52 Hi all, we are using Tomcat server 5.5.20. Database is 9.0.28. After starting tomcat and using our application after sometime we are getting the following error: Can anyone suggest me, its really very urgent Thread 78: SQLException While Purging the Selected Data From Source Table java.sql.SQLException: Connection oracle.jdbc.driver.t4cconnect...@1c9e95a is closed. for CONFIG 100019 For RUN_ID 100063 Debug: AJArchiveLogDetails.java Exception Occured While Inserting Data to AJArchiveLogDetails java.sql.SQLException: Connection oracle.jdbc.dr iver.t4cconnect...@1c9e95a is closed. Debug: insertToAJArchiveLogDetails() java.sql.SQLException: Connection oracle.jdbc.driver.t4cconnect...@1c9e95ais closed. at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.checkOpen(DelegatingConnection.java:354) at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:246) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:302) at beans.AJArchiveLogDetails.insertToAJArchiveLogDetails(AJArchiveLogDetails.java:177) at beans.PurgeProcess_T.run(PurgeProcess_T.java:281) Debug: PurgeProcess_T.java: run() Thread 78: Exception While Updating the AJ_JOBS Table java.lang.Exception: java.sql.SQLException: Connection oracle.jdbc.driver.t4cconnect...@1c9e95a is closed. for CONFIG 100019 For RUN_ID 100063 Debug: PurgeProcess_T.java: run() Thread 78: Exception Releasing Resources java.sql.SQLException: Connection oracle.jdbc.driver.T4CConnection@ 1c9e95a is closed. for CONFIG 100019 For RUN_ID 100063 With Regards Sharat Babu Shravanam -- Regards Lohiya Gaurav - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Loss of body POST request...
Servlets handle uri encoded POSTs just fine. It's when the POST body is encoded differently like with mulipart -- that's where tools like fileupload come into the picture. Either way, the POST body should be completely available to the servlet, even if it's just as an input stream. Were there any exceptions in the logs for broken pipes or similar stuff that might shed some light on the issue? --David Tommy Pham wrote: - Original Message From: Eugene johnba...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, September 15, 2009 4:16:43 AM Subject: Re: Loss of body POST request... What has FileUpload, if the request body is lost! I want to know why, in principle it may be lost? -- Best Regards, Eugene Batogov ___ From my readings, I remember that the servlet doesn't handle POST by default. So you have to implement your own. I've looked into options available and the best I could find, IMHO, and others have suggested is Commons FileUpload. It will handle all POST multipart, including the file upload. Look into the Streams API. Regards, Tommy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat mysql dbcp Communications link failure
Could you provide the full stack trace? And if possible, can you describe time it takes as it relates to the timeout of your MySQL server? The default timeout in MySQL is 8 hours, but is configurable. Also I'm assuming all the ${...} stuff is just you sanitizing the Resource ... / block. One last question ... is there any chance your code is holding on to connections as opposed to closing them when done? Closing from the app's point of view is just returning the connection to the pool for another request later. --David Chetouani wrote: Hello guys, If you can help with this problem. I have an application deployed on tomcat V6.18. It uses a mysql database. The problem is that after some hours the applicatiion throws an exception when trying to connect to the data base. com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception I cofigured a data source using dbcp : Resource name=jdbc/${database.datasource} auth=Container type=javax.sql.DataSource factory=org.apache.commons.dbcp.BasicDataSourceFactory driverClassName=${database.driver} url=${database.url} username=${database.user} password=${database.password} removeAbandoned=true removeAbandonedTimeout=300 logAbandoned=true maxActive=20 maxIdle=20 maxWait=1 validationQuery=SELECT 1 testOnBorrow=true testOnReturn=true testWhileIdle=true/ I did some searches and it seems that the problem is that the connection pool keeps the connections for a long time even if they are considered dead by mysql So if you can help Thanks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: problem displaying .swf file in generated html from jsp file
Have you used a plugin like Firebug for Firefox to verify the url of the .swf file as requested by the browser? What url does the browser try to use to get the .swf file and what is the status code on the response (200, 404, 500, etc., )? --David Adrian Matei wrote: Hi everyone, I've been having a frustrating problem for almost a week now and I couldn't find an answer so far, just open questions on most of the forums - and i've searched a lot. I am trying to embed a simple flash file .swf within a .jsp but when running it on the server (tomcat 6.0.20 tried also 5.0.22 and 6.0.16) it won't display the .swf. But if I take the html source and put it another file and run it directly in the browser it will run. Do you have any ideea what the proble might be? Should I place something in the configuration files? (the .swf and the .jsp are in the same directory) Here is the code for my page: div id=containerThis text will be replaced/div script type=text/javascript var so = new SWFObject('mediaplayer.swf','jstest','400','220','8'); so.addParam('allowscriptaccess','always'); so.addParam('allowfullscreen','true'); so.addVariable('width','400'); so.addVariable('height','220'); so.addVariable('file','http://content.longtailvideo.com/videos/flvplayer.flv'); so.addVariable('javascriptid','jstest'); so.addVariable('enablejs','true'); so.write('container'); /script I tried without the SWFObject the same result. Thank you for your consideration. Best regards, Adrian - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: catalina error file
André Warnier wrote: mateo-jl wrote: Hello, i would like to have a circular catalina error file is it possible ? Mmmm. The concept of a circular file sounds interesting. Maybe you want to explain a bit what you mean ? there may be a great technical breakthrough lurking there. I don't know ... if it's anything like a circular reference, it sounds like pure trouble to me. :-) Pure speculation on my part, but maybe the OP is looking for log rotation. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: problem displaying .swf file in generated html from jsp file
Good to hear. One of the more common/recommended things to do in webapps is to generate server relative paths to resources so context and server names can change dynamically. One way to do this with EL expressions in jsps is: script type=text/javascript src=${pageContext.request.contextPath}/webapp/relpath_to/resources.js /script or in your case: script type=text/javascript var so = new SWFObject('${pageContext.request.contextPath}/swf_resource_path/mediaplayer.swf','jstest','400','220','8'); so.addParam('allowscriptaccess','always'); so.addParam('allowfullscreen','true'); so.addVariable('width','400'); so.addVariable('height','220'); so.addVariable('file','http://content.longtailvideo.com/videos/flvplayer.flv'); so.addVariable('javascriptid','jstest'); so.addVariable('enablejs','true'); so.write('container'); /script It's rock solid stable even through forwarding. --David Adrian Matei wrote: Hi David, Thank you very much for your useful advice. Indeed with Firebug I've realized that the files .swf and .js were were being searched in the root of the application and not where I hold my jsp. Now they are loaded. Thanks again, Adrian From: David Smith d...@cornell.edu To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, September 8, 2009 9:06:06 PM Subject: Re: problem displaying .swf file in generated html from jsp file Have you used a plugin like Firebug for Firefox to verify the url of the .swf file as requested by the browser? What url does the browser try to use to get the .swf file and what is the status code on the response (200, 404, 500, etc., )? --David Adrian Matei wrote: Hi everyone, I've been having a frustrating problem for almost a week now and I couldn't find an answer so far, just open questions on most of the forums - and i've searched a lot. I am trying to embed a simple flash file .swf within a .jsp but when running it on the server (tomcat 6.0.20 tried also 5.0.22 and 6.0.16) it won't display the .swf. But if I take the html source and put it another file and run it directly in the browser it will run. Do you have any ideea what the proble might be? Should I place something in the configuration files? (the .swf and the .jsp are in the same directory) Here is the code for my page: div id=containerThis text will be replaced/div script type=text/javascript var so = new SWFObject('mediaplayer.swf','jstest','400','220','8'); so.addParam('allowscriptaccess','always'); so.addParam('allowfullscreen','true'); so.addVariable('width','400'); so.addVariable('height','220'); so.addVariable('file','http://content.longtailvideo.com/videos/flvplayer.flv'); so.addVariable('javascriptid','jstest'); so.addVariable('enablejs','true'); so.write('container'); /script I tried without the SWFObject the same result. Thank you for your consideration. Best regards, Adrian - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: catalina error file
Hassan Schroeder wrote: On Tue, Sep 8, 2009 at 12:07 PM, André Warniera...@ice-sa.com wrote: Mmmm. The concept of a circular file sounds interesting. In classic American office parlance (yeah, showing my age here), the circular file (or round file) was a euphemism for trash can :-) :-D The circular file still is the trash can. In that case, /dev/null should work. :-) --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat App Configuration
Just delete the original ROOT webapp and rename your webapp ROOT. -- David On Sep 7, 2009, at 5:54 AM, skarahan samilkara...@gmail.com wrote: Hi, I use tomcat5.5 on ubuntu and have java web application.When I run it, its address looks like http://servername:8180/myapp; on browser address line.But I don't like this.when I write http://servername:8180/; address on web browser address line,I want to open my application. I hope that I can explain my question.. Thanks for your help. -- View this message in context: http://www.nabble.com/Tomcat-App-Configuration-tp25327877p25327877.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: detecting oracle connection failures
I think you've misunderstood what maxWait does. It tells the pool how long to have your webapp code wait for a connection when all the connections in the pool are busy servicing other requests (the pool is exhausted). Sounds to me like you've successfully received a connection, are attempting a transaction and the transaction is hung up somehow with a potential network issue. I've not done any work with the Oracle drivers so maybe someone else on the list has an idea? --David Roberto Benedetti wrote: hi everyone, I'm having problems trying to combine Oracle and Tomcat: if I define a DB connection to a MySQL or Postgres resource, everything works fine and DB failures are properly detected. conversely, if I define an Oracle DataSource, apparently RDBMS or network problems are not detected and my application keeps waiting ad libitum, ignoring the maxWait parameter. my conf: Context Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@host:port:sid username=username password= maxActive=2 maxIdle=2 maxWait=2000/ !-- WatchedResourceWEB-INF/web.xml/WatchedResource -- /Context my environment: - apache-tomcat-6.0.20 - jdk-1.6.0_14 - ojdbc6.jar (2111220 bytes) is it a driver-specific issue? I couldn't find out any useful (i.e. pastable) hint. is tomcat+oracle such a rare combination? thanks in advance, roberto - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- David Smith Programmer/Analyst College of Agriculture and Life Sciences Cornell University B32 Morrison Hall Ithaca, NY 14853 Phone: (607) 255-4334 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18
As configured below, try http://d1uap:4901/UMI/UMI/servlet/HUControlServlet The servlet mapping in WEB-INF/web.xml should not include the context path of the webapp. --David Lataxes, Karl wrote: I am attempting to migrate a servlet from Tomcat 5.0.25 to 6.0.18, but my efforts to access it while running under 6.0.18 have been unsuccessful. The servlet is accessed on the server via HTTP, but has web interfaces for simple testing and to check servlet loading and client-server message traffic. The context.xml and web.xml files as described are similar to what we have running under Tomcat 5.0.25. Aside from the connector and shutdown ports, the server.xml file is the same one that was bundled with 6.0.18. We can access the servlet while running under 5.0.25, but not 6.0.18. It is probably a simple configuration file or security setting that I have not been able to locate. The servlet is initialized by a context file placed in {$CATALINA_HOME}/conf/Catalina/localhost. Tailing the catalina.out file, I have confirmed that the servlet context is being loadet at Tomcat startup. The context path is set to my home area for testing, but is similar to what we use for production deployment, i.e., it is not deployed from {$CATALINA_HOME}/webapps. Here are the contents of my context file: Context path=/UMI docBase=/amd/homes/lataxeks/umi/ap/DataColl reloadable=true Resources className=org.apache.naming.resources.FileDirContext allowLinking=true / Logger className=org.apache.catalina.logger.FileLogger prefix=UMIAPDC_log. suffix=.txt directory=/amd/homes/lataxeks/umi/logs timestamp=true/ Realm className=org.apache.catalina.realm.MemoryRealm / /Context The following are the contents of the web.xml file: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- HUControlServlet configuration defs -- servlet servlet-name HUControlServlet /servlet-name servlet-class com.nielsenmedia.umi.ap.datacollection.servlet.HUControlServlet /servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameHUControlServlet/servlet-name url-pattern/UMI/servlet/HUControlServlet/url-pattern /servlet-mapping security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/jsp/security/protected/*/url-pattern !-- If you list http methods, only those methods are protected -- http-methodDELETE/http-method http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nametomcat/role-name role-namerole1/role-name /auth-constraint /security-constraint /web-app Here is the stack trace I received when running my server based application to access the servlet: java.io.FileNotFoundException: http://d1uap:4901/UMI/servlet/HUControlServlet/ at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA ccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons tructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java :1240) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLC onnection.java:1234) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec tion.java:921) at com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.messages.H UStatus.sendStatus(HUStatus.java:104) at com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.messages.H UInitConn.sendStatus(HUInitConn.java:95) at com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.drivers.HU Session.Process(HUSession.java:431) at com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.drivers.HU Sim.main(HUSim.java:311) Caused by: java.io.FileNotFoundException: http://d1uap:4901/UMI/servlet/HUControlServlet/ at
Re: How do I uninstall Tomcat 6.0 so that I can down level it to 5.5 ?
Strickland, Lawrence P wrote: How do I uninstall Tomcat 6.0 so that I can down level it to 5.5? This is on a UNIX operating system. Larry Strickland Lead Systems Administrator lawrence-strickl...@uiowa.edu University of Iowa Hospitals and Clinics That depends on how you installed tomcat 6 in the first place. If you installed via apt-get, rpm or any of the other package methods, then use the normal uninstall method for those third party package versions. On the other hand, if your tomcat came from tomcat.apache.org, simply backup any webapps you have in the webapps folder and delete the tomcat directory. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: EL expressions not evaluation in tag library
So, you are saying the EL expressions are evaluated, but the standard taglibs aren't? Can you post a minimum jsp with the problem? Also get rid of javaee.jar. I believe it duplicates servlet-api classes. -- David On Sep 2, 2009, at 5:03 AM, veerabahu moonpearl_vegtime_2...@yahoo.com wrote: Hi All, We are using EL expression in one of our tag libraries (.tag files), like { input type=text id=${id} } 1. Made sure that servlets 2.4 is enabled in webapp web.xml like { ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; version=2.4 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; … … /web-app } 2. Following jars are available in WEB-INF/lib (in addition to other standard jars) 1. javaee.jar 2. standard.jar 3. jstl.jar 4. struts-el-1.2.4.jar Now, when we use EL in my JSP it is getting evaluated and able to see proper result. But the EL in tag libraries (as shown above) are not getting executed. We are using Tomcat 5.5 with Java1.5. There is more than one webapp running under same tomcat. All other webapps runs with servlets specification 2.3 ( I mean different DOCTYPE in web.xml) Can you help in identifying the reason for EL not getting executed ONLY in tag libraries? Thanks, Veerabahu -- View this message in context: http://www.nabble.com/EL-expressions-not-evaluation-in-tag-library-tp25254057p25254057.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: (newbie question) missing classs file?
I believe once a servlet is initialized in memory, it stays in and is re-used over and over. After removing the class, you'd have to reload the webapp to make the change show. --David Daniele Development-ML wrote: Consider also that once the application is loaded is memory, even if you cancel the classes, the application still works. I doubt that the JVM maintains in memory all the classes, all the times, but if your current usage of the heap is not ridiculous big, probably your class remains loaded. Dan On Tue, Aug 18, 2009 at 8:00 PM, Tena Sakai tsa...@gallo.ucsf.edu wrote: Hi Dan, Are you reloading the pages from the server with the shift key? The pages might be locally cached from your browser. Shift or no shift, it makes no difference. I told my browser to dump the cache then hit pages again. No difference. I doubt this is a cache issue. If that's the case, why does it reflect my hack (double Hello!) and no class file? I am confused. Tena -Original Message- From: Daniele Development-ML [mailto:daniele@googlemail.com] Sent: Tue 8/18/2009 11:51 AM To: Tomcat Users List Subject: Re: (newbie question) missing classs file? Are you reloading the pages from the server with the shift key? The pages might be locally cached from your browser. Dan On Tue, Aug 18, 2009 at 7:48 PM, Tena Sakai tsa...@gallo.ucsf.edu wrote: Hi, I am new to tomcat and jsp. I appologize in advance my lack of knowledge, but I would appreciate some poninters. I am running tomcat 6.0.14 on redhat linux. After reading a few pages of documentation, I tried: http://localhost:8080/sample It rendered what's in $CATALINA_HOME/webapps/sample/index.html, which included 2 hyperlinks: JSP page and servlet. Both links worked fine. Then I found a file $CATALINA_HOME/webapps/sample/WEB-INF/classes/mypackage/Hello.class. I removed this class file and hit the same url as before ( http://localhost:8080/sample), and each of the JSP page and servlet, expecting the error from tomcat. To my amazement, they both worked. Question number 1: Where is the executable class file? Then I went on to modify hello.jsp in $CATALINA_HOME/webapps/sample directory. I added extra string Hello! to what used to be: %= new String(Hello!) % Tomcat gave me what I expected: double Hello's. I thought it might have generated a class file. But there is no class file anywhere under $CATALINA_HOME/webapps/sample directory? Question number 2: Why does this work? Thank you in advance. Regards, Tena Sakai tsa...@gallo.ucsf.edu - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multi-Level Context Paths
Drop the path attribute from your Context ... .../Context 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, Context path=/test debug=99 reloadable=true antiJARLocking=true antiResourceLocking=false !--Resource name=jdbc/moneysend auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 driverClassName=oracle.jdbc.driver.OracleDriver username=MS3_STL password=password url=jdbc:oracle:thin:@192.168.0.37:1521:MS3 defaultAutoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true/-- /Context 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 Context path=/test debug=99 reloadable=true 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
Re: apache2.2 tomcat5.5.27 Windows 2008 virtual hosts
Hmmm ... maybe retour.mycompany.com isn't resolving to the IP you think it is. Is there anything in your tomcat logs that might imply the request is actually getting there? To me this smells a lot like a network issue (DNS not resolving, firewall rules, etc., ...). Can you verify tomcat works on the machine itself via a localhost request? I'd also like to see what the server.xml file looks like. I don't think its the issue, but it'd be nice to elliminate it entirely. --David java piet wrote: Sorry David, The addresses and names are fakes for reasons of confidentiality. The addresses and names in my code have worked before though. Kind regards, Piet On Mon, Aug 17, 2009 at 2:42 PM, David Smith d...@cornell.edu wrote: Are you replacing DNS names and IPs with fakes for the purposes of email or are these real values? 192.168.x.x is unroutable and suggests the time out is because your firewall or cable router aren't passing through the requests from clients. --David java piet wrote: Thank you for the feedback. Sorry for the incomplete information. The Apache http server is functioning as a reverse proxy. Multiple applications have to be accessed through the internet. Now, I have Tomcat listening on 8081. Going to retour.mycompany.com:8080 or retour.mycompany.com:8081 gives a network timeout. (The server at retour.mycompany.com is taking too long to respond.) On the other hand, when I use the ip address like http://192.168.210.143:8080/ I get the resource (/) not found error while http://192.168.210.143:8081/ gives a network timeout. Tomcat without the Apache http server service gives the same network timeout when accessed through 8081. Hope this gives a clearer picture. Kind regards. Piet On Sun, Aug 16, 2009 at 9:02 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: java piet [mailto:javap...@gmail.com] Subject: Re: apache2.2 tomcat5.5.27 Windows 2008 virtual hosts The reason for the Apache http server is because I thought I need it to handle the virtual hosting. No, Tomcat can handle that quite well: http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html As for the port 80, something else is already using it on the server. You may be able to use a different IP address and have Tomcat use port 80 with that. First I will try to have Tomcat listen on 8081 and see where that gets me. Your first step should really be to eliminate httpd; it will make things much simpler. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How do I set an option for a specific servlet if Tomcat is running as a service?
Aaron Aberg wrote: Hi, I'm using Linux CentOS with Plesk 9.2.1, Tomcat 5.5 and Solr 1.3.0. I installed the solr war file through the plesk control panel but it doesnt start up. The logs reveal that solr/home property needs to be set before it can be started up. After some googling, I found out that I could set the property in web.xml in the war file. This didn't seem to work for me. When I was first playing with solr, it was on a Windows machine and its very simple to set this property. You can do it through the tomcat service system tray application. However, I am using Linux now and I believe that I need to set this option in JAVA_OPTS. I have seen a bunch of examples where someone will export the variable etc and then run the catalina.sh command. I can't do that. I need to start and stop the service via plesk. This is what I'm thinking. I see in /etc/passwd that the tomcat user has a default path of /usr/share/tomcat5. I'm wondering if I could put a .bashrc file in that directory and set the option there. Would that work? Does anyone have an idea as to how I can solve this problem? By the way the option should be something like: JAVA_OPTS=-Dsolr.solr.home='/usr/share/tomcat5/solr' Thanks in advance, Aaron - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org So ... what I'm reading is you are starting tomcat as a service. In that case, there should be a script in /etc/init.d for starting/stopping tomcat. Take a look at that. If the settings aren't in there, the script may have comments pointing you in the right direction. I don't think the .bashrc will work because the tomcat account is probably disabled. That's the way all accounts used by linux/unix services are for security reasons. There is no interactive login to run a .bashrc file from when tomcat starts or stops. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat subdirectories BASIC authentication
Mark Thomas wrote: Gabriele Fatigati wrote: I kow what is url-pattern tag , but simply i don't understand how i have to write security coinstraints. But you clearly don't know what a context path is. Read the servlet spec. It explains this. You told me: you don't need to include the context path in the url-pattern elements And i renew my question :), What i have to write in url-pattern in this specific case? The servlet spec also explains how to write security constraints. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org May I add the servlet spec is a _very_ readable document -- nothing like the many RFCs that govern stuff like URLs and HTTP protocol. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Connection Pool Exhausted
I know I'm coming late to the party and starting with the original post to boot. I see a third party app (not developed by Kristen) that ran perfectly before a restart caused some problems. Given this, I'm of the feeling there's a config problem OR some other app on the same tomcat instance is leaking the connections. Below, I see two Resource ... / elements in your Context ... ... /Context. Is that really in the config or am I seeing a cut/paste problem? Are there anything other webapps running on this tomcat that might access that db pool? Given this started with a reboot, could you think of anything that might have changed between that reboot and the last time tomcat started before that? --David kwal...@sbceo.org wrote: Apologies for hijacking a previous thread - hopefully this post will start a new thread. Hi everyone, I run uPortal 2.53 on Ubuntu with java-1.5.0-sun-1.5.0.18, tomcat5.5.25, Apache2, mod_jk. I have run uPortal for over two years using the Ubuntu install of Tomcat 5.0. A few weeks ago I restarted Tomcat 5.0 and got a rendering error from uPortal. Since this is our live site, I panicked and installed Tomcat 5.5.25 manually. The site seemed happy enough and I went home thinking the problem was solved. Unfortunately, uPortal came down during the night and was showing a uPortal error on the main page. When I checked the logs I saw errors over and over and over again indicating that the connection pool was exhausted and a connection to the database could not be made. Here is what the error in the log looks like: Caused by: org.springframework.dao.DataAccessResourceFailureException: RDBMServices sql error trying to get connection to uportal; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted I have been troubleshooting this for weeks now. I have updated the mysql connector driver from mysql-connector-java-3.1.12-bin.jar to mysql-connector-java-5.1.8-bin.jar. We were running on a Feisty Fawn box - I reinstalled the whole site on Jaunty Jacolope and still see the same problem. I have tried messing around with ROOT.XML. Here is what is there now: Context path= docBase=ROOT crossContext=true Resource name=jdbc/PortalDb auth=Container type=javax.sql.DataSource username=MYUSERNAME password=MYPASSWORD driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/uportal_revert maxActive=100 maxIdle=30 maxWait=1 removeAbandoned=true removeAbandonedTimeout=30 logAbandoned=true/ Resource name=jdbc/PersonDb auth=Container type=javax.sql.DataSource username= MYUSERNAME password= MYPASSWORD driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/uportal_revert maxActive=100 maxIdle=30 maxWait=1 removeAbandoned=true removeAbandonedTimeout=30 logAbandoned=true/ !-- Disables restart persistence of sessions -- Manager pathname=/ /Context The site does not go down unless there is some load on it. I can make the problem happen by simulating load with JMeter. Also, I installed Lambda Probe to see if I can see anything there, but I am not really sure what to look for. I am leaning towards believing that there is something misconfigured in Tomcat given that the mysql/java/apache/mod_jk configuration is the same that we have had for the last two years and the site ran fine. Tomcat is the only thing I have really changed. It might be a leak, but I have not added any code to the code we have used for the past two years, and I am unsure of how to detect if it is a leak. Does anyone have any troubleshooting tips or advice? Right now I have a cronjob restarting Tomcat every hour to keep the site hobbling along, but this is really terrible to do on a live site. Thanks in advance! Kristen -- David Smith Programmer/Analyst College of Agriculture and Life Sciences Cornell University B32 Morrison Hall Ithaca, NY 14853 Phone: (607) 255-4334 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat subdirectories BASIC authentication
Try installing Firebug on an install of Firefox and watch Firebug's Net tab. You'll see all the requests, response codes and more as the page loads. Should be able to figure out what's happening in short order. --David Gabriele Fatigati wrote: And very very strage, with user_1 pages has correct layout, with user 2 no! 2009/8/15 Gabriele Fatigati g.fatig...@cineca.it: Mm, there are css link in the source of the page. But i've checked and i think are correct. How can avoid this behaviour? 2009/8/15 Gabriele Fatigati g.fatig...@cineca.it: Bad reference to the css maybe? Yes, to the css. 2009/8/15 Mark Thomas ma...@apache.org: Gabriele Fatigati wrote: Well, now i can authenticate subdirectories. But for some strange reason, web pages, after BASIC authentication has very bad layout! I attached an example. Attachments are blocked on this list so no-one can see your example. Why? Bad reference to the css maybe? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JSESSIONID cookie permanent?
Your best bet is to assign your own cookie. Then on new session creation, look for the cookie and repopulate the new session with shopping cart data. --David Mitch Claborn wrote: My usage is: I store the key to the user's shopping cart in the session. I'd like the user to be able to come back a few days from now and still find the items they have placed in their shopping cart. (This is mostly for anonymous users who don't sign in until checkout.) Mitch Martin Gainty wrote: anyone know if there is a use-case for sessionId surviving end-of-session? 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: Wed, 12 Aug 2009 12:43:11 -0500 From: mi...@claborn.net To: users@tomcat.apache.org Subject: JSESSIONID cookie permanent? Is there a way to make the JSESSIONID cookie issued by Tomcat permanent, or at least significantly longer life than end of session ? Mitch - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Get back to school stuff for them and cashback for you. http://www.bing.com/cashback?form=MSHYCBpubl=WLHMTAGcrea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1 - 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: Beginner
Mohamed Shah wrote: Hi, I am new to apache tomcat. May I know which is the root directory for source files like html,jsp. I guess it is webapps. How to call the files using browser. http://localhost:8080/mywork/name.jsp Is this right way to use? Then How to check if the service runs? I don't have admin rights but I called in startup.bat using command prompt and set the catalina_home variable to apache directory. Kindly Guide me. The root directory would be webapps/ROOT. Other webapps are located in the webapps directory with ROOT, each running independently(ish -- same JVM). ROOT accepts the URLs that don't match any other webapp. As far as checking to see if it works, just hit a URL known to work -- maybe the default success page distributed w/ tomcat if you still have that in there. (http://localhost:8080/) --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: avoiding ssl vulnerabilities in tomcat
Just to clarify, authentication to my mind means providing username/password credentials. There's nothing in the connector aside from maybe the clientAuth=false attribute that controls this. Setting that true would mean the client browser is required to send an authentication certificate during the initial handshake. Do you mean accessing without encryption or server certificate? If so, are there any other connectors configured? Can you offer any more specific information regarding what the support team found? --David sunil chandran wrote: Hello sir, I am sorry. I am using tomcat 4 !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8443 minProcessors=5 maxProcessors=150 enableLookups=true acceptCount=100 debug=0 scheme=https secure=true useURIValidationHack=false disableUploadTimeout=true Factory className=org.apache.coyote.tomcat4.CoyoteServerSocketFactory keystoreFile=.keystore keystorePass=mypass clientAuth=false protocol=TLS / /Connector this is the portion of server.xml. I have anabled ssl. still there is some vulnerabilities as informed by supprot team. They say that tomcat is configured to access without authentication. 1. is it true? 2. How can we confirm if the tomcat SSL is configure using any algorithm to authenticate or “none”. please help me. regards Sunil C --- On Tue, 4/8/09, Mark Thomas ma...@apache.org wrote: From: Mark Thomas ma...@apache.org Subject: Re: avoiding ssl vulnerabilities in tomcat To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, 4 August, 2009, 2:42 PM sunil chandran wrote: there are some vulnerability existing on my server: SSL Server Allows Cleartext Communication Vulnerability snip/ Can someone help me identify the place in server.xml file to avoid these vulnerabilties. You didn't say which Tomcat version so I am going to assume 6.0.20. Neither did you say which connector you are using. I am going to assume the default Java blocking IO connector. The info you require is in the docs. Take a look at the SSL section of this page: http://tomcat.apache.org/tomcat-6.0-doc/config/http.html Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Yahoo! recommends that you upgrade to the new and safer Internet Explorer 8. http://downloads.yahoo.com/in/internetexplorer/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Newbie: CSS not taking effect
Roman Sokolyuk wrote: Additionally, does it follow that img elements have to refer to images located outside the WEB-INF directory (Since no content from WEB-INF can be served directly to the browser request)? Simple answer: Yes. More complicated: There are ways around this limitation using a servlet to handle those requests and serve up the content. The URL for the resources would have to be something other than WEB-INF/resource. Download the tomcat source and take a look at the DefaultServlet class as a beginning. Is there a way to use CSS and images from within WEB-INf so that a client wouldn't be able to get to them on its own? See above. Keep in mind the resources are requested in separate requests from the pages that they are used on, so you'll have to inspect headers and/or cookies to determine who can have them and who can't. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Newbie: CSS not taking effect
André Warnier wrote: As an addendum : A very useful tool when dealing with issues like this one, if your are using Firefox as a browser, is an add-on like HttpFox. It allows you to access your server, and see exactly which requests are sent to the server (including the secondary ones like your stylesheet and javascript), and the responses that come back, along with all the HTTP headers etc.. A similar add-on for IE is Fiddler2. My personal favorite is Firebug which offers a huge amount of info regarding pages, paths, request and response bodies. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Newbie: CSS not taking effect
Roman Sokolyuk wrote: Thank you very much for your time. This fixed the problem. I have only one question. How does the browser determine which parts of the URL to strip? On Fri, Jul 31, 2009 at 11:07 AM, André Warnier a...@ice-sa.com wrote: One way to handle the paths in jsps is to use something like ${pageContext.request.contextPath}/webapp_relative_path/to_my_resource.css. The ${...} stuff is a JSTL expression evaluated at request time. The net effect is a server relative path that can change as the webapp's path changes. Very stable. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat upgrade 5.5 - 6 affecting apache server
If I remember write, this file has all the mount directives for various webapps hosted by tomcat. It might have even been auto-generated in your tomcat 5.5 environment by the tomcat service. I would migrate the stuff in workers.properties to their equivalent in apache httpd config files and drop the reference from jk.conf. --David Lucas Vickers wrote: Hello, I'm on a pre-configured box (I'm learning). I upgraded my tomcat from 5.5 to 6, and I found that my apache server can not start because: /usr/local/apache/conf/jk.conf references JkWorkersFile /usr/local/jakarta/tomcat/conf/workers.properties which is not available in tomcat 6. what should be done in this situation? remove the reference, copy the file over from my 5.5 dir? thanks! Lucas - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org