Re: Update to 6.0.20: deferred EL expressions
On Mon, Jun 8, 2009 at 1:07 AM, Mark Thomasma...@apache.org wrote: ... Just followed through the source code and found a handy comment (yes they really do exist) pointing me towards section JSP.2.2 of the JSP spec. This makes it clear that #{...} is not allowed in template text so unless I am mis-reading your original example you are trying to use #{...} in template text so that is not permitted by the spec. That it working prior to 6.0.20 appears to be a side-effect of the bug fix Chuck already identified. What does seem wrong is that JSP.2.2 requires a translation error is you use #{...} in template text and that doesn't seem to be happening. That is worth creating a bug for, so please go ahead so it doesn't get forgotten about. Thanks to all! I suspected that the 6.0.20 behavior was right (wrt to the 6.0.18 one) after reading Section 1.2.4 of JavaServer Pages 2.1 Expression Language Specification... ... And now you confirm this. In effect there is no error message in the Tomcat log. So I'm going to submit a bug for this. Again, thank you very much for the support!! Ciao!! -- Marco - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Header names lower case
Hi, I noticed the Tomcat implementation of HttpServletRequest.getHeaderNames() returns all header names in lower case. Is there any possibility to get them with their original case? Thanks, Alexander - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tyson Beffa is in Training
I will be out of the office starting 06/08/2009 and will not return until 06/15/2009. I will be out of the office in Training until Monday, June 15th. For WebSphere issues please email WebSphere-Admin. Thanks- Tyson Beffa This message and any files transmitted with it are the property of Sigma-Aldrich Corporation, are confidential, and are intended solely for the use of the person or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please contact the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Update to 6.0.20: deferred EL expressions
On Mon, Jun 8, 2009 at 9:30 AM, Marco Guazzonemarco.guazz...@gmail.com wrote: On Mon, Jun 8, 2009 at 1:07 AM, Mark Thomasma...@apache.org wrote: ... Just followed through the source code and found a handy comment (yes they really do exist) pointing me towards section JSP.2.2 of the JSP spec. This makes it clear that #{...} is not allowed in template text so unless I am mis-reading your original example you are trying to use #{...} in template text so that is not permitted by the spec. That it working prior to 6.0.20 appears to be a side-effect of the bug fix Chuck already identified. What does seem wrong is that JSP.2.2 requires a translation error is you use #{...} in template text and that doesn't seem to be happening. That is worth creating a bug for, so please go ahead so it doesn't get forgotten about. Thanks to all! I suspected that the 6.0.20 behavior was right (wrt to the 6.0.18 one) after reading Section 1.2.4 of JavaServer Pages 2.1 Expression Language Specification... ... And now you confirm this. In effect there is no error message in the Tomcat log. So I'm going to submit a bug for this. New bug reported. Link to bugzilla: https://issues.apache.org/bugzilla/show_bug.cgi?id=47331 Ciao!! -- Marco - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problem setting Host
Hello I've been facing problem setting my Host property with Tomcat 5.5. Please have a look on the code below and let me know what's wrong with my code. Now if I use the url nexusroi.com, it doesn't work whereas the url nexusroi.com/nexus does work well. Can anyone help me resolve this? -- View this message in context: http://www.nabble.com/Problem-setting-Host-tp23921857p23921857.html Sent from the Tomcat - User mailing list archive at Nabble.com.
RE: Problem setting Host
From: hellian [mailto:rashedulhasan2...@yahoo.com] I've been facing problem setting my Host property with Tomcat 5.5. Please have a look on the code below and let me know what's wrong with my code. Now if I use the url nexusroi.com, it doesn't work whereas the url nexusroi.com/nexus does work well. Can anyone help me resolve this? Cool, someone else using invisible ink :-). We could help more if you supplied the code. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Application Clustering
Hi Everyone, I've got a general query around application clustering in Tomcat. We've got several clusters of Tomcat 6.0.18, each consisting of 2-3 nodes per cluster. The setup is fairly straightforward and we're using the 'based on load' balance method at the web server layer for the ajp workers. This works great for scenarios where cluster members are bought in and out of the cluster groups, e.g. when bouncing Tomcat. My question is whether the cluster engine can be configured to failover to a working node when an application becomes unavailable on another node, i.e. when an application is bought down, rather than the Tomcat instance, using Lambda Probe for example. Can anybody please point me in the right direction? Cheers, Darren Connaught plc is one of the UK's top 250 companies on the London Stock Exchange and the leading provider of integrated services operating in the compliance, social housing and public sector markets. Please visit our website to see a full list of Connaught's Registered Companies www.connaught.plc.uk/group/aboutconnaught/registeredcompanies Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete this message. Connaught plc, Head Office 01392 444546
Servlet Error
Hi all, I am new to Tomcat/Apache, and have just about started to learn JSP/Servlets as well. I just wrote my first Hello world servlet (code below) and tried to run it, but got several errors. Here's exactly what I did: 1. I wrote Hello.java (code below) and put it in /webapps/ROOT directory 2. I tried to compile it (javac Hello.java) but got errors. (see below) I would appreciate if someone would tell me what I am missing. Also, after the servlet compiles, do I need to put it in WEB-INF? Just for the records, I try to access the servlet using http://localhost:8080/Hello and I am using Java version 1.6. Thanks in advance. ---CODE--- import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class Hello extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println(Hello World); } } --ERRORS-- Hello.java:2: package javax.servlet does not exist import javax.servlet.*; ^ Hello.java:3: package javax.servlet.http does not exist import javax.servlet.http.*; ^ Hello.java:5: cannot find symbol symbol: class HttpServlet public class Hello extends HttpServlet { ^ Hello.java:6: cannot find symbol symbol : class HttpServletRequest location: class Hello public void doGet(HttpServletRequest request, ^ Hello.java:7: cannot find symbol symbol : class HttpServletResponse location: class Hello HttpServletResponse response) ^ Hello.java:8: cannot find symbol symbol : class ServletException location: class Hello throws ServletException, IOException { ^ 6 errors
RE: Problem setting Host
nexus is a commercial software vendor and is responsible for their errors so i would contact them first in the meanwhile you can help yourself find the root of this problem by enabling logging so you can see the exception displayed in the logs (my logs are located at $CATALINA_HOME/logs/$HOSTNAME.-MM-DD.log) http://tomcat.apache.org/tomcat-6.0-doc/logging.html Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Mon, 8 Jun 2009 03:50:38 -0700 From: rashedulhasan2...@yahoo.com To: users@tomcat.apache.org Subject: Problem setting Host Hello I've been facing problem setting my Host property with Tomcat 5.5. Please have a look on the code below and let me know what's wrong with my code. Now if I use the url nexusroi.com, it doesn't work whereas the url nexusroi.com/nexus does work well. Can anyone help me resolve this? -- View this message in context: http://www.nabble.com/Problem-setting-Host-tp23921857p23921857.html Sent from the Tomcat - User mailing list archive at Nabble.com. _ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009
RE: Servlet Error
is servlet-api.jar on classpath usually located at $CATALINA_HOME\lib\servlet-api.jar what does your web-inf/web.xml look like? Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Mon, 8 Jun 2009 04:25:36 -0700 Subject: Servlet Error From: listan...@gmail.com To: users@tomcat.apache.org Hi all, I am new to Tomcat/Apache, and have just about started to learn JSP/Servlets as well. I just wrote my first Hello world servlet (code below) and tried to run it, but got several errors. Here's exactly what I did: 1. I wrote Hello.java (code below) and put it in /webapps/ROOT directory 2. I tried to compile it (javac Hello.java) but got errors. (see below) I would appreciate if someone would tell me what I am missing. Also, after the servlet compiles, do I need to put it in WEB-INF? Just for the records, I try to access the servlet using http://localhost:8080/Hello and I am using Java version 1.6. Thanks in advance. ---CODE--- import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class Hello extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println(Hello World); } } --ERRORS-- Hello.java:2: package javax.servlet does not exist import javax.servlet.*; ^ Hello.java:3: package javax.servlet.http does not exist import javax.servlet.http.*; ^ Hello.java:5: cannot find symbol symbol: class HttpServlet public class Hello extends HttpServlet { ^ Hello.java:6: cannot find symbol symbol : class HttpServletRequest location: class Hello public void doGet(HttpServletRequest request, ^ Hello.java:7: cannot find symbol symbol : class HttpServletResponse location: class Hello HttpServletResponse response) ^ Hello.java:8: cannot find symbol symbol : class ServletException location: class Hello throws ServletException, IOException { ^ 6 errors _ Hotmail® has ever-growing storage! Don’t worry about storage limits. http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009
RE: Problem setting Host
Sorry...I added the code, I don't know why it disappeared. Anyway the code ia as follows: Host name=nexusroi.com appBase=C:\superior\nexus\war deployOnStartup=true autoDeploy=false unpackWARs=true deployXML=false xmlValidation=false xmlNamespaceAware=false Context path=/nexus docBase=C:\superior\nexus\war workDir=C:\superior\nexus\work reloadable=true Resource auth=Container name=jdbc/NEXUS type=javax.sql.DataSource password=root driverClassName=com.mysql.jdbc.Driver maxIdle=2 maxWait=2000 username=root url=jdbc:mysql://localhost:3306/nexus maxActive=4 / /Context /Host Peter Crowther wrote: From: hellian [mailto:rashedulhasan2...@yahoo.com] I've been facing problem setting my Host property with Tomcat 5.5. Please have a look on the code below and let me know what's wrong with my code. Now if I use the url nexusroi.com, it doesn't work whereas the url nexusroi.com/nexus does work well. Can anyone help me resolve this? Cool, someone else using invisible ink :-). We could help more if you supplied the code. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Problem-setting-Host-tp23921857p23922502.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Servlet Error
Hi Martin, Thanks for your reply. My Apache Tomcat version is 5.5.27. The servlet-api.jar is in $CATALINA_HOME/common/lib. I included it in the classpath and now the code compiles without any errors. I am including my web.xml file below. Please let me know what else I need to do to get the servlet to work, and how to access it later on. Thanks again. Anand -- web.xml -- web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameWelcome to Tomcat/display-name description Welcome to Tomcat /description !-- JSPC servlet mappings start -- servlet servlet-nameorg.apache.jsp.index_jsp/servlet-name servlet-classorg.apache.jsp.index_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.index_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping !-- JSPC servlet mappings end -- /web-app On Mon, Jun 8, 2009 at 4:37 AM, Martin Gainty mgai...@hotmail.com wrote: is servlet-api.jar on classpath usually located at $CATALINA_HOME\lib\servlet-api.jar what does your web-inf/web.xml look like? Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Mon, 8 Jun 2009 04:25:36 -0700 Subject: Servlet Error From: listan...@gmail.com To: users@tomcat.apache.org Hi all, I am new to Tomcat/Apache, and have just about started to learn JSP/Servlets as well. I just wrote my first Hello world servlet (code below) and tried to run it, but got several errors. Here's exactly what I did: 1. I wrote Hello.java (code below) and put it in /webapps/ROOT directory 2. I tried to compile it (javac Hello.java) but got errors. (see below) I would appreciate if someone would tell me what I am missing. Also, after the servlet compiles, do I need to put it in WEB-INF? Just for the records, I try to access the servlet using http://localhost:8080/Hello and I am using Java version 1.6. Thanks in advance. ---CODE--- import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class Hello extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println(Hello World); } } --ERRORS-- Hello.java:2: package javax.servlet does not exist import javax.servlet.*; ^ Hello.java:3: package javax.servlet.http does not exist import javax.servlet.http.*; ^ Hello.java:5: cannot find symbol symbol: class HttpServlet public class Hello extends HttpServlet { ^ Hello.java:6: cannot find symbol symbol : class HttpServletRequest location: class Hello public void doGet(HttpServletRequest request, ^ Hello.java:7: cannot find symbol symbol : class HttpServletResponse location: class Hello HttpServletResponse response) ^ Hello.java:8: cannot find symbol symbol : class ServletException location: class Hello throws ServletException, IOException { ^ 6 errors _ Hotmail® has ever-growing storage! Don’t worry about storage limits. http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009
how can i extract row http data from request
Hello all i need to deal with legacy web app code , that needs to add basic authentication to it with sessions now i need to be able to extract the session id from the header ( can't add sessions into the code ) the scenario is that only once and only once per page i pass the session into the server side. but in the next server side calls i don't have it and i can add code to pass it into the server side call since i have the session from the first time i will save it into the map with the session id as the key. now i need only to be able to extract the session id on every client request . my question is .. can it be done ? Thanks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Application Clustering
On 08.06.2009 13:22, Darren Kukulka wrote: Hi Everyone, I've got a general query around application clustering in Tomcat. We've got several clusters of Tomcat 6.0.18, each consisting of 2-3 nodes per cluster. The setup is fairly straightforward and we're using the 'based on load' balance method at the web server layer for the ajp workers. This works great for scenarios where cluster members are bought in and out of the cluster groups, e.g. when bouncing Tomcat. My question is whether the cluster engine can be configured to failover to a working node when an application becomes unavailable on another node, i.e. when an application is bought down, rather than the Tomcat instance, using Lambda Probe for example. Can anybody please point me in the right direction? If you are using mod_jk (?), then you can use the so-called status worker to let mod_jk know, that you do no longer forward traffix to some nodes. This can also be scripted. If you only want to stop forwarding for some JkMounts, then look at the possibilities of uriworkermap.properties, and the so-called mount extensions. They allow to dynamically stop forwarding of individual mounts to some members of a load balancing worker. Automatic detection of an unavailable context is not very robust. You might have a look at the worker attribute fail_on_status. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: how can i extract row http data from request
From: Meir Yanovich [mailto:meiry...@gmail.com] i need to deal with legacy web app code , that needs to add basic authentication to it with sessions now i need to be able to extract the session id from the header ( can't add sessions into the code ) the scenario is that only once and only once per page i pass the session into the server side. but in the next server side calls i don't have it and i can add code to pass it into the server side call since i have the session from the first time i will save it into the map with the session id as the key. now i need only to be able to extract the session id on every client request . my question is .. can it be done ? If I'm answering the right question... Create a Filter. Filters can do things to requests and responses before and/or after the legacy web app code sees the request. The Filter can handle the authentication, for example by setting a cookie on a first response in a new session, and reading the cookie afterwards. I suspect some of the other people on the list may have more information on how to do this - I know the theory, but haven't had to deal with authentication in reality! - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Error building Tomcat 6.0.18
I get the following errors trying to build Tomcat v6.0.18 from source on linux? It appears to be a javac error in the dbcp module, can anyone help please? I also modidifed the build.properties for to compile against = 1.6 Evironment: Linux Ant 1.7.0 jdk 1.6.0_12 testexist: [echo] Testing for /home/jhoare/tc6.0.18/lib/tomcat6-deps/dbcp/tomcat-dbcp.jar downloadgz: [get] Getting: http://archive.apache.org/dist/commons/dbcp/source/commons-dbcp-1.2.2-src.tar.gz [get] To: /home/jhoare/tc6.0.18/lib/file.tar.gz [gunzip] Expanding /home/jhoare/tc6.0.18/lib/file.tar.gz to /home/jhoare/tc6.0.18/lib/file.tar [untar] Expanding: /home/jhoare/tc6.0.18/lib/file.tar into /home/jhoare/tc6.0.18/lib [delete] Deleting: /home/jhoare/tc6.0.18/lib/file.tar [delete] Deleting: /home/jhoare/tc6.0.18/lib/file.tar.gz [mkdir] Created dir: /home/jhoare/tc6.0.18/lib/tomcat6-deps/dbcp build-tomcat-dbcp: [copy] Copying 67 files to /home/jhoare/tc6.0.18/lib/tomcat6-deps/dbcp [mkdir] Created dir: /home/jhoare/tc6.0.18/lib/tomcat6-deps/dbcp/src/java/org/apache/tomcat/dbcp [move] Moving 63 files to /home/jhoare/tc6.0.18/lib/tomcat6-deps/dbcp/src/java/org/apache/tomcat/dbcp [mkdir] Created dir: /home/jhoare/tc6.0.18/lib/tomcat6-deps/dbcp/classes [javac] Compiling 63 source files to /home/jhoare/tc6.0.18/lib/tomcat6-deps/dbcp/classes [javac] /home/jhoare/tc6.0.18/lib/tomcat6-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/BasicDataSource.java:44: org.apache.tomcat.dbcp.dbcp.BasicDataSource is not abstract and does not override abstract method isWrapperFor(java.lang.Class?) in java.sql.Wrapper [javac] public class BasicDataSource implements DataSource { [javac]^ [javac] /home/jhoare/tc6.0.18/lib/tomcat6-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/DelegatingStatement.java:46: org.apache.tomcat.dbcp.dbcp.DelegatingStatement is not abstract and does not override abstract method isPoolable() in java.sql.Statement [javac] public class DelegatingStatement extends AbandonedTrace implements Statement {... Get vacation perfect and shop your summer essentials at www.net-a-porter.com __ CONFIDENTIALITY NOTICE The information in this email is confidential and is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, you must not read, use or disseminate the information. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Net a Porter Ltd. Net A Porter Ltd is a company registered in England Wales Number: 3820604 Registered Office: The Dome, Whiteleys Centre, 151 Queensway, London, W2 4YN. _ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Error building Tomcat 6.0.18
From: jhoare [mailto:james.ho...@net-a-porter.com] I get the following errors trying to build Tomcat v6.0.18 from source on linux? ... why? Tomcat's pure Java, so runs the same on any platform. Download Sun JDK, download zip of Tomcat, unzip, go. - Peter P.S. Say hi to Chisel ;-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Servlet Error
From: listan...@gmail.com [mailto:listan...@gmail.com] Subject: Re: Servlet Error My Apache Tomcat version is 5.5.27. The servlet-api.jar is in $CATALINA_HOME/common/lib. Good; that's where it should be. However, since you're just starting with Tomcat, why not use the newer 6.0.x version, rather than one that's largely in maintenance mode? I included it in the classpath and now the code compiles without any errors. Make sure you do not put anything in the CLASSPATH environment variable, just specify the jar location with -classpath when compiling your files. Having jars accessible to more than one classloader while running Tomcat will cause errors. It's good practice to place all of your code in a package; it's not explicitly required for servlets, but it helps to keep things orgranized. I am including my web.xml file below. You have mappings for a JSP-related file, but none for your servlet. If you don't actually have the .jsp, the existing servlet declaration and mapping should be removed. You do need to create the equivalent for your Hello class. Read the servlet spec for other information about what should be in web.xml. Look at the simpler webapps that come with Tomcat for samples. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Application monitoring
I forgot to add we are using JDK1.4 From: Leon Rosenberg rosenberg.l...@googlemail.com To: Tomcat Users List users@tomcat.apache.org Sent: Saturday, June 6, 2009 7:52:16 AM Subject: Re: Application monitoring On Sat, Jun 6, 2009 at 4:19 AM, Chetan Chhedachetan_chh...@yahoo.com wrote: All, What are you using for production monitoring and alerting for JVM apache based applications? I am referring to proactively monitoring and alerting of apache utilization(workers, requests etc), tomcat utilization(threads, heap, etc) , tracking Java methods, JSPs , servlets and also transaction tracking. Of course moskito , here's the demo monitoring app: http://moskito.anotheria.net/moskitodemo/mui/mskShowAllProducers here's the homepage https://moskito.dev.java.net http://moskito.anotheria.net - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem setting Host
From: hellian [mailto:rashedulhasan2...@yahoo.com] Subject: RE: Problem setting Host Host name=nexusroi.com appBase=C:\superior\nexus\war deployOnStartup=true autoDeploy=false unpackWARs=true deployXML=false xmlValidation=false xmlNamespaceAware=false Context path=/nexus docBase=C:\superior\nexus\war workDir=C:\superior\nexus\work reloadable=true Resource auth=Container name=jdbc/NEXUS type=javax.sql.DataSource password=root driverClassName=com.mysql.jdbc.Driver maxIdle=2 maxWait=2000 username=root url=jdbc:mysql://localhost:3306/nexus maxActive=4 / /Context /Host First, placing Context elements in server.xml is extremely bad practice. The Context element should be in the webapp's META-INF/context.xml file, or in conf/Catalina/[host]/[appName].xml; where you have it requires a restart of Tomcat anytime you make changes. Note that when in the proper locations, the path and docBase attributes must not be used in a Context element. Second, docBase and appBase must *never* be the same. The appBase directory is where each of your webapps should be placed; it must not point to a specific webapp. Third, if you want a webapp to be the default one, it must be named ROOT (case sensitive, even on Windows). Fourth, unless you are using multiple Host elements, there is no point in changing the name attribute; you can leave it at localhost. So, if you want this nexus webapp to be the default, change appBase to C:\superior, put the webapp in C:\superior\ROOT, place your Context element in C:\superior\ROOT\META-INF\context.xml, and remove the path and docBase attributes from the Context. If the webapp is distributed as a .war file that you don't want to modify, place the .war in C:\superior\ROOT.war, and the Context element in conf\Catalina\[host]\ROOT.xml. If you are not using multiple Host elements, put the Host name back to localhost; regardless, make sure the defaultHost of your Engine points to one of your Host elements. Other directory locations will also work, as long as you maintain the proper relationship between appBase and the location of the webapp. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Error building Tomcat 6.0.18
From: jhoare [mailto:james.ho...@net-a-porter.com] Subject: Error building Tomcat 6.0.18 I get the following errors trying to build Tomcat v6.0.18 from source on linux? jdk 1.6.0_12 Due to an incompatibility introduced by Sun in the 1.6 JDBC interface, you just use a 1.5 JDK for the initial ant download; once that's complete, you can build the rest of Tomcat with 1.6 as long as you make no changes to the tomcat-dbcp classes. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
mod_jk and stiky_sessions that are not stiky
mod_jk/1.2.23 Hello, I'm trying to configure a cluster using stiky_session. This is the relevant part of configuration: ### worker.node1_partition1.port=8009 worker.node1_partition1.host=172.16.130.110 worker.node1_partition1.type=ajp13 worker.node1_partition1.lbfactor=1 worker.node1_partition1.connection_pool_timeout=600 worker.node1_partition1.socket_keepalive=1 worker.node2_partition1.port=8009 worker.node2_partition1.host=172.16.130.112 worker.node2_partition1.type=ajp13 worker.node2_partition1.lbfactor=1 worker.node2_partition1.connection_pool_timeout=600 worker.node2_partition1.socket_keepalive=1 worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=node1_partition1,node2_partition1 worker.loadbalancer.sticky_session=1 ### but this is the result on the mod_jk.log: ### [Mon Jun 08 15:31:09 2009]loadbalancer node1_partition1 jboss.conaddeltirreno.it 0.006444 /MontopolisStorico/menu/logout.do [Mon Jun 08 15:31:09 2009]loadbalancer node2_partition1 jboss.conaddeltirreno.it 0.005739 /MontopolisStorico/login.jsp [Mon Jun 08 15:31:19 2009]loadbalancer node1_partition1 jboss.conaddeltirreno.it 0.112901 /MontopolisStorico/j_acegi_security_check [Mon Jun 08 15:31:19 2009]loadbalancer node2_partition1 jboss.conaddeltirreno.it 0.006513 /MontopolisStorico/index.jsp [Mon Jun 08 15:31:19 2009]loadbalancer node1_partition1 jboss.conaddeltirreno.it 0.004456 /MontopolisStorico/login.jsp ### as you can see, mod_jk send requests to both nodes even they are related to the same session. JSESSIONID is normally stored in cookie, but I have tried with JSESSIONID in URL without success. Thanks, Marco - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk and stiky_sessions that are not stiky
On 08.06.2009 15:54, Marco Sarti wrote: mod_jk/1.2.23 Hello, I'm trying to configure a cluster using stiky_session. This is the relevant part of configuration: ### worker.node1_partition1.port=8009 worker.node1_partition1.host=172.16.130.110 worker.node1_partition1.type=ajp13 worker.node1_partition1.lbfactor=1 worker.node1_partition1.connection_pool_timeout=600 worker.node1_partition1.socket_keepalive=1 worker.node2_partition1.port=8009 worker.node2_partition1.host=172.16.130.112 worker.node2_partition1.type=ajp13 worker.node2_partition1.lbfactor=1 worker.node2_partition1.connection_pool_timeout=600 worker.node2_partition1.socket_keepalive=1 worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=node1_partition1,node2_partition1 worker.loadbalancer.sticky_session=1 ### but this is the result on the mod_jk.log: ### [Mon Jun 08 15:31:09 2009]loadbalancer node1_partition1 jboss.conaddeltirreno.it 0.006444 /MontopolisStorico/menu/logout.do [Mon Jun 08 15:31:09 2009]loadbalancer node2_partition1 jboss.conaddeltirreno.it 0.005739 /MontopolisStorico/login.jsp [Mon Jun 08 15:31:19 2009]loadbalancer node1_partition1 jboss.conaddeltirreno.it 0.112901 /MontopolisStorico/j_acegi_security_check [Mon Jun 08 15:31:19 2009]loadbalancer node2_partition1 jboss.conaddeltirreno.it 0.006513 /MontopolisStorico/index.jsp [Mon Jun 08 15:31:19 2009]loadbalancer node1_partition1 jboss.conaddeltirreno.it 0.004456 /MontopolisStorico/login.jsp ### as you can see, mod_jk send requests to both nodes even they are related to the same session. JSESSIONID is normally stored in cookie, but I have tried with JSESSIONID in URL without success. You need to set jvmRoute in server.xml of Tomcat to node1_partition1 resp. node2_partition1. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Windows x64 Installer
Chuck - Thanks for the info and lead to check something else. I am all IPv4 here, though the IPv6 services may still be enabled on that system. I will need to check. I got the box in and setup with minimal customizations and was trying to get this rolled out quickly (I do this because a lot of our customer base does the same, believe it or not). I'll go dobule-check the box and make sure I've got the IPv6 stuff turned off and try again. Jeff -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Tuesday, June 02, 2009 11:07 PM To: Tomcat Users List Subject: RE: Windows x64 Installer From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Subject: RE: Windows x64 Installer Now the reason why 4) below was not working (all 64-bit), is that I didn't have an address specified in my connector tag. Apparently, at all windows revs prior to 2008 server, if you didn't supply an IP address, Windows would gladly supply 0.0.0.0, but now at 2008 it doesn't (possibly vista also?). Works fine on my Vista 64 box, with no address attribute for the Connector. Looks like there's some 2008 Server setting that's ignoring IPv4 and using only IPv6 if no bind address is given. Instead of seeing 0.0.0.0:80 in the first column, you'll see [::]:80. On my Vista 64 box, I see 0.0.0.0:8080 but not [::]:8080, with no address attribute in my Connector. I've got IPv6 disabled on my router, so I can't test that at the moment. there are a number of these [::] addresses in the list, so MS possibly hasn't ported all their services yet. Has nothing to do with porting services, but rather with IPv6-only being the default on your installation. I do see both IPv4 and IPv6 addresses in listening mode for the various Windows services on my system. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org *** NOTICE * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply or by telephone (call us collect at 512-343-9100) and immediately delete this message and all its attachments. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
implementing a Manager - how do I get a reference to it?
I'm implementing a Manager (session management) that stores sessions on shared servers (that is, a distributed manager, but not the default one that comes with tomcat). A key difference between the implementation that I'm working on and the ClusteredManager is that the entire session is distributed when it changes, rather than sending individual parameters around over the network. The problem that I'm having is that the Manager needs to be notified when the request has finished with the session. I'm aware that I can create a ServletRequestListener, and I think that the requestDestroyed method would be a reasonable time for me to be telling the manager that it should distribute the session. However, I can't for the life of me figure out how to get a reference to the Manager from a ServletRequestListener. I've tried: - having the ServletRequestListener also be a ServletContextListener, but I can't navigate to the manager from there. - finding the Manager through the session, but that's a StandardSessionFacade, which doesn't reveal the manager. - having the ServletRequestListener also be a ContainerListener, but I can't make the same instance of the Listener be registered as both (since registerting a ServletRequestListener through the StandardContext doesn't allow me to register an object, I can only tell it what class to use). Any suggestions? Either for how I can have my ServletRequestListener get a reference to the Manager, or for other strategies for knowing when the Request is finished with the Session so that I can distribute it. Thanks. Nolan
RE: Windows x64 Installer
Did the double-check. IPv6 protocol is disabled on the active network connection. So it shouldn't be an IPv6 issue. Jeff -Original Message- From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Sent: Monday, June 08, 2009 9:02 AM To: Tomcat Users List Subject: RE: Windows x64 Installer Chuck - Thanks for the info and lead to check something else. I am all IPv4 here, though the IPv6 services may still be enabled on that system. I will need to check. I got the box in and setup with minimal customizations and was trying to get this rolled out quickly (I do this because a lot of our customer base does the same, believe it or not). I'll go dobule-check the box and make sure I've got the IPv6 stuff turned off and try again. Jeff -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Tuesday, June 02, 2009 11:07 PM To: Tomcat Users List Subject: RE: Windows x64 Installer From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Subject: RE: Windows x64 Installer Now the reason why 4) below was not working (all 64-bit), is that I didn't have an address specified in my connector tag. Apparently, at all windows revs prior to 2008 server, if you didn't supply an IP address, Windows would gladly supply 0.0.0.0, but now at 2008 it doesn't (possibly vista also?). Works fine on my Vista 64 box, with no address attribute for the Connector. Looks like there's some 2008 Server setting that's ignoring IPv4 and using only IPv6 if no bind address is given. Instead of seeing 0.0.0.0:80 in the first column, you'll see [::]:80. On my Vista 64 box, I see 0.0.0.0:8080 but not [::]:8080, with no address attribute in my Connector. I've got IPv6 disabled on my router, so I can't test that at the moment. there are a number of these [::] addresses in the list, so MS possibly hasn't ported all their services yet. Has nothing to do with porting services, but rather with IPv6-only being the default on your installation. I do see both IPv4 and IPv6 addresses in listening mode for the various Windows services on my system. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org *** NOTICE * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply or by telephone (call us collect at 512-343-9100) and immediately delete this message and all its attachments. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org *** NOTICE * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply or by telephone (call us collect at 512-343-9100) and immediately delete this message and all its attachments. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Windows x64 Installer
From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Subject: RE: Windows x64 Installer IPv6 protocol is disabled on the active network connection. So it shouldn't be an IPv6 issue. But it clearly is, since your netstat output shows IPv6 addresses, not IPv4. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Windows x64 Installer
Jeffrey Janner wrote: Did the double-check. IPv6 protocol is disabled on the active network connection. So it shouldn't be an IPv6 issue. It should be disabled on all connections including localhost. NULL address means 'all interfaces'. Regards -- ^(TM) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Header names lower case
Hi, I noticed the Tomcat implementation of HttpServletRequest.getHeaderNames() returns all header names in lower case. Is there any possibility to get them with their original case? Nobody having any idea about this behaviour? Thanks again, Alexander - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: enterprise tomcat hosting, architecture. How will u do it?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 To whom it may concern, On 5/25/2009 3:44 AM, List Member wrote: Pls do send some of your scripts/configurations, it will be of great help for us! See attached (hopefully!). Here's what's going on: 1. ant.properties goes in ~/.ant.properties and is read first 2. build.xml creates build-[appname].properties and reads it 3. build.properties is read last This allows you to set up defaults in ~/.ant.properties for all your apps, and then override them like this: tomcat-home=/usr/local/tomcat myapp.tomcat-home=/usr/local/apache-tomcat-5.5.26 You should read the entire script to understand everything that is happening. Some things to note: 1. Be sure to change the value of the name attribute of the project element in build.xml: this sets the values for a lot of things. 2. The win32 tomcat-start and tomcat-stop targets are untested. We used to use our own batch files to start Tomcat but switched to a script-less strategy a while back. None of our devs use win32 so we haven't tested the replacement strategy. There's no reason not to expect it to work, but YMMV. 3. These scripts are rigged to build a Tomcat install from an existing one. Read RUNNING.txt in a Tomcat package to see the procedure that is being followed. In the webapp's conf/ and properties/ directory, there are (optional) directories for each release type (you can define these to be whatever you want... we use 'dev' 'demo' and 'prod'). Config files such as tomcat-server.xml and tomcat-context.xml are read from these directories, filtered using search-and-replace, and then deposited in the correct place (conf/server.xml and yourwebapp/META-INF/context.xml). The replacements include convenient things such as JNDI DataSource information, etc. Enjoy. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkotMGYACgkQ9CaO5/Lv0PA6aACePmwbwoLFkyIp0cE2zFlxDAKN 5s8An1xLlG5/w83SXNS0WwHUsbCeG1iP =jTMR -END PGP SIGNATURE- ?xml version=1.0? !-- Created July 2003 by Chris Schultz This build file should handle all compile, install, test, etc. operations required for this web application. The only external requirement for this build is an existing Tomcat installation (see property [appname].tomcat.home). -- project name=my-project default= basedir=. !-- Note that properties are fixed once set; .ant.properties can be used to override the values of properties set later by various properties files, etc. -- patternset id=properties.file.pattern includes=**/*.properties / patternset id=properties-shallow.file.pattern includes=*.properties / patternset id=class.file.pattern includes=**/*.class / patternset id=jar.file.pattern includes=**/*.jar / patternset id=taglib.file.pattern includes=**/*.tld / patternset id=xml.file.pattern includes=**/*.xml / patternset id=xml-shallow.file.pattern includes=*.xml / target name=check-local-properties condition property=local-properties-ready uptodate srcfile=${ant.file} targetfile=build-${ant.project.name}.properties / /condition /target target name=build-local-properties depends=check-local-properties unless=local-properties-ready echoBuilding build-${ant.project.name}.properties/echo !-- Translate properties from [appname].whatever to app.whatever -- echo file=build-${ant.project.name}.properties # # Set Generic Properties for this App # [appname].java-home=${java-home} [appname].release-type=${release-type} [appname].tomcat-home=${tomcat-home} [appname].tomcat-port = ${tomcat-port} [appname].tomcat-shutdown-port = ${tomcat-shutdown-port} [appname].context.name=${ant.project.name} # Database setup [appname].database.name=${database.name} [appname].database.username=${database.username} [appname].database.password=${database.password} [appname].database.host=${database.host} [appname].database.driver=${database.driver} [appname].database.url=${database.url} [appname].database.createUrl=${database.createUrl} [appname].datasource.ref=jdbc/${[appname].database.name} # # Copy Properties to app.* # app.java-home=${[appname].java-home} app.release-type=${[appname].release-type} app.tomcat-home=${[appname].tomcat-home} app.tomcat-port=${[appname].tomcat-port} app.tomcat-shutdown-port=${[appname].tomcat-shutdown-port} app.context.name=${[appname].context.name} app.database.name=${[appname].database.name} app.database.username=${[appname].database.username} app.database.password=${[appname].database.password} app.database.host=${[appname].database.host} app.database.driver=${[appname].database.driver} app.database.url=${[appname].database.url} app.database.createUrl=${[appname].database.createUrl} app.datasource.ref=${[appname].datasource.ref} /echo replace file=build-${ant.project.name}.properties token=[appname] value=${ant.project.name} / /target target name=init
RE: Header names lower case
From: Alexander Müller [mailto:alexander.muel...@brz.gv.at] Subject: Re: Header names lower case I noticed the Tomcat implementation of HttpServletRequest.getHeaderNames() returns all header names in lower case. Is there any possibility to get them with their original case? Nobody having any idea about this behaviour? Want to give us a hint about the Tomcat version you're looking at? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: concurrent connections with mod_jk/apache/tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jason, On 6/5/2009 5:34 PM, Jason Joseph wrote: I think I have figured it out though, I just realized I have mod_deflate enabled for Apache. That was my suspicion, but I wanted to see how the other issues played-out. Would that apply to data coming back from the AJP connector as well? Thats my best guess as to the discrepancy you noticed. It definitely would: mod_deflate needs to work with chunks of data and if the chunk size from Tomcat does not match-up with the chunk size used with mod_deflate (either of which may not be tunable), then you could see these kinds of stalls. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkotNYYACgkQ9CaO5/Lv0PD8LwCdHsRxyURrPLjIzZDZGijqxy3U KEkAn0BLwwWuGgIMHhdKx6/Vi1ejFyt/ =B1bF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Header names lower case
I noticed the Tomcat implementation of HttpServletRequest.getHeaderNames() returns all header names in lower case. Is there any possibility to get them with their original case? Want to give us a hint about the Tomcat version you're looking at? - Chuck I noticed it on Tomcat 5.0.30 and 6.0.20. Alexander - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: concurrent connections with mod_jk/apache/tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 6/7/2009 3:41 AM, André Warnier wrote: Jason Joseph wrote: ... Yes all static files are being served by Apache. No they aren't being loaded from the document root they are actually being loaded from within our application war. That I do not understand. It seems contradictory. Or, to put it another way, how do you manage that ? He probably means that httpd is serving static files from the /deployment directory/, not the WAR file itself. Some folks on this list hotly debate the wisdom of allowing a web server to serve content from your webapp deployment directory. I find the practice acceptable, as long as proper security precautions are taken to avoid info leakage (like reading your db username/password from META-INF/context.xml oops!). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAkotNrsACgkQ9CaO5/Lv0PAvmwCfQL2hK0UTcw2EMWdHOIwqMdsP +qEAl10TaagsP/B4LIHhPNBw72bc9SE= =SOQ3 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: concurrent connections with mod_jk/apache/tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jason, On 6/7/2009 7:17 PM, Jason Joseph wrote: Rainer Jung wrote: Be careful to secure access to WEB-INF and META-INF. Yup, Ive got this in there, one for META-INF too... Location /WebApp_ID/WEB-INF/ deny from all /Location I highly recommend using Directory instead of Location: this will CYA even if there's another URI that maps to the same place. Directory /path/to/your/webapp/META-INF Order deny,allow Deny from all /Directory Directory /path/to/your/webapp/WEB-INF Order deny,allow Deny from all /Directory If you use JSPs, it might not be a bad idea to: Directory /path/to/your/webapp/ Order allow,deny Allow from all Options -Indexes DirectoryIndex index.html FilesMatch \.jsp.* Order deny,allow Deny from all /FilesMatch /Directory This will prevent remote clients reading your JSP source in case you are using a case-insensitive filesystem or you have your server misconfigured in some way. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkotN7UACgkQ9CaO5/Lv0PA3qQCfQJlJQ5TR0H7LwAlA0tTdF2ZZ pgAAoI5LySXgN4UePhrAAXEk69Ca2vC2 =d8WV -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Header names lower case
Alexander Müller: I noticed the Tomcat implementation of HttpServletRequest.getHeaderNames() returns all header names in lower case. Is there any possibility to get them with their original case? I can't answer your question but I'm curious: why is a HTTP header name's case of any importance to you? RFC 2616 defines field names as case-insensitive. Relying on a header field's case therefore seems at least non-portable to me. Maybe you should elaborate what problem you are really trying to solve. -- Regards mks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Header names lower case
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alexander, On 6/8/2009 4:39 AM, Alexander Müller wrote: I noticed the Tomcat implementation of HttpServletRequest.getHeaderNames() returns all header names in lower case. Is there any possibility to get them with their original case? The HTTP spec (HTTP/1.1, section 4.2: http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html) states that HTTP header field names are case-insensitive. You should not be relying on a particular caseification (?) of header fields. Are you just interested in what the client sent? I think you'd have to modify the Connector in order to do that. In order for the headers to be case-insensitive, case must be normalized when assembling headers (the same header is allowed multiple times, and the servlet spec requires that all those field values be available in a single Enumeration when calling getHeaders). The implementers chose lower case as their normalization technique. In order to undo that, you'll have to modify the source of Tomcat. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkotOT0ACgkQ9CaO5/Lv0PBglACdEN+OPLMHnZxFOdcimd18ro2n OLwAn0TMHNUmNqxpGkmL12p1YLEl8AFt =BVx/ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Header names lower case
I can't answer your question but I'm curious: why is a HTTP header name's case of any importance to you? RFC 2616 defines field names as case-insensitive. Relying on a header field's case therefore seems at least non-portable to me. Maybe you should elaborate what problem you are really trying to solve. For me the case wouldnt be important, but I am forwarding (basically a proxy) the headers and the receiving party apparently is case sensitive. Alexander - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Windows x64 Installer
OK, after boning up on IPv6 addresses, I see what's happening. With no address specified in the connector, and with both the IPv4 and IPv6 protocols installed, APR is setting up a listener only on the IPv6 protocol any address port. Windows displays this as [::] in accordance with IPv6 addressing guidelines where you can omit leading zeros and empty address segments. In Windows, the IPv4 any address is always displayed as 0.0.0.0, which is not coming up in this instance. So the question is, why is APR only setting up the IPv6 address in this case and not the IPv4? I have to specifically give the connector the IPv4 any address in order to get this to work. Is there any way to tell Tomcat/APR that I want to default to IPv4? It doesn't appear that I can remove the IPv6 protocol from the Windows 2008 stack. Jeff -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Monday, June 08, 2009 10:19 AM To: Tomcat Users List Subject: RE: Windows x64 Installer From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Subject: RE: Windows x64 Installer IPv6 protocol is disabled on the active network connection. So it shouldn't be an IPv6 issue. But it clearly is, since your netstat output shows IPv6 addresses, not IPv4. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org *** NOTICE * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply or by telephone (call us collect at 512-343-9100) and immediately delete this message and all its attachments. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Windows x64 Installer
Will try that and see. The machine has 4 network ports, 3 of which are disabled completely (oops, actually unplugged). The main port is configured with the IPv6 protocol installed, but it is unchecked. Actually, all ports have it installed, and I haven't found a way to uninstall it. But all 4 ports do have the IPv6 protocol disabled (unchecked). I'll try actually disabling the other interfaces and see if that makes a difference, but I suspect not. There is no specific loopback adapter connection, so localhost just resolves to 127.0.0.1 and should get looped by the stack, correct? Jeff -Original Message- From: Mladen Turk [mailto:mt...@apache.org] Sent: Monday, June 08, 2009 10:26 AM To: Tomcat Users List Subject: Re: Windows x64 Installer Jeffrey Janner wrote: Did the double-check. IPv6 protocol is disabled on the active network connection. So it shouldn't be an IPv6 issue. It should be disabled on all connections including localhost. NULL address means 'all interfaces'. Regards -- ^(TM) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org *** NOTICE * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply or by telephone (call us collect at 512-343-9100) and immediately delete this message and all its attachments. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to force tomcat to make a single istance of a servlet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Syed, On 6/7/2009 12:53 PM, syed shah wrote: I want to enforce single instance creation for the servlet because I have some code that serves the user requests and i want to implement caching and handle synchronization myself, thanks and best regards Fahad Usually, only one instance of your servlet will be created. You could write some code to check for this, of course. Something like this should work: public class MyServlet extends HttpServlet { private static boolean _isInUse; public MyServlet() throws ServletException { super(); synchronized(getClass()) { if(_isInUse) { throw new ServletException(Sorry, only one at a time); } _isInUse = true; } } ... public void destroy() { synchronized(getClass()) { _isInUse = false; } } } I'm not actually sure why you'd ever want to do this, though. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkotO68ACgkQ9CaO5/Lv0PBXBgCgm0hf3J73t7GCXsLl9KHY5spf c5YAn1NSuZYMrk6r9FqFFdv8OqxQij/B =DZ4r -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Header names lower case
The HTTP spec (HTTP/1.1, section 4.2: http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html) states that HTTP header field names are case-insensitive. You should not be relying on a particular caseification (?) of header fields. Are you just interested in what the client sent? I think you'd have to modify the Connector in order to do that. In order for the headers to be case-insensitive, case must be normalized when assembling headers (the same header is allowed multiple times, and the servlet spec requires that all those field values be available in a single Enumeration when calling getHeaders). The implementers chose lower case as their normalization technique. In order to undo that, you'll have to modify the source of Tomcat. - -chris Thanks Chris, as I just mentioned in my reply to Markus, I am in the need of the original case as I am forwarding the headers and the receiving party apparently expects a particular case. Anyhow, I already almost thought there would be no way to configure this, but wanted to be sure. Thanks again, Alexander - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Header names lower case
Alexander Müller: RFC 2616 defines field names as case-insensitive. Relying on a header field's case therefore seems at least non-portable to me. Maybe you should elaborate what problem you are really trying to solve. For me the case wouldnt be important, but I am forwarding (basically a proxy) the headers and the receiving party apparently is case sensitive. apparently? Hm, in this case I'd double-check whether whatever problem you're having is indeed caused by the case of the header names. Just to make sure you're not barking at the wrong tree. If the receiving party is really relying on the case of header names, I'd ask them to fix their broken code. -- Regards mks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Header names lower case
apparently? Hm, in this case I'd double-check whether whatever problem you're having is indeed caused by the case of the header names. Just to make sure you're not barking at the wrong tree. If the receiving party is really relying on the case of header names, I'd ask them to fix their broken code. Maybe better definitely :) If I send the headers with the proper capitalisation I get through, otherwise I am getting an error I wouldnt send the header. Unfortunately this is one of the situations where you cant ask the other parties to correct their code, but have to adapt by yourself ;). Alexander - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat-connectors mod_jk.dsp file will not load in Visual Studio 2005
Mladen Turk wrote: All higher MSVCRT versions has dependency on MSVCRT.dll so if you build against that you have assurance that CRT functions will come from the same CRT library regardless of the version used. I know that stdio functions have problems, so if like mod_jk the module uses them for logging or reading config files you might get into trouble. We observed that with mod_jk and it manifested with weired looking log files. For example we use VS6 for building Tomcat Native, and it can work in both JDK5 (compiled with VS6) and JDK6 (compiled with VS2003) because it depends on MSVCRT.dll only. In general MSVCRT.dll + MSVCRTxx.dll is OK, however MSVCRTxx.dll + MSVCRTyy.dll is a very bad idea. I just googled what it would take to get VS2005 to link against MSVCRT.dll. It's doable, but not pretty at all. I can see why you use VS6 to build stuff. If only VS6 was still available on MSDN. Thanks to both you and Rainer for filling in the blanks for me. And I thought Linux glibc compatibility was confusing but this Microsoft MSVCRT stuff makes glibc problems look easy to solve :) Andy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem setting Host
Peter Crowther wrote: From: hellian [mailto:rashedulhasan2...@yahoo.com] I've been facing problem setting my Host property with Tomcat 5.5. Please have a look on the code below and let me know what's wrong with my code. Now if I use the url nexusroi.com, it doesn't work whereas the url nexusroi.com/nexus does work well. Can anyone help me resolve this? Cool, someone else using invisible ink :-). We could help more if you supplied the code. Did you try heating up the message over a candle ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: how to force tomcat to make a single istance of a servlet
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: how to force tomcat to make a single istance of a servlet Usually, only one instance of your servlet will be created. Unless using the SingleThreadModel (a really bad idea), the spec allows only one instance of a servlet per JVM. I wonder what the OP's real problem is? - 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.
Re: Header names lower case
Alexander Müller wrote: apparently? Hm, in this case I'd double-check whether whatever problem you're having is indeed caused by the case of the header names. Just to make sure you're not barking at the wrong tree. If the receiving party is really relying on the case of header names, I'd ask them to fix their broken code. Maybe better definitely :) If I send the headers with the proper capitalisation I get through, otherwise I am getting an error I wouldnt send the header. Unfortunately this is one of the situations where you cant ask the other parties to correct their code, but have to adapt by yourself ;). Just to nitpick, there is no proper capitalisation, since the RFC says that headers are case-insensitive. Apart from that, I would offer the following subjective advice, in the form of suggestions : - it sounds like you are trying to use Tomcat as some kind of transparent proxy here, and maybe in this case Tomcat is not the right tool for the job. Maybe you should use some kind of front-end to Tomcat, which will catch these requests, and proxy them to the broken back-end, instead of trying to do this with Tomcat, which does not really have the built-in mechanisms for that kind of thing. (I'm thinking of Apache httpd, with mod_proxy, mod_rewrite, mod_setenvif, mod_perl, etc..) - you may want to have a look at the urlrewrite filter at www.tuckey.org (yes, I know I sound like a salesman for that thing, and I'm starting to think I should ask for a commission). It can check incoming headers, and I believe it can delete and/or rewrite some of them before even forwarding them to your Tomcat application. - if you really persist in wanting to do this at the application level, I would look at it in another way : rather than trying to be a transparent proxy, have your Tomcat application : a) receive and process the client request, including the lower-cased headers b) from your application, issue a brand /new/ HTTP request to the broken back-end, composing the headers that you know it expects. For that, you could use some library like the Apache Commons HTTPClient. - if your purpose is just to transparently proxy these requests, you could also think about issuing a redirect response to the browser, and let it deal with it himself. The problem with trying to modify the Tomcat code for this, is that you will set yourself up for all kinds of annoyances, because you cannot even be sure how all /your/ different clients may capitalise these headers or not when they send the request to you. So you could be faced with having to check if you got a header like User-Agent or USER-AGENT or user-agent and so on... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to force tomcat to make a single istance of a servlet
Hi Christopher, I want to do this cause i am handling the synchronization myself and infact i am using innodb so i dont want multiple instance of the servlet, although i can handle multiple threads in there. I just wrote some code thats pretty similar to yours except that i use a int and check if its 1, also you increment it in the contructor that's neat, i do it in the initialize. Thanks, best regards Fahad On 6/8/09, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Syed, On 6/7/2009 12:53 PM, syed shah wrote: I want to enforce single instance creation for the servlet because I have some code that serves the user requests and i want to implement caching and handle synchronization myself, thanks and best regards Fahad Usually, only one instance of your servlet will be created. You could write some code to check for this, of course. Something like this should work: public class MyServlet extends HttpServlet { private static boolean _isInUse; public MyServlet() throws ServletException { super(); synchronized(getClass()) { if(_isInUse) { throw new ServletException(Sorry, only one at a time); } _isInUse = true; } } ... public void destroy() { synchronized(getClass()) { _isInUse = false; } } } I'm not actually sure why you'd ever want to do this, though. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkotO68ACgkQ9CaO5/Lv0PBXBgCgm0hf3J73t7GCXsLl9KHY5spf c5YAn1NSuZYMrk6r9FqFFdv8OqxQij/B =DZ4r -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Header names lower case
javax.servlet.http.HttpServlet //to receive service() method { Enumeration reqHeaderEnum = req.getHeaderNames(); while( reqHeaderEnum.hasMoreElements() ) { String headerName = (String)reqHeaderEnum.nextElement(); //THIS IS THE HEADER NAME responseString += CRLF + headerName + : + req.getHeader(headerName); //THIS IS THE VALUE assigned to HEADER_NAME } //to send /** * pReceives an HTTP HEAD request from the protected * codeservice/code method and handles the * request. * The client sends a HEAD request when it wants * to see only the headers of a response, such as * Content-Type or Content-Length. The HTTP HEAD * method counts the output bytes in the response * to set the Content-Length header accurately. * * pIf you override this method, you can avoid computing * the response body and just set the response headers * directly to improve performance. Make sure that the * codedoHead/code method you write is both safe * and idempotent (that is, protects itself from being * called multiple times for one HTTP HEAD request). * * pIf the HTTP HEAD request is incorrectly formatted, * codedoHead/code returns an HTTP Bad Request * message. * * @param reqthe request object that is passed *to the servlet * * @param respthe response object that the servlet *uses to return the headers to the clien * * @exception IOExceptionif an input or output error occurs * * @exception ServletExceptionif the request for the HEAD *could not be handled */ protected void doHead(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { } definitiv möglicherweise? Martin __ Verzicht und Vertraulichkeitanmerkung Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Date: Mon, 8 Jun 2009 18:34:04 +0200 From: alexander.muel...@brz.gv.at To: users@tomcat.apache.org Subject: Re: Header names lower case apparently? Hm, in this case I'd double-check whether whatever problem you're having is indeed caused by the case of the header names. Just to make sure you're not barking at the wrong tree. If the receiving party is really relying on the case of header names, I'd ask them to fix their broken code. Maybe better definitely :) If I send the headers with the proper capitalisation I get through, otherwise I am getting an error I wouldnt send the header. Unfortunately this is one of the situations where you cant ask the other parties to correct their code, but have to adapt by yourself ;). Alexander - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Insert movie times and more without leaving Hotmail®. http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
URL Auth Apache 2.2.11 + Tomcat 6.0.16
Hi, Since we modify our server to use mod_jk to serve sites there is an error with a Tomcat Action, that requires a HTML Auth. If we open the URL http://www.bla.de/?action=Import in a Browser, there is a Auth-Dialog to fill in Username and Passwort. This Username and Password seems to be hard coded in the action. If a scheduled Task try to excecute the Task there is a 401 Error java -cp D:\wwwroot\Java_shop\WEB-INF\classes com.j2dot.app.fv.ImportStandalone It is possible to add parameters in the cmd function? Greetings Alexander smime.p7s Description: S/MIME cryptographic signature
RE: URL Auth Apache 2.2.11 + Tomcat 6.0.16
did you ensure TC has execute access to that code? // These permissions apply to javac grant codeBase file:D:\wwwroot\Java_shop\WEB-INF\classes\- { permission java.security.AllPermission; }; Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. From: adied...@tecracer.de To: users@tomcat.apache.org Date: Mon, 8 Jun 2009 21:49:56 +0200 Subject: URL Auth Apache 2.2.11 + Tomcat 6.0.16 Hi, Since we modify our server to use mod_jk to serve sites there is an error with a Tomcat Action, that requires a HTML Auth. If we open the URL http://www.bla.de/?action=Import in a Browser, there is a Auth-Dialog to fill in Username and Passwort. This Username and Password seems to be hard coded in the action. If a scheduled Task try to excecute the Task there is a 401 Error java -cp D:\wwwroot\Java_shop\WEB-INF\classes com.j2dot.app.fv.ImportStandalone It is possible to add parameters in the cmd function? Greetings Alexander _ Insert movie times and more without leaving Hotmail®. http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
Frustrating refusal to serve *some* pages, scripts, images.
We have tomcat 6 (Tomcat/6.0.16) installed on a Redhat ES4 server in a production environment (although it's not being depended-upon at this moment; we're in the installation phase). I installed it via the tarball binary, not from an RPM. When I deployed a WAR that was running bug-free on my own localhost (debian sid, but also Tomcat 6.0.16), there were several errors. First, Tomcat refused to load my jQuery library (jQuery latest; 1.3.2). I considered perhaps there were some bad characters in the jQuery library because it was the /only/ file Tomcat would fail to load, so I downgraded jQuery, which actually solved the problem. Then, however, when I redeployed, I got the same exact error on the background image for my web app. And also on index.jsp. There are probably other problematic files, but I felt I could stop there... So I'm now convinced the problem is Tomcat; it never should have had problems with jQuery either, as I said it ran just fine on localhost. The full text of the stack trace follows ... it doesn't mean anything to me, though. Seems to be a red herring. SEVERE: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:410) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Thanks, Zaq - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: org.apache.tomcat.sendfile.support attribute returned via getAttribute() but name not returned via getAttributeNames()
Folks, Going to try this again since I got no reply to my first inquiry. I'd like to log a bug report along the lines of request getAttributeNames method does not return all request attributes (e.g., org.apache.tomcat.sendfile.support). Either that or this is a doc issues somewhere. I know in the scheme of things this is not an earth-shattering issue / bug, still it's apparently not working correctly. I would put this one of two ways, either: 1. The Tomcat HttpRequest getAttributeNames method has a bug and doesn't return the attribute like org.apache.tomcat.sendfile.support (even though I can access that attribute via the getAttribute method); or 2. There's a doc error in the getAttributeNames doc where the cases where it doesn't show all attribute names needs to be explained. My original message on the topic is below. Thanks! Chris On Fri, Jun 5, 2009 at 1:05 AM, Chris Marklecmar...@comcast.net wrote: Hi, Probably missing something simple here but I can't figure it out... I have pretty much just modified a simple hello world servlet as I start to play around with NIO sendfile support. I am using Tomcat 6.0.20. I am trying to check for the org.apache.tomcat.sendfile.support which says I can use the sendfile mode. When I request the request attributes in the doPut method via getAttributeNames(), I seem to get back an Enumeration with no attribute names in it. None... But when I ask for the org.apache.tomcat.sendfile.support attribute specifically via getAttribute(), I do get the attribute and it is correctly set to Boolean true/false depending on whether I've configured NIO in server.xml. Here is my code: protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { EnumerationString attrNames = request.getAttributeNames(); if (attrNames == null) { System.out.println(getAttributeNames returned null); } else { System.out.println(attrNames: + attrNames.toString()); } System.out.println(printing any attrs...); while (attrNames.hasMoreElements()) { String attrName = attrNames.nextElement(); System.out.println(attr: + attrName); } Boolean val = (Boolean) request.getAttribute(org.apache.tomcat.sendfile.support); if (val != null) { System.out.println(org.apache.tomcat.sendfile.support attr found: value: + val.toString()); } else { System.out.println(org.apache.tomcat.sendfile.support attr not found); } response.getWriter().write(Hello, world!); } Thanks in advance for any help on this... Chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Frustrating refusal to serve *some* pages, scripts, images.
From: Zaq Rizer [mailto:idhindsi...@gmail.com] Subject: Frustrating refusal to serve *some* pages, scripts, images. The full text of the stack trace follows ... Since this appears to be reproducible, you might want to stop Tomcat, clear out the logs, restart Tomcat, and try the failing request again. Then stop Tomcat, and post all the non-empty logs here. There's likely something in addition to the stack trace you provided that contains more information about the problem. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Frustrating refusal to serve *some* pages, scripts, images.
On Mon, Jun 8, 2009 at 4:14 PM, Caldarale, Charles Rchuck.caldar...@unisys.com wrote: From: Zaq Rizer [mailto:idhindsi...@gmail.com] Subject: Frustrating refusal to serve *some* pages, scripts, images. The full text of the stack trace follows ... Since this appears to be reproducible, you might want to stop Tomcat, clear out the logs, restart Tomcat, and try the failing request again. Then stop Tomcat, and post all the non-empty logs here. There's likely something in addition to the stack trace you provided that contains more information about the problem. Chuck, thanks for the idea. I did exactly that, and here are the logs. localhost.2009-06-08.log Jun 8, 2009 3:35:01 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Jun 8, 2009 3:35:01 PM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Jun 8, 2009 3:35:15 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet default threw exception javax.servlet.ServletException: Servlet execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) catalina.2009-06-08.log Jun 8, 2009 3:35:00 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_10/jre/lib/i386/server:/usr/java/jdk1.6.0_10/jre/lib/i386:/usr/java/jdk1.6.0_10/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib Jun 8, 2009 3:35:00 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Jun 8, 2009 3:35:00 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 345 ms Jun 8, 2009 3:35:00 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jun 8, 2009 3:35:00 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.16 Jun 8, 2009 3:35:00 PM org.apache.catalina.core.StandardContext addApplicationListener INFO: The listener org.apache.tiles.web.startup.TilesListener is already configured for this context. The duplicate definition has been ignored. Jun 8, 2009 3:35:00 PM org.apache.tiles.context.AbstractTilesApplicationContextFactory createFactory INFO: Initializing Tiles2 application context. . . Jun 8, 2009 3:35:00 PM org.apache.tiles.context.ChainedTilesApplicationContextFactory init WARNING: Cannot find TilesContextFactory class org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory Jun 8, 2009 3:35:00 PM org.apache.tiles.context.AbstractTilesApplicationContextFactory createFactory INFO: Finished initializing Tiles2 application context. Jun 8, 2009 3:35:00 PM org.apache.tiles.context.ChainedTilesApplicationContextFactory init WARNING: Cannot find TilesContextFactory class org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory Jun 8, 2009 3:35:00 PM org.apache.tiles.factory.TilesContainerFactory initializeContainer INFO: Initializing Tiles2 container. . . Jun 8, 2009 3:35:00 PM org.apache.tiles.context.ChainedTilesApplicationContextFactory init WARNING: Cannot find TilesContextFactory class org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory Jun 8, 2009 3:35:00 PM org.apache.tiles.context.ChainedTilesRequestContextFactory init WARNING: Cannot find TilesRequestContextFactory class org.apache.tiles.portlet.context.PortletTilesRequestContextFactory Jun 8, 2009 3:35:00 PM org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO identifySources WARNING: Unable to find configured definition '/WEB-INF/tiles.xml' Jun 8, 2009 3:35:00 PM org.apache.tiles.factory.TilesContainerFactory initializeContainer INFO:
Re: Frustrating refusal to serve *some* pages, scripts, images.
Zaq Rizer wrote: We have tomcat 6 (Tomcat/6.0.16) installed on a Redhat ES4 server in a production environment (although it's not being depended-upon at this moment; we're in the installation phase). I installed it via the tarball binary, not from an RPM. When I deployed a WAR that was running bug-free on my own localhost (debian sid, but also Tomcat 6.0.16), there were several errors. First, Tomcat refused to load my jQuery library (jQuery latest; 1.3.2). I considered perhaps there were some bad characters in the jQuery library because it was the /only/ file Tomcat would fail to load, so I downgraded jQuery, which actually solved the problem. Then, however, when I redeployed, I got the same exact error on the background image for my web app. And also on index.jsp. There are probably other problematic files, but I felt I could stop there... Wild stab in the dark. Could you post your server.xml and any context.xml file for your app please. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Frustrating refusal to serve *some* pages, scripts, images.
From: Zaq Rizer [mailto:idhindsi...@gmail.com] Subject: Re: Frustrating refusal to serve *some* pages, scripts, images. Jun 8, 2009 3:35:15 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet default threw exception javax.servlet.ServletException: Servlet execution threw an exception This is odd; I would have expected another stack trace of the original exception to be displayed, immediately following this one. Why is this stack trace different from the one you posted before? What changed? The original one should have also had an additional caused by stack trace with it. It's very odd that you don't seem to be getting those. Jun 8, 2009 3:35:00 PM org.apache.catalina.core.StandardContext addApplicationListener INFO: The listener org.apache.tiles.web.startup.TilesListener is already configured for this context. The duplicate definition has been ignored. The above is a cosmetic bug in the version of Tomcat you're using and can be ignored. Jun 8, 2009 3:35:00 PM org.apache.tiles.context.ChainedTilesApplicationContextFactory init WARNING: Cannot find TilesContextFactory class org.apache.tiles.portlet.context.PortletTilesApplicationContextFactory I'm not familiar with tiles, but the above doesn't look good. Jun 8, 2009 3:35:01 PM org.apache.catalina.core.StandardContext addApplicationListener INFO: The listener listeners.ContextListener is already configured for this context. The duplicate definition has been ignored. Another cosmetic-only message. /I/ don't see anything, do you? Just the TilesContextFactory warning. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Frustrating refusal to serve *some* pages, scripts, images.
I retained my entire conf and logs directory, and installed .0.20, and it works perfectly fine. I'm not confident enough to say it's a bug in .0.16, but it certainly could be Bad Unix Admin syndrome (not me). Btw, apologies for top-posting; I'm on my iPhone now... On Jun 8, 2009, at 17:03, Mark Thomas ma...@apache.org wrote: Zaq Rizer wrote: We have tomcat 6 (Tomcat/6.0.16) installed on a Redhat ES4 server in a production environment (although it's not being depended-upon at this moment; we're in the installation phase). I installed it via the tarball binary, not from an RPM. When I deployed a WAR that was running bug-free on my own localhost (debian sid, but also Tomcat 6.0.16), there were several errors. First, Tomcat refused to load my jQuery library (jQuery latest; 1.3.2). I considered perhaps there were some bad characters in the jQuery library because it was the /only/ file Tomcat would fail to load, so I downgraded jQuery, which actually solved the problem. Then, however, when I redeployed, I got the same exact error on the background image for my web app. And also on index.jsp. There are probably other problematic files, but I felt I could stop there... Wild stab in the dark. Could you post your server.xml and any context.xml file for your app please. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
[SECURITY] CVE-2008-5515 RequestDispatcher directory traversal vulnerability
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 CVE-2008-5515: Apache Tomcat information disclosure vulnerability Severity: Important Vendor: The Apache Software Foundation Versions Affected: Tomcat 4.1.0 to 4.1.39 Tomcat 5.5.0 to 5.5.27 Tomcat 6.0.0 to 6.0.18 The unsupported Tomcat 3.x, 4.0.x and 5.0.x versions may be also affected Description: When using a RequestDispatcher obtained from the Request, the target path was normalised before the query string was removed. A request that included a specially crafted request parameter could be used to access content that would otherwise be protected by a security constraint or by locating it in under the WEB-INF directory. Mitigation: 6.0.x users should upgrade to 6.0.20 or apply this patch: http://svn.apache.org/viewvc?view=revrevision=734734 5.5.x users should upgrade to 5.5.28 when released or apply this patch: http://svn.apache.org/viewvc?view=revrevision=782757 4.1.x users should upgrade to 4.1.40 when released or apply this patch: http://svn.apache.org/viewvc?view=revrevision=782763 Example: For a page that contains: % request.getRequestDispatcher( bar.jsp?somepar=somevalpar= + request.getParameter( blah ) ).forward( request, response ); % an attacker can use: http://host/page.jsp?blah=/../WEB-INF/web.xml Credit: This issue was discovered by Iida Minehiko, Fujitsu Limited References: http://tomcat.apache.org/security.html -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkotiBQACgkQb7IeiTPGAkMi6QCgnlzEt/7byUJo2YXGHMLj2ckH rF8AoK8dmpZcxd5pV9VvEaPqm4xhXJPO =bDV5 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problem with overriding the default servlet on tc 6.0.18
I have this in the web.xml of my application: servlet-mapping servlet-name MyServlet /servlet-name url-pattern / /url-pattern /servlet-mapping Which works fine, except for requests without pathinfo (i.e. http://servername/ ). That still seems to be handled by the default tomcat servlet, which is serving up the index.jsp that I no longer want to use. Am I doing something wrong or is this a bug? Incidentally I discovered you can't welcome-file-list by having an empty element, you have to have at least one welcome-file in there or the default servlet will use the one in $CATALINA_BASE/conf/web.xml . Bug or feature? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with overriding the default servlet on tc 6.0.18
After restarting tomcat it started working by itself, but only if I've overriden the default welcome-file-list in my web.xml or move index.jsp out of the way, implying that the default tomcat servlet is running *before* mine and then handing off to mine. I checked and requesting a plain static file does get handled by my servlet instead of the tomcat default, so this is only an issue with / Joseph S wrote: I have this in the web.xml of my application: servlet-mapping servlet-name MyServlet /servlet-name url-pattern / /url-pattern /servlet-mapping Which works fine, except for requests without pathinfo (i.e. http://servername/ ). That still seems to be handled by the default tomcat servlet, which is serving up the index.jsp that I no longer want to use. Am I doing something wrong or is this a bug? Incidentally I discovered you can't welcome-file-list by having an empty element, you have to have at least one welcome-file in there or the default servlet will use the one in $CATALINA_BASE/conf/web.xml . Bug or feature? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with overriding the default servlet on tc 6.0.18
Joseph S wrote: After restarting tomcat it started working by itself, but only if I've overriden the default welcome-file-list in my web.xml More on this: I discovered that reloading the webapp itself doesn't work, I have to restart Tomcat itself in order to get the welcome file list override to take. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Frustrating refusal to serve *some* pages, scripts, images.
--- On Mon, 6/8/09, Zaq Rizer idhindsi...@gmail.com wrote: WARNING: Unable to find configured definition '/WEB-INF/tiles.xml' Jun 8, 2009 3:35:00 PM org.apache.tiles.factory.TilesContainerFactory initializeContainer Just a random thought, which you've alluded to from your iPhone-posted message: Could there be permissions / file ownership issues? Also, are there any SE Linux issues outstanding? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Starting Tomcat 6.0
I currently start Tomcat with the Procrun Service Manager. It's an app called Apache Tomcat Properties with six tabbed forms: general, log on, logging, java, startup and shutdown. To start Tomcat I press the start button in the general tab. I want to experiment with security, lock down a directory so that only authenticated users can get the pages, etc. The doc says I need to: Starting Tomcat With A SecurityManager Once you have configured the catalina.policy file for use with a SecurityManager, Tomcat can be started with a SecurityManager in place by using the -security option: %CATALINA_HOME%\bin\catalina start -security (Windows) Unfortunately, I need more specific instructions on how to do this (not the policy file changes, just the start part.) I'm on Windows XP Pro SP3 Please and thank you.
Re: Problem with overriding the default servlet on tc 6.0.18
Joseph S j...@selectacast.net wrote in message news:4a2da6d6.50...@selectacast.net... I have this in the web.xml of my application: servlet-mapping servlet-name MyServlet /servlet-name url-pattern / /url-pattern /servlet-mapping Which works fine, except for requests without pathinfo (i.e. http://servername/ ). That still seems to be handled by the default tomcat servlet, which is serving up the index.jsp that I no longer want to use. Am I doing something wrong or is this a bug? This is a feature. Tomcat needs to process the welcome-file-list before doing Servlet mapping so that the correct servlet is invoked for the welcome file. Incidentally I discovered you can't welcome-file-list by having an empty element, you have to have at least one welcome-file in there or the default servlet will use the one in $CATALINA_BASE/conf/web.xml . Bug or feature? I'd say an enhancement rather than a bug, since you can always do (as you have discovered): welcome-file-list welcome-fileindex.doesnotexist/welcome-file /welcome-file-list For the benifit of the archives, this of course assumes that you have set replaceWelcomeFiles=true in the Context ... / element. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
swallowOutput=true not working. Why?
Hi, I just switched from Tomcat 5.5 to Tomcat 6 on an Ubuntu server. I'm trying to use log4j with this configuration: log4j.appender.R=org.apache.log4j.ConsoleAppender log4j.appender.R.target=System.out log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n This was not working, so I searched documentation and learned about: Context swallowOutput=true ... /Context However, this swallowOutput doesn't seem to work. I tried putting this in several places: 1) in the sever-wide context.xml, which already exists and has a Context ... element. (On my system, this fil is in /etc/tomcat6). 2) There was no host-specific one, so I added the file /etc/tomcat6/Catalina/localhost/context.xml with the contents: Context swallowOutput=true/ Note that ${CATALINA_HOME}/conf is a symlink to /etc/tomcat6, so when the documentation refers to the locations for these files, I am pretty sure I know which ones they're talking about. 3) Just to exhaust all possibilities, in my webapp's META-INF, I created a context.xml file with the same contents. None of these three things had any effect. I tried it both with log4j and, to rule out that log4j was the problem, tried some System.out.println and System.err.println here and there. Near as I can this output goes nowhere. I would REALLY like my log4j output to go to localhost_datetime.log. Otherwise, I think I have to do some screwing around with the security manager in order to use something like the RollingFileAppender. I tried to follow http://tomcat.apache.org/tomcat-6.0-doc/logging.html as best I could, including using tomcat-juli.jar from output/extras as well as adding in tomcat-juli-adapters.jar. I'm not sure if that really applies, but was wondering BTW the logger itself more-or-less seems to work. I determined this by doing something wrong just as a test: I called log4j's BasicConfigurator.configure() to see what it would do. I got log4j logging output, but I would get duplicate log entries the more times I reloaded my app. I quickly figured out that I need to get the logger as a static resource in whatever class wanted to log, e.g. private static Logger logger = Logger.getLogger(servletEventListener.class); Thanks, --Chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: implementing a Manager - how do I get a reference to it?
Nolan Johnson n0...@yahoo.com wrote in message news:291765.23953...@web38808.mail.mud.yahoo.com... I'm implementing a Manager (session management) that stores sessions on shared servers (that is, a distributed manager, but not the default one that comes with tomcat). A key difference between the implementation that I'm working on and the ClusteredManager is that the entire session is distributed when it changes, rather than sending individual parameters around over the network. The problem that I'm having is that the Manager needs to be notified when the request has finished with the session. I'm aware that I can create a ServletRequestListener, and I think that the requestDestroyed method would be a reasonable time for me to be telling the manager that it should distribute the session. However, I can't for the life of me figure out how to get a reference to the Manager from a ServletRequestListener. I've tried: - having the ServletRequestListener also be a ServletContextListener, but I can't navigate to the manager from there. - finding the Manager through the session, but that's a StandardSessionFacade, which doesn't reveal the manager. - having the ServletRequestListener also be a ContainerListener, but I can't make the same instance of the Listener be registered as both (since registerting a ServletRequestListener through the StandardContext doesn't allow me to register an object, I can only tell it what class to use). Any suggestions? Either for how I can have my ServletRequestListener get a reference to the Manager, or for other strategies for knowing when the Request is finished with the Session so that I can distribute it. Since you are already programming against Tomcat internals, the simplest is probably to write a Valve instead of a ServletRequestListener. The Valve will have access to all Tomcat internal Objects, and so could get to the Manager fairly simplily. Thanks. Nolan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org