Re: Serving up a Flash file
Shey Rab Pawo [EMAIL PROTECTED] wrote: Your conclusion is not correct. What Mr. Bainbridge told you is true, but that does not restrict where you can store the files on the server. Ok, now I'm confused ... [Bainbridge]: What you need to do is generate the Flash file in in a directory that Jboss/Tomcat serves files from like webapps\yourwebappname\flash_files or similar or similar and then the value= in your embed needs to be relative to the location of the JSP that includes the tag. My interpretation of the first part of the above is that the generated Flash files need to reside in the web app's directory structure. However, you're saying that that's not the case -- they can reside wherever on the server. So, is it the second part of Mr. Bainbridge's statement that provides the clue for accessing these files? That as long as the Flash file's path is specified relative to the location of the JSP (which includes the embed tag), then I'm good to go. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : Jass Login Module not found
Hi Sara, Your login module library (and all it's dependencies) must be deployed in common/lib if you setup JAASRealm with your own component. -Message d'origine- De : Sara Blauman [mailto:[EMAIL PROTECTED] Envoyé : jeudi 17 février 2005 23:22 À : tomcat-user@jakarta.apache.org Objet : Jass Login Module not found Hi, I am running Tomcat 5.5.4 and am wanting to use Jaas with my own custom login module. My Jaas config file is being found but my login module is not. If I run with one of Sun's login modules everything works fine so I think that my Jass configuration file, JASSRealm specification in my app.xml file, and -D options are ok. I wondered if my login module was even being loaded so I instanciated it in a part of my application code to verify and sure enough it is there, but, when it is called from the LoginContext it isn't found. I am trying this from an Mbean and also a servlet and the results are the same. I am not running a security manager. I tried putting the login module in a separate jar from the rest of my application as well as having it in the same jar but the results are the same. Does anyone have any ideas? Regards, Sara - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: RE : Jass Login Module not found
Hi Sara I've deployed my custom JAASLoginModule into server/lib directory. Since Tomcat 5.0.x/5.5.x, the custom JAAS LoginModule can be loaded by the Catalina Classloader (server/lib, server/classes) either what I prefer. Regards Oliver LERBSCHER Jean-Pierre [EMAIL PROTECTED]An: 'Tomcat Users List' tomcat-user@jakarta.apache.org firoute.fr Kopie: Thema:RE : Jass Login Module not found 18.02.2005 09:21 Bitte antworten an Tomcat Users List Hi Sara, Your login module library (and all it's dependencies) must be deployed in common/lib if you setup JAASRealm with your own component. -Message d'origine- De : Sara Blauman [mailto:[EMAIL PROTECTED] Envoyé : jeudi 17 février 2005 23:22 À : tomcat-user@jakarta.apache.org Objet : Jass Login Module not found Hi, I am running Tomcat 5.5.4 and am wanting to use Jaas with my own custom login module. My Jaas config file is being found but my login module is not. If I run with one of Sun's login modules everything works fine so I think that my Jass configuration file, JASSRealm specification in my app.xml file, and -D options are ok. I wondered if my login module was even being loaded so I instanciated it in a part of my application code to verify and sure enough it is there, but, when it is called from the LoginContext it isn't found. I am trying this from an Mbean and also a servlet and the results are the same. I am not running a security manager. I tried putting the login module in a separate jar from the rest of my application as well as having it in the same jar but the results are the same. Does anyone have any ideas? Regards, Sara - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** BITTE BEACHTEN *** Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet möglicherweise vertrauliche oder gesetzlich geschützte Daten oder Informationen. Zum Empfang derselben ist (sind) ausschliesslich die genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter Ausschluss jeder Reproduktion zu zerstören und die absendende Person umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: running tomcat using sablevm
Passing the classpath to VM is not a problem coz we have wrapper wriiten over sablevm which takes java's parameters and and converts it into sablevm's parameters. The wrapper is java-sablevm provided by the sablevm jvm. Could anyone provide me suggestion of where else it would be going wrong. Regards. ---Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 11:13 AM To: Tomcat Users List Subject: Re: running tomcat using sablevm I hadnt tried SableVM. It may be that CLASSPATH settings Tomcat passes to VM is not properly passed to it. There may be difference in passing classpath to VM. Check the docs. rgds Antony Paul On Fri, 18 Feb 2005 10:45:58 +0530, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Yeah I was able to run the tomcat suing sun JVM, but not with this particular jvm. -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 10:41 AM To: Tomcat Users List Subject: Re: running tomcat using sablevm Were you able to run it in Sun or any other JVM. ? rgds Antony Paul On Fri, 18 Feb 2005 10:36:21 +0530, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, Well the OS is Redhat linux 7.2 JVM version: sablevm 1.1.9 Tomcat version : 3.3.1a (Might be this is a older version but this is what I need to install) The error I get is as follows: Java.lang.InternalError:java.lang.ClassNotFoundException: org.apache.tomcat.core.ContextManager not found in [file:/usr/Jakarta-tomcat/Jakarta-tomcat-3.3.1a-src/build/tomcat/bin/./ ../lib/tomcat.jar, file:/usr/jakarta-tomcat/Jakarta-tomcat-3.3.1a-src/build/tomcat/bin/./] at java.lang.reflect.ReflectUtil.typeToClass (ReflectUtil.java:103) at java.lang.reflect.ReflectUtil.getReturnType (ReflectUtil.java:159) at java.lang.reflect.Method.getReturnType (Method.java:175) at java.lang.Class$MethodKey.Class$MethodKey (Class.java:911) at java.lang.Class.internalGetMethods (Class.java:1109) at java.lang.Class.getMethods (Class.java:1078) at org.apache.tomcat.util.IntrospectionUtils.findMethods (IntrospectionUtils.java:727) at org.apache.tomcat.util.IntrospectionUtils.findMethod (IntrospectionUtils.java:733) at org.apache.tomcat.util.IntrospectionUtils.setAttribute (IntrospectionUtils.java:106) at org.apache.tomcat.startup.Main.execute (Main.java:304) at org.apache.tomcat.startup.Main.main (Main.java:140) at java.lang.VirtualMachine.invokeMain (VirtualMachine.java) at java.lang.VirtualMachine.main (VirtualMachine.java:108) I hope this information would help you all to give a solution to my problem!!! -Varsha. -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 10:07 AM To: Tomcat Users List Subject: Re: running tomcat using sablevm Give more details and maybe someone can help. OS Version JVM version Tomcat Version Snip from logs with error Doug - Original Message - From: [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Thursday, February 17, 2005 11:24 PM Subject: running tomcat using sablevm Hello, Has anyone tried running tomcat using sablevm (JVM). I am trying to run tomcat but it fails. It gives ClassDefNot Found error. I don't know how to go about running the tomcat. Any suggestions or any help is appreciated!!! Regards. Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s)
JSVC Problem
Hi I've finally compiled JSVC successfuly. After some trials and errors I've been able to run JSVC but then now I get the following error message indicating that the server.xml cannot be found: Feb 18, 2005 12:54:38 PM org.apache.catalina.startup.Catalina load WARNING: Can't load server.xml Feb 18, 2005 12:54:38 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 0 ms I run Tomcat like this: sudo ./bin/jsvc -Djava.endorsed.dirs=./common/endorsed -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap I've also exported CATALINA_HOME: export CATALINA_HOME=/home/behrang/Java/Tomcat-5.5.7 Any ideas? Thanks in advance, -- Behrang Saeedzadeh http://www.jroller.com/page/behrangsa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
reading xml file from disk with jsp bean under tomcat
Hi all, I am developing a simple module of my app that simple reads an xml file from disk and adds it on my database. I used tomcat-4.1.30 and jsp. My bean implements a method readFileFromDisk(String myfile). When i try to execute my jsp page i have error message with code 404: myfile (file not fund). Should anyone know where to place my xml file so that with my jsp bean i access to it? I run my bean in standalone mode, all turn well. There is something in my servlet context configuration that i don't know. Any suggestion is welcome. I thank all of you in advance. Regards Majirus - Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail
Re: reading xml file from disk with jsp bean under tomcat
1.Code 404 appears when you can't find your jsp file. Do you correctly deployed it into an webapplication ? 2.You can get the file using the absolute URL to the file like [c:/myfile.xml] but you might want first to upload the file to the webserver and then parseit. Viorel Dragomir . .. --- - Original Message - From: Janvier Majirus To: tomcat-user@jakarta.apache.org Cc: tomcat-dev@jakarta.apache.org Sent: Friday, February 18, 2005 11:42 Subject: reading xml file from disk with jsp bean under tomcat Hi all, I am developing a simple module of my app that simple reads an xml file from disk and adds it on my database. I used tomcat-4.1.30 and jsp. My bean implements a method readFileFromDisk(String myfile). When i try to execute my jsp page i have error message with code 404: myfile (file not fund). Should anyone know where to place my xml file so that with my jsp bean i access to it? I run my bean in standalone mode, all turn well. There is something in my servlet context configuration that i don't know. Any suggestion is welcome. I thank all of you in advance. Regards Majirus - Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail
Re: Serving up a Flash file
You need to break things down and to see what the browser is doing, what your server is doing, what the web application is doing and what your business logic is doing. These all have differing parts to play in this kind of a situation. The URL is merely the communication between the browser and your web server. Your web server can cooperate with your web application and do anything it wants independent of the actual URL returned. The HTTP URL is not like a FILE address. I use a Struts action, which involves a URL like resource.do?file=whatever.swf. My web server, being aware I am running Struts, notices that the URL ends in .do and sends the URL to the Struts controller class, ActionServlet. The Struts ActionServlet, having read the configuration details for resource.do, sends the request to a class I call ResourceAction. ResourceAction is a request processing class that retrieves resources like swf files and returns them as an output stream to the client browser. ResourceAction does not care about the restrictions the server has in grabbing files and can go anywhere on my server. ResourceAction sees the name/value pair file=whatever.swf and uses preprogrammed logic to go get the called whatever.swf. You can do this a lot of different ways. This is one. Do you understand? It is best to get an idea of how it all works. This takes a while. You will get it but you have to make sure you understand what is happening, if you want to keep from being confused. On Fri, 18 Feb 2005 00:03:40 -0800, Paul Erion [EMAIL PROTECTED] wrote: Shey Rab Pawo [EMAIL PROTECTED] wrote: Your conclusion is not correct. What Mr. Bainbridge told you is true, but that does not restrict where you can store the files on the server. Ok, now I'm confused ... [Bainbridge]: What you need to do is generate the Flash file in in a directory that Jboss/Tomcat serves files from like webapps\yourwebappname\flash_files or similar or similar and then the value= in your embed needs to be relative to the location of the JSP that includes the tag. My interpretation of the first part of the above is that the generated Flash files need to reside in the web app's directory structure. However, you're saying that that's not the case -- they can reside wherever on the server. So, is it the second part of Mr. Bainbridge's statement that provides the clue for accessing these files? That as long as the Flash file's path is specified relative to the location of the JSP (which includes the embed tag), then I'm good to go. Paul -- The radiance of all the stars does not equal a sixteenth part of the moon's radiance, likewise, good deeds giving us merit, all these do not equal a sixteenth part of the merit of loving-kindness.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serving up a Flash file
Another way of responding to your question would be to say that your conclusion about Mr. Bainbridge's remarks is only true if you let the web server do all the work in retrieving the file. Then, of course, the reading of the entire request URL must be with the server. That is what you seem to have assumed must happen. But, that is not necessary. That is not, in my opinion, even desirable, because it ties your web application to the logic and the relationship between the browser and the web server. The web application ideally should be decoupled from those assumptions, even if they are usually not. On Fri, 18 Feb 2005 00:03:40 -0800, Paul Erion [EMAIL PROTECTED] wrote: Shey Rab Pawo [EMAIL PROTECTED] wrote: Your conclusion is not correct. What Mr. Bainbridge told you is true, but that does not restrict where you can store the files on the server. Ok, now I'm confused ... [Bainbridge]: What you need to do is generate the Flash file in in a directory that Jboss/Tomcat serves files from like webapps\yourwebappname\flash_files or similar or similar and then the value= in your embed needs to be relative to the location of the JSP that includes the tag. My interpretation of the first part of the above is that the generated Flash files need to reside in the web app's directory structure. However, you're saying that that's not the case -- they can reside wherever on the server. So, is it the second part of Mr. Bainbridge's statement that provides the clue for accessing these files? That as long as the Flash file's path is specified relative to the location of the JSP (which includes the embed tag), then I'm good to go. Paul -- The radiance of all the stars does not equal a sixteenth part of the moon's radiance, likewise, good deeds giving us merit, all these do not equal a sixteenth part of the merit of loving-kindness.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reading xml file from disk with jsp bean under tomcat
Hi Viorel, I thank you a lot. With absolute path it woks. Regards. Majirus Viorel Dragomir [EMAIL PROTECTED] wrote: 1. Code 404 appears when you can't find your jsp file. Do you correctly deployed it into an webapplication ? 2. You can get the file using the absolute URL to the file like [c:/myfile.xml] but you might want first to upload the file to the webserver and then parseit. Viorel Dragomir . .. --- - Original Message - From: Janvier Majirus To: tomcat-user@jakarta.apache.org Cc: tomcat-dev@jakarta.apache.org Sent: Friday, February 18, 2005 11:42 Subject: reading xml file from disk with jsp bean under tomcat Hi all, I am developing a simple module of my app that simple reads an xml file from disk and adds it on my database. I used tomcat-4.1.30 and jsp. My bean implements a method readFileFromDisk(String myfile). When i try to execute my jsp page i have error message with code 404: myfile (file not fund). Should anyone know where to place my xml file so that with my jsp bean i access to it? I run my bean in standalone mode, all turn well. There is something in my servlet context configuration that i don't know. Any suggestion is welcome. I thank all of you in advance. Regards Majirus - Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail - Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail
Re: running tomcat using sablevm
On Fri, 18 Feb 2005 09:54:30 +0530, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, Has anyone tried running tomcat using sablevm (JVM). I am trying to run tomcat but it fails. It gives ClassDefNot Found error. I don't know how to go about running the tomcat. Any suggestions or any help is appreciated!!! No idea about Sable, but Kaffe from CVS works, as long as you help it by adding stuff in the classpath (commons-logging-api.jar and jmx.jar). Basically it doesn't read the manifest which are in JARs yet. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running tomcat using sablevm
Remy Maucherat remy.maucherat at gmail.com writes: No idea about Sable, but Kaffe from CVS works, as long as you help it by adding stuff in the classpath (commons-logging-api.jar and jmx.jar). Basically it doesn't read the manifest which are in JARs yet. I've just merged in some code from GNU Classpath that should fix that :) cheers, dalibor topic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: running tomcat using sablevm
Where could I find the changes which you merged. Please help me out as I need it to fix my sablevm problem. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Dalibor Topic Sent: Friday, February 18, 2005 4:34 PM To: tomcat-user@jakarta.apache.org Subject: Re: running tomcat using sablevm Remy Maucherat remy.maucherat at gmail.com writes: No idea about Sable, but Kaffe from CVS works, as long as you help it by adding stuff in the classpath (commons-logging-api.jar and jmx.jar). Basically it doesn't read the manifest which are in JARs yet. I've just merged in some code from GNU Classpath that should fix that :) cheers, dalibor topic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Request for example of use of Sun's FtpClient or Apache's FTPClient
Hello,Does anyone have an example of how to use these classes which includes how the client destination file name must be specified?I have tried both from within servlets and in both cases it finds the source file correctly but then writes the ftp get to the server. Should they not be invoked from a servlet? If so, how are they used so that the file from the server is ftp'd to the client? Regards,Susan Hoddinotthttp://www.hexworx.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running tomcat using sablevm
On Fri, 18 Feb 2005 16:48:36 +0530, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Where could I find the changes which you merged. Please help me out as I need it to fix my sablevm problem. I think you should give up on sable at the moment. I have never heard of anyone doing anthing Tomcat related with it, so it doesn't look good. Apparently, if you get Kaffe (www.kaffe.org) from CVS and build it, you might be able to run Tomcat 5.5 (with the usual JDK 1.4 compat for the jmx.jar, unless they also merged in a JMX impl) out of the box. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: disable put, delete
It should already be disabled. See the configuration of the DefaultServlet in $CATALINA_HOME/conf/web.xml -Tim Ben Kim wrote: I'm running 5.0.28 and when I ran nessus scan, it gives me a warning about put and delete methods. I'm not sure how I should take it... It seems it's not applicable but nessus still gives the warning. Could anyone advise whether tomcat configuration needs to be fixed, and then how? (The BID was not straightforward to me.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running tomcat using sablevm
varsha.agrawal at wipro.com writes: Where could I find the changes which you merged. Please help me out as I need it to fix my sablevm problem. I got them from GNU classpath's CVS so I assume you should still be able to find them there. You may need to patch sablevm for it to work, but as I don't hack on SableVM, I am afraid I don't know how to help you there. I'm sure Grzegorz, Etienne and the other nice SableVM developers on the SableVM mailing list can, though. best of luck! dalibor topic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : RE : HTTP Status 408 Error when i login
This error can occur if the session id is invalid? I checked on a few forums and one or two personnes had the same problem! The server can generate a session id invalid? very very very strange... LERBSCHER Jean-Pierre wrote: I saw different information on it! 408 The Request timed out. For some reason the Server took too much time processing your Request. Net congestion is the most likely reason. Le client n'a pas présenté une requête complète pendant le délai maximal qui lui était imparti, et le serveur a abandonné la connexion. The 408 (Request Time-out) code means that the client's request wasn't completed, and the server gave up waiting for the client to finish. A client might receive this code if it did not supply the entity-body properly, or (under HTTP 1.1) if it neglected to supply a Connection: Close header. 408 Request Time-out This response code means the client did not produce a full request within some predetermined time (usually specified in the server's configuration), and the server is disconnecting the network connection. Perhaps you can track something on the server log. Or see at tcp parameter on client or server system (I don't know precisely). Can you use netstat utility to track tcp state info on socket? Change your browser to exclude bug in browser! For the moment I have no other idea! -Message d'origine- De : Bruno Gonçalves [mailto:[EMAIL PROTECTED] Envoyé : mercredi 16 février 2005 12:16 À : Tomcat Users List Objet : Re: RE : HTTP Status 408 Error when i login Jean-Pierre, do you have any idea what causes the 408 error? Humm... Bruno Gonçalves wrote: humm.. the trace don't give me much more information! --- *The POST:* XXX: Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://localhost:8082/jcms/web/jsp/das/j_security_check Content-Type: application/x-www-form-urlencoded Content-Length: 33 j_username=adminj_password=adminGET /favicon.ico HTTP/1.1 Host: localhost:8082 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0 Accept: image/png,*/*;q=0.5 Accept-Language: en-gb,en;q=0.5 XXX: Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive *The response:* HTTP/1.1 408 The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser Content-Type: text/html;charset=utf-8 Content-Length: 1554 Date: Tue, 15 Feb 2005 18:37:09 GMT Server: Apache-Coyote/1.1 Connection: close htmlheadtitleApache Tomcat/5.0.28 - Error report/titlestyle!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo nt-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo nt-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo nt-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size: 12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--/style /headbodyh1HTTP Status 408 - The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser/h1HR size=1 noshade=noshadepbtype/b Status report/ppbmessage/b uThe time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser/u/ppbdescription/b uThe client did not produce a request within the time that the server was prepared to wait (The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser)./u/pHR size=1 noshade=noshadeh3Apache Tomcat/5.0.28/h3/body/htmlHTTP/1.1 404 /favicon.ico Content-Type: text/html;charset=utf-8 Content-Length: 988 Date: Tue, 15 Feb 2005 18:37:09 GMT Server: Apache-Coyote/1.1 htmlheadtitleApache Tomcat/5.0.28 - Error report/titlestyle!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo nt-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo nt-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo nt-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
Replacing StandardContext with a parallel implementation
I'm trying to produce my own Context implementation in Tomcat 5.0.28, while otherwise keeping as many of the standard classes as possible. It's not much fun; a couple of classes in catalina.core have package visibility, and several others refer to StandardContext explicitly. However, quite reasonably, StandardContext is not designed for subclassing - many/most of its variables are private, and some crucial decision points are buried deep within private methods that do many other things. None of this is a surprise, as Tomcat is intended to be a reference implementation of the specs, and what I'm doing isn't a part of that. All fair enough! It does make things very difficult when you want something that is like StandardContext but with a couple of differences, as *either* you have to copy most of catalina (with appropriate maintenance headaches) *or*: - You have to copy the entire implementation of StandardContext, as it is not designed for subclassing; - You have to put your copied class in the catalina.core package, so that it has access to the classes with package visibility; - You *still* have to make your copied class be a subclass of StandardContext, as otherwise the explicit references to StandardContext elsewhere in Catalina cause errors. - You are then trying to deal with StandardContext's calls to super() in methods that you have to keep in your subclass (they refer to your local variables), where your subclass and StandardContext both try to do the same thing. Is there a case for making it easier to create non-standard Contexts in Tomcat? Possibilities might include: 1. Construct an interface for the internal contract of a Context, and make StandardContext implement that interface. This breaks the dependency on implementation inheritance. This, to me, is the key one, as it means that a copy of StandardContext can work. Arguably, it's also good design practice. 2. Possibly relax the visibility on the package-specific classes. Less useful - they've got package visibility for good reason, and it's possible to get round this issue in other ways. 3. Possibly refactor StandardContext in a couple of places to bring key decision points into their own methods that can be overridden by subclasses. Least useful, I think. I've seen plenty of comments from the Tomcat maintainers that mods to Tomcat that don't help it to achieve its goal of being a reference implementation won't be considered. I suspect that all of these mods fall outside Tomcat's goal, but I want to run the first one - the interface separation - past them, simply to confirm or deny that. I'd be happy to contribute the interface and mods for 5.0 and/or 5.5, but want to check first whether it's worth doing, or whether the maintainers will simply vote it out of the codebase. Comments welcome. - Peter -- Peter Crowther, Director, Melandra Limited John Dalton House, 121 Deansgate, Manchester M3 2AB t: +44 (0)161 828 8736 f: +44 (0)161 832 5683 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JasperException while running JSP
This is really just a guess, but could it be your class isn't in a package? Try this: 1. Create the folder structure com/mycompany/mywebproject under WEB-INF/classes substituting in your company name and web project name where indicated. 2. place this line near the beginning of your java class source file: package com.mycompany.mywebproject ; Again, replace your company name and web site project name where indicated. 3. Recompile and place the resulting .class file in the WEB-INF/classes/com/mycompany/mywebproject folder created in 1. 4. Restart your webapp and try it. --David U K Laxmi wrote: I have integrated tomcat 5.5 with apache 2 successfully and i could able to run sample JSPs. Now i created a jsp page which will inititate a Java program called TestSQLLoad.java. TestSQLLoad.java talks to Ms Access database and gets me reuired fields from databasae and it will be displayed on browser thro' JSP page test-db.jsp. I'm using Netscape 7.2 browser. When i run test-db.jsp after running tomcat apache, it gives JasperException. It's saying - TestSQLLoad cannot be resolved or is not a type. I created jar file with TestSQLLoad.java TestSQLLoad.class and put it in TOMCAT_ROOT/webapps/web/WEB-INF/classes directory as well as TOMCAT_ROOT/common/lib directories. Thinking that class loader is unable to find the class, i put the above directories in my class path as well. Where i'm going wrong? What's happenning. Pls help. Here is the exception that's displayed on the browser. org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 7 in the jsp file: /JSP/test-db.jsp Generated servlet error: TestSQLLoad cannot be resolved or is not a type An error occurred at line: 7 in the jsp file: /JSP/test-db.jsp Generated servlet error: TestSQLLoad cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serving up a Flash file
Just think out of the box a little on this one. Your .swf file can be literally anywhere on the web and on any web server as long as it's accessible. Then just write your code as: HTML BODY bgcolor=#ff OBJECT width=300 height=200 align=center PARAM name=movie value=http://www.some.webserver.com/someDir/test.swf; EMBED src=http://www.some.webserver.com/someDir/test.swf; type=application/x-shockwave-flash width=300 height=200 /EMBED /OBJECT /BODY /HTML You could also use relative urls such as /someDir/test.swf, ./someDir/test.swf or test.swf if you want as long as your .swf file is available on the same server as your .html or jsp. As far as avoiding having serveral copies of the same file, that's really a matter of how you handle the dev project. You could place them all in a directory on a server separate from your webapp and just link to them. This option is a favorite of people who put their Tomcat service behind Apache and have Apache serve static content. Or (and I like this one better) have a one directory repository for all of the shared .swf files and use an ant compile task to copy them so they are included in building the .war file. when you change one of the files, just re-run the ant builds and deploy your new .war files. At your level, this might be one to keep in mind but not try until you have some other successes first. --David Paul Erion wrote: Shey Rab Pawo [EMAIL PROTECTED] wrote: Your conclusion is not correct. What Mr. Bainbridge told you is true, but that does not restrict where you can store the files on the server. Ok, now I'm confused ... [Bainbridge]: What you need to do is generate the Flash file in in a directory that Jboss/Tomcat serves files from like webapps\yourwebappname\flash_files or similar or similar and then the value= in your embed needs to be relative to the location of the JSP that includes the tag. My interpretation of the first part of the above is that the generated Flash files need to reside in the web app's directory structure. However, you're saying that that's not the case -- they can reside wherever on the server. So, is it the second part of Mr. Bainbridge's statement that provides the clue for accessing these files? That as long as the Flash file's path is specified relative to the location of the JSP (which includes the embed tag), then I'm good to go. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: JasperException while running JSP
Hi, in Tomcat Version 5.5.4 there is a bug in the JSP Compiler Jasper, it sometiems looses the classpath (Bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=32330) This is fixed in 5.5.7. So there are two ways to fix it: 1. Restart Tomcat 2. Upgrade to 5.5.7 Cheers Bernhard -Ursprüngliche Nachricht- Von: U K Laxmi [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 18. Februar 2005 04:27 An: tomcat-user@jakarta.apache.org Betreff: JasperException while running JSP I have integrated tomcat 5.5 with apache 2 successfully and i could able to run sample JSPs. Now i created a jsp page which will inititate a Java program called TestSQLLoad.java. TestSQLLoad.java talks to Ms Access database and gets me reuired fields from databasae and it will be displayed on browser thro' JSP page test-db.jsp. I'm using Netscape 7.2 browser. When i run test-db.jsp after running tomcat apache, it gives JasperException. It's saying - TestSQLLoad cannot be resolved or is not a type. I created jar file with TestSQLLoad.java TestSQLLoad.class and put it in TOMCAT_ROOT/webapps/web/WEB-INF/classes directory as well as TOMCAT_ROOT/common/lib directories. Thinking that class loader is unable to find the class, i put the above directories in my class path as well. Where i'm going wrong? What's happenning. Pls help. Here is the exception that's displayed on the browser. org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 7 in the jsp file: /JSP/test-db.jsp Generated servlet error: TestSQLLoad cannot be resolved or is not a type An error occurred at line: 7 in the jsp file: /JSP/test-db.jsp Generated servlet error: TestSQLLoad cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3 28) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 56) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 96) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
crossContext=true ignored after restart
After my war file is reloaded I can no longer access other webapp context's. Simple test.jsp follows. It prints everything is fine 1st time war file is deployed. If I rebuild the war file and it is auto reloaded I get cross context failed. test,jsp (does not live in /) % ServletContext testContext = getServletContext(); if (testContext == null) { out.println(basic context get failed); } else { ServletContext crossContext = testContext.getContext(/); if (crossContext == null) out.println(cross context failed); else { out.println(everything is fine); } } % Any ideas here? Tony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JDBC - newbie
Hi I need some help with JDBC set. This is my first time. I have installed Tomcat and its working great. I have jdbc drivers, I have copied the jar file under commons lib I have read dbcp. How do I create a database connection pool, What is my next logical step. Please copy the code for me. Also Please let me know if I could use the Admin to do this. All help will be appreciated. Thanks __ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JDBC - newbie
Hi, The next logical step is to read the Tomcat JNDI Datasource manual at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html Allistair. -Original Message- From: deepak suldhal [mailto:[EMAIL PROTECTED] Sent: 18 February 2005 14:29 To: tomcat users Subject: JDBC - newbie Hi I need some help with JDBC set. This is my first time. I have installed Tomcat and its working great. I have jdbc drivers, I have copied the jar file under commons lib I have read dbcp. How do I create a database connection pool, What is my next logical step. Please copy the code for me. Also Please let me know if I could use the Admin to do this. All help will be appreciated. Thanks __ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk CLOSE_WAIT state and 1 byte recv buffer
Hi, i have the following problem with mod_jk from tomcat-connectors (1.2.5 - 1.2.8) including 1.2.9 (from cvs). Environment: apache is 2.0.52, forking model, server os is linux 2.6.10-1.760_FC3smp (fedora core 3), mod_jk 1.2.9 (others tested as well) After a while i get sockets stuck in CLOSE_WAIT state and netstat shows 1 byte in the receive queue for this socket. tcpdump shows, that the backend (jetty) half-closes the connection with FIN. That FIN is acked from the mod_jk machine but the connection is not closed (no FIN is send). sample netstat output: ... tcp1 0 192.168.100.1:51003 192.168.170.8:32511 CLOSE_WAIT tcp1 0 192.168.100.1:53875 192.168.170.8:12522 CLOSE_WAIT tcp1 0 192.168.100.1:53619 192.168.170.8:12521 CLOSE_WAIT ... Are there any known issues? Where do is start debugging this? What information is missing? TIA, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JasperException while running JSP
Thanks David. Yes, after putting it in a package, it worked. But now i'm facing new problem. It's throwing following exception. javax.naming.NameNotFoundException: Name jdbc is not bound in this Context Anybody know solution? --- David Smith [EMAIL PROTECTED] wrote: This is really just a guess, but could it be your class isn't in a package? Try this: 1. Create the folder structure com/mycompany/mywebproject under WEB-INF/classes substituting in your company name and web project name where indicated. 2. place this line near the beginning of your java class source file: package com.mycompany.mywebproject ; Again, replace your company name and web site project name where indicated. 3. Recompile and place the resulting .class file in the WEB-INF/classes/com/mycompany/mywebproject folder created in 1. 4. Restart your webapp and try it. --David U K Laxmi wrote: I have integrated tomcat 5.5 with apache 2 successfully and i could able to run sample JSPs. Now i created a jsp page which will inititate a Java program called TestSQLLoad.java. TestSQLLoad.java talks to Ms Access database and gets me reuired fields from databasae and it will be displayed on browser thro' JSP page test-db.jsp. I'm using Netscape 7.2 browser. When i run test-db.jsp after running tomcat apache, it gives JasperException. It's saying - TestSQLLoad cannot be resolved or is not a type. I created jar file with TestSQLLoad.java TestSQLLoad.class and put it in TOMCAT_ROOT/webapps/web/WEB-INF/classes directory as well as TOMCAT_ROOT/common/lib directories. Thinking that class loader is unable to find the class, i put the above directories in my class path as well. Where i'm going wrong? What's happenning. Pls help. Here is the exception that's displayed on the browser. org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 7 in the jsp file: /JSP/test-db.jsp Generated servlet error: TestSQLLoad cannot be resolved or is not a type An error occurred at line: 7 in the jsp file: /JSP/test-db.jsp Generated servlet error: TestSQLLoad cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: JasperException while running JSP
Thanks Bernhard. I was not using packages for my java class. After using package, now it worked fine for me. --- Bernhard Slominski [EMAIL PROTECTED] wrote: Hi, in Tomcat Version 5.5.4 there is a bug in the JSP Compiler Jasper, it sometiems looses the classpath (Bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=32330) This is fixed in 5.5.7. So there are two ways to fix it: 1. Restart Tomcat 2. Upgrade to 5.5.7 Cheers Bernhard -Ursprüngliche Nachricht- Von: U K Laxmi [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 18. Februar 2005 04:27 An: tomcat-user@jakarta.apache.org Betreff: JasperException while running JSP I have integrated tomcat 5.5 with apache 2 successfully and i could able to run sample JSPs. Now i created a jsp page which will inititate a Java program called TestSQLLoad.java. TestSQLLoad.java talks to Ms Access database and gets me reuired fields from databasae and it will be displayed on browser thro' JSP page test-db.jsp. I'm using Netscape 7.2 browser. When i run test-db.jsp after running tomcat apache, it gives JasperException. It's saying - TestSQLLoad cannot be resolved or is not a type. I created jar file with TestSQLLoad.java TestSQLLoad.class and put it in TOMCAT_ROOT/webapps/web/WEB-INF/classes directory as well as TOMCAT_ROOT/common/lib directories. Thinking that class loader is unable to find the class, i put the above directories in my class path as well. Where i'm going wrong? What's happenning. Pls help. Here is the exception that's displayed on the browser. org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 7 in the jsp file: /JSP/test-db.jsp Generated servlet error: TestSQLLoad cannot be resolved or is not a type An error occurred at line: 7 in the jsp file: /JSP/test-db.jsp Generated servlet error: TestSQLLoad cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3 28) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 56) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 96) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat's JK2 connector
Yes, Tomcat uses ajp13 and is compatible with the mod_jk2 connector. Yes, jk2 is deprecated and is in the process of being replaced by the ajp13 proxy in Apache 2.1. Apache 2.1 is a development release only and this should show up in Apache 2.2. Yes, you can use Apache with rewrite rules to create sticky cookie-based sessions and load balancing when using the http connector of Tomcat. Its not the easiest thing, but there are some examples out there. I'd say just use mod_jk2 until Apache 2.2 is available, or look and see if you can get the ajp13 proxy module to work with apache 2.0. Alternatively, you can use the development only web server apache 2.1, but I don't suggest that. Byron -Original Message- From: Pavel Krupets [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 4:10 PM To: tomcat-user@jakarta.apache.org Subject: Tomcat's JK2 connector Hello, I am evaluating JSF and need to test my component in clustered environment so I need Apache or Tomcat running as a front-end proxy server between users and JBoss'es instances, and I have some questions: 1) Whether Tomcat contains JK2 connector? I have one PC with Tomcat installed and I don't need good performance (I just need to test my component). 2) I found out that JK2 was deprecated. Can I use something to be a front-end proxy instead of JK (with sticky sessions: sessions should be moved to another server if and only if server which was serving them went down)? In latest JK2 source distribution I found following: --CUT-- This version matches the version included with tomcat-5.0.2 --CUT-- I have Tomcat 5.5.7 installed. With regards, Pavel Krupets - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to prevent multiple threads per session
Thanks for this pointer. This looks like it may solve the problem I'm having with thread consumption, but I'm concerned that the implementation might cause issues with frames where a session may make 3 requests to the servlet with different parameters. If the filter takes into consideration the request uri/url then that could be avoided- I'll look up the code and see how it handles the problem. Thanks, Byron -Original Message- From: sven morales [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 12:08 AM To: Tomcat Users List Subject: Re: How to prevent multiple threads per session Hi, Filters. There was a filter code developed by Ivelin Ivanov and Kevin Chipalkowsky that maybe be applicable to your needs. It is called RequestControlFilter. If a user makes two request, A and B then A will be processed first while B waits. When A finishes, B will be processed. If a user makes three or more requests ( e.g. A, B, and C) then the first will be processed (A), and then the after it finishes the last will be processed (C), and any intermediate requests will be skipped (B). aka_sergio --- Guernsey, Byron (GE Consumer Industrial) [EMAIL PROTECTED] wrote: I have a bit of a problem where deep in a servlet there is some synchronized code that is synchronized on an object in session. On a rare occasion, that code runs very slowly when a long report is running or a database slows. This causes the users of the application to keep clicking stop and refresh- thinking their request is going to run. Recently when the server stopped responding, I did a kill -3 and found almost all of the threads waiting for that synchronzied session object- meaning 1 user had managed to consume a large number of threads be click refresh. I realize that I could modify the code to fail out if it couldn't grab the monitor in a set period of time, but I'd prefer to cancel the thread that has no web browser endpoint associated with it- the one that holds the monitor and won't release it until its done with its query. Basically, if someone refreshes, I'd like to abort any threads they already have running- or simply allow tomcat to abort the processing when the threads endpoint goes away. Is there any way I can accomplish this? I'm using Tomcat 4.1.31 and Mod_jk2 on apache 2.0.52 Thanks, Byron == Byron Guernsey Senior Software Architect GE Consumer Industrial Systems (502) 452 - 5101 __ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE : RE : HTTP Status 408 Error when i login
Something weird... When I run my application on my local machine using the url http://localhost:8080/myapp/, I obtain the HTTP Status 408, but now when I use the url with the ip of my LAN work http://ip:8080/myapp/, I obtain a HTTP Status 403: HTTP Status 403 - Access to the requested resource has been denied *type* Status report *message* _Access to the requested resource has been denied_ *description* _Access to the specified resource (Access to the requested resource has been denied) has been forbidden._ Any idea? Bruno Gonçalves wrote: This error can occur if the session id is invalid? I checked on a few forums and one or two personnes had the same problem! The server can generate a session id invalid? very very very strange... LERBSCHER Jean-Pierre wrote: I saw different information on it! 408 The Request timed out. For some reason the Server took too much time processing your Request. Net congestion is the most likely reason. Le client n'a pas présenté une requête complète pendant le délai maximal qui lui était imparti, et le serveur a abandonné la connexion. The 408 (Request Time-out) code means that the client's request wasn't completed, and the server gave up waiting for the client to finish. A client might receive this code if it did not supply the entity-body properly, or (under HTTP 1.1) if it neglected to supply a Connection: Close header. 408 Request Time-out This response code means the client did not produce a full request within some predetermined time (usually specified in the server's configuration), and the server is disconnecting the network connection. Perhaps you can track something on the server log. Or see at tcp parameter on client or server system (I don't know precisely). Can you use netstat utility to track tcp state info on socket? Change your browser to exclude bug in browser! For the moment I have no other idea! -Message d'origine- De : Bruno Gonçalves [mailto:[EMAIL PROTECTED] Envoyé : mercredi 16 février 2005 12:16 À : Tomcat Users List Objet : Re: RE : HTTP Status 408 Error when i login Jean-Pierre, do you have any idea what causes the 408 error? Humm... Bruno Gonçalves wrote: humm.. the trace don't give me much more information! --- *The POST:* XXX: Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://localhost:8082/jcms/web/jsp/das/j_security_check Content-Type: application/x-www-form-urlencoded Content-Length: 33 j_username=adminj_password=adminGET /favicon.ico HTTP/1.1 Host: localhost:8082 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0 Accept: image/png,*/*;q=0.5 Accept-Language: en-gb,en;q=0.5 XXX: Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive *The response:* HTTP/1.1 408 The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser Content-Type: text/html;charset=utf-8 Content-Length: 1554 Date: Tue, 15 Feb 2005 18:37:09 GMT Server: Apache-Coyote/1.1 Connection: close htmlheadtitleApache Tomcat/5.0.28 - Error report/titlestyle!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo nt-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo nt-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo nt-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size: 12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--/style /headbodyh1HTTP Status 408 - The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser/h1HR size=1 noshade=noshadepbtype/b Status report/ppbmessage/b uThe time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser/u/ppbdescription/b uThe client did not produce a request within the time that the server was prepared to wait (The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser)./u/pHR size=1 noshade=noshadeh3Apache Tomcat/5.0.28/h3/body/htmlHTTP/1.1 404 /favicon.ico Content-Type: text/html;charset=utf-8 Content-Length: 988 Date: Tue, 15 Feb 2005 18:37:09 GMT Server: Apache-Coyote/1.1
Re: mod_jk CLOSE_WAIT state and 1 byte recv buffer
hello, i have a similar (the same?) problem, where i currently do not know what's really the root cause of it. i was monitoring my webapp (apache 2.0.52, tomcat 5.0.28, mod_jk2, later tomcat 5.5.7 with mod_jk 1.2.8) on port 80 (apache/mod_jk) by requesting a given url with curl. sometimes the url was not reachable, the output of curl then was curl: (6) name lookup timed out. the netstat-output was sometimes ok (cons in state ESTABLISHED), but sometimes it looked like the following: tcp1 0 127.0.0.1:50195 127.0.0.1:8009 CLOSE_WAIT 12109/httpd tcp1 0 127.0.0.1:50203 127.0.0.1:8009 CLOSE_WAIT 12113/httpd tcp1 0 127.0.0.1:50228 127.0.0.1:8009 CLOSE_WAIT 12108/httpd tcp1 0 127.0.0.1:50215 127.0.0.1:8009 CLOSE_WAIT 12111/httpd tcp0 0 127.0.0.1:50258 127.0.0.1:8009 ESTABLISHED 12112/httpd tcp0 0 127.0.0.1:50262 127.0.0.1:8009 ESTABLISHED 3268/httpd tcp0 0 127.0.0.1:50240 127.0.0.1:8009 ESTABLISHED 12110/httpd tcp0 0 127.0.0.1:50244 127.0.0.1:8009 ESTABLISHED 13759/httpd tcp0 0 127.0.0.1:50249 127.0.0.1:8009 ESTABLISHED 12114/httpd tcp0 0 127.0.0.1:50254 127.0.0.1:8009 ESTABLISHED 12115/httpd tcp0 0 :::127.0.0.1:50238 :::127.0.0.1:3306 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:50237 :::127.0.0.1:3306 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:8009 :::127.0.0.1:50262 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:8009 :::127.0.0.1:50258 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:8009 :::127.0.0.1:50254 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:8009 :::127.0.0.1:50249 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:8009 :::127.0.0.1:50244 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:8009 :::127.0.0.1:50240 ESTABLISHED 12562/java then i added the hostname of the requested url to /etc/hosts, and since then everything was ok. adding the hostname to /etc/hosts was my last action, after that i was not further debugging. my environment: 2.6.10-1.760_FC3 tomcat5-5.5.7-2jpp httpd-2.0.52-3.1 mod_jk-ap20-1.2.8-1jpp cheers, martin On Fri, 2005-02-18 at 15:49 +0100, Michael Stiller wrote: Hi, i have the following problem with mod_jk from tomcat-connectors (1.2.5 - 1.2.8) including 1.2.9 (from cvs). Environment: apache is 2.0.52, forking model, server os is linux 2.6.10-1.760_FC3smp (fedora core 3), mod_jk 1.2.9 (others tested as well) After a while i get sockets stuck in CLOSE_WAIT state and netstat shows 1 byte in the receive queue for this socket. tcpdump shows, that the backend (jetty) half-closes the connection with FIN. That FIN is acked from the mod_jk machine but the connection is not closed (no FIN is send). sample netstat output: ... tcp1 0 192.168.100.1:51003 192.168.170.8:32511 CLOSE_WAIT tcp1 0 192.168.100.1:53875 192.168.170.8:12522 CLOSE_WAIT tcp1 0 192.168.100.1:53619 192.168.170.8:12521 CLOSE_WAIT ... Are there any known issues? Where do is start debugging this? What information is missing? TIA, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Martin Grotzke Hohenesch 38, 22765 Hamburg Tel. +49 (0) 40.39905668 Mobil +49 (0) 170.9365656 E-Mail[EMAIL PROTECTED] Onlinehttp://www.javakaffee.de signature.asc Description: This is a digitally signed message part
RE: java.lang.IllegalStateException in tomcat 5.5.4
... session.invalidate(); ... In my case it was like this. I had written above code in my logout.jsp code. Any time when the user had refreshed the logoutpage page similar error occurred. Perhaps it might be case with you. That you are trying to acess the session method either session.getAttribute(adfad); or above one after you have invalidated the session in your code. Not sure. -Original Message- From: ssk 2001 [mailto:[EMAIL PROTECTED] Sent: Thursday, February 17, 2005 11:58 AM To: tomcat-user@jakarta.apache.org Subject: java.lang.IllegalStateException in tomcat 5.5.4 How to solve this error , pls advice java.lang.IllegalStateException: getAttribute: Session already invalidated at org.apache.catalina.session.StandardSession.getAttribute (StandardSession.java:984) at org.apache.catalina.session.StandardSessionFacade.getAttribute (StandardSessionFacade.java:109) at gnu.beanfactory.SessionScope.get(Unknown Source) at gnu.beanfactory.BeanFactory.findInstance(Unknown Source) at gnu.beanfactory.BeanFactory.getObjectInstance(Unknown Source) at gnu.beanfactory.BeanFactory.getObjectInstance(Unknown Source) at gnu.beanfactory.BeanContext.lookup(Unknown Source) at gnu.beanfactory.BeanContext.lookup(Unknown Source) at org.apache.jsp.include.nav_jsp.checkAccess (org.apache.jsp.include.nav_jsp:62) at org.apache.jsp.include.nav_jsp._jspService (org.apache.jsp.include.nav_jsp:1601) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:325) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:214) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105) at org.apache.catalina.valves.AccessLogValve.invoke (AccessLogValve.java:526) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke (JkCoyoteHandler.java:300) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:383) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at org.apache.jk.common.ChannelSocket.processConnection (ChannelSocket.java:675) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) thanks SSK - Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
deployment with a different context than war name - tomcat 5.5.7
Hi, Can anyone point me to a working example of of using a context xml fragment file to deploy an war at a different context than the war name? In other words, I don't want to define it in the global config file. I've read all the docs I can find on this, and it still doesn't work. I'm using the manager app to deploy, and it always says invalid context. Thanks, Chad Woolley - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deployment with a different context than war name - tomcat 5.5.7
I would suspect your stuck on this one. I think I remember a thread here back in the fall that essentially said the path attribute to Context/ is ignored in TC 5.5.7. Any of the developers care to confirm that?? --David Chad Woolley wrote: Hi, Can anyone point me to a working example of of using a context xml fragment file to deploy an war at a different context than the war name? In other words, I don't want to define it in the global config file. I've read all the docs I can find on this, and it still doesn't work. I'm using the manager app to deploy, and it always says invalid context. Thanks, Chad Woolley - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Daemon
Hi I get the following error message in the error log when I start the Tomcat as a daemon via the provided jsvc tool: Feb 18, 2005 10:09:12 PM org.apache.catalina.startup.Catalina load WARNING: Can't load server.xml After this, I can verify that Tomcat is not run by hitting http://localhost:8080 at the address bar of my browser. Tomcat runs fine if I run it via the startup.sh script. Any ideas? Thanks in advance, -- Behrang Saeedzadeh http://www.jroller.com/page/behrangsa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CGI
Hi, Is the following consistent with how CGI perl scripts should execute under a tomcat webapp? I have a webapp called mywebapp and a perl script called myperl The web.xml file contains the following: servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-nameclientInputTimeout/param-name param-value100/param-value /init-param init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-nameexecutable/param-name param-valueperl/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi/param-value /init-param load-on-startup5/load-on-startup /servlet and servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping If I enter the url //localhost:8080/mywebapp/WEB-INF/cgi/myperl I get a resource unavailable error. If I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it executes the myperl script successsfully. If I edit the web.xml file to change the cgiPathPrefix to, for example, myscripts/cgi and then I enter the url //localhost:8080/mywebapp/myscripts/cgi/myperl it simply displays the perl script code. Again if I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it executes the myperl script successsfully. TIA Steve.
Cluster and Connection Pooling problem
Environment = Tomcat 5.5.7, Java 1.5_01, IIS (win2k) using the isapi redirector. Problem: Using the scenario outlined by Graham King (http://www.javaworld.com/javaworld/jw-12-2004/jw-1220-tomcat.html ), a simple cluster is easily configured. However, when attempting to deploy our application, I run into a wall attempting to get things in the proper order regarding the connection pooling needed by the application. The application's error log indicates that the connection pooling parms are not really being read in the server.xml. What is the conflict? Anyone else encountered this? I hesitate to supply xml in this forum if someone else has encountered this problem TIA Chuck
Re: CGI
Kelly, Steve wrote: Hi, Is the following consistent with how CGI perl scripts should execute under a tomcat webapp? I have a webapp called mywebapp and a perl script called myperl The web.xml file contains the following: servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-nameclientInputTimeout/param-name param-value100/param-value /init-param init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-nameexecutable/param-name param-valueperl/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi/param-value /init-param load-on-startup5/load-on-startup /servlet and servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping If I enter the url //localhost:8080/mywebapp/WEB-INF/cgi/myperl I get a resource unavailable error. Correct. Resources under WEB-INF are not directly accessible. If I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it executes the myperl script successsfully. Also correct. If I edit the web.xml file to change the cgiPathPrefix to, for example, myscripts/cgi and then I enter the url //localhost:8080/mywebapp/myscripts/cgi/myperl it simply displays the perl script code. This is as expected for the configuration settings. However, I wouldn't want to run my server like this. It is usually a bad thing (tm) from a security point of view to expose your CGI script. Again if I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it executes the myperl script successsfully. Also, as expected from the config settings. HTH, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: CGI
Hi Mark, Yes, thanks. That confirms what I'm seeing. Only problem is I have some freebie product (the Spellchecker plugin for HTMLArea) that needs to execute a perl script to call the Aspell spell checker, which gets invoked from somewhere inside the plugin's javascript I believe using some form of relative addressing. Does this mean I either need to edit the javascript or I can't do it ? Steve. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: 18 February 2005 19:28 To: Tomcat Users List Subject: Re: CGI Kelly, Steve wrote: Hi, Is the following consistent with how CGI perl scripts should execute under a tomcat webapp? I have a webapp called mywebapp and a perl script called myperl The web.xml file contains the following: servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-nameclientInputTimeout/param-name param-value100/param-value /init-param init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-nameexecutable/param-name param-valueperl/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi/param-value /init-param load-on-startup5/load-on-startup /servlet and servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping If I enter the url //localhost:8080/mywebapp/WEB-INF/cgi/myperl I get a resource unavailable error. Correct. Resources under WEB-INF are not directly accessible. If I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it executes the myperl script successsfully. Also correct. If I edit the web.xml file to change the cgiPathPrefix to, for example, myscripts/cgi and then I enter the url //localhost:8080/mywebapp/myscripts/cgi/myperl it simply displays the perl script code. This is as expected for the configuration settings. However, I wouldn't want to run my server like this. It is usually a bad thing (tm) from a security point of view to expose your CGI script. Again if I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it executes the myperl script successsfully. Also, as expected from the config settings. HTH, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CGI
There is another option. You can change the CGI servlet mapping to use extension mapping. If you map it to *.cgi or *.pl or whatever you use on your system, CGI scripts in the 'normal' web app path should be served by the CGI servlet. Mark Kelly, Steve wrote: Hi Mark, Yes, thanks. That confirms what I'm seeing. Only problem is I have some freebie product (the Spellchecker plugin for HTMLArea) that needs to execute a perl script to call the Aspell spell checker, which gets invoked from somewhere inside the plugin's javascript I believe using some form of relative addressing. Does this mean I either need to edit the javascript or I can't do it ? Steve. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: 18 February 2005 19:28 To: Tomcat Users List Subject: Re: CGI Kelly, Steve wrote: Hi, Is the following consistent with how CGI perl scripts should execute under a tomcat webapp? I have a webapp called mywebapp and a perl script called myperl The web.xml file contains the following: servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-nameclientInputTimeout/param-name param-value100/param-value /init-param init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-nameexecutable/param-name param-valueperl/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi/param-value /init-param load-on-startup5/load-on-startup /servlet and servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping If I enter the url //localhost:8080/mywebapp/WEB-INF/cgi/myperl I get a resource unavailable error. Correct. Resources under WEB-INF are not directly accessible. If I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it executes the myperl script successsfully. Also correct. If I edit the web.xml file to change the cgiPathPrefix to, for example, myscripts/cgi and then I enter the url //localhost:8080/mywebapp/myscripts/cgi/myperl it simply displays the perl script code. This is as expected for the configuration settings. However, I wouldn't want to run my server like this. It is usually a bad thing (tm) from a security point of view to expose your CGI script. Again if I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it executes the myperl script successsfully. Also, as expected from the config settings. HTH, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: disable put, delete
It should already be disabled. See the configuration of the DefaultServlet in $CATALINA_HOME/conf/web.xml I'd appreciate more advice. I've tested it myself and it didn't work. My nessus also says it could not exploit it but recommends I disable it. Here's my DefaultServlet section, all surrounded by !-- -- line by line, from the $CATALINA_HOME/conf/web.xml. Am I right to interpret this as saying that readonly is [true] by default (hence commented out) for DefaultServlet, so that any DELETE or PUT attempt is rejected? === The default servlet for all web applications, that serves static servlets with servlet mappings (defined either here or in your own web.xml file. This servlet supports the following initialization parameters (default values are in square brackets): ... readonly Is this context read only, so HTTP commands like PUT and DELETE are rejected? [true] So, could I say it's been already disabled in 5.0.28 and nessus's finding is wrong? I need to either correct this problem, or submit an explanation of why it is not necessary, to my security folks, so would appreciate some kind of confirmation from anyone knowledgeable. Thanks, Ben Kim Database Developer/Systems Administrator 434E Harrington Tower / College of Education Texas AM University - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: disable put, delete
If readonly is set to true, then PUT and DELETE are disabled. The scanning tool might be expecting a differnet HTTP status code when trying to exploit PUT and DELETE. -Tim Ben Kim wrote: It should already be disabled. See the configuration of the DefaultServlet in $CATALINA_HOME/conf/web.xml I'd appreciate more advice. I've tested it myself and it didn't work. My nessus also says it could not exploit it but recommends I disable it. Here's my DefaultServlet section, all surrounded by !-- -- line by line, from the $CATALINA_HOME/conf/web.xml. Am I right to interpret this as saying that readonly is [true] by default (hence commented out) for DefaultServlet, so that any DELETE or PUT attempt is rejected? === The default servlet for all web applications, that serves static servlets with servlet mappings (defined either here or in your own web.xml file. This servlet supports the following initialization parameters (default values are in square brackets): ... readonly Is this context read only, so HTTP commands like PUT and DELETE are rejected? [true] So, could I say it's been already disabled in 5.0.28 and nessus's finding is wrong? I need to either correct this problem, or submit an explanation of why it is not necessary, to my security folks, so would appreciate some kind of confirmation from anyone knowledgeable. Thanks, Ben Kim Database Developer/Systems Administrator 434E Harrington Tower / College of Education Texas AM University - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: disable put, delete
Thanks. On Fri, 18 Feb 2005, Tim Funk wrote: If readonly is set to true, then PUT and DELETE are disabled. The scanning tool might be expecting a differnet HTTP status code when trying to exploit PUT and DELETE. -Tim Ben Kim wrote: It should already be disabled. See the configuration of the DefaultServlet in $CATALINA_HOME/conf/web.xml I'd appreciate more advice. I've tested it myself and it didn't work. My nessus also says it could not exploit it but recommends I disable it. Here's my DefaultServlet section, all surrounded by !-- -- line by line, from the $CATALINA_HOME/conf/web.xml. Am I right to interpret this as saying that readonly is [true] by default (hence commented out) for DefaultServlet, so that any DELETE or PUT attempt is rejected? === The default servlet for all web applications, that serves static servlets with servlet mappings (defined either here or in your own web.xml file. This servlet supports the following initialization parameters (default values are in square brackets): ... readonly Is this context read only, so HTTP commands like PUT and DELETE are rejected? [true] So, could I say it's been already disabled in 5.0.28 and nessus's finding is wrong? I need to either correct this problem, or submit an explanation of why it is not necessary, to my security folks, so would appreciate some kind of confirmation from anyone knowledgeable. Thanks, Ben Kim Database Developer/Systems Administrator 434E Harrington Tower / College of Education Texas AM University - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Regards, Ben Kim Database Developer/Systems Administrator 434E Harrington Tower / College of Education Texas AM University - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can't get DB Pooling to Work
I've tried word for word what the documentation says to do to use DBCP with Tomcat but I can't get it to work. Here's the exception I am getting: javax.servlet.ServletException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779) org.apache.jsp.MyJsp_jsp._jspService(org.apache.jsp.MyJsp_jsp:81) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276) org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159) org.apache.jsp.MyJsp_jsp._jspx_meth_sql_query_0(org.apache.jsp.MyJsp_jsp:100) org.apache.jsp.MyJsp_jsp._jspService(org.apache.jsp.MyJsp_jsp:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) I believe my context isn't working or it's not finding it. I'm using Tomcat 5.5.7 and mySQL. I have tried putting it in server.xml, in context.xml in the MANIFEST-INF folder of the webapp, and in conf/Catalina/localhost/context.xml. The context I'm using is exactly like it is in the docs except the user and password and resource name and it uses mySQL. Context path=/dotdraft docBase=dotdraft debug=5 reloadable=true crossContext=true Resource name=jdbc/dotdraft auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=xxx password=xxx driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/test/ /Context Thanks, Karl
Re: Can't get DB Pooling to Work
Making a guess that you are on Linux, who owns the jar file? Where did you put it? Are you wanting global or context resource? Doug From: Karl Coleman I've tried word for word what the documentation says to do to use DBCP with Tomcat but I can't get it to work. Here's the exception I am getting: javax.servlet.ServletException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver root cause javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't get DB Pooling to Work
XP Pro. I want a context resource if that means I want it applied to just this application, not all of them. Which JAR? Both the JConnector JAR and naming-factory-dbcp.jar are in common/lib. Thanks, Karl -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 4:00 PM To: Tomcat Users List Subject: Re: Can't get DB Pooling to Work Making a guess that you are on Linux, who owns the jar file? Where did you put it? Are you wanting global or context resource? Doug From: Karl Coleman I've tried word for word what the documentation says to do to use DBCP with Tomcat but I can't get it to work. Here's the exception I am getting: javax.servlet.ServletException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver root cause javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't get DB Pooling to Work
Add the driver to you app war. This will allow you to make changes to the driver without a restarting Tomcat. Place nothing in server.xml. Add it the context.xml. What version is the driver and how big is it? Doug - Original Message - From: Karl Coleman [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Friday, February 18, 2005 4:06 PM Subject: RE: Can't get DB Pooling to Work XP Pro. I want a context resource if that means I want it applied to just this application, not all of them. Which JAR? Both the JConnector JAR and naming-factory-dbcp.jar are in common/lib. Thanks, Karl -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 4:00 PM To: Tomcat Users List Subject: Re: Can't get DB Pooling to Work Making a guess that you are on Linux, who owns the jar file? Where did you put it? Are you wanting global or context resource? Doug From: Karl Coleman I've tried word for word what the documentation says to do to use DBCP with Tomcat but I can't get it to work. Here's the exception I am getting: javax.servlet.ServletException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver root cause javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't get DB Pooling to Work
I got it working. It was really dumb actually. In conf/Catalina/localhost I had the file named as context.xml. I renamed it to match the name of the app and it worked. Thanks for your input Doug. Karl -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 4:24 PM To: Tomcat Users List Subject: Re: Can't get DB Pooling to Work Add the driver to you app war. This will allow you to make changes to the driver without a restarting Tomcat. Place nothing in server.xml. Add it the context.xml. What version is the driver and how big is it? Doug - Original Message - From: Karl Coleman [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Friday, February 18, 2005 4:06 PM Subject: RE: Can't get DB Pooling to Work XP Pro. I want a context resource if that means I want it applied to just this application, not all of them. Which JAR? Both the JConnector JAR and naming-factory-dbcp.jar are in common/lib. Thanks, Karl -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 4:00 PM To: Tomcat Users List Subject: Re: Can't get DB Pooling to Work Making a guess that you are on Linux, who owns the jar file? Where did you put it? Are you wanting global or context resource? Doug From: Karl Coleman I've tried word for word what the documentation says to do to use DBCP with Tomcat but I can't get it to work. Here's the exception I am getting: javax.servlet.ServletException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver root cause javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: java.sql.SQLException: No suitable driver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
log4j in tomcat erroring -- dont know why
Hi. I've got tomcat up and running and have a log4j.properties file in my WEB-INF\classes directory. My servlets and jsps run fine. No errors. Stdout.log shows this on servlet execution and i have no idea why because the log4j log file is being populated just fine even though my stdout says its not. ANY ideas? thanks log4j:ERROR Could not read configuration file [log4j.properties]. java.io.FileNotFoundException: log4j.properties (The system cannot find the file specified) java.io.FileNotFoundException: log4j.properties (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at java.io.FileInputStream.init(FileInputStream.java:66) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:297) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:315) at com.imediainc.nycballet.nycbbuilder.dataaccess.DBConnection.getConnection(Unknown Source) at com.imediainc.nycballet.nycbbuilder.dataaccess.NYCBData.getAllReps(Unknown Source) at com.imediainc.nycballet.nycbbuilder.control.RepsMainController.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397) 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(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637) at org.apache.jsp.reps.index_jsp._jspService(index_jsp.java:43) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
Deploying / Update Web Applications without deploying JSP files
Dear sirs, I have to deploy a Tomcat app that has several thousands of JSP files (using Struts of course). It's an application that will be deployed as a client application with a browser interface. The customer don't want me to release the JSP files due to security reasons. (In fact, the customer asked us if we could encrypt the .class files as well). I know that if I precompile the JSP files and change the web.xml file to include one tag servlet servlet-nameservlet-class/servlet for each JSP file I could do it, but I have a problem: the web.xml file became very, very large, and I can't update it each time I need to update the application (my team wrote an application updater that downloads only the changed class files, but the updater program can't do file editing). Is there any way to update a web application without having to update the web.xml file? Thank you for your attention. ___ Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: CGI
Thanks - I'll give it a try. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: 18 February 2005 19:51 To: Tomcat Users List Subject: Re: CGI There is another option. You can change the CGI servlet mapping to use extension mapping. If you map it to *.cgi or *.pl or whatever you use on your system, CGI scripts in the 'normal' web app path should be served by the CGI servlet. Mark Kelly, Steve wrote: Hi Mark, Yes, thanks. That confirms what I'm seeing. Only problem is I have some freebie product (the Spellchecker plugin for HTMLArea) that needs to execute a perl script to call the Aspell spell checker, which gets invoked from somewhere inside the plugin's javascript I believe using some form of relative addressing. Does this mean I either need to edit the javascript or I can't do it ? Steve. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: 18 February 2005 19:28 To: Tomcat Users List Subject: Re: CGI Kelly, Steve wrote: Hi, Is the following consistent with how CGI perl scripts should execute under a tomcat webapp? I have a webapp called mywebapp and a perl script called myperl The web.xml file contains the following: servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-nameclientInputTimeout/param-name param-value100/param-value /init-param init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-nameexecutable/param-name param-valueperl/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi/param-value /init-param load-on-startup5/load-on-startup /servlet and servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping If I enter the url //localhost:8080/mywebapp/WEB-INF/cgi/myperl I get a resource unavailable error. Correct. Resources under WEB-INF are not directly accessible. If I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it executes the myperl script successsfully. Also correct. If I edit the web.xml file to change the cgiPathPrefix to, for example, myscripts/cgi and then I enter the url //localhost:8080/mywebapp/myscripts/cgi/myperl it simply displays the perl script code. This is as expected for the configuration settings. However, I wouldn't want to run my server like this. It is usually a bad thing (tm) from a security point of view to expose your CGI script. Again if I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it executes the myperl script successsfully. Also, as expected from the config settings. HTH, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Capitalizing names OT
Does anyone know if there is an equivalent to the Oracle Initcap() function? I am trying to write a database independent name capitalization routine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need simple app to test tc5 session failover - please
Hello Tomcat users and creators. Thank you all for helping out. Can anyone point to me a simple app that I can use to test if tomcat 5 session failover is working? I don't think any of the standard tomcat examples will work. I tried numguess, but my guess count gets reset to 1 each time I fail over. I'm not a java programmer so I'm not able to write my own test app. I do know from the docs page that an app has to meet (at least) the following two requirements: 1. All your session attributes must implement java.io.Serializable 2. Make sure your web.xml has the distributable/ element I'm using tomcat 5.0.30 on linux. I have just set up jk-based load balancing and uncommented the cluster section in the server.xml. Thanks very much, [EMAIL PROTECTED]
Re: Tomcat Daemon
Hi I solved the problem by using the -user option. Actually, I've to run the jsvc by calling sudo ... cause this is how the security model of Ubuntu Linux, based on Debian, is: cd $CATALINA_HOME ./bin/jsvc -Djava.endorsed.dirs=./common/endorsed -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err -user myusername org.apache.catalina.startup.Bootstrap Is this acceptabe? Or It's better to create a Tomcat user and run Tomcat by specifying user Tomcat? Regards, Behrang S. On Fri, 18 Feb 2005 22:14:12 +0330, Behrang Saeedzadeh [EMAIL PROTECTED] wrote: Hi I get the following error message in the error log when I start the Tomcat as a daemon via the provided jsvc tool: Feb 18, 2005 10:09:12 PM org.apache.catalina.startup.Catalina load WARNING: Can't load server.xml After this, I can verify that Tomcat is not run by hitting http://localhost:8080 at the address bar of my browser. Tomcat runs fine if I run it via the startup.sh script. Any ideas? Thanks in advance, -- Behrang Saeedzadeh http://www.jroller.com/page/behrangsa -- Behrang Saeedzadeh http://www.jroller.com/page/behrangsa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Missing application web.xml, using defaults only
Hi Mr. Calderale, Do you mind sharing the tool you used to know how many times Tomcat uses calls the system call chdir() ? I would appreciate it if the code is readily for us to use. Thank you. aka_sergio __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Daemon
Sorry, I had a type in the previous post. The actual command is: cd $CATALINA_HOME sudo ./bin/jsvc -Djava.endorsed.dirs=./common/endorsed -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err -user myusername org.apache.catalina.startup.Bootstrap On Sat, 19 Feb 2005 02:17:25 +0330, Behrang Saeedzadeh [EMAIL PROTECTED] wrote: Hi I solved the problem by using the -user option. Actually, I've to run the jsvc by calling sudo ... cause this is how the security model of Ubuntu Linux, based on Debian, is: cd $CATALINA_HOME ./bin/jsvc -Djava.endorsed.dirs=./common/endorsed -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err -user myusername org.apache.catalina.startup.Bootstrap Is this acceptabe? Or It's better to create a Tomcat user and run Tomcat by specifying user Tomcat? Regards, Behrang S. On Fri, 18 Feb 2005 22:14:12 +0330, Behrang Saeedzadeh [EMAIL PROTECTED] wrote: Hi I get the following error message in the error log when I start the Tomcat as a daemon via the provided jsvc tool: Feb 18, 2005 10:09:12 PM org.apache.catalina.startup.Catalina load WARNING: Can't load server.xml After this, I can verify that Tomcat is not run by hitting http://localhost:8080 at the address bar of my browser. Tomcat runs fine if I run it via the startup.sh script. Any ideas? Thanks in advance, -- Behrang Saeedzadeh http://www.jroller.com/page/behrangsa -- Behrang Saeedzadeh http://www.jroller.com/page/behrangsa -- Behrang Saeedzadeh http://www.jroller.com/page/behrangsa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: log4j in tomcat erroring -- dont know why
Brian, Are you calling PropertyConfigurator explicitly anywhere in your code? Brian McGovern wrote: Hi. I've got tomcat up and running and have a log4j.properties file in my WEB-INF\classes directory. My servlets and jsps run fine. No errors. Stdout.log shows this on servlet execution and i have no idea why because the log4j log file is being populated just fine even though my stdout says its not. ANY ideas? thanks log4j:ERROR Could not read configuration file [log4j.properties]. java.io.FileNotFoundException: log4j.properties (The system cannot find the file specified) java.io.FileNotFoundException: log4j.properties (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at java.io.FileInputStream.init(FileInputStream.java:66) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:297) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:315) at com.imediainc.nycballet.nycbbuilder.dataaccess.DBConnection.getConnection(Unknown Source) at com.imediainc.nycballet.nycbbuilder.dataaccess.NYCBData.getAllReps(Unknown Source) at com.imediainc.nycballet.nycbbuilder.control.RepsMainController.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397) 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(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637) at org.apache.jsp.reps.index_jsp._jspService(index_jsp.java:43) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RE: Missing application web.xml, using defaults only
From: sven morales [mailto:[EMAIL PROTECTED] Subject: RE: Missing application web.xml, using defaults only Do you mind sharing the tool you used to know how many times Tomcat uses calls the system call chdir() ? Sorry, it's specific to the file system implemenation on our mainframes, and is not at all portable to any other platform. However, if you buy one of our boxes, you get the utility for free... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: log4j in tomcat erroring -- dont know why
No Im not. I thought i didnt need to if i wanted to grab the root loggers props which look in WEB-INF/classes. And again, my log4j file as defined in my properties file is logging just fine. -B -Original Message- From: Edmon Begoli [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 5:51 PM To: Tomcat Users List Subject: Re: log4j in tomcat erroring -- dont know why Brian, Are you calling PropertyConfigurator explicitly anywhere in your code? Brian McGovern wrote: Hi. I've got tomcat up and running and have a log4j.properties file in my WEB-INF\classes directory. My servlets and jsps run fine. No errors. Stdout.log shows this on servlet execution and i have no idea why because the log4j log file is being populated just fine even though my stdout says its not. ANY ideas? thanks log4j:ERROR Could not read configuration file [log4j.properties]. java.io.FileNotFoundException: log4j.properties (The system cannot find the file specified) java.io.FileNotFoundException: log4j.properties (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at java.io.FileInputStream.init(FileInputStream.java:66) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:297) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:315) at com.imediainc.nycballet.nycbbuilder.dataaccess.DBConnection.getConnection(Unknown Source) at com.imediainc.nycballet.nycbbuilder.dataaccess.NYCBData.getAllReps(Unknown Source) at com.imediainc.nycballet.nycbbuilder.control.RepsMainController.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397) 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(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637) at org.apache.jsp.reps.index_jsp._jspService(index_jsp.java:43) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.endorsed.dirs question
Hi Why do I have to specify $CATALINA_HOME/common/endorsed as an endorsed dir when running Tomcat as a daemon although that it's an empty dir? Regards, -- Behrang Saeedzadeh http://www.jroller.com/page/behrangsa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need simple app to test tc5 session failover - please
Dan, I just spent a couple of weeks working with Filip Hanik to get session replication and failover working correctly on Tomcat 5.5.7 (at least for the specifics of my situation). Failover was working fine, though I did have to use a special listener to handle the replication of the jvmRoute suffix with MOD_JK properly. What was not working was when one restarted the failed node - some exceptions would occur and it would not pick up the load properly. I wrote a simple test case application that just updated a counter in an object stored in the session each time a request was submitted. The application is tiny, but the supporting jar files make the zip file about 4mb in size. If you can receive such a large email attachment let me know and I'll send it directly to you. Let me know - Richard Dan Carwin wrote: Hello Tomcat users and creators. Thank you all for helping out. Can anyone point to me a simple app that I can use to test if tomcat 5 session failover is working? I don't think any of the standard tomcat examples will work. I tried numguess, but my guess count gets reset to 1 each time I fail over. I'm not a java programmer so I'm not able to write my own test app. I do know from the docs page that an app has to meet (at least) the following two requirements: 1. All your session attributes must implement java.io.Serializable 2. Make sure your web.xml has the distributable/ element I'm using tomcat 5.0.30 on linux. I have just set up jk-based load balancing and uncommented the cluster section in the server.xml. Thanks very much, [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Putting JDBC drivers in common/lib
Is it mandatory to put the JDBC drivers in the common/lib? Or can I put the JDBC drivers in each context's WEB-INF/lib? As long as I can remember I read somewhere that these drivers most be placed in the common/lib directory cause otherwise it introduces class loader problems. But what if I have two different Web applications and each of them use a different version of the JDBC driver for the same RDBMS? Regards, -- Behrang Saeedzadeh http://www.jroller.com/page/behrangsa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Putting JDBC drivers in common/lib
if you are using jndi, i think they have to be in common/lib. If not, they can go in WEB-INF/lib instead. Larry On Sat, 19 Feb 2005 02:42:35 +0330, Behrang Saeedzadeh [EMAIL PROTECTED] wrote: Is it mandatory to put the JDBC drivers in the common/lib? Or can I put the JDBC drivers in each context's WEB-INF/lib? As long as I can remember I read somewhere that these drivers most be placed in the common/lib directory cause otherwise it introduces class loader problems. But what if I have two different Web applications and each of them use a different version of the JDBC driver for the same RDBMS? Regards, -- Behrang Saeedzadeh http://www.jroller.com/page/behrangsa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Capitalizing names OT
David Short wrote: Does anyone know if there is an equivalent to the Oracle Initcap() function? I am trying to write a database independent name capitalization routine. In what language? Java? public static String initCap(String s) { return (s == null || s.length() == 0) ? s : s.substring(0,1).toUpperCase() + s.substring(1); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Capitalizing names OT
http://jakarta.apache.org/commons/lang/apidocs/org/apache/commons/lang/StringUtils.html#capitalize(java.lang.String) -Tim Shankar Unni wrote: David Short wrote: Does anyone know if there is an equivalent to the Oracle Initcap() function? I am trying to write a database independent name capitalization routine. In what language? Java? public static String initCap(String s) { return (s == null || s.length() == 0) ? s : s.substring(0,1).toUpperCase() + s.substring(1); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Capitalizing names OT
Thanks! -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Shankar Unni Sent: Friday, February 18, 2005 4:18 PM To: tomcat-user@jakarta.apache.org Subject: Re: Capitalizing names OT David Short wrote: Does anyone know if there is an equivalent to the Oracle Initcap() function? I am trying to write a database independent name capitalization routine. In what language? Java? public static String initCap(String s) { return (s == null || s.length() == 0) ? s : s.substring(0,1).toUpperCase() + s.substring(1); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Capitalizing names OT
Thanks! -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 4:23 PM To: Tomcat Users List Subject: Re: Capitalizing names OT http://jakarta.apache.org/commons/lang/apidocs/org/apache/commons/lang/Strin gUtils.html#capitalize(java.lang.String) -Tim Shankar Unni wrote: David Short wrote: Does anyone know if there is an equivalent to the Oracle Initcap() function? I am trying to write a database independent name capitalization routine. In what language? Java? public static String initCap(String s) { return (s == null || s.length() == 0) ? s : s.substring(0,1).toUpperCase() + s.substring(1); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Capitalizing names OT
If you are doing proper names, it's a lot harder than that. Some issues with names are: The Mac names McNeil, McKendry, and the other variants that are Mac. Names that contain an apostrophe O'Hara, O'Neil Then you have Generational qualifiers, III, IV, V George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: David Short [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 3:29 PM To: Tomcat Users Group (E-mail) Subject: Capitalizing names OT Does anyone know if there is an equivalent to the Oracle Initcap() function? I am trying to write a database independent name capitalization routine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Capitalizing names OT
Yep, I agree. Thanks for the feedback. -Original Message- From: George Sexton [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 4:41 PM To: 'Tomcat Users List'; [EMAIL PROTECTED] Subject: RE: Capitalizing names OT If you are doing proper names, it's a lot harder than that. Some issues with names are: The Mac names McNeil, McKendry, and the other variants that are Mac. Names that contain an apostrophe O'Hara, O'Neil Then you have Generational qualifiers, III, IV, V George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: David Short [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 3:29 PM To: Tomcat Users Group (E-mail) Subject: Capitalizing names OT Does anyone know if there is an equivalent to the Oracle Initcap() function? I am trying to write a database independent name capitalization routine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Programmatically call the error page for a 500 error
Hello, This works in Tomcat 4, but not 5 (5.0.25) response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); RequestDispatcher dispatcher = request.getRequestDispatcher(somePage); dispatcher.forward(request, response); I would like to set a 500 error code, and call different pages in different circumstances. Right now it calls the default Tomcat 500 page. If I add an error page in the web.xml it will call that. But I need to programmatically decide, so I can have a 500 error go to various JSPs that communicate the problem. Any ideas? Thanks, Chris ps. I tried an error page that was just text, so the error page is not triggering an error I believe... the same code works fine in tomcat 4 (.1.28 I think) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Name jdbc is not bound in this Context error
I could able to get thro' JarperException. Thanks for replies. Now facing new problem. I'm getting NameNotFoundException - Name jdbc is not bound in this Context Environment what i'm using is: Apache 2, Tomcat 5.5, Netscape 7.2, MsAccess 2003 on windows 2000 machine. I integrated tomcat and apache as apache doesn't support jsps. I wrote a JSP called test-db.jsp which in turn calls java program TestSQLLoad.java. This TestSQLLoad.java performs dattabase operation, fetches the data from table and that data is displayed on Netscape thro' jsp. 1. test-db.jsp resides ina directory TOMCAT_HOME/webapps/web/JSP. Contents are as follows: %@ page contentType=text/html import=testpkg.TestSQLLoad% html head titleDB Test/title /head body % TestSQLLoad tst = new TestSQLLoad(); tst.init(); % h2Results/h2 User - %= tst.getUser() %br/ Pwd - %= tst.getPassword() %br/ Id - %= tst.getID() % /body /html 2. TestSQLLoad.java is residing in following directory. TOMCAT_HOME/webapps/web/classes/testpkg direcotry. Contents of this file are as follows: package testpkg; import javax.naming.*; import javax.sql.*; import java.sql.*; public class TestSQLLoad { String user = Not Connected; String pwd = no pwd; int id = -1; public void init() { try{ Context ctx = new InitialContext(); if(ctx == null ) { throw new Exception(Boom - No Context); } Context envCtx = (Context) ctx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/db1); //DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/db1); if (ds != null) { Connection conn = ds.getConnection(); if(conn != null) { user = Got Connection +conn.toString(); Statement stmt = conn.createStatement(); String q = select name, password, id from user; ResultSet rst = stmt.executeQuery(q); if(rst.next()) { user=rst.getString(1); pwd=rst.getString(2); id = rst.getInt(3); } conn.close(); } } }catch(Exception e) { e.printStackTrace(); } } public String getUser() { return user; } public String getPassword() { return pwd; } public int getID() { return id; } } 3. I created a jar file using testpkg directory put it in TOMCAT_HOME/common/lib as well as TOMCAT_HOME/webapps/web/WEB-INF/lib directory. 4. I created MsAccess database called db1.mdb and put it in TOMCAT_HOME/WEBAPPS/WEB/db1 directory. I created a table called user with fields name, password and ID. ID is the primary key. 5. I included following in the server.xml of TOMCAT_HOME/conf directory. Context path=/db1 docBase=C:/tomcat/webapps/db1 debug=5 reloadable=true crossContext=true GlobalNamingResources Resource name=jdbc/db1 auth=Container type=javax.sql.DataSource factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory driverClassName=sun.jdbc.odbc.JdbcOdbcDrive url=jdbc:odbc://localhost/db1 maxActive=20 maxIdle=10 maxWait=-1 / /GlobalNamingResources /Context 6. I included following in context.xml of TOMCAT_HOME/conf directory. ResourceLink global=jdbc/db1 name=jdbc/db1 type=javax.sql.DataSource/ 7. I included following in web.xml of TOMCAT_HOME/webapps/web/WEB-INF directory. resource-ref res-ref-namejdbc/db1/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref 8. I copied commons-collections-2.1.1.jar, commons-dbcp-1.2.1.jar and commons-pool-1.2.jar into TOMCAT_HOME/common/lib directory. 9. I started apache, tomcat and then opened a browser and typed http://localhost/web/JSP/test-db.jsp. 10. I get following on the browser. Results User - Not Connected Pwd - no pwd Id - -1 11. On the tomcat window where tomcat is running i'm getting following error. javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:769) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(Resou rceLinkFactory.java:96) at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) at org.apache.naming.NamingContext.lookup(NamingContext.java:792) at org.apache.naming.NamingContext.lookup(NamingContext.java:139) at org.apache.naming.NamingContext.lookup(NamingContext.java:780) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at testpkg.TestSQLLoad.init(TestSQLLoad.java:22) at org.apache.jsp.JSP.test_002ddb_jsp._jspService(org.apache.jsp.JSP.tes t_002ddb_jsp:54) at