Re: Broken pipe errors
Broken pipe can also happen when faulty network hardware or sensitive firewalls drop the connection. --David Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James, James Law wrote: | Can anyone help with the below error? We have just changed from a FC8 | box with the default install (Test Box) to a FC8 box with a more | stripped down install (both the same machines) Is anything actually not working? Broken pipe messages are occasionally generated when users hit STOP on their browsers before the entire response has been written to the output stream. AFAIK, unless you find that something is actually not working, I think you can safely ignore these messages. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkg1vQcACgkQ9CaO5/Lv0PCPSgCgpP2XWeyaVbbElgVJ4UUnbTA6 uV4AoMQkfNkymmXex8XzElfGJkvjLXkp =L/dz -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Moving a site
SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\SalesPortal does not exist or is not a readable directory Can you post more of this ... like say a root cause? Also can you verify the existence of the webapp folder and check to be sure the tomcat service has permission to read it? --David Rick Simpson wrote: All 3 remaining hairs will thank you. Tomcat 5.5 Java JDK 1.6.0 Sever 2003 May 22, 2008 11:53:05 AM org.apache.catalina.core.StandardContext stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/SalesPor tal] has not been started May 22, 2008 11:53:12 AM org.apache.catalina.core.StandardContext stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/SalesPor tal] has not been started May 22, 2008 11:54:45 AM org.apache.catalina.core.StandardContext stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/SalesPor tal] has not been started May 22, 2008 11:54:45 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/SalesPortal] May 22, 2008 11:55:24 AM org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\SalesPortal does not exist or is not a readable directory -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, May 22, 2008 2:36 PM To: Tomcat Users List Subject: Re: Moving a site So you decided to take our hair as well .. :-) Specifics please: Tomcat version: Java version: OS: Any relevant excerpts from the logs: --David === This e-mail is intended only for the use of the addressees. Any copying, forwarding, printing or other use of this e-mail by persons other than the addressees is not authorized. This e-mail may contain information that is privileged, confidential and exempt from disclosure. If you are not the intended recipient, please notify us immediately by return e-mail (including the original message in your reply) and then delete and discard all copies of the e-mail. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Moving a site
Regarding the logs, exceptions usually log very much like what you posted then go off into a huge list of '... at (some class name) (some line number)'. For example: java.lang.IllegalArgumentException: Document base C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\SalesPortal does not exist or is not a readable directory at org.apache.catalina.. (SomeClass.java:443) at .. at root cause: java.io.PermissionDeniedException (or whatever) at at At the end of that, there usually is a 'root cause:' and another exception stack trace. If you see such a thing in your logs, we'd like to see that. That would offer more infomation regarding what happened. Could you give us the general layout of webapps\SalesPortal? Also right click on the SalesPortal folder and take a look at the security tab. Does the local System account have Read permissions on the folder and it's contents? Lastly, you should check to be sure the folder isn't really a shortcut which Java may not understand or follow. --David Rick Simpson wrote: David I am sorry to sound like I don't know what I am doing but I don't. I can open the rest of the folders in webapp folder from the manager just not mine. The file I am moving came from version 4.1 of Tomcat, not sure if that matters or not. -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, May 22, 2008 3:02 PM To: Tomcat Users List Subject: Re: Moving a site SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\SalesPortal does not exist or is not a readable directory Can you post more of this ... like say a root cause? Also can you verify the existence of the webapp folder and check to be sure the tomcat service has permission to read it? --David === This e-mail is intended only for the use of the addressees. Any copying, forwarding, printing or other use of this e-mail by persons other than the addressees is not authorized. This e-mail may contain information that is privileged, confidential and exempt from disclosure. If you are not the intended recipient, please notify us immediately by return e-mail (including the original message in your reply) and then delete and discard all copies of the e-mail. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manager Application (Tomcat 5.5.26)
Can you go through the exact steps you took in installing tomcat? Also where exactly did you get your tomcat? Lastly, what Java are you using? I ask because the binary download of tomcat from one of the Apache mirrors just plain works out of the box with the Sun JVM. The error you are getting makes me think one or more jar libraries may not be in the correct location or the JVM is one of the less useful ones like gnu java. --David Nuno Manuel Martins wrote: Hi, I did just that, unfortunately I am getting the same error :( May 21, 2008 9:27:20 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Allocate exception for servlet HTMLManager java.lang.ClassNotFoundException: org.apache.catalina.manager.HTMLManagerServlet at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:127) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) May 21, 2008 9:35:03 AM org.apache.catalina.core.StandardWrapperValve invoke INFO: Servlet HTMLManager is currently unavailable Any more ideas? Thanks, Nuno -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: terça-feira, 20 de Maio de 2008 12:13 To: Tomcat Users List Subject: RE: Manager Application (Tomcat 5.5.26) From: David Smith [mailto:[EMAIL PROTECTED] Subject: Re: Manager Application (Tomcat 5.5.26) If I were you, I'd download a fresh copy of tomcat 5.5 (or just unzip the downloaded version from before) and recopy server/webapps/manager from the archive to your installed tomcat. I'd suggest going farther and just throwing away the existing Tomcat installation, since it's obviously been corrupted in ways unknown. Start over with a fresh download and a fresh installation, update conf/tomcat-users.xml, and verify that the manager app works. Once that's done, carefully make any config changes for the webapps you want to deploy, taking notes so you can back out anything that doesn't work. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manager Application (Tomcat 5.5.26)
) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Thread.java:595) root cause java.lang.ClassNotFoundException: org.apache.catalina.manager.HTMLManagerServlet java.net.URLClassLoader$1.run(URLClassLoader.java:200) java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findClass(URLClassLoader.java:188) java.lang.ClassLoader.loadClass(ClassLoader.java:306) java.lang.ClassLoader.loadClass(ClassLoader.java:251) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Thread.java:595) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.26 logs. If I do a refresh I get the error I sent in the first e-mail. Does the webapp needs any jar that does not come by default or something? Regards, Nuno -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: segunda-feira, 19 de Maio de 2008 19:41 To: Tomcat Users List Subject: Re: Manager Application (Tomcat 5.5.26) The manager webapp provided by tomcat doesn't need installation -- it's a part of tomcat already in the download distribution. It's location has changed slightly over time -- normally found in the webapps directory, tomcat 5.5.x put it in server/webapps by default. Regarding the error below, there must have been a previous error in the logs from when you started tomcat. Could you look at that and post if necessary? --David Nuno Manuel Martins wrote: Hello, I'm trying to install the manager application on Tomcat 5.5.26 (well, actually it comes installed by default, I am just trying to make it work) and after I authenticate with a user created in conf/tomcat-users.xml I get the following message HTTP Status 404 - Servlet HTMLManager is not available type Status report message Servlet HTMLManager is not available description The requested resource (Servlet HTMLManager is not available) is not available. I googled around but all I could find was recomentations to re-install the application but this mostly relates to RPM installs or 3rd party software but I am using the source distribution from the official site... however I did try to unpack the source again and overwrite the manager application (still have the problem though). My server.xml has the following about this: GlobalNamingResources Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources [...] Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Context path=/manager docBase=/usr/local/tomcat-5.5.26/webapps/manager reloadable=true crossContext=true/ Think these are the relevant parts. If you have any ideas on what may be causing this let me know. Thanks, Nuno - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start
Re: HTML hyperlink problem in Apache Tomcat 5.5
You may be running into a cross-scripting issue with your browser. The security in browsers doesn't normally allow online content any access to local files. Make sure all the content you are trying to access from the page offered by tomcat is available from tomcat. --David thunderhead wrote: Hi again, This is an addendum to my earlier post, which highlights the linking problem mentioned earlier and introduces another one (sigh). The directory structure of my web application is the following: GSDC5P1 (root) --- docs | images | lib | mindmaps index.html --- docs GSDC_PolicyManual.mht The index.html file is in the root and from this file, I want to link to the GSDC_PolicyManual.mht present under the directory docs. In my index.html file, I tried linking to this file in six different ways (NOTE: In some of these links, I tried linking to a specific sub-section of the MIME HTML [.mht] document by using the anchors present, because that is my ultimate aim in creating these links). In particular, I tried using a relative path, absolute path and the full web container path (localhost and my workstation IP address, considering I'm running Tomcat in my own workstation) to link to the file. The HTML code for the links is below: docs/GSDC_PolicyManual.mht Test 1 C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\GSDC5P1\docs\GSDC_PolicyManual.mht Test 2 docs/GSDC_PolicyManual.mht#_Toc175474678 Test 3 C:\Program%20Files\Apache%20Software%20Foundation\Tomcat%205.5\webapps\GSDC5P1\docs\GSDC_PolicyManual.mht#_Toc175474678 Test 4 http://localhost:8080/GSDC5P1/docs/GSDC_PolicyManual.mht#_Toc175474678 Test 5 http://10.194.118.58:8080/GSDC5P1/docs/GSDC_PolicyManual.mht#_Toc175474678 Test 6 The results are that the relative paths and http:// paths work. But when the .mht file opens up, it throws the following error: MIME-Version: 1.0 Content-Type: multipart/related; boundary==_NextPart_01C8B51A.46DAF130 This document is a Single File Web Page, also known as a Web Archive file. If you are seeing this message, your browser or editor doesn't support Web Archive files. Please download a browser that supports Web Archive, such as Microsoft Internet Explorer. --=_NextPart_01C8B51A.46DAF130 Content-Location: file:///C:/E048E08C/GSDC_PolicyManual.htm Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii I cannot make much sense of this because when I double click on the .mht file and open it in Internet Explorer (my workstation has version 6 installed), the document shows up fine. Again, the absolute links to this document don't work at all. No errors, no messages of the kind above. I'm really keen to get to the bottom of this and somehow make the .mht file work, while keeping in mind that it may be on a remote server (so I must be able to link to it outside of my webapps folder). Hope that throws much more light on the situation. thunderhead wrote: I understand what you're getting at. I am running a local instance of Tomcat, which means that both the client and the server are in my workstation. So shouldn't the local linkages work then? Now, bringing the files into the webapps folder is a convenient solution. But the issue is that this web application is ultimately going to be deployed on a production/test server, and the application has to refer to the direct path of files lying on a remote server elsewhere. Again, http:// paths work, but local paths don't even if they refer to my own workstation (the one in which I am running Tomcat). One thing I must point out is that I don't have a configuration file in my web application's folder (currently it does not use any JSP, and the only Java involved is in an applet (.jar) which is embedded into a HTML document). Should I make a configuration file? If so, what must I put into it such that these links work? Thanks for looking into this. Caldarale, Charles R wrote: From: thunderhead [mailto:[EMAIL PROTECTED] Subject: HTML hyperlink problem in Apache Tomcat 5.5 I tried linking some local files on my workstation for testing purposes. You can't do that. Each link is evaluated in the environment of the *client* (browser, in your case). Unless the files are located on the client system, they won't be found. Put the files inside the webapp and access them via the proper webapp-relative references. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations
Re: how to change http://107.105.13.1/webapp/ into http://www.mydomain.com/webapp/
You may not have to go through all that trouble. Check with the name registration service you got your domain name from -- they may have DNS service. --David ryan webb wrote: Mr. David, Thank you very much for your kind reply. I've got a feeling that this is not Tomcat related. I think I will try to setup a DNS server. For this. God bless. On Mon, May 19, 2008 at 5:46 PM, David Smith [EMAIL PROTECTED] wrote: Not a tomcat question ... you need to get your system registered with a DNS service and it will respond to the www.mydomain.com name regardless of service (tomcat, apache, iis, ssh, sftp, etc., ...). --David ryan webb wrote: Hello, How to change http://107.105.13.1/webapplication/ into http://www.mydomain.com/webapplication/ in tomcat? If not Tomcat related please let me know...(give me tips or anything) Thank you =) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to change http://107.105.13.1/webapp/ into http://www.mydomain.com/webapp/
Not a tomcat question ... you need to get your system registered with a DNS service and it will respond to the www.mydomain.com name regardless of service (tomcat, apache, iis, ssh, sftp, etc., ...). --David ryan webb wrote: Hello, How to change http://107.105.13.1/webapplication/ into http://www.mydomain.com/webapplication/ in tomcat? If not Tomcat related please let me know...(give me tips or anything) Thank you =) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: *SPAM* Re: How to increase tomcat memory
/etc/init.d/tomcatX is not a file provided by any packages from tomcat.apache.org. I would suspect it's probably the best place for your adjustments when launching tomcat as a service -- especially since it already contained -Xmx128m. Check documentation provided by the packager to get an authoritative answer though. --David Tomás Tormo wrote: Sorry, the file i edited was the one in /etc/init.d/tomcatX (where X is the version of Tomcat) too much working.. :D Greetings! Tomás Tormo escribió: Thank you very much for you answer. Because of I was in a hurry, I examined the invocation of tomcat and I found that Tomcat was using 128mb of memory, so, obviously , the lines I added weren't working at all... Then, I realized that the -Xmx128m argument was after a line -Djava.awt.headless=true, so I simply located that line (that can be found in catalina.sh) and changed the argument with -Xmx512m, and now my applicattion is working perfectly :) Anyway... does anybody know the correct way to do this? (or maybe, this is the good one... :p ) Thank you again! Alan Chaney escribió: You seem to be using linux. If you go: ps alx | grep java after you have started tomcat you should be able to find the invocation for tomcat. Please check to see whether or not the options you have specified below appear in that list and check very carefully that there is whitespace around the options. I would look for two things were I debugging this: 1. The option isn't being included in the tomcat java invocation 2. The option is corrupted (misspelt, incorrect spacing etc). HTH Alan Chaney Tomás Tormo wrote: Hi here it comes my question again... :D How to increase tomcat memory? I'm getting GC overhead limit exceeded. I tried putting export JAVA_OPTS=-Xms256m -Xmx512m in setclasspath.sh file as well as putting CATALINA_OPTS=-server -Xms256m -Xmx512m in /etc/init.d/tomcat5.5 script file, but when I go to tomcat administration webpage and list the server status I always get Max memory: 113.81 MB. Thank you very much - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manager Application (Tomcat 5.5.26)
The manager webapp provided by tomcat doesn't need installation -- it's a part of tomcat already in the download distribution. It's location has changed slightly over time -- normally found in the webapps directory, tomcat 5.5.x put it in server/webapps by default. Regarding the error below, there must have been a previous error in the logs from when you started tomcat. Could you look at that and post if necessary? --David Nuno Manuel Martins wrote: Hello, I'm trying to install the manager application on Tomcat 5.5.26 (well, actually it comes installed by default, I am just trying to make it work) and after I authenticate with a user created in conf/tomcat-users.xml I get the following message HTTP Status 404 - Servlet HTMLManager is not available type Status report message Servlet HTMLManager is not available description The requested resource (Servlet HTMLManager is not available) is not available. I googled around but all I could find was recomentations to re-install the application but this mostly relates to RPM installs or 3rd party software but I am using the source distribution from the official site... however I did try to unpack the source again and overwrite the manager application (still have the problem though). My server.xml has the following about this: GlobalNamingResources Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources [...] Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Context path=/manager docBase=/usr/local/tomcat-5.5.26/webapps/manager reloadable=true crossContext=true/ Think these are the relevant parts. If you have any ideas on what may be causing this let me know. Thanks, Nuno - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Once again, clear text passwords in context.xml files
Kevin: That works for remote user accounts logging into tomcat webapps, but does not work for database pools, etc., ... where tomcat the service has to perform a login to gain access to protected resources. Marcus: If the admins who are making noise ever really thought about the problem, they would know better. You could hash the passwords, but then there would have to be some code somewhere to unhash them with potentially yet another password to unhash that. And if you don't unhash the password before using it to access the resource, it's the same as a clear text password. You really never get away from having a password of some form sitting around somewhere. Besides, have you ever asked them how they handle the private key for their SSL certificate? That has to sit on the server in the clear. It's certainly not encoded in any way that would stop a hacker and I would argue it's more important to keep that safe than the password your webapp uses to access protected resources. Regarding malicious superuser, if they let an untrusted party gain that level of access on their server they have *MUCH* bigger problems than your tomcat service. Tomcat should only be using accounts with minimum access rights anyway (as we all should if you really want to get down to best practice). And if the resource is of a sensitive nature, it should be behind a firewall limiting availability to the outside world. --David Kevin Williams wrote: How about hashing the passwords with a known forumla and storing them in this intermediate format. App would need to hash the user input and compare. This might give ur security czars a warmer feeling and get them off ur back. -Kevin On 5/13/08, Milanez, Marcus [EMAIL PROTECTED] wrote: Filip thanks for your reply, 1. make sure tomcat runs as an account that can't login Right, that is done 2. make any file that contains secure information readonly, and readable only by the tomcat user Done too if someone gets onto your machine as an super user, you have bigger problem than the password being in clear text That is the answer everyone gives in tomcat forums all over the internet, so it seems to me that no possible solution is available. On the other hand, is it right to stay behind a possible security fault (malicious super user performing login) in order to say I'll not correct known security issues in my application? The thing is I'm not responsible for the servers but the ones who are, keep arguing that this is a crictical security problem. Are they seeing a big problem in a small one? Thanks a lot! Marcus -Mensagem original- De: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Enviada em: terça-feira, 13 de maio de 2008 12:37 Para: Tomcat Users List Assunto: Re: Once again, clear text passwords in context.xml files it's a wasted effort, the one way it could be truly secure, was if tomcat asked you for a key upon startup. this wouldn't work very well in a 1000 tomcat instance server farm. any other effort simply masks the problem, letting you think it is secure, when it isn't. what you should do is this 1. make sure tomcat runs as an account that can't login 2. make any file that contains secure information readonly, and readable only by the tomcat user if someone gets onto your machine as an super user, you have bigger problem than the password being in clear text Filip Milanez, Marcus wrote: Hello everyove, We were asked to eliminate clear text passwords associated to database pooled connections in context.xml files... I know it has been discussed a lot, but I would like to ask once again whether someone has a simple, clean solution for that. We are using Windows server and MS SQL 2005. One of the options I came across is to use Windows Integratd authentication instead of database users. Is there any other ideas to overcome this situation? Thanks a lot, Marcus Milanez - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to reload web app from java program?
But to use the api that the manager app uses, your webapp needs to have privileged=true set in the context first. Second, look at the source for the manager webapp for exactly what it does. And lastly, notice the manager webapp can't reload itself -- I suspect there's a reason for that. I'm not sure a webapp being reloaded can request the manager reload it as the manager does it during the request and doesn't send a response until the reload is complete. If you have code that can't unload because it's actively being executed, it might block the reload. --David [EMAIL PROTECTED] wrote: Hello, If you wanted to go that route, might as well call wget or curl to hit the manager webapp with a reload command. It is then possible to send appropriate http request from java class to manager webapp, isn't it? But is there any API to reload the context from the app itself? I suppose I need exactly the same API call as manager app does to reload the context! Regards, Milos The OP is trying to reload one webapp, not the entire tomcat. --David David Kerber wrote: David Smith wrote: Don't think so. The next best things are a) using the manager webapp to reload or b) design the webapp to reload local config information itself. The only down side to (b) is it can't work on resources defined in tomcat configs like database pools. Couldn't you call an external batch file that stopped and then restarted Tomcat? Like calling a windows .cmd file that issued NET STOP and NET START commands? That's not exactly the application itself doing the restart, but it's probably close enough for most purposes. D --David [EMAIL PROTECTED] wrote: Hello, is there any way to reload deployed application from the application itself? I suppose there must be an API to do that. Thanks in advance, Milos Kovacevic - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat problem on a multiple CPU system
Can you describe how you open the 8 browser windows and what browser you are using? I ask because those 8 browser windows may be coming from one process and using at most 2 connections, hence the slower processing. Firefox normally only has one process no matter how you open the new windows. IE can be 8 separate processes if you launch each separately from Explorer (ie the Start button or desktop shortcut) and not use the new window menu option or ctrl-n. --David Gilbert, Antoine wrote: Well, each process is a image rendering process. But my point is, if I launch 8 threads directly in a JVM outside of tomcat, it run faster and use 100% of the 8 CPU... If I make a Servlet (or a JSP) who will start a process each time I call it (I call it 8 times). So, the big question is, why It's fast directly on the JVM and it's slow on Tomcat ? Why with Tomcat It's not possible to use 100% of all the 8 CPU ? There is no data transfer between client and server, in both case the images are rendered on the disk. I just made this rendering test to expose the fact that I'm unable to make my tomcat use efficiently all my CPU. So the big question, why these 8 processes run betters than these 8 process within Tomcat ? -Original Message- From: Alan Chaney [mailto:[EMAIL PROTECTED] Sent: 4 mai 2008 17:33 To: Tomcat Users List Subject: Re: Tomcat problem on a multiple CPU system Hi Antoine The thing to remember is that this is a system which has (at least) four main parts: 1. Tomcat 2. The operating system 3. A network connection 4. Your application (and potentially) 5. A database (but you didn't mention that) Here are some questions. 1. How do you make the connection to the servlet. Does the browser run on the same machine as the application? 2. Does you application create network traffic? If so, how many bytes are transferred to the browser? Each servlet thread will have to wait until the application has transferred all the data out. 3. What kind of disk activity does your application generate? Is it different when the app is running from the servlet? Probably somewhere your servlet threads are sleeping waiting for a resource. You could do a thread dump to see what is happening (I don't use Windows so I can't remember how you do that with the Win setup) In the end, you'll need to profile the system to work out where the bottlenecks are. You'll need to use network analysers and probably Java profilers to track down what's happening such as when packets are received, when the replies are generated and maybe profile what your app. is doing. HTH Alan Chaney Gilbert, Antoine wrote: Hi I have a 2x quad core (8 cpu units) server. If I start a java program and this one is launching (at the same time) 8 thread doing some CPU intensive jobs, all the CPU are used at 100%, and that's what I'm expecting.. But, if I am using tomcat, and I call a servlet 8 times to process these 8 jobs, it take longer to execute these same 8 jobs and all the CPU are not used at 100%, it's more like 30%... Any idea about this problem or behavior ? I'm using Tomcat 5.5.17, windows, JDK 1.6 Antoine !DSPAM:481e1bf27941527717022! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to reload web app from java program?
Don't think so. The next best things are a) using the manager webapp to reload or b) design the webapp to reload local config information itself. The only down side to (b) is it can't work on resources defined in tomcat configs like database pools. --David [EMAIL PROTECTED] wrote: Hello, is there any way to reload deployed application from the application itself? I suppose there must be an API to do that. Thanks in advance, Milos Kovacevic - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to reload web app from java program?
If you wanted to go that route, might as well call wget or curl to hit the manager webapp with a reload command. The OP is trying to reload one webapp, not the entire tomcat. --David David Kerber wrote: David Smith wrote: Don't think so. The next best things are a) using the manager webapp to reload or b) design the webapp to reload local config information itself. The only down side to (b) is it can't work on resources defined in tomcat configs like database pools. Couldn't you call an external batch file that stopped and then restarted Tomcat? Like calling a windows .cmd file that issued NET STOP and NET START commands? That's not exactly the application itself doing the restart, but it's probably close enough for most purposes. D --David [EMAIL PROTECTED] wrote: Hello, is there any way to reload deployed application from the application itself? I suppose there must be an API to do that. Thanks in advance, Milos Kovacevic - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and JSF
I would suspect one of the xml files tomcat reads at startup uses xsi:schemaLocation, but doesn't declare the xsi namespace. Maybe check your webapps web.xml files to be sure they are well formed. There are a lot of xml validators in the world that can help you with this. --David jaykay wrote: Hi, I got the issue corrected. I was using jars from jsf-1_1_01 distribution. When I copied the jsf-api.jar and jsf-impl.jar from jsf 1.2 (mojarra-1.2_08-b06-FCS),I got my desired results. But Tomcat has some xml parsing error when starting up. I assume it is the problem with JSF right? The log attached May 2, 2008 12:00:15 PM org.apache.catalina.core.AprLifecycleListener init INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_14\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.5.0_14\bin;C:\OraHome\bin;C:\OraHome\jre\1.4.2\bin\client;C:\OraHome\jre\1.4.2\bin;C:\Program Files\Java\jre1.5.0_14\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\apache-ant-1.7.0\bin;C:\apache-ant-1.7.0\lib;C:\Program Files\Java\jdk1.5.0_14\lib;C:\apache-tomcat-6.0.14\lib;C:\apache-tomcat-6.0.14\bin;.; May 2, 2008 12:00:15 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 2, 2008 12:00:15 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 403 ms May 2, 2008 12:00:15 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 2, 2008 12:00:15 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.14 May 2, 2008 12:00:16 PM org.apache.tomcat.util.digester.Digester error SEVERE: Parse Error at line 3 column -1: Undeclared prefix: xsi:schemaLocation. org.xml.sax.SAXParseException: Undeclared prefix: xsi:schemaLocation. at org.apache.crimson.parser.Parser2.error(Parser2.java:3013) at org.apache.crimson.parser.Parser2.processName(Parser2.java:1581) at org.apache.crimson.parser.Parser2.processAttributeNS(Parser2.java:1553) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1410) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:499) at org.apache.crimson.parser.Parser2.parse(Parser2.java:304) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562) at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:518) at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:476) at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:301) at org.apache.catalina.core.StandardContext.processTlds(StandardContext.java:4428) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4235) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) 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:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) May 2, 2008 12:00:24 PM tt.util.STD error SEVERE: slowDown Data: getting a connection took 219 May 2, 2008 12:03:20 PM tt.util.STD error SEVERE: Link Arena and PAEventQueue Listeners not started on this machine: myId [0] primaryID [0] May 2, 2008 12:03:20 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 May 2, 2008 12:03:20 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 May 2, 2008 12:03:20 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/16 config=null May 2, 2008 12:03:20 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 185074 ms May 2, 2008 12:03:30 PM tt.util.STD error SEVERE: RELOADING CACHENon Threaded May 2, 2008 12:03:30 PM tt.util.STD error SEVERE: slowDown Data: getting a connection took 141 May 2, 2008 12:03:30 PM tt.util.STD error SEVERE:
Re: Problem with policies
What makes you think its a problem with the security policy file? This looks more like it can't find the struts html taglib tld file. It's looking for the definition in your web.xml file or the tld file in the META-INF of one of your .jar files in WEB-INF/lib --David Roberto Riggio wrote: Hi, I'm running tomcat 5.5.25 under ubuntu. However with the default setup i get the following exeception when a try to use my webapp: org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/tags-html cannot be resolved in either web.xml or the jar files deployed with this application org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116) org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:317) org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:148) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557) org.apache.jasper.compiler.Parser.parse(Parser.java:127) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212) org.apache.jasper.compiler.ParserController.parse(ParserController.java:101) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156) org.apache.jasper.compiler.Compiler.compile(Compiler.java:296) org.apache.jasper.compiler.Compiler.compile(Compiler.java:277) org.apache.jasper.compiler.Compiler.compile(Compiler.java:265) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) The I've tried to grant all rights to my webapp with: grant codeBase file:${catalina.base}/webapps/myapp/- { permission java.security.AllPermission; }; and everything works fine. Is there anybody that can give me some hints about how this problem should be handled? I'm sure that give full rights to the webapp is not the best solutions. Thanks Roberto - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with policies
I would have expected a SecurityException or AccessControlException in the stack you posted if the security manager were at fault. Did you post the whole thing or just a snippet? --David Roberto Riggio wrote: Because it works fine if I add the following block to to 50user.policy grant codeBase file:${catalina.base}/webapps/myapp/- { permission java.security.AllPermission; }; Am I missing something? R. - David Smith [EMAIL PROTECTED] wrote: What makes you think its a problem with the security policy file? This looks more like it can't find the struts html taglib tld file. It's looking for the definition in your web.xml file or the tld file in the META-INF of one of your .jar files in WEB-INF/lib --David Roberto Riggio wrote: Hi, I'm running tomcat 5.5.25 under ubuntu. However with the default setup i get the following exeception when a try to use my webapp: org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/tags-html cannot be resolved in either web.xml or the jar files deployed with this application org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116) org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:317) org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:148) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557) org.apache.jasper.compiler.Parser.parse(Parser.java:127) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212) org.apache.jasper.compiler.ParserController.parse(ParserController.java:101) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156) org.apache.jasper.compiler.Compiler.compile(Compiler.java:296) org.apache.jasper.compiler.Compiler.compile(Compiler.java:277) org.apache.jasper.compiler.Compiler.compile(Compiler.java:265) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) The I've tried to grant all rights to my webapp with: grant codeBase file:${catalina.base}/webapps/myapp/- { permission java.security.AllPermission; }; and everything works fine. Is there anybody that can give me some hints about how this problem should be handled? I'm sure that give full rights to the webapp is not the best solutions. Thanks Roberto - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where to define Context element...
The Tomcat documentation lists several different places that you can define a Context element. I don't want to define it in my app's web.xml Neither should you. Web.xml has its own purpose defined by the servlet spec. My web app is in a war called mytest.war, which I deployed to $CATALINA_HOME/webapps. My web.xml has the following elements: You'll have to add a resource-ref block to this. See the tomcat JDBC howto docs for details. Otherwise it looks good. Context path=/mytest docBase=mytest debug=5 reloadable=true crossContext=true Drop the path and docBase attributes. They are at best duplicate of information tomcat can glean from other sources. You can also put this in a file named context.xml in the META-INF directory of your war file. Resource name=jdbc/mytest auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=javauser password=javadude driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/mytest?autoReconnect=true/ Drop autoReconnect=true and replace it with a new attribute validationQuery=select 1 on the Resource element. It'll handle stale connections much better. --David Michael Burbidge wrote: I'm trying to define a JNDI resource for a datasource. The Tomcat documentation lists several different places that you can define a Context element. I don't want to define it in my app's web.xml and I don't want to modify tomcat config files. I want to define a companion file for my app, but I'm having a hard time understanding the documentation. It says the following, is one place you can define a Context element: in individual files (with a .xml extension) in the $CATALINA_HOME/conf/[enginename]/[hostname]/ directory. The name of the file (less the .xml) extension will be used as the context path. Multi-level context paths may be defined using #, e.g.context#path.xml. My web app is in a war called mytest.war, which I deployed to $CATALINA_HOME/webapps. My web.xml has the following elements: servlet servlet-namemytest/servlet-name servlet-class org.springframework.web.servlet.DispatcherServlet /servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-namemytest/servlet-name url-pattern/*/url-pattern /servlet-mapping I placed a file named mytest.xml in $CATALINA_HOME/conf/Catalina/localhost/mytest.xml. mytest.xml contains the following: Context path=/mytest docBase=mytest debug=5 reloadable=true crossContext=true Resource name=jdbc/mytest auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=javauser password=javadude driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/mytest?autoReconnect=true/ /Context My Context defined this way is not loaded. I've checked using the Tomcat Manager and there is no JNDI resource loaded. What am I doing wrong? Thanks, Michael- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: access files from jsp
Seems to me the simplest is the c:import tag and fetch the file via http -- just my two cents. You know more about your architecture and what's available than any of us. --David henry human wrote: Once again because there was a mistake in the first email : i am about to read from a JSP the data at a remote computer. At remote computer is tomcat running. the files are stored in remote computer at d:\archive\files The port 80 is also accessible. Please tell me, what should be configured in tomcat to be able to access the files ? I am thankful for any hint __ Gesendet von Yahoo! Mail. Mehr Möglichkeiten, in Kontakt zu bleiben. http://de.overview.mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: access files from jsp
Here's the picture you painted in the original email and I based my answer on: 1. You have a jsp file on a tomcat server which needs to read information from a remote system 2. The system containing the remote file has a webserver you could put the file in. The c:import tag is a java standard tag library (JSTL) tag used to import data form locations outside the jsp. In this case, I'm saying you could request the file from the remote webserver. Google is your friend if you'd like more information. If I've misunderstood your environment, please provide a *lot* more detail -- specifically more information regarding the system the remote file reside's on (does it have a web server?). --David henry human wrote: Seems to me the simplest is the c:import tag and sorry,I don't understand what you mean, could you tell more detailed. Maybe a little code code, a sample, etc fetch the file via http how?? -- just my two cents. You know more about your architecture and what's available than any of us. ?? what should be configured in tomcat ? Do you mean that i do not need tomcat at all for this scenario? I think it is not possible to read from the hard disc directories f.i. d:\archive\files without helps of a web server ? I am appreciated, if you get a sample, more details! --David henry human wrote: Once again because there was a mistake in the first email : i am about to read from a JSP the data at a remote computer. At remote computer is tomcat running. the files are stored in remote computer at d:\archive\files The port 80 is also accessible. Please tell me, what should be configured in tomcat to be able to access the files ? I am thankful for any hint __ Gesendet von Yahoo! Mail. Mehr Möglichkeiten, in Kontakt zu bleiben. http://de.overview.mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] E-Mails jetzt auf Ihrem Handy. www.yahoo.de/go - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: access files from jsp
So... the remote file is available to the local system on a network drive. That's a fun one. There are a couple of different ways to do this. 1. Using Windows fileshares Let me preface this by saying *I've* never done this. The few times I've had a tomcat server on a Windows machine, it only ever accessed local files. There are people on the list with way more experience than I have. As I understand it, as long as tomcat is running under a user account that has privileges to read the remote file, you could use a UNC path with java standard file access classes and methods to read the file. The mapped drive letter wouldn't work unless tomcat was only running while you are logged in. In a jsp, this could be done with a scriptlet: !-- import your classes at the top of the jsp -- jsp:scriptlet try { FileInputStream remoteFileReader = new FileInputStream( remoteServer\\archive\\files\\myFile.txt ) ; // do something with the file } catch ( Exception e ) { // do something if the access fails } finally { try { remoteFileReader.close() ; } catch ( Exception e ) {} } /jsp:scriptlet It should be mentioned the system account most services run under by default does not have any privilege to access remote files via UNC path, so you'll have to customize your tomcat installation a little. ... Or always be logged into the system and have it running as you which isn't the most ideal method. 2. Using a webserver on the remote system This I have done and it's more platform independent. Your jsp can request it from the remote server using standard taglibs: (note standard.jar and jstl.jar must be in your webapp's WEB-INF/lib directory) !-- import the core taglib from jstl at the top of the file. Docs for the jstl taglib can help with this -- c:import url=http://remoteSystem.dns.com/http/path/to/file.txt; var=fileContents / !-- Do something with the file contents, it'll be available in the fileContents page context attribute -- --David henry human wrote: Thanks David, I try to clarify my situation. I have a JSP running in local computer in tomcat. This JSP should read from a remote machine. The files are under d:\archive\files. These directory which provide a repository functionality could not be transfer somewhere else. The files “must be” saved there. 1) Scennario one: The remote machine does not hava e webserver 2) Scenario two: a tomcat is running on remote computer My questions: 1) Do I need the webserver at all to access remotely the files? 2) Is it poosile to access the data on d:\archive… without to put them in a webserver directory or not? If no, do I need configuration for the webserver (f.i. tomcat)to allow access to the files from outside? --- David Smith [EMAIL PROTECTED] schrieb: Here's the picture you painted in the original email and I based my answer on: 1. You have a jsp file on a tomcat server which needs to read information from a remote system 2. The system containing the remote file has a webserver you could put the file in. The c:import tag is a java standard tag library (JSTL) tag used to import data form locations outside the jsp. In this case, I'm saying you could request the file from the remote webserver. Google is your friend if you'd like more information. If I've misunderstood your environment, please provide a *lot* more detail -- specifically more information regarding the system the remote file reside's on (does it have a web server?). --David henry human wrote: Seems to me the simplest is the c:import tag and sorry,I don't understand what you mean, could you tell more detailed. Maybe a little code code, a sample, etc fetch the file via http how?? -- just my two cents. You know more about your architecture and what's available than any of us. ?? what should be configured in tomcat ? Do you mean that i do not need tomcat at all for this scenario? I think it is not possible to read from the hard disc directories f.i. d:\archive\files without helps of a web server ? I am appreciated, if you get a sample, more details! --David henry human wrote: Once again because there was a mistake in the first email : i am about to read from a JSP the data at a remote computer. At remote computer is tomcat running. the files are stored in remote computer at d:\archive\files The port 80 is also accessible. Please tell me, what should be configured in tomcat to be able to access the files ? I am thankful for any hint __ Gesendet von Yahoo! Mail. Mehr Möglichkeiten, in Kontakt zu bleiben. http://de.overview.mail.yahoo.com
Re: access files from jsp
Yes, in general the c:import url=http://remoteServer/path; / would fetch the file via http protocol. The actual URL you'd use is dependent on the configuration of the remote server. --David henry human wrote: You gave me some idea and brought light to the issue! Thanks c:import url=http://remoteSystem.dns.com/http/path/to/file.txt var=fileContents / Am I right about above, that you mean my JSP ask the tomcat on the remote machine and consequently the remote tomcat reads the file by means of the incoming url, from the d:\archive\files directory? Or you mean that the files are at remote web server directory ( f.i. \\tomcat\httpdirectory\files ) and my JSP request for them ? --- David Smith [EMAIL PROTECTED] schrieb: So... the remote file is available to the local system on a network drive. That's a fun one. There are a couple of different ways to do this. 1. Using Windows fileshares Let me preface this by saying *I've* never done this. The few times I've had a tomcat server on a Windows machine, it only ever accessed local files. There are people on the list with way more experience than I have. As I understand it, as long as tomcat is running under a user account that has privileges to read the remote file, you could use a UNC path with java standard file access classes and methods to read the file. The mapped drive letter wouldn't work unless tomcat was only running while you are logged in. In a jsp, this could be done with a scriptlet: !-- import your classes at the top of the jsp -- jsp:scriptlet try { FileInputStream remoteFileReader = new FileInputStream( remoteServer\\archive\\files\\myFile.txt ) ; // do something with the file } catch ( Exception e ) { // do something if the access fails } finally { try { remoteFileReader.close() ; } catch ( Exception e ) {} } /jsp:scriptlet It should be mentioned the system account most services run under by default does not have any privilege to access remote files via UNC path, so you'll have to customize your tomcat installation a little. ... Or always be logged into the system and have it running as you which isn't the most ideal method. 2. Using a webserver on the remote system This I have done and it's more platform independent. Your jsp can request it from the remote server using standard taglibs: (note standard.jar and jstl.jar must be in your webapp's WEB-INF/lib directory) !-- import the core taglib from jstl at the top of the file. Docs for the jstl taglib can help with this -- c:import url=http://remoteSystem.dns.com/http/path/to/file.txt; var=fileContents / !-- Do something with the file contents, it'll be available in the fileContents page context attribute -- --David henry human wrote: Thanks David, I try to clarify my situation. I have a JSP running in local computer in tomcat. This JSP should read from a remote machine. The files are under d:\archive\files. These directory which provide a repository functionality could not be transfer somewhere else. The files “must be” saved there. 1) Scennario one: The remote machine does not hava e webserver 2) Scenario two: a tomcat is running on remote computer My questions: 1) Do I need the webserver at all to access remotely the files? 2) Is it poosile to access the data on d:\archive… without to put them in a webserver directory or not? If no, do I need configuration for the webserver (f.i. tomcat)to allow access to the files from outside? --- David Smith [EMAIL PROTECTED] schrieb: Here's the picture you painted in the original email and I based my answer on: 1. You have a jsp file on a tomcat server which needs to read information from a remote system 2. The system containing the remote file has a webserver you could put the file in. The c:import tag is a java standard tag library (JSTL) tag used to import data form locations outside the jsp. In this case, I'm saying you could request the file from the remote webserver. Google is your friend if you'd like more information. If I've misunderstood your environment, please provide a *lot* more detail -- specifically more information regarding the system the remote file reside's on (does it have a web server?). --David henry human wrote: Seems to me the simplest is the c:import tag and sorry,I don't understand what you mean, could you tell more detailed. Maybe a little code code, a sample, etc fetch the file via http how?? -- just my two cents. You know more about your architecture and what's available than any of us
Re: access files from jsp
No, I don't mean that. It should be able to retrieve any type of file. What you can do with it from within a jsp might be somewhat limited though. What exactly do you want to do with the file contents within the jsp? BTW, I highly recommend you read the documentation for the jstl taglibs and do some googling. I'm sure some research would help you a lot. --David henry human wrote: Hi David, most of these files are PDF, XLS and not only TXT format. You are meaning that with a JSP definitvly one can reads only TXT files? i understood with help of --- David Fisher [EMAIL PROTECTED] schrieb: Henry doesn't say if these are text files or binary files. If these are binary files like PDF, PPT and XLS files then a servlet will be needed - not a jsp. We use variations like the following in both Tomcat 4.1.31 and Tomcat 5.5.26 public class OpenFileServlet extends HttpServlet{ public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // You probably want to look up the url - which is really a path. String url = request.getParameter(url); if(url == null) return; // You'll know your mime types for your content. String ext = request.getParameter(ext); String content_type; if (.ppt.equals(ext)) {content_type = application/vnd.ms- powerpoint; } else if (.xls.equals(ext)) {content_type = application/ vnd.ms-excel; } else {content_type = application/pdf;} // we don't like to inline Office documents. boolean is_inline = application/pdf.equals(content_type); File f = new File(url); if ( f.exists() f.length() 0) { response.setContentType( content_type); // The following works way better in Windows IE than ext= response.setHeader(Content-disposition, (is_inline?inline:attachment)+;filename= + f.getName()); int lng = (int)f.length(); response.setContentLength( lng ); FileInputStream fis = new FileInputStream(f); byte[] chunk = new byte[16184]; int count; while ((count = fis.read(chunk)) =0 ) { response.getOutputStream().write(chunk,0,count); } fis.close(); } else { log(File not found: + url); } } } FYI - this approach really became necessary about when 4.1.29 came out - at that time Tomcat got pretty strict with non-Text being served via JSP. All of our PDF and PPT content broke in Windows IE. And we had to back out a whole release. Regards, Dave On Apr 29, 2008, at 1:39 PM, David Smith wrote: So... the remote file is available to the local system on a network drive. That's a fun one. There are a couple of different ways to do this. 1. Using Windows fileshares Let me preface this by saying *I've* never done this. The few times I've had a tomcat server on a Windows machine, it only ever accessed local files. There are people on the list with way more experience than I have. As I understand it, as long as tomcat is running under a user account that has privileges to read the remote file, you could use a UNC path with java standard file access classes and methods to read the file. The mapped drive letter wouldn't work unless tomcat was only running while you are logged in. In a jsp, this could be done with a scriptlet: !-- import your classes at the top of the jsp -- jsp:scriptlet try { FileInputStream remoteFileReader = new FileInputStream( \\\ \remoteServer\\archive\\files\\myFile.txt ) ; // do something with the file } catch ( Exception e ) { // do something if the access fails } finally { try { remoteFileReader.close() ; } catch ( Exception e ) {} } /jsp:scriptlet It should be mentioned the system account most services run under by default does not have any privilege to access remote files via UNC path, so you'll have to customize your tomcat installation a little. ... Or always be logged into the system and have it running as you which isn't the most ideal method. 2. Using a webserver on the remote system This I have done and it's more platform independent. Your jsp can request it from the remote server using standard taglibs: (note standard.jar and jstl.jar must be in your webapp's WEB-INF/lib directory) !-- import the core taglib from jstl at the top of the file. Docs for the jstl taglib can help with this -- c:import url=http://remoteSystem.dns.com/http/path/to/file.txt; var=fileContents / !-- Do something with the file contents, it'll be available
Re: How to close idle connections
I see you have maxIdle=20. Do you have more that 20 connections sitting idle? Is this really that much of a concern? As long as the connections are released (closed) and returned to the pool, I don't see the problem. The entire idea of a connection pool is the system keeps around a set of idle connections for borrow. When you code get's a connection, it comes from the pool of idle connections and returned when you close the connection. This speeds up your application by elliminating the overhead of contacting the server and constructing a new connection whenever you call for one. The pool just grabs a pre-made one off the shelf for you. --David Enrico Sasdelli wrote: Hi all, I use tomcat-6.0.14 and postgresql-8.1 with JNDI connection pool, after a while, my web application (written in Java/JSP), creates many database connections and postgres processes. But all of these connections are signed as Idle, I want to close this idle connections to avoid getting to get many postrgres processes. So, is there a way to tells tomcat to close an Idle connection after some time of inactivity? At the state of the art, I close the connections, statements and resultsets in the finally {} blocks, I use JNDI context resource to get the connection and this is my context.xml: ?xml version=1.0 encoding=UTF-8? Context path=/ManodoriSite Resource name=jdbc/mydb auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=20 maxWait=1 removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true username=myUser password=myPassword driverClassName=org.postgresql.Driver url=jdbc:postgresql://databaseHost/database/ /Context I've already read tons of documentation, from the official site, google and searched through the mailing list archive but I haven't found answer. Many thanks! Enrico - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: R: How to close idle connections
No, I have at most 20 idle connections, that's goes right, but my boss want less idle connections to avoid to overload the database server. So there isn't way to close an idle connection to remove the relative process? If so, I will set maxIdle=2 and everyone will be happy (expecially me :) I'll bet money the added, idle postgres connections are just sleeping while they wait for work. Given idle connections contribute virtually no additional load, don't see his argument that idle connections contribute to a database overload. If the minor increase in overhead due to sleeping threads actually overloads the database, you need to let your boss know the server hardware is way too frail for production use and needs to be upgraded. --David Enrico Sasdelli wrote: Thanks for reply, I see you have maxIdle=20. Do you have more that 20 connections sitting idle? Is this really that much of a concern? As long as the connections are released (closed) and returned to the pool, I don't see the problem. No, I have at most 20 idle connections, that's goes right, but my boss want less idle connections to avoid to overload the database server. So there isn't way to close an idle connection to remove the relative process? If so, I will set maxIdle=2 and everyone will be happy (expecially me :) Thank you, Enrico The entire idea of a connection pool is the system keeps around a set of idle connections for borrow. When you code get's a connection, it comes from the pool of idle connections and returned when you close the connection. This speeds up your application by elliminating the overhead of contacting the server and constructing a new connection whenever you call for one. The pool just grabs a pre-made one off the shelf for you. --David - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Comodo as a CA
I used Comodo a couple of years ago. Only changed vendors when the university started a contract w/ another vendor and offered them to departments for free. Never had a problem with Comodo although I did have to make sure the certificate chain was available to the client. That got me around the whole browser trust problem back when Comodo wasn't well known. --David Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Anyone? Christopher Schultz wrote: | All, | | I'm asking the Tomcat community this because everyone always surprises | me with their wide customer experiences. | | I need to get new SSL certs for a domain name switch we're doing, soon. | VeriSign's SGC/EV SSL certs are ridiculously expensive and so I'm | looking for alternatives. Comodo offers a product that is | indistinguishable (to me) to VeriSign's SGC/EV cert, but it costs 1/4 as | much. | | Does anyone have any experience with Comodo? Specifically, has anyone | run across any customers whose browsers do not trust Comodo as a CA? | | Thanks, | -chris - - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgTMMcACgkQ9CaO5/Lv0PASDgCePtVQFzSF9gFlphqc1HHWvh2O fecAoIW7BC7ns5hqCBYnzj6aoH6cX0Co =J9yo -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: simple JSP redirect to another page -- how to deal with relative URLs
I see the problem. You could use absolute paths in jsp includes and the servlet container would understand them as relative to the webapp's root as opposed to the server's root: Say you have this file layout webapp |index.jsp |article1 |index.jsp |article1.html |article2 |index.jsp |article1.html article2/index.jsp could simply have jsp:include file=/article1/article1.html / and it would find article1.html in the article1 folder. --David DIGLLOYD INC wrote: I previously asked about remapping URLs and got some helpful responses. In a nutshell, this was recommended: http://tuckey.org/urlrewrite/ Looks very good for some purposes. But I also want to solve a much simpler problem-- I have a very large amount of static content (articles), with each article in its own directory. A main Table of Contents links to the start page in each directory, which is *not* index.html (eg some-main-page.html). I don't want to rename or change those pages as they have world-wide direct links to them--they have to stay as-is. But I do want to insert an index.jsp page without altering any content. For many of these folders inserting a trival index.jsp solves the index-page problem: %@ include file=the-main-page.html % (though I do wonder if google consider this unacceptable duplicate content) My pages all use relative links eg .., ./, etc. So this works ***when the page being included is in the same directory**. But when the include page is in another directory, none of the relative links work. None of these variants do the right thing; any referenced images cannot be found. %@ include file=../ReviewInfo.html % jsp:include file=../ReviewInfo.html % jsp:forward page=../some-other-page.html / The jsp:forward directive seems perfect, but the flaw of not changing the current location (eg no cd is done first) makes it useless for this purpose. Or does it? Is there something I'm missing here? Alternately, is there some other trivial solution? URL-rewriting is not appropriate in this case; there is no particular pattern, just a fair number of specific cases. I was hoping for a simple 1-line index.jsp in each directory. Lloyd Lloyd Chambers http://diglloyd.com [Mac OS X 10.5.2 Intel, Tomcat 6.0.16] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: simple JSP redirect to another page -- how to deal with relative URLs
Never mind .. I saw your other responses and the best solution is the redirect option. After following the redirect, the browser will have the correct URL for calculating the full url of each of the page's resources. --David David Smith wrote: I see the problem. You could use absolute paths in jsp includes and the servlet container would understand them as relative to the webapp's root as opposed to the server's root: Say you have this file layout webapp |index.jsp |article1 |index.jsp |article1.html |article2 |index.jsp |article1.html article2/index.jsp could simply have jsp:include file=/article1/article1.html / and it would find article1.html in the article1 folder. --David DIGLLOYD INC wrote: I previously asked about remapping URLs and got some helpful responses. In a nutshell, this was recommended: http://tuckey.org/urlrewrite/ Looks very good for some purposes. But I also want to solve a much simpler problem-- I have a very large amount of static content (articles), with each article in its own directory. A main Table of Contents links to the start page in each directory, which is *not* index.html (eg some-main-page.html). I don't want to rename or change those pages as they have world-wide direct links to them--they have to stay as-is. But I do want to insert an index.jsp page without altering any content. For many of these folders inserting a trival index.jsp solves the index-page problem: %@ include file=the-main-page.html % (though I do wonder if google consider this unacceptable duplicate content) My pages all use relative links eg .., ./, etc. So this works ***when the page being included is in the same directory**. But when the include page is in another directory, none of the relative links work. None of these variants do the right thing; any referenced images cannot be found. %@ include file=../ReviewInfo.html % jsp:include file=../ReviewInfo.html % jsp:forward page=../some-other-page.html / The jsp:forward directive seems perfect, but the flaw of not changing the current location (eg no cd is done first) makes it useless for this purpose. Or does it? Is there something I'm missing here? Alternately, is there some other trivial solution? URL-rewriting is not appropriate in this case; there is no particular pattern, just a fair number of specific cases. I was hoping for a simple 1-line index.jsp in each directory. Lloyd Lloyd Chambers http://diglloyd.com [Mac OS X 10.5.2 Intel, Tomcat 6.0.16] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Datasource and Hibernate
You've been answered. Please take a look at my and Mark's responses. If you can't find them in your email, take a look at the list archives. --David Dubois, Fabien wrote: Hi everybody, I'm using tomcat6 and trying to use datasource for mysql connexion (and hibernate). I have looked to the tomcat 6 official documentation, and in the $CATALINA_HOME/conf/context.xml, i have declared : Context path=/appWicket reloadable=true Resource name=jdbc/hibernate auth=Container type=javax.sql.DataSource description=DB Connection driverClass=com.mysql.jdbc.Driver jdbcUrl=jdbc:mysql://localhost:3306/opensource?autoReconnect=true user=root password=/ /Context In my hibernate.cfg.xml, I have done this (add the first line, to replace the commented lines): session-factory name=appWicketSession property name=connection.datasourcejava:comp/env/jdbc/hibernate/property !--property name=hibernate.connection.driver_classorg.gjt.mm.mysql.Driver/proper ty-- !--property name=hibernate.connection.passwordadmin/property-- !--property name=hibernate.connection.urljdbc:mysql://localhost:3306/opensource/ property-- !--property name=hibernate.connection.username/property-- property name=bytecode.use_reflection_optimizerfalse/property property name=c3p0.max_size5/property property name=c3p0.min_size3/property property name=c3p0.timeout1800/property property name=current_session_context_classthread/property property name=dialectorg.hibernate.dialect.MySQLDialect/property property name=format_sqltrue/property property name=show_sqltrue/property When I try to launch the application, an error appears : INFO [http-8080-1] (NamingHelper.java:26) - JNDI InitialContext properties:{} INFO [http-8080-1] (DatasourceConnectionProvider.java:61) - Using datasource: java:comp/env/jdbc/hibernate WARN [http-8080-1] (SettingsFactory.java:117) - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSo urce.java:1150) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourc e.java:880) at org.hibernate.connection.DatasourceConnectionProvider.getConnection(Data sourceConnectionProvider.java:69) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1 292) at com.mycompany.hibernate.HibernateUtil.clinit(Unknown Source) at com.mycompany.hibernate.GestionBDD.selectQuery(Unknown Source) at com.mycompany.middleware.CDataFromBDD.getListDomaine(Unknown Source) at com.mycompany.commun.PanelTreeView.init(Unknown Source) at com.mycompany.HomePage.initPanels(Unknown Source) at com.mycompany.HomePage.init(Unknown Source) 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:513) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory. java:149) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory. java:58) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget .newPage(BookmarkablePageRequestTarget.java:262) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget .getPage(BookmarkablePageRequestTarget.java:283) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget .processEvents(BookmarkablePageRequestTarget.java:210) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(Ab stractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java :1166) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363 ) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java: 194) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:235) at
Re: How do I co-exist both tomcat and java in one windows machine?
Tomcat requires java. There's never been a problem with them on the same box. Can you be a little more specific on what you're asking? --David Nix Hanwei wrote: Hi Gurus, How do I co-exist both tomcat and java in one windows server? Thanks in advance. __ Tired of visiting multiple sites for showtimes? Yahoo! Movies is all you need http://sg.movies.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I co-exist both tomcat and java in one windows machine?
The JDKs are no problem -- they just get installed each in their own directory. The tomcat's can also be installed each in their own directory. You'll have to modify the server.xml of each to make sure there are no conflicts in the shutdown ports or any of the connetors. I'm going to venture a guess you are really considering these as services. In that case, you'll want to get the .zip download of tomcat for installation instead of the .exe installer version. It includes service.bat which you should take a look at for installing each as a service. If you aren't interested in installing them as services, you should be able to modify startup.bat and shutdown.bat in each to use the correct jdk. You'll have to post what web server (IIS or Apache Httpd) you are using jk with for info on that. From the tomcat end, part of making sure there aren't any port conflicts is to make sure each tomcat's AJP connector is on a different port. From the IIS or Apache Httpd end, it's just a matter of defining each in the jk config and then mounting url patterns to go to the appropriate jk connection. --David Nix Hanwei wrote: Thanks. I'm trying to install tomcat 5.0 and tomcat 6.0 and java 1.4 and java 1.6 in a box. How do I define CATALINA_HOME and JAVA_HOME and jk connector for each tomcat? - Original Message From: David Smith [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, 23 April 2008 5:42:59 Subject: Re: How do I co-exist both tomcat and java in one windows machine? Tomcat requires java. There's never been a problem with them on the same box. Can you be a little more specific on what you're asking? --David Nix Hanwei wrote: Hi Gurus, How do I co-exist both tomcat and java in one windows server? Thanks in advance. __ Tired of visiting multiple sites for showtimes? Yahoo! Movies is all you need http://sg.movies.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Tired of visiting multiple sites for showtimes? Yahoo! Movies is all you need http://sg.movies.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Datasource
What is in tomat's lib directory? And what's in the resource-ref ... /resource-ref section of your web.xml? Commenting on your resource definition below, remove autoReconnect=true as it's not recommended by the mysql folks. Add validationQuery=select 1 to have the pool test connections on borrow. This works a *lot* better than the autoReconnect parameter. In general your error Cannot create JDBC driver of class '' for connect URL 'null' generally means there's some misconfiguration in either your context xml file (maybe the one you have below isn't being used?) or WEB-INF/web.xml file. --David Fabien D. wrote: Hi everybody, I'm using tomcat6 and trying to use datasource for mysql connexion (and hibernate). I have looked to the tomcat 6 official documentation, and in the $CATALINA_HOME/conf/context.xml, i have declared : Context path=/appWicket reloadable=true Resource name=jdbc/hibernate auth=Container type=javax.sql.DataSource description=DB Connection driverClass=com.mysql.jdbc.Driver jdbcUrl=jdbc:mysql://localhost:3306/opensource?autoReconnect=true user=root password=/ /Context In my hibernate.cfg.xml, I have done this (add the first line, to replace the commented lines): session-factory name=appWicketSession property name=connection.datasourcejava:comp/env/jdbc/hibernate/property !--property name=hibernate.connection.driver_classorg.gjt.mm.mysql.Driver/property-- !--property name=hibernate.connection.passwordadmin/property-- !--property name=hibernate.connection.urljdbc:mysql://localhost:3306/opensource/property-- !--property name=hibernate.connection.username/property-- property name=bytecode.use_reflection_optimizerfalse/property property name=c3p0.max_size5/property property name=c3p0.min_size3/property property name=c3p0.timeout1800/property property name=current_session_context_classthread/property property name=dialectorg.hibernate.dialect.MySQLDialect/property property name=format_sqltrue/property property name=show_sqltrue/property When I try to launch the application, an error appears : INFO [http-8080-1] (NamingHelper.java:26) - JNDI InitialContext properties:{} INFO [http-8080-1] (DatasourceConnectionProvider.java:61) - Using datasource: java:comp/env/jdbc/hibernate WARN [http-8080-1] (SettingsFactory.java:117) - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292) at com.mycompany.hibernate.HibernateUtil.clinit(Unknown Source) at com.mycompany.hibernate.GestionBDD.selectQuery(Unknown Source) at com.mycompany.middleware.CDataFromBDD.getListDomaine(Unknown Source) at com.mycompany.commun.PanelTreeView.init(Unknown Source) at com.mycompany.HomePage.initPanels(Unknown Source) at com.mycompany.HomePage.init(Unknown Source) 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 org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:149) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:262) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at
Re: Access SQL Server 2005 and 2000 on same machine
Ok... how do you get two services on the same port? Are they bound to different IPs? They can't both respond on the same address and port. --David Alexander Diedler wrote: Hello, We have installed a SQL 2000 and SQL 2005 Server Express on the same server and same Port (1433) Now we have no chance to tell the Tomcat in Conf Directory, which SQL Server Version and Database has to be choosen for the Application. I know, that there are Instance Names like 127.0.0.1\sqlexpress or 127.0.0.1\default but how use it in Tomcat 6.0.14 on Windows 2003 Server? Here a Example from /conf/Catalina/localhost/root.xml Resource name=jdbc/jTDS auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=sa password=xxx removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true driverClassName=net.sourceforge.jtds.jdbc.Driver url=jdbc:jtds:sqlserver://testsqlserver:1433/tecracer4;charset=Cp1252 / - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Directories in Tomcat 5.5\temp
I *think* the antiResourceLocking in tomcat may cause this if configured in your Context ... element. Those with better knowledge might want to comment further. Last I know the webapp is copied/expanded to either temp or work when it's enabled. --David hezjing wrote: Hi Chuck Hmmm ... I don't think my web application is explicitly writting anything into the directory. When I look further into these directories, they contain the same (and only) JAR files of my web application, e.g. Tomcat 5.5\temp\0-myapp\WEB-INF\lib\*.jar Tomcat 5.5\temp\1-myapp\WEB-INF\lib\*.jar On Tue, Apr 22, 2008 at 11:09 PM, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: hezjing [mailto:[EMAIL PROTECTED] Subject: Directories in Tomcat 5.5\temp Can anyone explaines why these directories are created? Your webapps are creating them. and why these directories are not being clean-up by Tomcat? Tomcat merely provides the workspace for the webapps; usage of it, including any desired cleanup, is up to the webapps. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't hit tomcat by real IPAddress or Hostname
If I had to hazard a guess, a firewall is in the way. Can you say more about your network topology? From where are you attempting to connect and what's between the client and the server? Lastly, do you have an address attribute in the connector for port 4949 in your server.xml? --David [EMAIL PROTECTED] wrote: Here's the situation: - I can hit Tomcat 6 using http://localhost:4949 - I can hit Tomcat 6 using http://127.0.0.1:4949 - I CAN'T hit Tomcat using my real IP Address http://1xx.189.130.51:4949 or by using the machine's hostname. I had no problem doing this with Tomcat 5x. What would cause this? Thanks. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: first authentication attempt fails - mysql timeout
The DatasourceRealm will work. Drop the autoReconnect parameter from the database url though as it's not recommended by the MySQL folks. Instead, add a validationQuery to your ResourceParams so database connections are tested briefly before they are borrowed from the pool. The query can be as simple as 'select 1'. Also if the Resource you are trying to use with the Datasource realm is not a global resource, you'll probably need to add localDataSource=true to the Realm ... / definition. See the docs at http://tomcat.apache.org/tomcat-4.1-doc/realm-howto.html#DataSourceRealm and http://tomcat.apache.org/tomcat-4.1-doc/jndi-datasource-examples-howto.html Info regarding autoReconnect can be found at http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html (version 5.0 -- you didn't specify mysql version) -David Robert Jacobson wrote: Hi, I have an existing Tomcat configuration that is working well. However, it is running version 4.1.31. We are updating the platform, so I thought I'd take the opportunity to update Tomcat. Unfortunately (??) I must stick with the Tomcat 4.1 release. I have a test machine on which I have installed 4.1.37. I only had one issue with the upgrade -- the authentication was not working quite as well as it was before. While it worked, I had one issue -- when the mysql connection would timeout (after 8 hours by default), the authentication would stop working completely. With tomcat 4.1.31, there would be an exception w/ stack trace, but it would reconnect and work right away. I was authenticating using a mysql database through the JDBCRealm. I found some posts in the archives ( http://www.mail-archive.com/[EMAIL PROTECTED]/msg149130.html) indicating that switching from the JDBCRealm to DataSourceRealm would resolve the issue, so I have done so. In the process I also added the autoReconnect parameter to the connection URL (i.e. jdbc:mysql://localhost:3325/authority?autoReconnect=true ) I suppose I should note that my configuration is now essentially straight out of the JNDI datasource HOWTO. I of course changed the username password, the port number, and the database name. I have authentication working with the new configuration. However, after a mysql connection timeout, the first attempt to authenticate always fails. The second attempt is successful. Is there a way to fix this problem? Thanks for your time. -- David Smith Network Operations Supervisor Department of Entomology Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: (607) 255-9571 Fax: (607) 255-0940 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cookie-less session tracking - whats are the downsides
The man in the middle attack you describe below is one possible issue. However it's easy to capture cookies and provide those in an attack. An effective hacker is going to be able to look exactly like the client on an unencrypted connection. URL encoded sessonIds can cause headaches if you a proxy in the middle strip off the sessionIds on the way through or if the search bots suck up URLs with sessonIds. If your app can effectively handle those cases, I don't see a downside. --David mfs wrote: Guys, I would want to know the downsides to using cookie-less sessions ? I want to give my client the freedom to disable cookies on the browser if he chooses to, but i would want to know the implications to that ? Some say, exposing your sessionId in the url exposes it to hackers who can spoof the IP (as of the victim) and provide the jsessionId (in the url) and can gain control of the victim's session, but if u are using ssl, that shouldnt be an issue. Would someone comment on the real hazards/bottlenecks to the cookie-less approach. Thanks in advance and Regards, Farhan. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WAR created on tomcat 6.0 -Executed on Tomcat 5.5
I've never had standard.jar or jstl.jar anywhere except the webapp's WEB-INF/lib folder so it's hard to say what tomat will do with that. You may have to declare the taglibs in WEB-INF/web.xml when done that way. Also what is the necessary folders you installed the jars in? --David Computerjuice wrote: I've just looked at the netbean tutorial(http://www.netbeans.org/kb/55/mysql-webapp.html#getting) that was used as the basis for my application. It was for use with netbeans 5.5, which was bundled with Tomcat 5.5.17 I think. So going by what you have already said, my WAR file is unlikely to contain features of 2.5. I know someone suggested I download ensure package the .jar files. But even if these files did not get packed into my WAR i remember explicitly installing these files into necessary folders on the my server space. This was done by suggestion of the host company. But still the JSTL tags were displayed with no apparent connection to the database. There must be a problem with the website Host. Thank you to all that replied Hassan Schroeder-2 wrote: On Wed, Apr 16, 2008 at 4:59 PM, Computerjuice [EMAIL PROTECTED] wrote: So aside form installing Tomcat 6 is there a way round this compatibility issue. ie is there a way that a Tomcat 6.0 WAR could be made to function in tomcat 5.5. That depends on whether your app depends on features of the 2.5 servlet spec, or can run on 2.4. Which is another way of putting my previous, unanswered, question :-) -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is Connection Pooling still necessary?
Pooling still makes sense although in modern servlet containers it's provided. Outside the JVM, there's the overhead of making the connection and authenticating that can eat up significant amounts of time in busy sites with large numbers of queries to the db. Those costs are completely outside the JVM and would occur in stuff built with any of the other languages. Overall, do some performance testing on your webapp. If it's need of a database is so low that connections timeout and get recycled between borrows from the pool, you probably could get away with out the pooling. --David Jonathan Mast wrote: I'm developing a webapp that is going to be making frequent DB operations. I know that DB connections are expensive and that developers pool connections to prevent the overhead of frequent instantiation. Is this design pattern still necessary? I ask because I vaguely recall skimming over an article that stated that this design pattern is not needed anymore with newer versions of Java. Currently, our webapps make infrequent calls to our database and as such I simply use a static getConnection() method to create new Connections, which I explicitly close at the end of their use. I realize that our setup, Tomcat 5.5 on Java 1.4.2, will almost certainly require connection pooling. But does newer versions of Java obviate this need? Any pointers to relevant (ie. JDK 1.4.2) tutorials on this topic would be greatly appreciated. Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: changing webapps path
Andre Hübner wrote: Hi List, i use tomcat 5.5.26 on Suse Linux 10.1 Tomcat is installed in /usr/share/tomcat5 Newly created webapps are created in /usr/share/tomcat5/webapps Now i want to change this Path for new uploaded webapps. I could make symlink to folder i want but i think there must be a cleaner way. I read of parameter workDir in a tutorial but cannot find this in admin-application. Is this changeable for user over admin/manager or an other conf-setting? Please give me a little hint. Thank you Andre If you are doing this on a singular webapp basis, you could set the docBase of your webapp's Context ... element. If you'd like all webapp's for a host to be stored in a different place, you could set the appBase attribute of the respective Host ... element in server.xml. --David - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WAR created on tomcat 6.0 -Executed on Tomcat 5.5
Check your war file for the existence of standard.jar and jstl.jar in WEB-INF/lib. I'll bet at least standard.jar is missing if not both of them. --David Computerjuice wrote: I have developed a web application using netbeans and Tomcat 6.0. I have deplyed the resulting WAR file to a website Host server that is running Tomcat 5.5. However the JSTL tags are displayed instead of the exposing the database contents. The application uses a connection pool to connect to the database. Yes my code works fine because it all worked in the development environment. Now for my question, is there compatibility between tomcat 5.5 and tomcat 6.0? Development Tools: Netbeans: 6.0 Tomcat: 6.0.14 Java: JSE 6 Ant: 1.7.0 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ROOT as 'ROOTORIG'
Just took a quick look at the default ROOT page as it comes with tomcat 6.0.14 and it uses page relative link 'manager/html' instead of a server relative '/manager/html'. I'm hazarding a guess this is a very minor cosmetic bug in tomcat as I can't think of a single reason to use a page relative link. It's just worked like that for a long time because almost nobody has ever move the original ROOT webapp to a different context and continued to use it. --David karthikn wrote: Hi ROOT_orig? What happens if you reference what you actually named it as? Ok Am sorry ...( I rename the ROOT as ROOT_orig and NOT 'ROOTORIG' but still the Browser status is HTTP Status 404 - /ROOT_orig/manager/html Why ? with regards Karthik Caldarale, Charles R wrote: From: karthikn [mailto:[EMAIL PROTECTED] Subject: Re: ROOT as 'ROOTORIG' On Renaming the ROOT as 'ROOTORIG' , got Http 404 error for the Manager or admin set of pages HTTP Status 404 - /ROOT_orig/manager/html If you renamed ROOT to ROOTORIG, why did you try to reference it as ROOT_orig? What happens if you reference what you actually named it as? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ROOT as 'ROOTORIG'
The short of the issue is it's not the OP's fault -- 'tis a bug in the ROOT webapp as provided by Tomcat. I see Mark has fixed in the trunk and it should be in the next release. Thank you Mark! --David Felix Schumacher wrote: Am Montag, den 14.04.2008, 23:16 +0530 schrieb karthikn: Hi ROOT_orig? What happens if you reference what you actually named it as? Ok Am sorry ...( I rename the ROOT as ROOT_orig and NOT 'ROOTORIG' but still the Browser status is HTTP Status 404 - /ROOT_orig/manager/html Are you sure, that manager is in ROOT? The normal manager application has its own context. You will have to find that and rename it. But I am not sure, that you can rename it to ROOT_orig/manager. Bye Felix Why ? with regards Karthik Caldarale, Charles R wrote: From: karthikn [mailto:[EMAIL PROTECTED] Subject: Re: ROOT as 'ROOTORIG' On Renaming the ROOT as 'ROOTORIG' , got Http 404 error for the Manager or admin set of pages HTTP Status 404 - /ROOT_orig/manager/html If you renamed ROOT to ROOTORIG, why did you try to reference it as ROOT_orig? What happens if you reference what you actually named it as? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classpath Problem
What I thought ... you can't have appBase from the Host element the same as the docBase for your webapp. Make the appBase something else ... anything else. It could be an empty directory. It won't matter as long as it isn't the same as the path of your webapp. Also it's been recommended for many years now not to put Context ... / elements in the server.xml. They should each be in their own xml file stored under conf/Catalina/DOMAIN_WITHOUT_WWW in your case with the file named after the context path. Your first app below would be named ROOT.xml and it would contain the following: Context reloadable=true docBase=/home/sttpwcm/public_html debug=1 Resource name=jdbc/sttp auth=Container type=javax.sql.DataSource maxActive=4 maxIdle=30 maxWait=8000 username=USERNAME password=PASSWORD driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost/DATABASE?autoReconnect=true/Resource /Context Note I dropped the path attribute from your Context ... element. That's because the path is really specified by the name of the file, ROOT which is a special name to tomcat meaning path= --David OpenP2M Open wrote: Hi, This is the Host of the domain with the problem Host name=DOMAIN_WITHOUT_WWW appBase=/home/sttpwcm/public_html AliasDOMAIN_WITH_WWW/Alias Context path= reloadable=true docBase=/home/sttpwcm/public_html debug=1 Resource name=jdbc/sttp auth=Container type=javax.sql.DataSource maxActive=4 maxIdle=30 maxWait=8000 username=USERNAME password=PASSWORD driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost/DATABASE?autoReconnect=true/Resource /Context Context path=/manager debug=0 privileged=true docBase=/usr/local/jakarta/tomcat/server/webapps/manager /Context /Host Thank you 2008/4/10, David Smith [EMAIL PROTECTED]: Could you post the Host element of your server.xml? I know people have had this problem and solved it in the past, but it's been a while. --David OpenP2M Open wrote: Hi, I'm migrating an application from one server to another. On the old server the application runs perfectly, but on the new one I'm getting this message of error only on the .jsp that are in subfolders (when I move then to root folder they run ok): An error occurred at line: 8 in the generated java fileOnly a type can be imported. glauber.banco.Filter resolves to a package The .jsp's that are on /public_html run ok When I create a subforlder and put the same .jsps they get that error message above. I'm thinking the root folder has a different classpath than the subfolders... Does anyone know what is the problem and how to fix? Thank You Glauber - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Perl CGI setup
I know at least Chuck has already responded, but it may need to be emphasized even more. Tomcat will not allow clients to directly request _ANYTHING_ from the WEB-INF directory. This is per the servlet spec. --David Shabu Khan wrote: Thanks Charles. I put it back: servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi/*/url-pattern /servlet-mapping and restarted tomcat, we are still back to the same problem. http://myhost:8080/WEB-INF/cgi/web_xml_mon.pl?qa-1 returns - HTTP Status 404 - /WEB-INF/cgi/web_xml_mon.pl type Status report message /WEB-INF/cgi/web_xml_mon.pl description The requested resource (/WEB-INF/cgi/web_xml_mon.pl) is not available. Apache Tomcat/4.1.37-LE-jdk1.4 - On Fri, Apr 11, 2008 at 12:39 PM, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Shabu Khan [mailto:[EMAIL PROTECTED] Subject: Re: Perl CGI setup if my scripts/configs are in $CATALINA_HOME/webapps/ROOT/WEB-INF/cgi directory, what should the url-pattern be? http://myhostname.FQDN:8080/WEB-INF/cgi/web_xml_mon.pl?qa-1 Your url-pattern is fine - all that does is select the servlet to pass the request to. It's the URL you're using that's broken. Just take out the /WEB-INF and leave the rest as is. TGIF - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsvc creates pid file owned by root
Well ... here's the problem. jsvc needs that pid file to shutdown tomcat. It would be a real PITA if some user or script were to muck around and damage or delete that file. Having said that, most *nix systems have a sticky bit ability to force permissions on newly created files in specific folders. Or you could modify your service script to chmod the pid file on startup. --David Gunnar Boström wrote: Hi, I can start and stop Tomcat 5.5 with the jsvc program but the problem is that the pid file is created with permissions 600 and owned by root. I want to be able to read the pid file to check if the Tomcat process is up and running and also for other purposes. Is it possible to make the pid file be owned by the user that runs Tomcat or have the permissions to be set to 666? Regards Gunnar - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat not recompiling new jsp in development mode
Next time, take a look at the timestamp on the files in work/catalina/localhost/* and compare them to the timestamp on the jsps. I'll bet your transfer client is setting the timestamp on your jsps and the local machine's time isn't in sync with the remote server's. When the remote server compiles the jsp, the timestamp on the resulting .java and .class files are set to the remote server's system time. --David Mohamed King wrote: Guys, Any idea why a new version of my jsp is not compiled and changes shown. Tomcat is running in development mode and the time on the new jsp is later than the previous. I manually have to delete the tomcat_home/work/catalina/localhost directory and restart for changes to go into effect. It is my understanding I should not have to do this if tomcat is running in development mode. What am I doing wrong. Thank you, Mohamed King eApps Hosting - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can Tomcat set its pid in a file?
You could use jsvc instead of the shell scripts. --David fredk2 wrote: Hi, Currently the pid file is set when you run catalina.sh (unix/linux) if [ ! -z $CATALINA_PID ]; then echo $! $CATALINA_PID fi In some situation (when using sudo, su, catalina.out piped to a log rotation program) it is harder and possibly prone to error to get the right pid - $! might not be the pid of the JVM. Apache httpd sets the pid file and cleans it up Is there a simple way/sample to have Tomcat set the pid file during its bootstrap and not the startup shell script ? Rgds Fred - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Manager page won't load
That's a question for your logs. If the logs don't help, is there a core dump hanging around indicating the JVM crashed? --David Gary Opela (Corporate) wrote: Update on this: I uninstalled tomcat, and remedy (mid-tier), rebooted. Next, I installed tomcat 5.5 from the apache.org download. Tested, and tomcat worked great! Then, I re-installed remedy (mid-tier/web-tier) and now tomcat stopped working. By stopped working, I meant my manager page won't load again. What would installing a web application do that would break tomcat? Thanks, Gary Opela, Jr., RSP Remedy Engineer Leader Communications, Inc. Best Product, Best People, Best PriceTM An ISO 9001:2000 Certified, CMMI® Level 3 Rated Company -Original Message- From: Gary Opela (Corporate) [mailto:[EMAIL PROTECTED] Sent: Thursday, April 10, 2008 1:15 PM To: Tomcat Users List Subject: RE: Tomcat Manager page won't load Localhost:80 works, localhost:8080 does not. Awesome page: http://neosmart.net/blog/2006/configuring-jsp-for-iis/ I followed advice there, and of course, had to alter some stuff to update the paths in the conf files, but still no luck. I am not using neosmart, I'm using a 3rd party application called Remedy. Remedy had a workers.properties.minimal file, so I edited the isapie_redirect.properties file to reference the workers.properties.minimal file instead of the workers.properties file. I also had to edit some lines to point to the home path of my jvm.dll, which for some reason is: C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector instead of C:\Program Files\Apache Software Foundation\Tomcat-5.5.17 I did go in and change everything over to reference C:\Program Files\Apache Software Foundation\Tomcat-5.5.17, but it still didn't work. I am now going to un-install Tomcat, then re-install it from the download from apache's site, instead of letting the 3rd party application install it. Thanks, Gary Opela, Jr., RSP Remedy Engineer Leader Communications, Inc. Best Product, Best People, Best PriceTM An ISO 9001:2000 Certified, CMMI® Level 3 Rated Company -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, April 10, 2008 11:49 AM To: Tomcat Users List Subject: Re: Tomcat Manager page won't load Hi Gary- so if port 80 is ok in other words http://localhost:80 Browser shows ok and none of the other configurations work you might have a misconfiguration with workers.properties Start here for configuring Tomcat redirect capability with IIS Webserver http://neosmart.net/blog/2006/configuring-jsp-for-iis/ Then finetune the connector capability via Tomcats workers.properties with this article http://tomcat.apache.org/connectors-doc/reference/iis.html Mladen Turk's article is a good primer on when to use LoadBalancer to overcome IIS built-in connection restrictions http://people.apache.org/~mturk/docs/article/ftwai.html HTH Martin- - Original Message - From: Gary Opela (Corporate) [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, April 10, 2008 11:37 AM Subject: RE: Tomcat Manager page won't load Is there a way to change it after install? I had no control over the install, as my 3rd party application installed it for me. Thanks, Gary Opela, Jr., RSP Remedy Engineer Leader Communications, Inc. Best Product, Best People, Best PriceTM An ISO 9001:2000 Certified, CMMI® Level 3 Rated Company -Original Message- From: Nuno Manuel Martins [mailto:[EMAIL PROTECTED] Sent: Thursday, April 10, 2008 10:28 AM To: Tomcat Users List Subject: RE: Tomcat Manager page won't load Did you put your connector on port 80? By default it is on port 8080 so the correct address would be http://localhost:8080 -Original Message- From: Gary Opela (Corporate) [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 10 de Abril de 2008 16:20 To: users@tomcat.apache.org Subject: Tomcat Manager page won't load Environment: Windows Server 2k3 R2 EE Apache Tomcat 5.5.17 installed in: C:\Program Files\Apache Software Foundation\Tomcat-5.5.17 Microsoft IIS 6.0 IE 6.0.X.X SP2 Java: C:\Program Files\Java\jre1.6.0_05 C:\Program Files\Java\jdk1.6.0_05 Whenever I go to Start - All Programs - Apache 5.5, none of the webpages under that folder will load. I just get The Page Cannot be Displayed error message in the window, with the title bar saying Cannot Find Server - Microsoft Internet Explorer I have a 3rd party application that uses IIS6 and Tomcat 5.5 (which it installs Tomcat during the installation of the 3rd party product) to serve up its website built on jsp pages. Nothing will work. None of the jsp pages will load or anything. I'm not really sure where to start at, but I've looked several places on the internet. I set a JAVA_HOME = C:\Program Files\Java\jre1.6.0_05 and a CATALINA_HOME = C:\Program Files\Apache Software Foundation\Tomcat-5.5.17. Also, in IIS, I right-click on Default
Re: Classpath Problem
Could you post the Host element of your server.xml? I know people have had this problem and solved it in the past, but it's been a while. --David OpenP2M Open wrote: Hi, I'm migrating an application from one server to another. On the old server the application runs perfectly, but on the new one I'm getting this message of error only on the .jsp that are in subfolders (when I move then to root folder they run ok): An error occurred at line: 8 in the generated java fileOnly a type can be imported. glauber.banco.Filter resolves to a package The .jsp's that are on /public_html run ok When I create a subforlder and put the same .jsps they get that error message above. I'm thinking the root folder has a different classpath than the subfolders... Does anyone know what is the problem and how to fix? Thank You Glauber - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet Concurrency problem
I'm guessing these requests are from the same browser. The browser limits the number of connections it makes to the server to 2. If you really need more, google for hacks to the browser to allow more. --David davilovick wrote: Hi, we are trying to develop a servlet, but ive encountered some problems with the concurrency. The problem is that only 2 HttpRequest is dispatched at the same time. the doPost body is the following: code protected void doGet(HttpServletRequest request, HttpServletResponse response) { System.out.println(START); try { Thread.sleep(5000); } catch (InterruptedException e) {e.printStackTrace();} response.getWriter().write(Hello World!!); System.out.println(END); } /code The request is waiting for 5 seconds, and later, return Hello World! In our tests, when i launch 4 request, only 2 is running at the same time, and when the first finiched, the third request is proccesed.. ¿How can I solv this problem? PD: Sorry, im Spanish, and my English is not well. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.x or 6.x: ROOT limitation removed?
As you've set it up below, your webapp, one2team will be deployed twice. Once as ROOT and once as one2team. If I were in your shoes, I would create a folder right next to webapps and name it mywebapps or something. Name isn't all that important. Then move the one2team webapp in that folder and modify your ROOT.xml below, pointing it's docbase to the new location for one2team. Anything in webapps will auto-deploy with it's path = the folder name under webapps as long as your Host .. element has it as it's appBase pointed there. Also I wouldn't lie about the appBase -- just point it to a real, empty folder. In my suggestion above, it's still pointed to webapps even though there's nothing there. --David Francis Galiegue wrote: 2008/4/9, Caldarale, Charles R [EMAIL PROTECTED]: [...] I've had no problems with 5.0, 5.5, and 6.0 in using a ROOT.xml file in conf/Catalina/[host] containing a Context element with an absolute docBase attribute pointing to the location of the webapp. You must not use a path attribute, and you must delete the ROOT directory under the Host appBase, if there is one. Well, this doesn't work for me :( Here is what I try in the server.xml: Server port=8005 shutdown=SHUTDOWN Service name=Catalina Connector port=8009 protocol=AJP/1.3 enableLookups=false URIEncoding=UTF-8 maxProcessors=0/ Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps autoDeploy=false deployXML=false unpackWARs=false/ /Engine /Service /Server And in Catalina/localhost/ROOT.xml: Context docBase=/var/lib/tomcat5/webapps/one2team Valve className=org.apache.catalina.valves.AccessLogValve prefix=tomcat-access suffix=.log rotatable=false pattern=%a (%B bytes/%D msec) %s %r/ Logger className=org.apache.catalina.logger.FileLogger prefix=tomcat-logger suffix=.log verbosity=2 timestamp=false/ /Context As a Context attribute, I've tried no path as you suggested, path=, path=/: no luck, the webapp still deploys as /one2team... Also, if I lie about the appBase in Host, the application isn't found at all (but I guess this was to be expected after all). I've also tried the real appBase, changing the docBase of the Context to one2team: app deploys as /one2team, even though the context file is named ROOT.xml :( - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat cache wierd behaviour
I've seen some transfer clients (like winscp) default to setting the date/time on the remote copy the same as the local. If the local system time isn't in sync with the server, it could cause issues like this. When the jsp is compiled, tomcat uses the server's date, time and time zone. In your specific case, it may be either your local system or the server doesn't have the right time zone or maybe hasn't handled the daylight savings time transition correctly. --David loredana loredana wrote: winscp is a tool...like windows commander or total commander, . is just to view the files in an organized matter. :) i'm sure the problem is not winscp :) - Original Message From: Hassan Schroeder [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, April 8, 2008 5:33:44 PM Subject: Re: tomcat cache wierd behaviour On Tue, Apr 8, 2008 at 7:12 AM, loredana loredana [EMAIL PROTECTED] wrote: I run a date command on the server (which is ubuntu) and got Tue Apr 8 15:50:01 CEST 2008 Using winscp, I see ... So it sounds like your problem is with winscp, whatever that is, not Tomcat :-)Maybe this is a question for the winscp user list? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat cache wierd behaviour
Winscp isn't a command line tool -- it's one of those GUI enabled transfer tools with the split panels. Think of something more along the lines of Explorer or Norton Commander -- the two interfaces styles available from winscp out of the box. By default it set's the date/time of the recently sent file to the client's date/time so it can implement a synchronize feature. I changed the settings in mine to prevent this because my server time would float a little between ntp updates. Tomcat wouldn't see the updates until a couple of minutes after I uploaded them. Issues of times on the remote system being off by an hour are discussed on the winscp website (as the OP described in his example in the original post): http://winscp.net/eng/docs/timestamp The setting to preserve timestamps on uploads can be changed: http://winscp.net/eng/docs/ui_copy -- here you can see the checkbox labeled Preserve timestamp in the screenshot, far right side under 'Attributes'. --David Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, David Smith wrote: | I've seen some transfer clients (like winscp) default to setting the | date/time on the remote copy the same as the local. If 'winscp' acts anything like UNIX scp, then the default mode is to set the modification time on the destination to the destination's current date (basically, 'touch' the file upon creation). The -p switch allows you to preserve the existing modification time of the source file, so that the destination matches the source after the copy. It's unclear how different time zones are handled. I would check to see what 'winscp' does by default. You probably want any files you copy to your server to be date-stamped with the current date on the server, rather than preserving the source file's modification time. The OP never mentioned what the timezone was on the source machine, only the destination (CEST, UTC +2). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf7xUUACgkQ9CaO5/Lv0PCT8gCggO1z8trzf40N1YNbgAgy0cUP SjkAoJqJiFYvg56JthbKEkFihH3LARPq =LrfO -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to change default port 8080 in TomCat ?
All sarcasm aside, take a look at the Connector ... / elements in conf/server.xml. Change the port attribute to the port number you want to use. You didn't specify the tomcat version you are using. Here's the docs for tomcat 6.0's HTTP connector: http://tomcat.apache.org/tomcat-6.0-doc/config/http.html If this isn't the version of tomcat you are using, browse the docs for your version. You could also do something as simple as googling 'Connector site:tomcat.apache.org' to get where you need to be. --David Ben Stover wrote: Hi, If I want to change the default port 8080 where TomCat is listening to another port (e.g. 9955) where can I do this? I gues it must be somewhere in a config xml file. In which exactly? Ben - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: disable jsp cache in tomcat work folder
Normally jsps are monitored for updates and recompile if the date on the jsp is after the date on it's compiled .class file. If you are having trouble with jsps not recompiling after an update, one thing to check is if there is any difference between your system clock and the server's clock. If that's the case, the new jsps will eventually compile, just not till the server catches up with your system clock. Outside of that, I think you need to have a chat with your server admin regarding tomcat's config. --David loredana loredana wrote: Long story short, as everyone know, jsp files are cached in the work folder of tomcat. If I modify something in the jsp, I can't see the difference unless I delete the files under work folder. My problem is that I don't have rights/access to delete files under that folder. Is there any other way I can delete those files or tell tomcat not to cache files anymore? I tried restarting tocmat after I made a change in the jsp, I still see the old one, I read about the reload=true suggestion but I don't have any context tag in the server.xml. Anyone can give me any other suggestions on this issue? 10x a lot in advance You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml pbm
and where is this web.xml file stored? It has to be in your webapp's WEB-INF (note all CAPS) folder per the servlet specification. --David supareno wrote: hello, my config is: tomcat 5.5.9 jdk 6 linux ubuntu eclipse 3.2 ant 1.7.0 i write a build.xml file to build and deploy my war. (compilation OK and deployment on the server OK) but, when i try to start it, it starts but when i try to access to it, i'm only seeing the list of the apps prrsents in the webapps folder ! i installed lambda probe on tomcat to see what's going on and: web.xml is not load. the log file is: 4 avr. 2008 13:33:01 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Le fichier web.xml de l'application est absent, utilisation des paramêtres par défaut StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myapp] it's in french so i will translate the message ( :-) ): application web.xml file is not present, using default parameters StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myapp] i don't understand because the web.xml is in the war file !! the web.xml file looks like this one: ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd' web-app servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param load-on-startup2/load-on-startup /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping taglib !-- != taglibs... -- /taglib !-- resource -- resource-ref descriptiondbpool/description res-ref-namejdbc/library/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app the context.xml is in the META-INF folder and probe can see it but cannot see the web.xml file !!! i dont understand why i cannot deploy this application !!! what i did wrong??? regards - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml pbm
That error is different from what you originally posted and implies your webapp is trying to modify the tomcat supplied JNDI name context. That context which houses tomcat container supplied stuff like database pools is read only. ... But that's a different post. Back to the original error -- do you still get errors that it couldn't find web.xml? --David supareno wrote: the web.xml is in the WEB-INF folder when i deploy the war file , the log write this stuff 4 avr. 2008 14:28:33 org.apache.catalina.core.NamingContextListener lifecycleEvent GRAVE: La création du context de nommage (naming context) a échoué : javax.naming.NamingException: Le Contexte est en lecture seule it's always in french so i will translate again: failed to create the naming context: javax.naming.NamingException: the context is read only and where is this web.xml file stored? It has to be in your webapp's WEB-INF (note all CAPS) folder per the servlet specification. --David - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml pbm
Can you expand a copy of your webapp war file and confirm a there is a web.xml file in it? In my experience, the errors generated out of tomcat are usually right on the money, so we should confirm the generated war file really contains a web.xml at WEB-INF/web.xml. --David supareno wrote: David Smith a écrit : That error is different from what you originally posted and implies your webapp is trying to modify the tomcat supplied JNDI name context. That context which houses tomcat container supplied stuff like database pools is read only. ... But that's a different post. Back to the original error -- do you still get errors that it couldn't find web.xml? always the same ! when i use lambda probe, i could see the context with the 'context descriptor' link but i cannot see the 'deployment descriptor'... when i deploy with ant, log is: 4 avr. 2008 14:47:44 org.apache.catalina.startup.HostConfig deployWAR INFO: Déploiement de l'archive myapp.war de l'application web (translation: en = Deploy myapp.war archive from web application) 4 avr. 2008 14:47:44 org.apache.catalina.startup.ContextConfig applicationWebConfig INFO: Le fichier web.xml de l'application est absent, utilisation des paramêtres par défaut StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myapp] (translation: en = the web.xml file is not present, using default parameters) 4 avr. 2008 14:47:44 org.apache.catalina.core.NamingContextListener lifecycleEvent GRAVE: La création du context de nommage (naming context) a échoué : javax.naming.NamingException: Le Contexte est en lecture seule (translation: en = failed on naming context creation: javax.naming.NamingException: the context is read only) --David - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Changing Tomcat Home Page
Remove the ROOT folder and rename MyWebSpace to ROOT. --David Ian Bloggs wrote: I want to change the default home page from /webapps/ROOT to something like /webapps/MyWebSpace. Can anyone advise how I do this please? I'm using Apache Tomcat/6.0.14 (Win32) Regards, Ian __ Sent from Yahoo! Mail. A Smarter Inbox http://uk.docs.yahoo.com/nowyoucan.html - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: where to put config file in a webapp
Caldarale, Charles R wrote: From: Kimberly Begley [mailto:[EMAIL PROTECTED] Subject: where to put config file in a webapp Currently it is in WEB-INF Normally, such a properties or config file would be placed in WEB-INF/classes, and accessed via ServletContext.getResourceAsStream(). If using ServletContext.getResourceAsStream(), the file can be anywhere in the webapp. If using Class.getResourceAsStream(), then it has to be in WEB-INF/classes or in a jar in WEB-INF/lib. I read online that I could put the entry in the web.xml file? See section 4 of the Servlet Spec, in particular the ServletContext.getInitParameter() API, then look at the Tomcat doc for where to set them: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Context%20Pa rameters - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: N00b Installation Question
I'll give you a hint ... case matters. Take a really close look at what you've setup in your web.xml and what you've named your servlet. extenXLSTestbed != ExtenXLSTestbed. --David Lizard Lizard wrote: Greetings! I am trying to setup/configure Tomcat 6.0 under Vista. I am mostly following the examples in the Eclipse Cookbook. Tomcat is running; I get the appropriate startup page when I go to localhost:8080 However, I cannot get my first example to work properly. Here's all of the relevant data: This is the directory structure: C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\VARiskWork\WEB-INF In classes, I have a folder called ExtenXLSTestbed. In that is a file called ServletClass.class. The class is in package ExtenXLSTestbed. Here is my web.xml file, which is located in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\VARiskWork\WEB-INF: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, INc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameExample Application/display-name servlet servlet-nameServlet/servlet-name servlet-classextenXLSTestbed.ServletClass/servlet-class /servlet servlet-mapping servlet-nameServlet/servlet-name url-pattern/ServletClass/url-pattern /servlet-mapping /web-app What am I missing? I'm sure it's painfully obvious, but I've wasted 2 hours now staring at Resource not found and looking for typos/case sensitivity issues. I have tried several variants on the URL, including http://localhost:8080/VARiskWork/extenXLSTestbed.ServletClass and http://localhost:8080/VARiskWork/ServletClass and http://localhost:8080/ServletClass all produce 'resource not found' errors. Thanks in advance for any help. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: N00b Installation Question
In that case, you'll have to take a look at your logs for clues to what's happening. Can you post relevant parts of your logs for when your webapp was started and when you tried to request the servlet? --David Lizard Lizard wrote: On Wed, Apr 2, 2008 at 12:06 PM, David Smith [EMAIL PROTECTED] wrote: I'll give you a hint ... case matters. Take a really close look at what you've setup in your web.xml and what you've named your servlet. extenXLSTestbed != ExtenXLSTestbed. I double-checked; the typo was in my post to this list. :) The case is always lower case. Here's the exact declaration from the Java file: package extenXLSTestbed; - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: parsing of .jsp not functional
It would seem your request for file.jsp is not being routed through mod_jk and is hitting a local file.jsp in your httpd site. Where is the errant file.jsp located? Does tomcat show any log messages for the moment in time when page is requested? Anything in your httpd logs regarding the request? --David Andre Hübner wrote: Hi List, i have a Problem with parsing .jsp Files using Apache/mod_jk My Setup: Apache 2.2.8 mod_jk 1.2.26 Tomcat 5.5.26 on Suse Linux 10.1 Tomcat/Apache is up and running, on TomcatPort i can parse .jsp files domain.com:8080/file.jsp is working but domain.com/file.jsp is not and i dont know how. This is my mod_jk.conf LoadModulejk_module /usr/lib/apache/mod_jk.so JkWorkersFile /usr/share/tomcat5/conf/workers.properties JkLogFile /usr/share/tomcat5/logs/mod_jk.log JkLogLevel info JKMount /*.jsp ajp13 JKMount /*.srv ajp13 JKMount /admin/* ajp13 JKMount /manager/* ajp13 This is my workers.properties: workers.tomcat_home=/usr/share/tomcat5/ workers.java_home=/usr/lib/jvm/java ps=/ worker.list=ajp13, ajp14 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 #worker.ajp14.port=8010 #worker.ajp14.host=localhost #worker.ajp14.type=ajp14 #worker.ajp14.secretkey=secret #worker.ajp14.credentials=myveryrandomentropy #worker.ajp14.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp13 worker.inprocess.type=jni worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar worker.inprocess.cmd_line=start worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr System comes up with no errors. But i see sourcecode when requesting .jps Files over Apache. Unfortunately, i do not find the mistake. There are some warnings in mod_jk.log [Tue Apr 01 09:03:23.826 2008] [32636:3081734336] [warn] map_uri_to_worker::jk_uri_worker_map.c (608): Uri * is invalid. Uri must start with / [Tue Apr 01 09:04:07.877 2008] [14898:3081734336] [warn] map_uri_to_worker::jk_uri_worker_map.c (608): Uri * is invalid. Uri must start with / What could be wrong in my case? Is there any help? Thank you Andre - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in running Tomcat
Raghavan_sat wrote: David Smith-2 wrote: tomcat 5 w/ gcj -- either get rid of it or take this conversation to the yum folks. We support tomcat as provided by Apache using primarily Sun Java although I'm sure people have had success with IBM's jvm. Other packaging methods introduce lot's of symlinks and at times alterations in the source to match those packaging schemes. Regarding tomcat5 and sun jvm 1.6, I'm not seeing any jvm 1.6 in your stack trace below. On the contrary, it indicates tomcat 5.5.26 and jdk 1.5.0_14. Can you post what's in your catalina.out file as found in the logs directory of your tomcat install? I think we've asked for this before and you didn't reply. --David Raghavan_sat wrote: Hi, I installed tomcat5 using yum and it installed lot of dependencies... This tomcat uses gcj java to run and is running fine.. But my Servlet program cannot be compiled with this gcj javaSo i installed JDK1.6 and changed the java using alternatives command and compiled it But with this java being selected my tomcat is not running... its showing lock file found but no process running for pid . So i downloaded separate tomcat - apache tomcat 5 and extracted it... it starts fine with jdk 1.6 but when i use my servlet it just goes off.. Following that if i shutdown tomcat it shows Using CATALINA_BASE: /root/apache-tomcat-5.5.26 Using CATALINA_HOME: /root/apache-tomcat-5.5.26 Using CATALINA_TMPDIR: /root/apache-tomcat-5.5.26/temp Using JRE_HOME: /usr/java/jdk1.5.0_14/ Mar 29, 2008 6:53:57 PM org.apache.catalina.startup.Catalina stopServer SEVERE: Catalina.stop: 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:520) at java.net.Socket.connect(Socket.java:470) at java.net.Socket.init(Socket.java:367) at java.net.Socket.init(Socket.java:180) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395) 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:585) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435) So my problem is tomcat5(yum) with gcj java is not compiling my servlet and tomcat5(downloaded) with jdk1.6 is not at all running.. what can i do to run my servlet :( - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Apr 1, 2008 10:24:19 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_05/jre/lib/i386/client:/usr/java/jdk1.6.0_05/jre/lib/i386:/usr/java/jdk1.6.0_05/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib Apr 1, 2008 10:24:19 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8085 Apr 1, 2008 10:24:19 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1613 ms Apr 1, 2008 10:24:19 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Apr 1, 2008 10:24:19 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.26 Apr 1, 2008 10:24:19 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Apr 1, 2008 10:24:20 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/root/apache-tomcat-5.5.26/webapps/ROOT/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Apr 1, 2008 10:24:21 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8085 Apr 1, 2008 10:24:22 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Apr 1, 2008 10:24:22 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/108 config=null Apr 1, 2008 10:24:22 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Apr 1, 2008 10:24:22 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 3076 ms in servlet OS
Re: mod_jk and url rewriting+forwarding
mod_jk doesn't use the HTTP protocol. It uses the AJP13 protocol. Unless you've done something unusual with your tomcat, the 8080 connector will be talking HTTP, not AJP. Default AJP port is usually 8009, so try 'worker.MyWorker.port=8009' in your workers.properties file. If you've changed the ajp connector's port config, then use that. --David Melanie Pfefer wrote: hi, I want to forward http://proxy/gqaf:soi:PAR:TRE:001 (proxy is an apache) to http://backend:8080/gqaf-web/gqaf:soi:PAR:TRE:001 (backend:8080 is a tomcat server) I downloaded mod_jk and modified httpd.conf: LoadModule jk_module modules/mod_jk.so JkWorkersFile /usr/local/apache224/conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /*TRE* MyWorker and created workers.properties: workers.java_home=/usr/local/java/jdk1.6.0_03/ ps=/ worker.list=MyWorker worker.MyWorker.port=8080 worker.MyWorker.host=backend worker.MyWorker.type=ajp13 From logs: [Tue Apr 01 21:33:48.890 2008] [27044:1] [debug] ajp_send_request::jk_ajp_common.c (1395): (MyWorker) request body to send 0 - request body to resend 0 [Tue Apr 01 21:34:08.897 2008] [27044:1] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (1004): (MyWorker) can't receive the response message from tomcat, tomcat (172.21.26.218:8080) has forced a connection close for socket 19 [Tue Apr 01 21:34:08.897 2008] [27044:1] [error] ajp_get_reply::jk_ajp_common.c (1766): (MyWorker) Tomcat is down or refused connection. No response has been sent to the client (yet) [Tue Apr 01 21:34:08.897 2008] [27044:1] [info] ajp_service::jk_ajp_common.c (2186): (MyWorker) sending request to tomcat failed (recoverable), (attempt=2) [Tue Apr 01 21:34:08.897 2008] [27044:1] [error] ajp_service::jk_ajp_common.c (2204): (MyWorker) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port [Tue Apr 01 21:34:08.897 2008] [27044:1] [debug] ajp_reset_endpoint::jk_ajp_common.c (691): (MyWorker) resetting endpoint with sd = 4294967295 (socket shutdown) [Tue Apr 01 21:34:08.897 2008] [27044:1] [debug] ajp_done::jk_ajp_common.c (2522): recycling connection pool slot=0 for worker MyWorker [Tue Apr 01 21:34:08.897 2008] [27044:1] [info] jk_handler::mod_jk.c (2364): Service error=0 for worker=MyWorker I checked tomcat and it is up. Any idea? thanks __ Sent from Yahoo! Mail. A Smarter Inbox http://uk.docs.yahoo.com/nowyoucan.html - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in running Tomcat
tomcat 5 w/ gcj -- either get rid of it or take this conversation to the yum folks. We support tomcat as provided by Apache using primarily Sun Java although I'm sure people have had success with IBM's jvm. Other packaging methods introduce lot's of symlinks and at times alterations in the source to match those packaging schemes. Regarding tomcat5 and sun jvm 1.6, I'm not seeing any jvm 1.6 in your stack trace below. On the contrary, it indicates tomcat 5.5.26 and jdk 1.5.0_14. Can you post what's in your catalina.out file as found in the logs directory of your tomcat install? I think we've asked for this before and you didn't reply. --David Raghavan_sat wrote: Hi, I installed tomcat5 using yum and it installed lot of dependencies... This tomcat uses gcj java to run and is running fine.. But my Servlet program cannot be compiled with this gcj javaSo i installed JDK1.6 and changed the java using alternatives command and compiled it But with this java being selected my tomcat is not running... its showing lock file found but no process running for pid . So i downloaded separate tomcat - apache tomcat 5 and extracted it... it starts fine with jdk 1.6 but when i use my servlet it just goes off.. Following that if i shutdown tomcat it shows Using CATALINA_BASE: /root/apache-tomcat-5.5.26 Using CATALINA_HOME: /root/apache-tomcat-5.5.26 Using CATALINA_TMPDIR: /root/apache-tomcat-5.5.26/temp Using JRE_HOME: /usr/java/jdk1.5.0_14/ Mar 29, 2008 6:53:57 PM org.apache.catalina.startup.Catalina stopServer SEVERE: Catalina.stop: 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:520) at java.net.Socket.connect(Socket.java:470) at java.net.Socket.init(Socket.java:367) at java.net.Socket.init(Socket.java:180) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395) 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:585) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435) So my problem is tomcat5(yum) with gcj java is not compiling my servlet and tomcat5(downloaded) with jdk1.6 is not at all running.. what can i do to run my servlet :( - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in Running a servlet
The stack below tells me tomcat isn't running any longer after you try to run your servlet. In addition to what Mark suggested, your catalina.out file from the point your servlet was called onward would also be helpful. Also look for a core dump as there's a chance the JVM crashed -- that wouldn't necessarily show up in the logs except as an abrupt end to the logs (no shutdown messages or anything after the point your servlet was called until tomcat is started again). --David Raghavan_sat wrote: Hi, I have a servlet program that works fine under tomcat running in windows... But the same servlet program is not running under tomcat running in fedora... when i access this servlet tomcat just goes off.. in the sense i was even unable access the home page which i can easily do before running this servlet.. so when i use the following command after this problem sh shutdown.sh am getting this error what should i do. Using CATALINA_BASE: /root/apache-tomcat-5.5.26 Using CATALINA_HOME: /root/apache-tomcat-5.5.26 Using CATALINA_TMPDIR: /root/apache-tomcat-5.5.26/temp Using JRE_HOME: /usr/java/jdk1.5.0_14/ Mar 29, 2008 6:53:57 PM org.apache.catalina.startup.Catalina stopServer SEVERE: Catalina.stop: 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:520) at java.net.Socket.connect(Socket.java:470) at java.net.Socket.init(Socket.java:367) at java.net.Socket.init(Socket.java:180) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395) 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:585) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat mod_jk PNG resized to GIF with IE : too small
What I'm seeing is some weird scaling stuff being injected into the response being sent back to IE browsers: img id=form1:image1 style=width:100px;height:100px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src='/pngproblem/resources/jpp000.png;jsessionid=..', sizingMethod='scale') src=/pngproblem/theme/com/sun/rave/ui/defaulttheme/images/other/dot.gif;jsession=.. alt= title=... border=0 / in Firefox, this is what I get: img id=form1:image1 src=/pngproblem/resources/jbb000.png;jsessionid=. alt= title=. border=0 / Now I've replaced the really long unimportant stuff like jsessionid with '...', but you get the idea. Your webapp appears to be detecting an IE browser and altering the link to provide a scaling service. --David Saleem Edah-Tally wrote: It seems to me it's a problem with Tomcat or mod_jk. I do no do convert any images myself on the fly. The PNG images gets converted if the request comes from IE. You can have a sample at pngproblem.nmset.info IE displays PNG correctly if served by an Apache web server directly, as at opencim10.free.fr So it's really a Tomcat or mod_jk problem. Thanks. Le vendredi 28 mars 2008, Christopher Schultz a écrit : Set, [EMAIL PROTECTED] wrote: | I'm having a problem with PNG images served by Tomcat through mod_jk on | Apache web server on Linux. | | When pages are browsed bt Internet Explorer, PNG images are converted to GIF | but the GIF images are very small. Do you convert the images to GIF on the server, or are you saying that MSIE does something, here? If on the server, how are you performing the transcoding? | Firefox does display the PNG images faithfully. Does MSIE display the PNG images at the right size if you don't try to convert to GIF on the fly? -chris - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat JNDI datasource
Your root cause seems to indicate it's having some trouble possibly with the url: Caused by: java.lang.NullPointerException at java.util.StringTokenizer.init(StringTokenizer.java:146) at com.ibm.db2.jcc.DB2Driver.acceptsURL(DB2Driver.java:245) at java.sql.DriverManager.getDriver(DriverManager.java:232) Not having much experience with IBM's db2 driver, I don't have any good suggestions, but it's something to look at. Also your validation query looks like it could potentially return a lot of records. The validation query only needs to be something simple like 'select 1' -- just enough to fire off some traffic to the server and get a positive response. Tom Henricksen wrote: I have an application in Tomcat 5.0.30 that we are trying to get to use JDBC through JNDI. I am trying to follow along with akarta-tomcat-5.0.30/webapps/tomcat-docs/jndi-datasource-examples-howto. html. I have setup the context.xml Context debug=4 docBase=C:/Java/eclipse-europa/europa-workspace/bop-med/web path=/bop-med reloadable=true workDir=work\Catalina\localhost\bop-med Resource name=jdbc/medical type=javax.sql.DataSource password=password driverClassName=com.ibm.db2.jcc.DB2Driver maxIdle=2 maxWait=5000 validationQuery=select * from sysibm.SYSDUMMY1 username=user url=jdbc:db2://server:5/db maxActive=4/ /Context And I have setup the web.xml with resource-ref descriptionDB Connection/description res-ref-namejdbc/medical/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref When I call the following code initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/medical); Connection conn = ds.getConnection(); System.out.println(DB Version : + conn.getMetaData().getDatabaseMajorVersion()); conn.close(); I get the following error org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource .java:780) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja va:540) at com.advtechgrp.web.servlet.TestConn.processRequest(TestConn.java:37) at com.advtechgrp.web.servlet.TestConn.doGet(TestConn.java:20) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon textValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79 9)
Re: Tomcat JNDI datasource
| Context debug=4 | docBase=C:/Java/eclipse-europa/europa-workspace/bop-med/web | path=/bop-med reloadable=true | workDir=work\Catalina\localhost\bop-med Bad boy: take out the docBase and path attributes. At best, they will be ignored. At worse, they will confuse both you /and/ Tomcat. Feel free to leave workDir in there, though it is not required. Unless you /need/ to specify it, you should take that out and let Tomcat do what it wants. Not necessarily bad. He's deploying the app from outside the tomcat webapps directory, so at least docBase is good. The path on the other hand would be picked up from the name of the context xml file in conf/Catalina/localhost. Note that setting the validationQuery without also setting testOnBorrow=true will result in the validationQuery being ignored. Last I looked, testOnBorrow is true by default and only needs a validationQuery. Setting it explicitly won't hurt though. --David Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom, Tom Henricksen wrote: | org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver | of class '' for connect URL 'null' Aah, yes. The old connect URL 'null' problem. This is always a problem with some nitpicky detail in your configuration, /or/ that you have your driver JAR in the wrong place (or too many places). First check to see where you have put db2driver.jar (or whatever DB2 calls its driver library). It should only exist in one place. Since you have your DataSource configuration in your context.xml, I think that you can simply put it into your application's lib directory and leave it at that. However, if you also have it in your TOMCAT_HOME/(common|shared)/lib, things won't work. Pick one location and stick with it. I have my MySQL driver in one place only: TOMCAT_HOME/common/lib and nowhere else. | I have an application in Tomcat 5.0.30 that we are trying to get to use | JDBC through JNDI. Since you are making such a change, would upgrading Tomcat be a possibility? Tomcat 5.0 is no longer supported. Upgrading to 5.5 should not be all that painful. | I have setup the context.xml | | | | Context debug=4 | docBase=C:/Java/eclipse-europa/europa-workspace/bop-med/web | path=/bop-med reloadable=true | workDir=work\Catalina\localhost\bop-med Bad boy: take out the docBase and path attributes. At best, they will be ignored. At worse, they will confuse both you /and/ Tomcat. Feel free to leave workDir in there, though it is not required. Unless you /need/ to specify it, you should take that out and let Tomcat do what it wants. | Resource name=jdbc/medical | type=javax.sql.DataSource | password=password | driverClassName=com.ibm.db2.jcc.DB2Driver | maxIdle=2 | maxWait=5000 | validationQuery=select * from sysibm.SYSDUMMY1 | username=user | url=jdbc:db2://server:5/db | maxActive=4/ | /Context In my configuration, i also have: auth=Container Note that setting the validationQuery without also setting testOnBorrow=true will result in the validationQuery being ignored. | And I have setup the web.xml with | | | | resource-ref | descriptionDB Connection/description | res-ref-namejdbc/medical/res-ref-name | res-typejavax.sql.DataSource/res-type | res-authContainer/res-auth | /resource-ref Technically, you don't need this, but it's not a bad idea to leave it in there. | initCtx = new InitialContext(); | Context envCtx = (Context) initCtx.lookup(java:comp/env); | DataSource ds = (DataSource) envCtx.lookup(jdbc/medical); | | Connection conn = ds.getConnection(); | | System.out.println(DB Version : | + conn.getMetaData().getDatabaseMajorVersion()); | | conn.close(); This code looks fine (though you don't really have to do two separate lookups -- you can combine them into a single lookup). When you get it working, you should be checking for null, catching NamingExceptions and stuff like that, too. But this should work. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkftAZMACgkQ9CaO5/Lv0PAy+gCgn4uSwY+hSQiQcTLb7lYIg04F uNcAnAo2QhichFNbHa4P24h7IA1X0XK4 =tR4e -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail:
Re: Tomcat JNDI datasource
Bad suggestion. It should exist in one and only one place. That place is common/lib for tc 5.0, 5.5 so it's visible to both tomcat's internal code and the webapp. --David Howard Watson wrote: Hi. Did you try putting your .jar files in \WEB-INF\lib of you webapp? Tom Henricksen [EMAIL PROTECTED] 3/28/2008 8:08 AM I have an application in Tomcat 5.0.30 that we are trying to get to use JDBC through JNDI. I am trying to follow along with akarta-tomcat-5.0.30/webapps/tomcat-docs/jndi-datasource-examples-howto. html. I have setup the context.xml Context debug=4 docBase=C:/Java/eclipse-europa/europa-workspace/bop-med/web path=/bop-med reloadable=true workDir=work\Catalina\localhost\bop-med Resource name=jdbc/medical type=javax.sql.DataSource password=password driverClassName=com.ibm.db2.jcc.DB2Driver maxIdle=2 maxWait=5000 validationQuery=select * from sysibm.SYSDUMMY1 username=user url=jdbc:db2://server:5/db maxActive=4/ /Context And I have setup the web.xml with resource-ref descriptionDB Connection/description res-ref-namejdbc/medical/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref When I call the following code initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/medical); Connection conn = ds.getConnection(); System.out.println(DB Version : + conn.getMetaData().getDatabaseMajorVersion()); conn.close(); I get the following error org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource .java:780) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja va:540) at com.advtechgrp.web.servlet.TestConn.processRequest(TestConn.java:37) at com.advtechgrp.web.servlet.TestConn.doGet(TestConn.java:20) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon textValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79 9) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57 7) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:684) at java.lang.Thread.run(Thread.java:534) Caused by:
Re: Tomcat JNDI datasource
It does have merit to keep associated jars together except in those rare occasions where the jar has to be in the classloader heirarchy at a place visible to both tomcat's internal code and the webapp's. In that case it has to be in common/lib and not in any descendant classloader. To do what you suggest requires the app have it's own pooling library and use the factory attribute in the Resource def. --David Howard Watson wrote: If the app still had errors with the .jar file in the webapps own \WEB-INF\lib then something else is broken (called a test). Since his webapp docBase is outside the Tomcat directory structure there is merit with having associated .jar files in that docBase. And in instances where there are multiple Tomcats running and perhaps multiple versions, then keeping associated files with your app has merit also. David Smith [EMAIL PROTECTED] 3/28/2008 8:45 AM Bad suggestion. It should exist in one and only one place. That place is common/lib for tc 5.0, 5.5 so it's visible to both tomcat's internal code and the webapp. --David Howard Watson wrote: Hi. Did you try putting your .jar files in \WEB-INF\lib of you webapp? Tom Henricksen [EMAIL PROTECTED] 3/28/2008 8:08 AM I have an application in Tomcat 5.0.30 that we are trying to get to use JDBC through JNDI. I am trying to follow along with akarta-tomcat-5.0.30/webapps/tomcat-docs/jndi-datasource-examples-howto. html. I have setup the context.xml Context debug=4 docBase=C:/Java/eclipse-europa/europa-workspace/bop-med/web path=/bop-med reloadable=true workDir=work\Catalina\localhost\bop-med Resource name=jdbc/medical type=javax.sql.DataSource password=password driverClassName=com.ibm.db2.jcc.DB2Driver maxIdle=2 maxWait=5000 validationQuery=select * from sysibm.SYSDUMMY1 username=user url=jdbc:db2://server:5/db maxActive=4/ /Context And I have setup the web.xml with resource-ref descriptionDB Connection/description res-ref-namejdbc/medical/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref When I call the following code initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/medical); Connection conn = ds.getConnection(); System.out.println(DB Version : + conn.getMetaData().getDatabaseMajorVersion()); conn.close(); I get the following error org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource .java:780) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja va:540) at com.advtechgrp.web.servlet.TestConn.processRequest(TestConn.java:37) at com.advtechgrp.web.servlet.TestConn.doGet(TestConn.java:20) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon textValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20
Re: Tomcat JNDI datasource
Just had a brainstorm while responding on another post. The docs for 5.0.30 should describe defining a resource in terms of a Resource ... / element and a ResourceParams/ResourceParams element. The resource as setup below is only correct for version 5.5.x and later. --David Tom Henricksen wrote: I have an application in Tomcat 5.0.30 that we are trying to get to use JDBC through JNDI. I am trying to follow along with akarta-tomcat-5.0.30/webapps/tomcat-docs/jndi-datasource-examples-howto. html. I have setup the context.xml Context debug=4 docBase=C:/Java/eclipse-europa/europa-workspace/bop-med/web path=/bop-med reloadable=true workDir=work\Catalina\localhost\bop-med Resource name=jdbc/medical type=javax.sql.DataSource password=password driverClassName=com.ibm.db2.jcc.DB2Driver maxIdle=2 maxWait=5000 validationQuery=select * from sysibm.SYSDUMMY1 username=user url=jdbc:db2://server:5/db maxActive=4/ /Context And I have setup the web.xml with resource-ref descriptionDB Connection/description res-ref-namejdbc/medical/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref When I call the following code initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/medical); Connection conn = ds.getConnection(); System.out.println(DB Version : + conn.getMetaData().getDatabaseMajorVersion()); conn.close(); I get the following error org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource .java:780) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja va:540) at com.advtechgrp.web.servlet.TestConn.processRequest(TestConn.java:37) at com.advtechgrp.web.servlet.TestConn.doGet(TestConn.java:20) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon textValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79 9) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57 7) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:684) at java.lang.Thread.run(Thread.java:534) Caused by: java.lang.NullPointerException
Re: Tomcat mod_jk PNG resized to GIF with IE : too small
Sorry, can't help you on that one. I use NetBeans all the time but never the visual editing componet. Good luck with the project. -David [EMAIL PROTECTED] wrote: Yes, I don't have any control over this resizing. The web app is created visually in Netbeans, I looked into a lot of config parameters but could not see where to turn this resizing off. Thanks anyway. Message d'origine Date: Fri, 28 Mar 2008 09:03:25 -0400 De: David Smith [EMAIL PROTECTED] A: Tomcat Users List users@tomcat.apache.org Sujet: Re: Tomcat mod_jk PNG resized to GIF with IE : too small What I'm seeing is some weird scaling stuff being injected into the response being sent back to IE browsers: img id=form1:image1 style=width:100px;height:100px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src='/pngproblem/resources/jpp000.png;jsessionid=..', sizingMethod='scale') src=/pngproblem/theme/com/sun/rave/ui/defaulttheme/images/other/dot.gif;jsession=.. alt= title=... border=0 / in Firefox, this is what I get: img id=form1:image1 src=/pngproblem/resources/jbb000.png;jsessionid=. alt= title=. border=0 / Now I've replaced the really long unimportant stuff like jsessionid with '...', but you get the idea. Your webapp appears to be detecting an IE browser and altering the link to provide a scaling service. --David Saleem Edah-Tally wrote: It seems to me it's a problem with Tomcat or mod_jk. I do no do convert any images myself on the fly. The PNG images gets converted if the request comes from IE. You can have a sample at pngproblem.nmset.info IE displays PNG correctly if served by an Apache web server directly, as at opencim10.free.fr So it's really a Tomcat or mod_jk problem. Thanks. Le vendredi 28 mars 2008, Christopher Schultz a écrit : Set, [EMAIL PROTECTED] wrote: | I'm having a problem with PNG images served by Tomcat through mod_jk on | Apache web server on Linux. | | When pages are browsed bt Internet Explorer, PNG images are converted to GIF | but the GIF images are very small. Do you convert the images to GIF on the server, or are you saying that MSIE does something, here? If on the server, how are you performing the transcoding? | Firefox does display the PNG images faithfully. Does MSIE display the PNG images at the right size if you don't try to convert to GIF on the fly? -chris - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] SET [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: another apache/tomcat/mod_jk/virtual hosting question/issue
Bad Gateway wouldn't be generated by tomcat unless your tomcat code was somehow getting content from another site. Given your most recent log snippets have apparently been from an httpd error log file instead of tomcat's logs (like catalina.out), I'm going to guess your mod_jk setup in httpd isn't working. JSP compile errors don't show up in the httpd error log and mod_jk errors don't show up in catalina.out under any normal setup. As Chuck points out, there isn't just one problem here, there's several. Start by making sure your tomcat is working first. You can do that by making sure a standard http connector is setup to let's say port 8080 and then hitting http://ww3.nisonline.org:8080/test.jsp. When that works, fix your mod_jk setup. --David Tommy Peterson wrote: When the unable to compile class for JSP error showed up (it isn't anymore) it would mention the jsp file that I was calling. I intentionally called several different jsp files to see if it was the coding, althougth this application works now, and has for years, on a different server just fine (I need to move it)--so it isn't a code issue. The error points to a line in that file. I have looked to see if the class is there--it is. Anyway, this says to me that Java is somehow not being used or installed correclty--things can't compile. I verified that Java was installed correctly. Anyway, what happens now is that the page just sits there and then after a few seconds I get a Bad Gateway page. A 502 error. Try it: ww4.nislonline.org or use the other one that I am now pointing to the standard jsp examples to test whether Tomcat shows up: ww3.nislonline.org You'll see the HTML page but try to submit the post: same issue as it is posting to a jsp page. I don't understand why this has to be this difficult. I have followed the documentation. And it seems I just keep running into new brick walls. Thanks. Tomcat Users List users@tomcat.apache.org on Tuesday, March 25, 2008 at 3:55 PM -0500 wrote: In that case, there should have been some text after 'org.apache.jasper.JasperException: Unable to compile class for JSP: ' citing the line number and problem with the jsp. Is it really just blank where compile error message should be? Can you try to restart tomcat and see if that clears the issue? --David Tommy Peterson wrote: I went all the way to the top of the error log for the first error; there were two, one after the other: [error] jk_ajp_common.c (1004): (ajp13) can't receive the response message from tomcat, tomcat (127.0.0.1:8009) has forced a connection close for socket 4540 [Tue Mar 25 15:02:44.320 2008] [5796:5300] [error] jk_ajp_common.c (1766): (ajp13) Tomcat is down or refused connection. No response has been sent to the client (yet) Tomcat Users List users@tomcat.apache.org on Tuesday, March 25, 2008 at 2:26 PM -0500 wrote: From experience, this error is usually the result of an earlier error. Look further up your logs to the first error that occurs after you request this page. Fix that and this one should go away. --David Tommy Peterson wrote: this is the problem with every jsp page I try to hit. does this mean java can't compile the java beans? I don't get this. I did a search and lot of a ppl seem to have issue but no solutions. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP: Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423) org.apache.jasper.compiler.Compiler.compile(Compiler.java:308) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:273) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) Tomcat Users List users@tomcat.apache.org on Tuesday, March 25, 2008 at 1:03 PM -0500 wrote: Sorry about that. Tomcat 6.0.1.4 Apache 2.2.9 What is the command to get a
Re: another apache/tomcat/mod_jk/virtual hosting question/issue
Which workers.properties file? It's the one specified by the JkWorkersFile directive in your httpd configuration. If you have more than one, you might want to consider getting rid of the others just to eliminate confusion. Official mod_jk connector docs can be found at http://tomcat.apache.org/connectors-doc/ I suspect for most people who have pleas here it's because they search the web and found some book or article that's either years old and out of date or written by someone who's offering really bad advice. --David Tommy Peterson wrote: It is actually because I have gotten such inconsistent experiences from this set up . . . the Tomcat apps were being served up at one point which is what I alluded to in my original post. But to fix the failure of Apache to forward requests to Tomcat I made changes; then this came about. It is one problem after the other. There is no complete documentation on this. It is obscure at best with people making references to a workers.properties file but they don't say which one. No wonder the forum is full of pleas for help in this area. Tomcat Users List users@tomcat.apache.org on Tuesday, March 25, 2008 at 5:02 PM -0500 wrote: From: Tommy Peterson [mailto:[EMAIL PROTECTED] Subject: Re: another apache/tomcat/mod_jk/virtual hosting question/issue I don't understand why this has to be this difficult. Because you seem to be trying to solve multiple problems simultaneously, rather than isolating them and taking care of one at a time. Until you can demonstrate that the webapps are functioning with direct browser-to-Tomcat connections, don't introduce httpd into the mix. I have followed the documentation. It's clear that you haven't (or else you're using sadly outdated documentation), or you would not be putting your Context elements in Tomcat's conf/server.xml file. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: httpd cant talk to tomcat workers
1. You probably want to clean out your workers.properties file. The log below indicates it has a lot of old depricated stuff in it. Mine is just a very bare bones one: worker.list=tcinstance1 worker.tcinstance1.port=8009 worker.tcinstance1.type=ajp13 2. Make sure an ajp13 port is alive at port 8009 on your tomcat instance. The bottom of your log snippet indicates it isn't. Just edit tomcat's server.xml file, look for a Connector / element containing port=8009 and make sure it doesn't have xml comments ( !-- -- ) surrounding it. --David Andy Smith wrote: Hi list, I'm new to tomcat and am trying to get apache to talk via mod_jk. I am using httpd 2.2.8 compiled from source mod_jk 1.2.26 from source and tomcat 5.5.23 from Alfresco 2.9B community. So far I have created a workers.properties based on the example file included with tomcat 5.5 source (just corrected the paths and set for UNIX) and added the following to my apache httpd.conf: # Load mod_jk module LoadModulejk_module modules/mod_jk.so # Declare the module for IfModule directive (remove this line on Apache 2.0.x) #AddModule mod_jk.c # Where to find workers.properties JkWorkersFile /opt/alfresco/tomcat/conf/workers.properties # Where to put jk shared memory JkShmFile /var/log/httpd/mod_jk.shm # Where to put jk logs JkLogFile /var/log/httpd/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevelinfo # Select the timestamp log format JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkMount /* ajp13 # Send servlet for context /examples to worker named worker1 #JkMount /alfresco/servlet/* worker1 # Send JSPs for context /examples to worker named worker1 #JkMount /alfresco/*.jsp worker1 #JkOptions +ForwardURICompatUnparsed When I try and connect via a browser to http://hostname/alfresco I get the error: Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. And in the mod_jk logs I see: [Wed Mar 26 14:33:01 2008] [5617:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.class_path' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5617:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.cmd_line' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5617:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.jvm_lib' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5617:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.stdout' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5617:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.stderr' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5617:3086026976] [info] init_jk::mod_jk.c (2825): mod_jk/1.2.26 initialized [Wed Mar 26 14:33:01 2008] [5619:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.class_path' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5619:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.cmd_line' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5619:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.jvm_lib' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5619:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.stdout' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5619:3086026976] [warn] jk_map_validate_property::jk_map.c (410): The attribute 'worker.inprocess.stderr' is deprecated - please check the documentation for the correct replacement. [Wed Mar 26 14:33:01 2008] [5619:3086026976] [info] init_jk::mod_jk.c (2825): mod_jk/1.2.26 initialized [Wed Mar 26 14:33:07 2008] [5620:3086026976] [info] jk_open_socket::jk_connect.c (566): connect to 127.0.0.1:8009 failed (errno=111) [Wed Mar 26 14:33:07 2008] [5620:3086026976] [info] ajp_connect_to_endpoint::jk_ajp_common.c (869): Failed opening socket to (127.0.0.1:8009) (errno=111) [Wed Mar 26 14:33:07 2008] [5620:3086026976] [error] ajp_send_request::jk_ajp_common.c (1359): (ajp13) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111) [Wed Mar 26 14:33:07 2008] [5620:3086026976] [info] ajp_service::jk_ajp_common.c (2186): (ajp13)
Re: another apache/tomcat/mod_jk/virtual hosting question/issue
From experience, this error is usually the result of an earlier error. Look further up your logs to the first error that occurs after you request this page. Fix that and this one should go away. --David Tommy Peterson wrote: this is the problem with every jsp page I try to hit. does this mean java can't compile the java beans? I don't get this. I did a search and lot of a ppl seem to have issue but no solutions. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP: Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423) org.apache.jasper.compiler.Compiler.compile(Compiler.java:308) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:273) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) Tomcat Users List users@tomcat.apache.org on Tuesday, March 25, 2008 at 1:03 PM -0500 wrote: Sorry about that. Tomcat 6.0.1.4 Apache 2.2.9 What is the command to get a module version number listing? If I am on the server and enter localhost:8080/nisl4 or localhost:8080/nisl3 I get a 500 error saying that something can't be compiled. So i guess technicall I can reach the apps. Thanks. Tomcat Users List users@tomcat.apache.org on Tuesday, March 25, 2008 at 11:51 AM -0500 wrote: From: Tommy Peterson [mailto:[EMAIL PROTECTED] Subject: another apache/tomcat/mod_jk/virtual hosting question/issue But I cannot get the Java apps to work. Don't suppose you'd care to give anyone a hint about what versions of Tomcat, httpd, mod_jk, etc., you happen to be using? Can you access the webapps directly (port 8080), bypassing httpd? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring linux for Tomcat web hosting
1. Configure tomcat to listen on port 80 and without root privilege. Not sure how you setup tomcat on your Ubuntu box, but most linux distributions will require you start it with something like jsvc from the commons-daemon project to do this. 2. Configure your cable router to forward port 80 connections it receives from the outside world to your Ubuntu box. 3. Work with your domain name provider to make sure your shiny new domain name resolves to your static IP. Life should be good after that. --David Srivastava, Abhay wrote: Hi, I have created a website running on Tomcat 6.x and have also purchased a domain. The OS I am using is Ubuntu 7.1 (linux). Can anyone help me with configuring the linux so that my host name can direct to tomcat server. Right I have a static IP address and I can direct my domain name to this static IP address. Now my Tomcat is running behind a router with a DHCP configuration. What configuration I need to do configures my linux an d Tomcat. Any help will be appreciated. Thanks in advance. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring linux for Tomcat web hosting
Only if you are mixing technologies or have other complications. For instance, I find Apache Httpd easier to deal with for PHP, Perl, or CGI stuff in general. In a straight java servlet environment, it just adds latency and complexity you probably won't want. --David Srivastava, Abhay wrote: Thanks David. I appreciate your help. Also, do I need to have a Apache HTTP server sitting before my Tomcat instance ? Right now I don't see any reason for doing so. Abhay Srivastava Reference Architecture Shared Services and Architecture | Smith Barney Technology | CitiGroup GWM (212) 657 - 4617 -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2008 3:01 PM To: Tomcat Users List Subject: Re: Configuring linux for Tomcat web hosting 1. Configure tomcat to listen on port 80 and without root privilege. Not sure how you setup tomcat on your Ubuntu box, but most linux distributions will require you start it with something like jsvc from the commons-daemon project to do this. 2. Configure your cable router to forward port 80 connections it receives from the outside world to your Ubuntu box. 3. Work with your domain name provider to make sure your shiny new domain name resolves to your static IP. Life should be good after that. --David Srivastava, Abhay wrote: Hi, I have created a website running on Tomcat 6.x and have also purchased a domain. The OS I am using is Ubuntu 7.1 (linux). Can anyone help me with configuring the linux so that my host name can direct to tomcat server. Right I have a static IP address and I can direct my domain name to this static IP address. Now my Tomcat is running behind a router with a DHCP configuration. What configuration I need to do configures my linux an d Tomcat. Any help will be appreciated. Thanks in advance. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: another apache/tomcat/mod_jk/virtual hosting question/issue
In that case, there should have been some text after 'org.apache.jasper.JasperException: Unable to compile class for JSP: ' citing the line number and problem with the jsp. Is it really just blank where compile error message should be? Can you try to restart tomcat and see if that clears the issue? --David Tommy Peterson wrote: I went all the way to the top of the error log for the first error; there were two, one after the other: [error] jk_ajp_common.c (1004): (ajp13) can't receive the response message from tomcat, tomcat (127.0.0.1:8009) has forced a connection close for socket 4540 [Tue Mar 25 15:02:44.320 2008] [5796:5300] [error] jk_ajp_common.c (1766): (ajp13) Tomcat is down or refused connection. No response has been sent to the client (yet) Tomcat Users List users@tomcat.apache.org on Tuesday, March 25, 2008 at 2:26 PM -0500 wrote: From experience, this error is usually the result of an earlier error. Look further up your logs to the first error that occurs after you request this page. Fix that and this one should go away. --David Tommy Peterson wrote: this is the problem with every jsp page I try to hit. does this mean java can't compile the java beans? I don't get this. I did a search and lot of a ppl seem to have issue but no solutions. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP: Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423) org.apache.jasper.compiler.Compiler.compile(Compiler.java:308) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:273) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) Tomcat Users List users@tomcat.apache.org on Tuesday, March 25, 2008 at 1:03 PM -0500 wrote: Sorry about that. Tomcat 6.0.1.4 Apache 2.2.9 What is the command to get a module version number listing? If I am on the server and enter localhost:8080/nisl4 or localhost:8080/nisl3 I get a 500 error saying that something can't be compiled. So i guess technicall I can reach the apps. Thanks. Tomcat Users List users@tomcat.apache.org on Tuesday, March 25, 2008 at 11:51 AM -0500 wrote: From: Tommy Peterson [mailto:[EMAIL PROTECTED] Subject: another apache/tomcat/mod_jk/virtual hosting question/issue But I cannot get the Java apps to work. Don't suppose you'd care to give anyone a hint about what versions of Tomcat, httpd, mod_jk, etc., you happen to be using? Can you access the webapps directly (port 8080), bypassing httpd? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: replacement for symbolic links to files (Apache httpd to Tomcat)
Here's a possibility: Write the quick and dirty blog jsp, name it blog.html, and then add this to your web.xml file: servlet-mapping servlet-namejsp/servlet-name url-patternblog.html/url-pattern /servlet-mapping The idea is to specifically map blog.html to the jsp servlet for jsp processing. I haven't tried it, but it seems like it should work. --David DIGLLOYD INC wrote: I'm converting from an Apache http system. Thousands of my users have bookmarked http://diglloyd.com/diglloyd/blog.html With Apache, I symlinked blog.html to the current month's blog. Now with Tomcat, I see warnings that enabling symlinks is a security risk. What is the best way to make blog.html = 2008-03-blog.html ? (eg if March 2008 is the current blog) I realize that I can write a one-line blog.jsp which includes the current month's blog. But that won't help users that bookmarked blog.html. An http redirect works, but it seems the google search engine is not enamored of redirects; I don't want to hurt my search ranking. Lloyd Chambers - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: replacement for symbolic links to files (Apache httpd to Tomcat)
servlet-mapping ... /servlet-mapping takes the name of a servlet as defined by the servlet.../servlet element, not the servlet's class. That's what the servlet ... /servlet element is for. In this case, the jsp servlet is already defined in the global web.xml file found at conf/web.xml right next to the server.xml file. Please don't edit this web.xml file unless you *really* know what you are doing. Just take a look at it to see how the default servlet and the jsp servlet are defined. Note the separate servlet-mapping element. There can be more than one of these to map a servlet to different paths. --David DIGLLOYD INC wrote: David, I'm new to programming Servlets/JSP, I didn't realize a servlet- mapping could just specify a url-pattern an not specify a servlet class, nor do I understand exactly what this example mapping does (and if it does it without other side-effects). Do you mean to use this in conjunction with a blog.jsp which would then include blog.html? Lloyd On Mar 24, 2008, at 5:13 AM, David Smith wrote: Here's a possibility: Write the quick and dirty blog jsp, name it blog.html, and then add this to your web.xml file: servlet-mapping servlet-namejsp/servlet-name url-patternblog.html/url-pattern /servlet-mapping The idea is to specifically map blog.html to the jsp servlet for jsp processing. I haven't tried it, but it seems like it should work. --David DIGLLOYD INC wrote: I'm converting from an Apache http system. Thousands of my users have bookmarked http://diglloyd.com/diglloyd/blog.html With Apache, I symlinked blog.html to the current month's blog. Now with Tomcat, I see warnings that enabling symlinks is a security risk. What is the best way to make blog.html = 2008-03-blog.html ? (eg if March 2008 is the current blog) I realize that I can write a one-line blog.jsp which includes the current month's blog. But that won't help users that bookmarked blog.html. An http redirect works, but it seems the google search engine is not enamored of redirects; I don't want to hurt my search ranking. Lloyd Chambers - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: replacement for symbolic links to files (Apache httpd to Tomcat)
Oh and by the way ... Hassan's idea is really good as well. For that, you just need to write a class that implements the javax.servlet.Filter interface and define the servlet in your web.xml file. The servlet spec is an excellent resource for this kind of stuff: http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html It has docs for the classes/interfaces in javax.servlet as well as docs on what's valid in the web.xml file. --David DIGLLOYD INC wrote: David, I'm new to programming Servlets/JSP, I didn't realize a servlet- mapping could just specify a url-pattern an not specify a servlet class, nor do I understand exactly what this example mapping does (and if it does it without other side-effects). Do you mean to use this in conjunction with a blog.jsp which would then include blog.html? Lloyd On Mar 24, 2008, at 5:13 AM, David Smith wrote: Here's a possibility: Write the quick and dirty blog jsp, name it blog.html, and then add this to your web.xml file: servlet-mapping servlet-namejsp/servlet-name url-patternblog.html/url-pattern /servlet-mapping The idea is to specifically map blog.html to the jsp servlet for jsp processing. I haven't tried it, but it seems like it should work. --David DIGLLOYD INC wrote: I'm converting from an Apache http system. Thousands of my users have bookmarked http://diglloyd.com/diglloyd/blog.html With Apache, I symlinked blog.html to the current month's blog. Now with Tomcat, I see warnings that enabling symlinks is a security risk. What is the best way to make blog.html = 2008-03-blog.html ? (eg if March 2008 is the current blog) I realize that I can write a one-line blog.jsp which includes the current month's blog. But that won't help users that bookmarked blog.html. An http redirect works, but it seems the google search engine is not enamored of redirects; I don't want to hurt my search ranking. Lloyd Chambers - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Regarding installation of Tomcat service wrapper
Hi. error.docx is a MS Word 2007 format file, unreadable by older Office products (thank you Microsoft!) and probably most third party readers without updates or extra software. Could you repost this as a plain old text file? --David radhika123 wrote: Hi I want to know the details how to run Tomcat as service wrapper. http://www.nabble.com/file/p16194942/error.docx error.docx I am getting the above mentioned error. Could anybody please resolve this error ASAP. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat stops after client abort
I'm not sure anyone here can. Tomcat is good at recovering from a client abort -- they happen a lot for all sorts of reasons. Sounds like the ARS Mid-Tier (what ever that is) is at fault and doesn't deal with rejection very well. Have you contacted the company regarding this? ratul banerjee wrote: Can some one help me on this its very urgent...? On 3/18/08, ratul banerjee [EMAIL PROTECTED] wrote: Is the download static content, or is it generated? If it's generated, what's the code that generates it? The download content is generated. It is generated through the ARS Mid-Tier. Also... could you give us some more details on OS, Tomcat version, whether it's standalone or fronted by Apache httpd or IIS? The OS is Windows 2003 Server. Tomcat version is 5.5.23...Standalone - Show quoted text - - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] On 3/18/08, Peter Crowther [EMAIL PROTECTED] wrote: From: ratul banerjee [mailto:[EMAIL PROTECTED] Could not find anything close to that OK. To add something more,this is happening in case of client browser that is requesting a big download and midway during the search the client browser is closed. Is the download static content, or is it generated? If it's generated, what's the code that generates it? Also... could you give us some more details on OS, Tomcat version, whether it's standalone or fronted by Apache httpd or IIS? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache up grade question
The short answer is no, an upgrade to Apache Httpd will not necessitate an upgrade of tomcat. Even a bigger update of httpd from 1.3.x to say 2.2.x won't necessitate an upgrade of tomcat. They aren't that tightly bound together. You may have to recompile your mod_jk module if you use it though. --David Patrick Unthank wrote: We have a box with tomcat and apache installed with JRE 1.4.2. For reasons I cannot give here I cannot upgrade the JRE but a security scan has highlighted that I have to upgrade apache from 1.3.29 to 1.3.41, but not to apache2. I am unsure that if I do an upgrade on apache alone whether it will break tomcat. I am also unsure as to what version of tomcat I am running. I believe that it is pre-version 5.0 as there are no convenient version.sh scripts to run and the manager service is disabled so cannot try to call the webservice to find out. I am also chasing a tight time line. Any help would be greatly appreciated. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat is confused between sites
That still doesn't rule out an application bug. They may have gotten careless in how they handle request data or cache the server name somewhere not intending to support virtual hosting. --David sol42020 wrote: Most people would think that, but the problem disappears when I modify the server.xml file for Tomcat. When I comment out the tema server, tematest works fine with no errors. Tomcat appears to be confused. The applications work independently, but tema is the only one that works when server.xml has both applications listed. Do you have any other ideas why this would happen? Hassan Schroeder-2 wrote: So it looks like you have an application error, not a Tomcat problem. You should probably be asking the app's developers for help, then :-) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat is confused between sites
As a member of this list for several years, I can honestly tell you I have not seen one post from anyone who felt better off with the third party packages. You can check the archives yourself -- there are a number of posts from people whose problems disappeared when they uninstalled the third party stuff and installed a tomcat original distribution. --David sol42020 wrote: Actually, you said the following, which wasn't very specific on how to solve this particular problem. It made me think that you just didn't like repackaged versions of Tomcat. I will now consider changing the version I'm using since another user agreed that it's a possible problem. Thanks for your advice. Hassan Schroeder-2 wrote: Yeah, first remove this crap linux-repackaged Tomcat and get a real (and up-to-date) version from the Tomcat web site. You should also get a non-dark-ages version of Java while you're at it :-) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RES: about java.lang.outofmemory error
If I understand the situation right, the sum total of all memory demands (both tomcat's and others) exceded the sum of all memory on the system, both real and virtual. Reducing the memory allocation to tomcat dropped the total demand to a level the system could provide. If that's the case, you'll end up having to get a bigger box in the long run. Decreasing tomcat's memory will most likely be only a short term solution. --David Milanez, Marcus wrote: Ok... I don't want this thread to be any longer, but the fact is that we haven't configured the heap for mor space them physical plus swap. Anyway, I got it solved when we decreased initial memory and maximum memory. -Mensagem original- De: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 17 de março de 2008 12:16 Para: Tomcat Users List Assunto: RE: about java.lang.outofmemory error From: Milanez, Marcus [mailto:[EMAIL PROTECTED] Subject: RES: about java.lang.outofmemory error GC never (ever) ran and Tomcat proccess could never acquire the amout of memory we'd specified The fact that GC never ran is irrelevant. As someone else pointed out, you likely configured the heap for more space than the sum of real plus swap, thereby causing a failure when attempting to allocate pages for the process. Also be aware that the JVM wil throw an OOME for *any* resource failure, including such things as running out of file descriptors. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Leopard
I can't speak for the OP, but as a long time Mac user, I know TextEdit's default output is richtext. It's a really annoying behavior of TextEdit. The OP should use either vi (if they're brave or have experience in it) or a developer IDE like NetBeans or Eclipse to write the initial file. After that I believe TextEdit can be used and will leave the file as text on future saves. --David Alan Chaney wrote: I'd guess that you copied the text in the tutorial using an editor which converted it to an RTF (Rich Text Format). The text you show in your email is rtf markup. The startup_tomcat file is a shell script which is setting the following environment variables JAVA_HOME - where you have installed our java sdk JRE_HOME - the java runtime CATALINA_HOME - the location of your tomcat files You can set these 'by hand' by typing the lines in at the command line. Its better to set them in the .bashrc file. Hope that helps maxchoc wrote: I'm trying to install Tomcat 6.0.16 on Leopard. I'm following a tutorial on http://swetnam.wordpress.com/2007/12/15/installing-apache-tomcat-6-on-os-x/ I've gotten to the point of trying to start tomcat on my mac but when in the Terminal, I get the following sh-3.2# ./start_tomcat ./start_tomcat: line 1: {rtf1ansiansicpg1252cocoartf949cocoasubrtf270: command not found ./start_tomcat: line 2: syntax error near unexpected token `}' ./start_tomcat: line 2: `{\fonttbl\f0\fswiss\fcharset0 Helvetica;}' What am I missing? Thanks marlene - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DBCP: Threads sitting forever in getConnection()?
Hi. 1. Please post this in a separate thread as it's a separate issue. 2. Is this happening immediately (in the first request) after start or does it take a few requests to make it wait for a connection? If it takes a few requests, your code is not closing connection as it should. They don't close themselves -- you need to explicitly close them so they can return to the pool. --David rohitmp wrote: HI All, I too am facing the same issue. But in contrast i have my resource setup in context.xml only But still tomcat is waiting indefinitely to to get a connection. My context file is as below ?xml version=1.0 encoding=UTF-8? Context path=/mycontextpath Resource name=jdbc/connPool auth=Container type=javax.sql.DataSource username=schot password=tiger driverClassName=org.gjt.mm.mysql.Driver url=jdbc:mysql://localhost:3306/myDb maxActive=100 maxIdle=30/ /Context the relevant thread dump is as follows http-8080-Processor2 daemon prio=10 tid=0x08374800 nid=0xef4 in Object.wait() [0xae069000..0xae069e30] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0xaf619100 (a org.apache.tomcat.dbcp.pool.impl.GenericObjectPool) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject (GenericObjectPool.java:810) - locked 0xaf619100 (a org.apache.tomcat.dbcp.pool.impl.GenericObjectPool) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection (PoolingDataSource.java:96) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection (BasicDataSource.java:880) at com.bhagin.vaanee.util.DBConnection.init (DBConnection.java:64) at com.bhagin.vaanee.authorisation.AttributeBeanSetter.fngetSessionAttributeBean (AttributeBeanSetter.java:42) at org.apache.jsp.authorize_jsp._jspService (authorize_jsp.java:116) at org.apache.jasper.runtime.HttpJspBase.service( HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service (HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:265) at javax.servlet.http.HttpServlet.service (HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler. processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt (LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (ThreadPool.java:689) at java.lang.Thread.run(Thread.java:619) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the best way to stop the tomcat daemon?
You should have gotten a sample service shell script in you jsvc source. Mine has this in the stop portion: jsvc -stop -pidfile $PID_FILE org.apache.catalina.startup.Bootstrap $PID_FILE is a shell variable containing the path of a file with the process id of the running jsvc. I customized the sample service script and dropped it in the /etc/init.d folder so I could use service tomcat55 start|stop --David jarrod wrote: Hi. I'm working on getting the Tomcat daemon running using jsvc. I've got it basically running (thanks, Rainer). Now I'm not sure what is the best way to stop it and to restart it. If I call # ps aux | grep tomcat this is what I get: [EMAIL PROTECTED] bin]# ps aux | grep tomcat root 4305 0.0 0.2 45856 1208 pts/0S18:30 0:00 su tomcat tomcat4306 0.0 0.2 10856 1476 pts/0S+ 18:30 0:00 bash root 4494 0.0 0.0 8000 340 ?Ss 18:58 0:00 jsvc.exec -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap -user tomcat root 4495 1.2 4.5 336120 23724 ?Sl 18:58 0:00 jsvc.exec -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap -user tomcat root 4511 0.0 0.1 5984 568 pts/1S+ 18:58 0:00 grep tomcat I could just run # kill -9 4494 and 4495, but I'm not sure it's correct to do that. Maybe it will leave things in a messed up state? Any knowledgeable advice would be appreciated. Also, what if I just want to restart Tomcat? Thanks, Ethan - ebdb http://aeondust.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp calling a servlet (or at least that's the goal)
Keep in mind it's the browser that calls the servlet, not really your jsp and the browser knows nothing of tomcat contexts. Your form ... tag should have an action of /test/servlet/UploadUnzipTest. In the jsp, you can compute this as form action=${pageContext.request.contextPath}/servlet/UploadUnzipTest enctype=multipart/form-data in jsp pages. --David Kimberly Begley wrote: it's in CATALINA_HOME/webapps/test On Wed, Mar 12, 2008 at 10:14 PM, Mark Thomas [EMAIL PROTECTED] wrote: Kimberly Begley wrote: and my jsp form calls it like this: form action=/servlet/UploadUnzipTest enctype=multipart/form-data method=post What is the context path your app is deployed to? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat and mysql
Drop the ?autoReconnect=true from your mysql url and then add validationQuery=select 1 testOnBorrow=true. I believe the testOnBorrow is true by default, but their's no harm in setting it explicitly. Resource name=jdbc/mysql_gaeaglobalvrmanager auth=Container type=javax.sql.DataSource driverClassName=com.mysql.jdbc.Driver maxIdle=15 maxWait=1 username=root url=jdbc:mysql://localhost:3306/mscore validationQuery=select 1 testOnBorrow=true maxActive=2000 removeAbandoned=true removeAbandonedTimeout=60/ Autoreconnect doesn't do what you'd assume it should. It will not automatically reconnect and then retry the query. Instead it will throw a SQLException and then connect so you can try the query again. --David Sury Balasubramanian wrote: Hello all, I run tomcat connecting to two separate instances (one mySQL instance) running on the same machine and the other one is oracle. If i leave tomcat idle overnight and come back the next day, it doesn't reconnect to mySQL even though i have the following in the JNDI settings.. Resource name=jdbc/mysql_gaeaglobalvrmanager auth=Container type=javax.sql.DataSource driverClassName=com.mysql.jdbc.Driver maxIdle=15 maxWait=1 username=root url=jdbc:mysql://localhost:3306/mscore?autoReconnect=true maxActive=2000 removeAbandoned=true removeAbandonedTimeout=60/ I dont have the reconnect option at all for oracle and the connection works fine. Is this a question to be posed to a mySQL forum. apologize if this is out of place? Thanks Sury - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Two separate instances of Tomcat running on a single Windows 2003 server.
Be sure in addition to changing the port numbers in the Connector elements of server.xml, you also change the shutdown port numbers at the top of the server.xml. --David Panian, Ardo wrote: Out of the box Tomcat uses ports 8080, 8005, and 8009? is that correct? That said if I had my other two instances running on 8180,8280, and 8105,8205 and so on this is all I would need to do? On Tue, Mar 11, 2008 at 1:21 PM, David kerber [EMAIL PROTECTED] wrote: Panian, Ardo wrote: Is it possible (and I am sure that it is) to have two separate instances of Tomcat running on a single Windows 2003 server, and connected through the ISAPI redirector to IIS running on the local system. If so could you please guide me in the right direction? Thanks Your tomcats need to be listening on different ports, but other than that there's nothing special about this setup. I have a production server with 3 instances running, and it works fine. As for the IIS part of the question, I don't use it. D - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't start tomcat 5.5.26 service on windows
Charles Caldarale wrote: I would recommend installing Tomcat (and the JVM) in directory paths without spaces; Microsoft made a real blunder when putting spaces in frequently used directory names, and Apache isn't helping. I agree. MS could have done something as dirt simple as c:\Software which is exactly what I do for my JVM, NetBeans, and Tomcat installs. --David - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with configuring Apache and Tomcat with mod_jk
The only reference to any worker.worker3.class= property is in association with some inprocess stuff that I believe got dropped from mod_jk a /long/ time ago. The current mod_jk does not have any such directive in workers.properties (see http://tomcat.apache.org/connectors-doc/reference/workers.html) I'd highly recommend you look at the official documentation at http://tomcat.apache.org/connectors-doc/ In particular, this page does has the quick how to that cuts to the bare bones of the matter: http://tomcat.apache.org/connectors-doc/generic_howto/quick.html --David Murat Birben wrote: Hi everyone, I've installed Tomcat6 to my CentOs server which has also Apache 2.2installed in it. Now I want to configure these two and I'll use mod_jk for this purpose, when i searched the net the configurations that are made consist of a line in the workers.properties file as: worker.worker3.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar But there is no such a tomcat.jar file. Is there anyone has a solution for this problem or any solution ideas? Regards, - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]