Re: tomcat connector through cgi-bin?
Jacob Rhoden wrote: Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jacob, Jacob Rhoden wrote: Hi, Has anyone here ever had to use a cgi-bin directory to try and connect to tomcat? ie, some script that when run under cgi-bin, connects and forwards the info to tomcat? Ugh. This sounds miserable. ;) I cant find much on it, but it would be really handy. (Have a web server that i cant install a connector in!). Do you mean that you can't install something like mod_jk? Or, that you can't use a Tomcat connector with a port number? You might be able to use proxying (possibly?) already available in your web server to simply proxy requests to an HTTP connector running in Tomcat. I think this would be cleaner than a cgi-bin-Tomcat hack. What is your environment? Perhaps we can come up with a better solution. Its a system where we have no permission on any files except user home directories and the cgi-bin directory. So we can run tomcat as a non-unprivileged user on a high port, but we need the ability to allow files to be served through the apache web server on port 80. So it has to be something we can install in the cgi-bin directory. In the past we have had a perl script to simply make a connection to an app server and pass the data through. There is a very large set of Perl scripts (that have grown to the point where its inefficient and unmanageable) that I would like to start rationalizing/organizing into a simpler Java app. Sorry to be so negative, but I'd suggest getting a new webserver then: 1) hosting is cheap, 2) you can configure the server to do what you really need it to do. There's little point in trying to force a cgi environment to forward requests into Tomcat, if your server doesn't support it. It's a false economy if you spend more than the equivalent hosting cost in your time trying to resolve this - not a really a good idea at all. p Best Regards, Jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploying without a context?
Donal Roantree wrote: Hi. Sorry this seems so simple but I've been tearing my hair out. I want to have my Tomcat application deployed to /AAA/BBB/CCC and browseable at www.ABC.com. In the server.xml file I have a Host tag but I don't know what I should put into the Context tag. I've been trying Context path= docBase=.../Context but Tomcat seems to think that since I don't have a path or docBase I must mean that everything is in /AAA/BBB/CCC/ROOT which is NOT what I want. Surely this is a very common setup. What am I doing wrong? Thanks. You didn't describe your environment, OS, Tomcat version. ROOT is the special name for the default application for a given host. You can either deploy a ROOT.war into the hosts appBase, a deployed webapp (in the ROOT directory) or you can place a ROOT.xml context file (with an appropriate docBase attribute) into the 'tomcat/conf/Catalina/hostname/' directory. Regardless, the behaviour you have discovered is the correct and intended one. The 'path' attribute is only used to indicate the webapp/context path, in a Context..., when the context is defined in server.xml - which is discouraged. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Named based virtual host redirection
Hassan, All the static content is served by Tomcat anyway...i.e - there is no content on the Apache web server. How is the mod_proxy_ajp used? The doco on Apache org refers to it in a developer sense, rather than as a web server directive. -Original Message- From: Hassan Schroeder [mailto:[EMAIL PROTECTED] Sent: 06 March 2007 15:27 To: Tomcat Users List Subject: Re: Named based virtual host redirection On 3/6/07, Darren Kukulka [EMAIL PROTECTED] wrote: This worked but I want to hide the redirect URL, and eliminate the doubled network traffic, I hope? :-) Anyway, VirtualHost *:80 DocumentRoot d:/apache2/htdocs ServerName test.abc.co.uk ProxyPass / http://fred.abc.co.uk/app1/ ProxyPassReverse / http://fred.abc.co.uk/app1/ /VirtualHost This almost works, but it only appears to show the html content, not the JSP. Does anybody have any suggestions how to make this work? 1. move your static content to Tomcat, 2. use mod_proxy_ajp instead of mod_jk FWIW! -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Connaught honoured AIM 'Decade of Excellence' Award Connaught awarded Partnering Contractor of the Year 2005 Connaught wins AIM 'Company of the Year' award 2004 West of England Business of the Year Award Winner 2003 Why not visit our website http://www.connaught.plc.uk 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 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Advanced mod_jk router configuration
On 2/28/07, Rainer Jung [EMAIL PROTECTED] wrote: worker 1 and worker2 distance=0 worker 3 distance=1 Thank you very much. This worked for us very well. Regards, Rainer -- Sriram - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Possible JSTL/EL bug in 6.0.10
Hello, JSTL is not working on Tomcat 6, the JSTL specific code never gets executed. Consider the following JSP page fragment: c:forEach var=it items=#{bean.list} h:inputText id=ipt value=#{it.name}/ /c:forEach The list property is a simple java.util.List. A Object[] is not working too. In the bean the getList() method should be called but this never happens. Thus, the it variable is null. I use the - JSTL 1.2 from https://maven-repository.dev.java.net/repository/jstl/jars/ - JSF 1.2_03 from https://javaserverfaces.dev.java.net/download.html - Tomcat 6.0.10 cheers, Gerald - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Possible JSTL/EL bug in 6.0.10
Please provide the full jsp please. Side note: JSF and non-JSF tags do not mix very well. En l'instant précis du 07/03/07 11:14, Gerald Holl s'exprimait en ces termes: Hello, JSTL is not working on Tomcat 6, the JSTL specific code never gets executed. Consider the following JSP page fragment: c:forEach var=it items=#{bean.list} h:inputText id=ipt value=#{it.name}/ /c:forEach The list property is a simple java.util.List. A Object[] is not working too. In the bean the getList() method should be called but this never happens. Thus, the it variable is null. I use the - JSTL 1.2 from https://maven-repository.dev.java.net/repository/jstl/jars/ - JSF 1.2_03 from https://javaserverfaces.dev.java.net/download.html - Tomcat 6.0.10 cheers, Gerald - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
Hi all: I'd posted sometime ago seeking help for a particular requirement. Rainer Jung replied to my post. The thread is here http://thread.gmane.org/gmane.comp.jakarta.tomcat.user/144823 Requirement: 1. Host an application on two tomcat instances. 2. Enable load balancing between these two Tomcat instances. 3. If one Tomcat instance goes down then the other should take over. 4. If the second goes down, then the first should be retried. This should happen even if the first had failed some time ago. 5. After both the Tomcat instances are retried a number of times, fall back to yet another Tomcat. This third tomcat could do some special processing. Solution: mod_jk gives us this out of the box. For load balancing, add the first two Tomcat instances worker.router.balance_workers=worker1,worker2 For fail over between the two instances, do nothing extra For making only the first one work, and to use the second instance only for fail over, mark the second instance as disabled. worker.worker2.activation=disabled For ensuring that mod_jk tries both the Tomcat instances a specified number of times before moving to the third Tomcat instance. ensure that the first two Tomcat instances have the same distance count, while the Third tomcat instance has a higher distance count. worker.worker1.distance=0 worker.worker2.distance=0 worker.worker3.distance=1 I've attached the worker.properties file below for reference. == worker.properties = # The advanced router LB worker worker.list=router # Define a worker using ajp13 worker.worker1.port=8009 worker.worker1.recovery_options=0 worker.worker1.host=192.168.11.26 worker.worker1.type=ajp13 worker.worker1.lbfactor=1 worker.worker1.retries=3 worker.worker1.fail_on_status=600 worker.worker1.distance=0 worker.worker1.mount=/mondrian/* # Define prefered failover node for worker1 worker.worker1.redirect=worker2 # Define another worker using ajp13 worker.worker2.port=8009 worker.worker2.recovery_options=0 worker.worker2.host=192.168.11.25 worker.worker2.type=ajp13 worker.worker2.lbfactor=1 worker.worker2.retries=3 worker.worker2.fail_on_status=600 worker.worker2.distance=0 worker.worker2.mount=/mondrian/* # Disable worker2 for all requests except failover. Comment out the following to enable the 2 node load-balancing # worker.worker2.activation=disabled # Define the last resort worker using ajp13 worker.worker3.port=8009 worker.worker3.recovery_options=0 worker.worker3.host=192.168.11.24 worker.worker3.type=ajp13 worker.worker3.lbfactor=1 worker.worker3.retries=3 worker.worker3.fail_on_status=600 worker.worker1.distance=1 worker.worker3.mount=/mondrian/* # Define the LB worker worker.router.type=lb worker.router.sticky_session=0 #worker.router.sticky_session_force=0 worker.router.balance_workers=worker1,worker2 worker.list=jkstatus # Define a 'jkstatus' worker using status worker.jkstatus.type=status - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This will work if you are only using 1 Apache HTTPD server Regards Andrew On 07/03/2007, at 11:27 AM, Sriram Narayanan wrote: I'd posted sometime ago seeking help for a particular requirement. Rainer Jung replied to my post. The thread is here http://thread.gmane.org/gmane.comp.jakarta.tomcat.user/144823 Requirement: 1. Host an application on two tomcat instances. 2. Enable load balancing between these two Tomcat instances. 3. If one Tomcat instance goes down then the other should take over. 4. If the second goes down, then the first should be retried. This should happen even if the first had failed some time ago. 5. After both the Tomcat instances are retried a number of times, fall back to yet another Tomcat. This third tomcat could do some special processing. Solution: mod_jk gives us this out of the box. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF7pTSW126qUNSzvURAjE7AJ4z/2hNk4QqdFirX0liLH0YBDJWVwCfZRwh bY/ufculwvdURDGYguWx+Gw= =euml -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Named based virtual host redirection
Darren Kukulka wrote: Hassan, All the static content is served by Tomcat anyway...i.e - there is no content on the Apache web server. How is the mod_proxy_ajp used? The doco on Apache org refers to it in a developer sense, rather than as a web server directive. the pertinent info is actually on the mod_proxy page - it's largely config free if you're using it with the Tomcat AJP connector. ProxyPass /app ajp://hostname:ajpport/app You can also use the [p] Proxy directive for mod_rewrite RewriteRule ^/(.+)\.jsp(x?)(.+)* ajp://hostname:ajpport/$1.jsp$2$3 (...or something, the regex *probably* works) -Original Message- From: Hassan Schroeder [mailto:[EMAIL PROTECTED] Sent: 06 March 2007 15:27 To: Tomcat Users List Subject: Re: Named based virtual host redirection On 3/6/07, Darren Kukulka [EMAIL PROTECTED] wrote: This worked but I want to hide the redirect URL, and eliminate the doubled network traffic, I hope? :-) Anyway, VirtualHost *:80 DocumentRoot d:/apache2/htdocs ServerName test.abc.co.uk ProxyPass / http://fred.abc.co.uk/app1/ ProxyPassReverse / http://fred.abc.co.uk/app1/ /VirtualHost This almost works, but it only appears to show the html content, not the JSP. Does anybody have any suggestions how to make this work? 1. move your static content to Tomcat, 2. use mod_proxy_ajp instead of mod_jk FWIW! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Possible JSTL/EL bug in 6.0.10
David Delbecq wrote: Please provide the full jsp please. Side note: JSF and non-JSF tags do not mix very well. Here is the full JSP page: %@ taglib uri=http://java.sun.com/jsf/html; prefix=h% %@ taglib uri=http://java.sun.com/jsf/core; prefix=f% %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % f:view %@ include file=../doctype.jspf% html lang=de xmlns=http://www.w3.org/1999/xhtml; xml:lang=de head %@ include file=../header.jspf% titleAppname/title /head body div class=data h:form id=myform f:verbatimdiv class=panel/f:verbatim f:verbatimdiv class=panelHeader/f:verbatim h:commandLink action=#{handler.switch} styleClass=panelLink h:graphicImage value=collapsed.png rendered=#{handler.collapsed}/ h:graphicImage value=expanded.png rendered=#{!handler.collapsed}/ h:outputText value= bla/ /h:commandLink f:verbatim/div/f:verbatim h:panelGroup rendered=#{!handler.collapsed} c:forEach items=#{handler.fields} var=it h:inputText id=fieldPercent value=#{it.percentValue}/ h:message for=fieldPercent/ /c:forEach f:verbatimp/f:verbatim h:commandButton id=buttonMore value=#{msg.more} action=#{handler.more}/ h:commandButton id=buttonDelete value=#{msg.delete} action=#{handler.delete}/ f:verbatim/p/f:verbatim /h:panelGroup f:verbatim/div/f:verbatim /h:form /div /body /html /f:view cheers, Gerald - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
On 3/7/07, Andrew Miehs [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This will work if you are only using 1 Apache HTTPD server Are you referring to the following ? Two httpd servers with mod_jk pointing to the same two tomcat instances. httpdA and mod_jkA have a reference to TomcatA and TomcatB httpdB and mod_jkB have a reference to TomcatA and TomcatB What would be the complications in such a scenario ? I can think of situation where mod_jkA does not know of mod_jkB's status and vice-versa. In such a case, let's assume that TomcatA is down and that mod_jkB learns of this. And that mod_jk A has not yet contacted TomcatA. For long running requests, it would definitely be a problem to learn of TomcatA being unable to serve requests quite some time after sending a request to it. If the processing times on tomcat are low, would it be acceptable for mod_jkA to learn of the TomcatA instance being down, updating it's internal list with this info, and then redirecting the request to tomcatB. This is all that I could think of. If there's something else that we should be knowing, please do write back. Thanks in advance. -- Sriram - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Possible JSTL/EL bug in 6.0.10
There is a newer version of the jsf implementation at: https://javaserverfaces.dev.java.net/servlets/ProjectDocumentList?folderID=7028expandFolder=7028folderID=0 Probably not that but worth checking. I also read someware that the 1.2 implementation (or parts of it) require a valid web.xml with the 2.5 schema, but I can't confirm that, I have myself struggling with jsf1.2 and facelets and had some problems and suddenly it worked. /Per Jonsson Gerald Holl skrev: David Delbecq wrote: Please provide the full jsp please. Side note: JSF and non-JSF tags do not mix very well. Here is the full JSP page: %@ taglib uri=http://java.sun.com/jsf/html; prefix=h% %@ taglib uri=http://java.sun.com/jsf/core; prefix=f% %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % f:view %@ include file=../doctype.jspf% html lang=de xmlns=http://www.w3.org/1999/xhtml; xml:lang=de head %@ include file=../header.jspf% titleAppname/title /head body div class=data h:form id=myform f:verbatimdiv class=panel/f:verbatim f:verbatimdiv class=panelHeader/f:verbatim h:commandLink action=#{handler.switch} styleClass=panelLink h:graphicImage value=collapsed.png rendered=#{handler.collapsed}/ h:graphicImage value=expanded.png rendered=#{!handler.collapsed}/ h:outputText value= bla/ /h:commandLink f:verbatim/div/f:verbatim h:panelGroup rendered=#{!handler.collapsed} c:forEach items=#{handler.fields} var=it h:inputText id=fieldPercent value=#{it.percentValue}/ h:message for=fieldPercent/ /c:forEach f:verbatimp/f:verbatim h:commandButton id=buttonMore value=#{msg.more} action=#{handler.more}/ h:commandButton id=buttonDelete value=#{msg.delete} action=#{handler.delete}/ f:verbatim/p/f:verbatim /h:panelGroup f:verbatim/div/f:verbatim /h:form /div /body /html /f:view cheers, Gerald - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Possible JSTL/EL bug in 6.0.10
En l'instant précis du 07/03/07 12:04, Gerald Holl s'exprimait en ces termes: David Delbecq wrote: Please provide the full jsp please. Side note: JSF and non-JSF tags do not mix very well. c:forEach items=#{handler.fields} var=it h:inputText id=fieldPercent value=#{it.percentValue}/ h:message for=fieldPercent/ /c:forEach Sorry, should have seen it in your first message: items=#{handler.fields} -- this expression is not evaluated by tomcat. In jsp 2.0, expression must have the form ${handler.fields} You are mixing jstl stuff and jsf stuff. #{} is value binding expressions used by jsf. Moreover, handler is a JSF managed bean, am not sure JSF exports it's managed bean as it. They probably are inside a session/request/application (depend on managed bean) scope Map that can handle their lifecycle. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/03/2007, at 12:58 PM, Sriram Narayanan wrote: On 3/7/07, Andrew Miehs [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This will work if you are only using 1 Apache HTTPD server Are you referring to the following ? Two httpd servers with mod_jk pointing to the same two tomcat instances. httpdA and mod_jkA have a reference to TomcatA and TomcatB httpdB and mod_jkB have a reference to TomcatA and TomcatB What would be the complications in such a scenario ? I can think of situation where mod_jkA does not know of mod_jkB's status and vice-versa. Yep - this is the case I am referring to. You have moved the problem of load balancing Tomcat to load balancing HTTPD. How do you want to load balance httpd? Don't forget, you will need something to deal with session persistence. If the Apache HTTPD and tomcat are running on the same machine, you will probably find it easier to do a 1-1 mapping httpd - tomcat than the cross over setup that you are currently envisaging. Regards Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF7rWrW126qUNSzvURAu8qAJ9a1lR//+cKOr9xYa5q4byFn2IltQCcCU5Q esRNcj1ucsQNwA3K+XLjrGE= =4Tlr -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5 with java 1.4.2...
I've googled and read the release notes included with the 1.4.2 tomcat download. It references the running.txt doc for more info on doing this. I can't find thiat document or reference in the TC doc's or by googling the issue/searching the tomcat forum. Does anyone have a pointer to what the exact steps are that need to be completed to run TC 5.5 with JDK 1.4.2? Related, is there a doc or FAQ that talks about issues/limitations running in this mode? It's not something I want to do but have to do because of 3rd party software constraints. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
getting context path name
Hi all, I have an issue I have a context nemed demo with the following configuration Context path=/demo docBase=webapps/MyWebApp.war debug=0 privileged=true /Context I want to get the context name demo in a servlet . I am using Spring framework. It will be more usefule if I get it in Dispatcher servlet. If I am deploying the context in / , I should get it as / Context path=/ docBase=webapps/MyWebApp.war debug=0 privileged=true /Context Thanks in advance -- View this message in context: http://www.nabble.com/getting-context-path-name-tf3362065.html#a9352868 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Possible JSTL/EL bug in 6.0.10
David Delbecq wrote: En l'instant précis du 07/03/07 12:04, Gerald Holl s'exprimait en ces termes: David Delbecq wrote: Please provide the full jsp please. Side note: JSF and non-JSF tags do not mix very well. c:forEach items=#{handler.fields} var=it h:inputText id=fieldPercent value=#{it.percentValue}/ h:message for=fieldPercent/ /c:forEach Sorry, should have seen it in your first message: items=#{handler.fields} -- this expression is not evaluated by tomcat. In jsp 2.0, expression must have the form ${handler.fields} According to [1] the #{} should work with the new unified EL. If I try your hint I can't view the page anymore: Error: According to TLD or attribute directive in file, attribute items does not accept any expressions. You are mixing jstl stuff and jsf stuff. #{} is value binding expressions used by jsf. Moreover, handler is a JSF managed bean, am not sure JSF exports it's managed bean as it. They probably are inside a session/request/application (depend on managed bean) scope Map that can handle their lifecycle. The handler is not a JSF managed bean, it's a Spring managed bean. I think this should work. cheers, Gerald [1] http://java.sun.com/products/jsp/reference/techart/unifiedEL.html - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5 with java 1.4.2...
JT Neville wrote: I've googled and read the release notes included with the 1.4.2 tomcat download. It references the running.txt doc for more info on doing this. I can't find thiat document or reference in the TC doc's or by googling the issue/searching the tomcat forum. RUNNING.txt should be in the directory where you unpacked Tomcat 5.5. Does anyone have a pointer to what the exact steps are that need to be completed to run TC 5.5 with JDK 1.4.2? Here's the relevant snippet from RUNNING.txt: Running Tomcat With J2SE Version 1.4 (1) Obtain the compat package: (1.1) Download the compat package from the binary download site: http://tomcat.apache.org * Or build this package yourself from the source code: see BUILDING.txt in this directory. (2) Unzip the package in $CATALINA_HOME. It will place the XML parser APIs and Xerces implementation in the common/endorsed directory, and the JMX API jar (jmx.jar from Sun) in the bin directory. (3) Follow the same directions for starting and stopping the server as if you were using J2SE 5.0. Related, is there a doc or FAQ that talks about issues/limitations running in this mode? It's not something I want to do but have to do because of 3rd party software constraints. AFAIK there are no limitations caused by running Tomcat 5.5 with JDK 1.4. Regards mks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5 with java 1.4.2...
JT Neville wrote: I've googled and read the release notes included with the 1.4.2 tomcat download. It references the running.txt doc for more info on doing this. I can't find thiat document or reference in the TC doc's or by googling the issue/searching the tomcat forum. RUNNING.txt is in the root of the unzipped download. It contains all you need to know. Does anyone have a pointer to what the exact steps are that need to be completed to run TC 5.5 with JDK 1.4.2? You'll need to download the 1.4 compatibility packages from: http://tomcat.apache.org/download-55.cgi Related, is there a doc or FAQ that talks about issues/limitations running in this mode? It's not something I want to do but have to do because of 3rd party software constraints. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot create resource instance
Hi, I am trying to create a servlet which connects to a oracle database. My servlet is called from an HTML form. When it is called i recieve a javax naming exception Cannot create resource instance error. Please can someone advise me what I need to configure? I get no tomcat errors on startup. Thankyou i am calling the db connection with the following java: - Context initial = new InitialContext(); Context envContext = (Context)initial.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/maindb); tcon = ds.getConnection(); server.xml (within context) -- Resource name=jdbc/maindb auth=Container type=javax.sql.DataSource / ResourceParams name=jdbc/maindb parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameurl/name valuejdbc:oracle:[EMAIL PROTECTED]:1512:maindb/value /parameter parameter nameuser/name valuennw03u/value /parameter parameter namepassword/name value**/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams web.xml -- resource-ref res-ref-namejdbc/maindb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Jar files in WEB-INF/lib --- classes12.jar jasper-compiler.jar commons-collections-3.1.jar jasper-runtime.jar commons-dbcp-1.2.1.jar jsp-api.jar commons-dbcp-1.2.jarmysql-connector-java-3.1.8-bin.jar commons-el.jar naming-factory-dbcp.jar commons-pool-1.3.jar naming-java.jar jasper-compiler-jdt.jar This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
More domains
Hi all, I'm new to Tomcat (version 5.5) and having a Windows Server 2003. Currently the Tomcat runs on port 8080. How can I host multiply domains with Tomcat? I've only done it before with Apache 2. For example, I have www.homedomain.com and I'd like to have the following: * webapps\ROOT - www.homedomain.com * webapps\mydomain.com - www.mydomain.com * webapps\myseconddomain.com - www.myseconddomain.com I mean all the domains available on port 80. (If it's necessary, I can move Tomcat from port 8080 to 80) Thanks for helping, Marcell
Re: Cannot create resource instance
Before we can offer any relevant advice, please let us know which version of tomcat you are working with. There are configuration differences between 5.0.x and 5.5.x. --David Natasha N Wright wrote: Hi, I am trying to create a servlet which connects to a oracle database. My servlet is called from an HTML form. When it is called i recieve a javax naming exception Cannot create resource instance error. Please can someone advise me what I need to configure? I get no tomcat errors on startup. Thankyou i am calling the db connection with the following java: - Context initial = new InitialContext(); Context envContext = (Context)initial.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/maindb); tcon = ds.getConnection(); server.xml (within context) -- Resource name=jdbc/maindb auth=Container type=javax.sql.DataSource / ResourceParams name=jdbc/maindb parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameurl/name valuejdbc:oracle:[EMAIL PROTECTED]:1512:maindb/value /parameter parameter nameuser/name valuennw03u/value /parameter parameter namepassword/name value**/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams web.xml -- resource-ref res-ref-namejdbc/maindb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Jar files in WEB-INF/lib --- classes12.jar jasper-compiler.jar commons-collections-3.1.jar jasper-runtime.jar commons-dbcp-1.2.1.jar jsp-api.jar commons-dbcp-1.2.jar mysql-connector-java-3.1.8-bin.jar commons-el.jar naming-factory-dbcp.jar commons-pool-1.3.jar naming-java.jar jasper-compiler-jdt.jar This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More domains
I guess this part should be handled by Apache using the connector with Tomcat. But since Im a newbie either, somebody else for sure can help you better. Regards Roberto - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot create resource instance
I am using Tomcat version 4. with JDK 1.4 (quite old i know!) David Smith wrote: Before we can offer any relevant advice, please let us know which version of tomcat you are working with. There are configuration differences between 5.0.x and 5.5.x. --David Natasha N Wright wrote: Hi, I am trying to create a servlet which connects to a oracle database. My servlet is called from an HTML form. When it is called i recieve a javax naming exception Cannot create resource instance error. Please can someone advise me what I need to configure? I get no tomcat errors on startup. Thankyou i am calling the db connection with the following java: - Context initial = new InitialContext(); Context envContext = (Context)initial.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/maindb); tcon = ds.getConnection(); server.xml (within context) -- Resource name=jdbc/maindb auth=Container type=javax.sql.DataSource / ResourceParams name=jdbc/maindb parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameurl/name valuejdbc:oracle:[EMAIL PROTECTED]:1512:maindb/value /parameter parameter nameuser/name valuennw03u/value /parameter parameter namepassword/name value**/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams web.xml -- resource-ref res-ref-namejdbc/maindb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Jar files in WEB-INF/lib --- classes12.jar jasper-compiler.jar commons-collections-3.1.jar jasper-runtime.jar commons-dbcp-1.2.1.jar jsp-api.jar commons-dbcp-1.2.jar mysql-connector-java-3.1.8-bin.jar commons-el.jar naming-factory-dbcp.jar commons-pool-1.3.jar naming-java.jar jasper-compiler-jdt.jar This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: More domains
From: Marcell Kiss-Toth [mailto:[EMAIL PROTECTED] Subject: More domains Currently the Tomcat runs on port 8080. How can I host multiply domains with Tomcat? Use one Host element for each domain. They will all share the same Connector elements, since they're all part of the same Engine. Define a separate appBase directory for each Host, and put the default app for each domain in the respective appBase as the ROOT directory (or ROOT.war file). Check here for details: http://tomcat.apache.org/tomcat-5.5-doc/config/host.html You don't need httpd to to this - just configure the Connector for port 80 instead of 8080. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat connector through cgi-bin?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jacob, Jacob Rhoden wrote: What is your environment? Perhaps we can come up with a better solution. Its a system where we have no permission on any files except user home directories and the cgi-bin directory. So we can run tomcat as a non-unprivileged user on a high port, but we need the ability to allow files to be served through the apache web server on port 80. Hmm. And the system administrator cannot be convinced to add configuration directives for your virtual host or anything like that? Hmm... Do you have access to PHP? I think you might be able to get away with a small PHP script that uses an HTTP include. I think that would be easier than writing a Perl-based (or worse, C-based) CGI program. So it has to be something we can install in the cgi-bin directory. In the past we have had a perl script to simply make a connection to an app server and pass the data through. Can you use that one? Or will it not work for Tomcat for some reason? Using PHP, you should be able to use the HttpMessage (http://php.net/manual/en/http.HttpRequest.php) object and stuff it with cookies, headers, parameters, and the request body from the incoming request. Make the request and stream the result. Note that I've never tried this and so I could be completely wrong. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF7teH9CaO5/Lv0PARAkEkAKCP2XAZXdt7rFeIipMnLw3w2j1D/ACfadU9 uYc4R2TqzAZGR2igDXj7G/8= =1MHZ -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getting context path name
request.getContextPath() should supply what you need. If the webapp is the ROOT webapp, it will return an empty string. That just makes it easy to write stuff like: img src=${pageContext.request.contextPath}/images/myMasthead.jpg / If you really need the ROOT webapp to return /, then you'll just have to test for an empty string and handle that as a special case. --David santhoshihrd wrote: Hi all, I have an issue I have a context nemed demo with the following configuration Context path=/demo docBase=webapps/MyWebApp.war debug=0 privileged=true /Context I want to get the context name demo in a servlet . I am using Spring framework. It will be more usefule if I get it in Dispatcher servlet. If I am deploying the context in / , I should get it as / Context path=/ docBase=webapps/MyWebApp.war debug=0 privileged=true /Context Thanks in advance - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Console Logging
I have been looking about :) I have a simple tomcat instance with one webapp in it. I want to turn on high level - type logging to the console for internal debugging messages so I know what is happening. I gather I have to put a log4j.properties file in common/classes I put one I found in a howto and nothing happend (no file or change in console output) I ideally I could turn it on/off (ie internal engine logging) in my application to braket things that are a problem. turnItOn(); doSomethingThatBreaks(); tornItOff(); Thanks in advance. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More domains
Marcell Kiss-Toth wrote: Hi all, I'm new to Tomcat (version 5.5) and having a Windows Server 2003. Currently the Tomcat runs on port 8080. How can I host multiply domains with Tomcat? I've only done it before with Apache 2. For example, I have www.homedomain.com and I'd like to have the following: * webapps\ROOT - www.homedomain.com * webapps\mydomain.com - www.mydomain.com * webapps\myseconddomain.com - www.myseconddomain.com Firstly, you'll need to define a ROOT webapp for each host. * webapps\homedomain.com\ROOT - www.homedomain.com * webapps\mydomain.com\ROOT - www.mydomain.com * webapps\myseconddomain.com\ROOT - www.myseconddomain.com You should Read The Fantastic Manual pages that describe how to configure Tomcat Hosts and Contexts: http://tomcat.apache.org/tomcat-5.5-doc/config/index.html I mean all the domains available on port 80. (If it's necessary, I can move Tomcat from port 8080 to 80) You've half answered you're own question here. Port 80 is the default for http services, so if you don't intend to force people to use a port number in the URL then 80 it is. p Thanks for helping, Marcell - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5 with java 1.4.2...
Thanks that helped a lot. Please don't shoot the messenger as someone else chose the server OS, but I notice the Windows Service Installer download contains everything but the running.txt file. I've downloaded just the zip file and grabbed running.txt now. Thanks again Markus. -Original Message- From: Markus Schönhaber [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Date: Wed, 7 Mar 2007 14:51:04 +0100 Subject: Re: Tomcat 5.5 with java 1.4.2... JT Neville wrote: I've googled and read the release notes included with the 1.4.2 tomcat download. It references the running.txt doc for more info on doing this. I can't find thiat document or reference in the TC doc's or by googling the issue/searching the tomcat forum. RUNNING.txt should be in the directory where you unpacked Tomcat 5.5. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrew, Andrew Miehs wrote: This will work if you are only using 1 Apache HTTPD server Really? It looks like it would work to me. Sure, the separate mod_jks don't know each other's status, but it doesn't matter as they will quickly find out the status of each Tomcat instance pretty quickly. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF7tka9CaO5/Lv0PARAqWPAKCa5U7KcTmUqRB26TvWppEZfvY75gCfe+l3 qLx+XBYTcKrDRCHdzghPQ0g= =KPJ6 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot create resource instance
Then I would point you to http://tomcat.apache.org/tomcat-4.1-doc/jndi-resources-howto.html and http://tomcat.apache.org/tomcat-4.1-doc/jndi-datasource-examples-howto.html for some excellent information on setting up this stuff. I don't think you have to spec a resource factory as the built-in one for datasources is a slightly refactored (package rename only) version of DBCP. Also, the JDBC driver needs to be stored in common/lib of the tomcat installation. Lastly, unless you are directly using the commons-dbcp package or the commons-pool package in your code, the commons-dbcp-xx.xx.jar and commons-pool.jar are not necessary in WEB-INF. --David Natasha N Wright wrote: I am using Tomcat version 4. with JDK 1.4 (quite old i know!) David Smith wrote: Before we can offer any relevant advice, please let us know which version of tomcat you are working with. There are configuration differences between 5.0.x and 5.5.x. --David Natasha N Wright wrote: Hi, I am trying to create a servlet which connects to a oracle database. My servlet is called from an HTML form. When it is called i recieve a javax naming exception Cannot create resource instance error. Please can someone advise me what I need to configure? I get no tomcat errors on startup. Thankyou i am calling the db connection with the following java: - Context initial = new InitialContext(); Context envContext = (Context)initial.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/maindb); tcon = ds.getConnection(); server.xml (within context) -- Resource name=jdbc/maindb auth=Container type=javax.sql.DataSource / ResourceParams name=jdbc/maindb parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameurl/name valuejdbc:oracle:[EMAIL PROTECTED]:1512:maindb/value /parameter parameter nameuser/name valuennw03u/value /parameter parameter namepassword/name value**/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams web.xml -- resource-ref res-ref-namejdbc/maindb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Jar files in WEB-INF/lib --- classes12.jar jasper-compiler.jar commons-collections-3.1.jar jasper-runtime.jar commons-dbcp-1.2.1.jar jsp-api.jar commons-dbcp-1.2.jar mysql-connector-java-3.1.8-bin.jar commons-el.jar naming-factory-dbcp.jar commons-pool-1.3.jar naming-java.jar jasper-compiler-jdt.jar This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Retrieve list of all sessions
Hello all, I've created a management screen which lists all currently logged in users. This list is kept as a hashmap and is kept in sync with reality in the following way: At login-time I put the sessions in a list. A sessionlistener removes any sessions from this map when sessionDestroyed() is being called. It all seems very simple but we noticed that some sessions are remaining in the list for a few days while that user has different sessions open. (I am guessing one per every 100 sessions has this problem). So either the session list is not in sync anymore with reality or worse: some sessions are not being cleaned up. Can anyone help on either how to troubleshoot this, or if there is another (easier :) ) way to get the currently active sessions? Thank you, Glen.
RE: Retrieve list of all sessions
From: Glen Vermeylen [mailto:[EMAIL PROTECTED] Subject: Retrieve list of all sessions I've created a management screen which lists all currently logged in users. This list is kept as a hashmap and is kept in sync with reality in the following way: A HashMap is unsynchronized; does your logic provide the necessary synchronization for insertions, deletions, *and* retrievals? If not, switching to a HashTable might resolve your problem. Or then again, it might just be a bug, but you didn't tell us the version of Tomcat you're using, so searching bugzilla would be rather tedious. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Console Logging
I did what it says here http://minaret.biz/tips/log4j.html but no results. I havn't found other decent instructions yet. PK - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache handling HTTPS forwards to Tomcat HTTP, Tomcat HTTP redirects to HTTPS, loop.
I found out the specific cause of my problem and now I am looking at solutions. The easiest is to take apache out of the equation and have tomcat handle the ssl. I am on a hosted shared server and I think the reason apache is handling the ssl is to take the computational load of encryption off of the shared server so I am pretty much stuck in my present situation. I think the solution that I can implement is modifying the HttpConnector to recoignise the difference b/t a request that has come through apache and been decrypted from a straight browser request to the http port. Has anyone made these modifications to the HttpConnector? or is there perhaps some built in functionality in the HttpConnector that might allow me to do this without have to extend or modify it? Thanks for any advice, MG - Original Message From: Mike Grandmaison [EMAIL PROTECTED] To: tomcat-u users@tomcat.apache.org Sent: Friday, March 2, 2007 2:25:50 PM Subject: Http Connector Redirect - Not working with Portforwarding on hosted solution Hi, I am trying to get the user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint to work. I have it working on my development machine. The problem is when I move the code over to the stagging server it does not work. My stagging server differs from my dev machine in that port forwarding is taking place. Specifically http and https ports for my virtual host are being forwarded to tomcat. Now what I would expect in this case is that all I would need to change would be the redirectPort attribute value of the Http Connector such that it forwards to 443 which the port forwarding would then forward to the tomcat specific https port. I have tried that but without success. Has anyone else had this problem and had any luck getting it to work under these conditions. Thank you for any advice, MG Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097
Re: Possible JSTL/EL bug in 6.0.10
En l'instant précis du 07/03/07 14:43, Gerald Holl s'exprimait en ces termes: David Delbecq wrote: En l'instant précis du 07/03/07 12:04, Gerald Holl s'exprimait en ces termes: David Delbecq wrote: Please provide the full jsp please. Side note: JSF and non-JSF tags do not mix very well. c:forEach items=#{handler.fields} var=it h:inputText id=fieldPercent value=#{it.percentValue}/ h:message for=fieldPercent/ /c:forEach Sorry, should have seen it in your first message: items=#{handler.fields} -- this expression is not evaluated by tomcat. In jsp 2.0, expression must have the form ${handler.fields} According to [1] the #{} should work with the new unified EL. If I try your hint I can't view the page anymore: Error: According to TLD or attribute directive in file, attribute items does not accept any expressions. [1] unified EL refers to jsp 2.1 specifications, i was referring to 2.0 specifications. To ensure you are using 2.1 specifications, check mainly that - your taglib contains jsp-version2.1/jsp-version - your webapplication is properly configured to use the webapp2.5 specifications. The root element of web.xml should be like web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; When this is done, remove JSF stuff and do this inside your body tag: --- Just to be sure unified EL works, here is the request parameter named x: #{param.x}br/ You can change it by requesting http://server/webapp/jspname.jsp?x=fooBarbr/ Now i will iterate over handler.fieldsbr/ c:forEach items=#{handler.fields} var=it Found field with value: #{it.percentValue} /c:forEach --- The handler is not a JSF managed bean, it's a Spring managed bean. I think this should work. Not sure, but i don't know the inners of spring. cheers, Gerald [1] http://java.sun.com/products/jsp/reference/techart/unifiedEL.html - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help with exporting SSL certificate
I purchased a chained *.SSL cert from Godaddy. I installed it successfully on my Tomcat Server(server #1). Now I need to export it and replace another Tomcat servers(server #2) self signed cert with the export from server #1. I tried doing the keytool export from server #1 and keytool import into my current keystore on server #2 with no success(The keytool process throws no errors). I dont get any error messages or anything to track down..the https pages just dont load. What is the proper procedure for doing these exports /imports? Any help is appreciated.
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Christopher, Balancing the 2 Tomcats behind one Apache (with sticky sessions) works. Now you add a second Apache HTTPD. How do you choose which one of these gets used? You now have the original problem all over again... How do you load between the two web servers? Cheers Andrew On 07/03/2007, at 4:24 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrew, Andrew Miehs wrote: This will work if you are only using 1 Apache HTTPD server Really? It looks like it would work to me. Sure, the separate mod_jks don't know each other's status, but it doesn't matter as they will quickly find out the status of each Tomcat instance pretty quickly. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF7u9CW126qUNSzvURAh5+AKCEcI3uKAisPAKhRUuTEMXSHSWzqACffxxx 5YZuzPz+e44Lq4EI3EV+SX8= =du2M -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrew, Andrew Miehs wrote: Balancing the 2 Tomcats behind one Apache (with sticky sessions) works. Now you add a second Apache HTTPD. How do you choose which one of these gets used? You now have the original problem all over again... How do you load between the two web servers? Perhaps round-robin DNS? That's how I would do it, unless I wanted to buy a real load balancer like a BigIP. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF7vW79CaO5/Lv0PARAp36AKC/dEjFHuhANbnFdDRf9RdnY3Ew+gCgn0hT j2/q1J9dDj1XWgl2DEtj/7w= =V9Ll -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Console Logging
I wrote an application which allows you to modify the running log4j configuration on the fly. It's a Struts app, and relies on the fact that tomcat and all the apps are running out of common/lib/log4j*.jar and common/classes/log4j.properties. However, you could add the servlet, jars, and mappings to a single app if you wish. I have found it useful for turning up or down logging levels on a running production system. It will revert to your log4j.properties configuration as well, so you can easily go back to the configured settings when you're done. I can send you (or anyone else who is interested) the sources and/or war. PM me off-list. Tim -Original Message- From: Peter Kennard [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 07, 2007 10:59 AM To: Tomcat Users List Subject: Re: Console Logging I did what it says here http://minaret.biz/tips/log4j.html but no results. I havn't found other decent instructions yet. PK - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Redirect question - SOLVED
Thanks, the connector did it for me. -Original Message- From: Caldarale, Charles R Sent: Tuesday, March 06, 2007 5:44 PM To: Tomcat Users List Subject: RE: Redirect question From: Jean-Sebastien Pilon Subject: Redirect question I wish to get rid of apache from the design, is there any way I can set it up so it listens on port 80 and redirects to 8080 ? Just duplicate your existing Connector in server.xml and change to port to 80. It's fine to have more than one Connector per Engine. If you're using UNIX/Linux, you could use iptables to do the redirection. - Chuck NOTICE: This email contains privileged and confidential information and is intended only for the individual to whom it is addressed. If you are not the named addressee, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this transmission by mistake and delete this communication from your system. E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. AVIS: Le présent courriel contient des renseignements de nature privilégiée et confidentielle et nest destiné qu'à la personne à qui il est adressé. Si vous nêtes pas le destinataire prévu, vous êtes par les présentes avisés que toute diffusion, distribution ou reproduction de cette communication est strictement interdite. Si vous avez reçu ce courriel par erreur, veuillez en aviser immédiatement lexpéditeur et le supprimer de votre système. Notez que la transmission de courriel ne peut en aucun cas être considéré comme inviolable ou exempt derreur puisque les informations quil contient pourraient être interceptés, corrompues, perdues, détruites, arrivées en retard ou incomplètes ou contenir un virus. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More domains
Caldarale, Charles R wrote: From: Marcell Kiss-Toth [mailto:[EMAIL PROTECTED] Subject: More domains Currently the Tomcat runs on port 8080. How can I host multiply domains with Tomcat? Use one Host element for each domain. They will all share the same Connector elements, since they're all part of the same Engine. Define a separate appBase directory for each Host, and put the default app for each domain in the respective appBase as the ROOT directory (or ROOT.war file). Check here for details: http://tomcat.apache.org/tomcat-5.5-doc/config/host.html You don't need httpd to to this - just configure the Connector for port 80 instead of 8080. - Chuck I have configured the domain in the server.xml. Localhost is working correctly, however I get a blank page for the lately specified domain (both version with and without www - I also used Alias tag). I copied the localhost Host section and replaced the localhost value to my domain name. Already created the folders so on. Have no errors, just getting a blank page. The ROOT folder is the same as in the top ROOT folder. What could be the problem? Thanks, Marcell
Re: how to set role for JAASRealm
Hi First of all, are you sure a JDBCRealm or a DataSourceRealm do not fill your needs ? Secondly, AFAIK when providing a Jaas module to the JaasRealm you just need to provide the authentication method (LoginModule inteface). You don't have to manipulate the loginContext, it is the JaasRealm job ... If you really need to use Jaas: 1: Write your own LoginModule (implementing java.security.auth.spi.LoginModule) 2: Write a jaas.conf description file (must be declared with - Djava.security.auth.config ) 3: The appName (TMSLogin) must reference a valid config in the jaas.conf 4: Configure the context / web.xml file Hih On 3/7/07, shahab [EMAIL PROTECTED] wrote: Hi: I am trying to implement authentication and authorization using JAASRealm. (I am following the instruction provided at - http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html). However, looks like the role that I set (in the RolePrincipal) is not taking effect. I have created a class extending Principal for the role. I am setting the right name of the role (which I fetch from DB) and add the class to Subject as follows - LoginContext lc = null; try { lc = new LoginContext(TMSLogin, new AuthCallBackHandler(username, password)); } catch (LoginException le) { .. } try { lc.login(); } catch (LoginException le) { } // now I am trying to set the rolePrincipal Subject mySubject = lc.getSubject(); TMSRoles tmsRoles = new TMSRoles(role); mySubject.getPrincipals().add(tmsRoles); I have also made entries in server.xml as follows (i set debug to 0 hoping for more debug info, TMSLogin is defined in jaas.config in tomcat's conf directory) - Realm className=org.apache.catalina.realm.JAASRealm appName=TMSLogin userClassNames=tms.core.authentication.TMSPrincipal roleClassNames=tms.core.authentication.TMSRoles debug=0/ my entry in web.xml is the following - security-constraint display-nameAdminConstraint/display-name web-resource-collection web-resource-nameTMSAdmin/web-resource-name descriptionOnly for administrators/description url-pattern/admin/*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint description/ role-nameADMIN/role-name /auth-constraint /security-constraint security-role descriptionADMIN/description role-nameADMIN/role-name /security-role the getName() of the TMSRoles instance returns ADMIN, which should allow url /admin/*. However, I am still getting HTTP 403. Please help. thanx Shahab -- View this message in context: http://www.nabble.com/how-to-set-role-for-JAASRealm-tf3359888.html#a9346104 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Souviens-toi qu'au moment de ta naissance tout le monde était dans la joie et toi dans les pleurs. Vis de manière qu'au moment de ta mort, tout le monde soit dans les pleurs et toi dans la joie.
Re: Help with exporting SSL certificate
Yerger, Chad wrote: I purchased a chained *.SSL cert from Godaddy. I installed it successfully on my Tomcat Server(server #1). Now I need to export it and replace another Tomcat servers(server #2) self signed cert with the export from server #1. I tried doing the keytool export from server #1 and keytool import into my current keystore on server #2 with no success(The keytool process throws no errors). I dont get any error messages or anything to track down..the https pages just dont load. What is the proper procedure for doing these exports /imports? Any help is appreciated. There's not a lot of information from your message to go on, like what error do you get from your browser on loading a page, so I kind of have to take a guess. On server 1: keytool -export -rfc -alias tomcat -file tomcat.cert -storepass changeit Copy mycertificate.cert to server 2 On server 2: keytool -delete -alias tomcat -storepass changeit keytool -import -alias tomcat -storepass changeit -file tomcat.cert Sorry I can't unwrap the lines there. Mojo -- Morris Jones Monrovia, CA http://www.whiteoaks.com Old Town Astronomers http://www.otastro.org - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Console Logging
Thanks will check out after lunch. I definately want to use the log4j for our apps. I am assuming the Tomcat internals have very good debug log info like why sockets are closed or timed out etc (If I can get them activated :) I dread finding out it might be a windows sockets bug :| PK At 13:18 3/7/2007, you wrote: I did what it says here http://minaret.biz/tips/log4j.html but no results. I havn't found other decent instructions yet. PK try this one: http://www.vipan.com/htdocs/log4jhelp.html with http://minaret... you need to install another jar... Regards. FC - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Console Logging
That is interesting, Certainly for adminstration of many apps it would be great to have a good GUI for assigning log files to apps and log levels. but I can't even get any debug output yet, much less tweak it. Everyone warns about the volume of data when it's tured to 11, but: Where I am: With an out of the box Tomcat 5.5 install on my workstation (windows XP) I set level=ALL on every entry in conf/logging.properties (no change to files or console print) I tried setting them to DEBUG and it barfed saying DEBUG was in invalid value. I set debug=10 on all the entities in the server.xml file (likewise no change) if I cd (catalina-home}/logs grep DEBUG * I get nothing. And files arn't that big. They are logging INFO however so they are being written to. I put the newer version log4j1.3 jars in common/lib as described in a HOWTO. This did change something, I got less console output and less info in the files. I know it's looking there for catalina-base because if I change the server.xml file changes take effect when restarted. I tried putting in both the log4j.properties and the log4j.xml files from the howto page, no change over putting in the jars. I'm a bit mystified. too many different sets of instructions and interactions I guess. My problem is I am getting some apparently spontaneous socket closings reported by the client and want to find out detail. All on local host, I'm simulating a slow server push application with: for(i = 0; i 100; ++i) { Thread.sleep(200); res.getWriter().println(waiting + i); res.flushBuffer(); } res.getWriter().println(done!); res.flushBuffer(); Using flushBuffer() makes Transfer-Encoding: chunked chunks in the reply. My client reports the socket is closed way before the done is recived in about 80% of cases. Otherwise tomcat is sending HTTP chunks exactly as expected and to HTTP1.1 spec when it works. I figure on the clinet I should get all the chunks up to the terminal chunk \r\n0\r\n before the socket is closed. I need to figure this out, it's kind of a fundamental basic thing, I'm a bit stuck. PK At 12:37 3/7/2007, you wrote: I wrote an application which allows you to modify the running log4j configuration on the fly. It's a Struts app, and relies on the fact that tomcat and all the apps are running out of common/lib/log4j*.jar and common/classes/log4j.properties. However, you could add the servlet, jars, and mappings to a single app if you wish. I have found it useful for turning up or down logging levels on a running production system. It will revert to your log4j.properties configuration as well, so you can easily go back to the configured settings when you're done. I can send you (or anyone else who is interested) the sources and/or war. PM me off-list. Tim -Original Message- From: Peter Kennard [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 07, 2007 10:59 AM To: Tomcat Users List Subject: Re: Console Logging I did what it says here http://minaret.biz/tips/log4j.html but no results. I havn't found other decent instructions yet. PK - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
On 3/7/07, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrew, Andrew Miehs wrote: Balancing the 2 Tomcats behind one Apache (with sticky sessions) works. Now you add a second Apache HTTPD. How do you choose which one of these gets used? You now have the original problem all over again... How do you load between the two web servers? Perhaps round-robin DNS? That's how I would do it, unless I wanted to buy a real load balancer like a BigIP. Ok, round-robin dns will work. But it will probably work with pure tomcats too, wouldn't it? If you round-robin the load between two httpds, why dont you do the same between two tomcats? Leon - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF7vW79CaO5/Lv0PARAp36AKC/dEjFHuhANbnFdDRf9RdnY3Ew+gCgn0hT j2/q1J9dDj1XWgl2DEtj/7w= =V9Ll -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Tomcat 5.5.20] How to use JAASRealm ?
hi, I can't figure out why you need to extend a JaasRealm ? This class lives in the server classloader, therein it cannot be and should definitivly never be accessed from your webapp. I think that you missunderstand the way to use the JaasRealm. Please look at my previous post (today) and tell me if it's clear enougth. HIH On 2/13/07, Stefan Lecho [EMAIL PROTECTED] wrote: Hello, In our project we are using a class that extends JAASRealm. This class is deployed in Tomcat 5.5.20. When accessing this class, an exception is generated: java.lang.NoClassDefFoundError: org/apache/catalina/realm/JAASRealm. By copying catalina-optional.jar from server\lib to common\lib, the original exception is no longer generated, but other exceptions are generated. In order to remove all generated exceptions, I am obliged to copy the following jars from server\lib to common\lib: catalina.jar, catalina-cluster.jar, catalina-optional.jar, catalina-storeconfig.jar, commons-modeler.jar, tomcat-ajp.jar, tomcat-coyote.jar, tomcat-http.jarand tomcat-util.jar. Is there another - cleaner - solution to make JAASRealm-derived classes work in Tomcat 5.5.20 ? Regards, Stefan Lecho. -- Souviens-toi qu'au moment de ta naissance tout le monde était dans la joie et toi dans les pleurs. Vis de manière qu'au moment de ta mort, tout le monde soit dans les pleurs et toi dans la joie.
Re: [Tomcat 5.5.20] How to use JAASRealm ?
Sorry for the double post: If you really need to use Jaas: 1: Write your own LoginModule (implementing java.security.auth.spi.LoginModule) 2: Write a jaas.conf description file (must be declared with - Djava.security.auth.config ) 3: The appName (TMSLogin) must reference a valid config in the jaas.conf 4: Configure the context / web.xml file On 3/7/07, olivier nouguier [EMAIL PROTECTED] wrote: hi, I can't figure out why you need to extend a JaasRealm ? This class lives in the server classloader, therein it cannot be and should definitivly never be accessed from your webapp. I think that you missunderstand the way to use the JaasRealm. Please look at my previous post (today) and tell me if it's clear enougth. HIH On 2/13/07, Stefan Lecho [EMAIL PROTECTED] wrote: Hello, In our project we are using a class that extends JAASRealm. This class is deployed in Tomcat 5.5.20. When accessing this class, an exception is generated: java.lang.NoClassDefFoundError: org/apache/catalina/realm/JAASRealm. By copying catalina-optional.jar from server\lib to common\lib, the original exception is no longer generated, but other exceptions are generated. In order to remove all generated exceptions, I am obliged to copy the following jars from server\lib to common\lib: catalina.jar, catalina-cluster.jar, catalina-optional.jar, catalina-storeconfig.jar, commons-modeler.jar, tomcat-ajp.jar, tomcat-coyote.jar, tomcat-http.jarand tomcat-util.jar . Is there another - cleaner - solution to make JAASRealm-derived classes work in Tomcat 5.5.20 ? Regards, Stefan Lecho. -- Souviens-toi qu'au moment de ta naissance tout le monde était dans la joie et toi dans les pleurs. Vis de manière qu'au moment de ta mort, tout le monde soit dans les pleurs et toi dans la joie. -- Souviens-toi qu'au moment de ta naissance tout le monde était dans la joie et toi dans les pleurs. Vis de manière qu'au moment de ta mort, tout le monde soit dans les pleurs et toi dans la joie.
Location to override global error-page
This seems basic, but apparently not. A similar question has been asked recently, and there are a few posts on the web, but the answers aren't enough to solve my problem. I am trying to override the global default error page by using directives such as error-page location/catch_all_errors.html/location /error-page or even error-page error-code404/error-code location/catch_all_errors.html/location /error-page If I include this in the bottom of my webapps web.xml file, it will catch 404 errors for requests under my web-app: http://myhost.com/myWebapp/thisPageDoesNotExist.html but when I modify the global deployment descripter conf/web.xml, I cannot catch top-level errors like this one: http://myhost.com/thisPageDoesNotExist.html More specifically, as a previous poster pointed out: http://marc.theaimsgroup.com/?l=tomcat-userm=116059712510694w=2 it will catch the errors and display a blank page, but it won't display my customized page. A related problem is that even when I display customized errors under my webapp, the error-page text displays, but loaded graphics sometimes do not (it seems to depend on the URL). At least part of my problem is that I am not sure where to locate the error page if I create one. That is, what the root directory is for the statements: location/catch_all_errors.html/location or locationcatch_all_errors.html/location Thanks. -- View this message in context: http://www.nabble.com/Location-to-override-global-%3Cerror-page%3E-tf3364166.html#a9359765 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Root context setup
Thank you for the help - this works perfectly. I do notice that the war file gets expaned in the webapps directory in a sub-folder called ROOT. Should I delete the contents of this directory everytime I deploy a new war file? On 2/16/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Jim Goodspeed [mailto:[EMAIL PROTECTED] Subject: Re: Root context setup Is there another way to accomplish this though? Don't put the .war file in Tomcat's directory structure. Instead, put a ROOT.xml file in conf/Catalina/[hostname] that contains a Context element with a docBase attribute that points to the location of the .war file. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help with mod_jk autoconfigure
Hi all, I'm trying to get the mod_jk auto configuration to work. I have the following line in my conf/server.xml right after the Listeners that are declared in the default file. Here is what I have Listener classname=org.apache.jk.config.ApacheConfig modJk=/usr/lib/httpd/modules/mod_jk.so/ Here is my server information Server version: Apache Tomcat/5.5.20 Server built: Sep 12 2006 10:09:20 Server number: 5.5.20.0 OS Name:Linux OS Version: 2.6.9-5.ELsmp Architecture: i386 JVM Version:1.5.0_10-b03 JVM Vendor: Sun Microsystems Inc. I receive this stack trace in the catalina log. WARNING: Catalina.start using conf/server.xml: java.lang.NullPointerException at org.apache.tomcat.util.digester.Digester.createSAXException( Digester.java:2725) at org.apache.tomcat.util.digester.Digester.createSAXException( Digester.java:2751) at org.apache.tomcat.util.digester.Digester.startElement( Digester.java:1278) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement( AbstractSAXParser.java:533) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement (AbstractXMLDocumentParser.java:220) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement (XMLDocumentFragmentScannerImpl.java:872) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch (XMLDocumentFragmentScannerImpl.java:1693) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument (XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse( XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse( XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse( XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse( AbstractSAXParser.java:1242) at org.apache.tomcat.util.digester.Digester.parse(Digester.java :1561) at org.apache.catalina.startup.Catalina.load(Catalina.java:489) at org.apache.catalina.startup.Catalina.start(Catalina.java:543) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Mar 7, 2007 8:30:30 PM org.apache.catalina.startup.Catalina start Any idea what's wrong, the exception isn't very helpful. If I comment out my line everything is fine. I'm currently testing it running as root to avoid any permission or port issue. Any help would be greatly appreciated. Thanks, Todd
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leon, Leon Rosenberg wrote: On 3/7/07, Christopher Schultz [EMAIL PROTECTED] wrote: Perhaps round-robin DNS? That's how I would do it, unless I wanted to buy a real load balancer like a BigIP. Ok, round-robin dns will work. But it will probably work with pure tomcats too, wouldn't it? If you round-robin the load between two httpds, why dont you do the same between two tomcats? I suppose we're getting into a semi-philosophical discussion, here, about where load balancing belongs. In my opinion, Tomcat is the resource that needs to be load-balanced, since it's doing most of the work. You want to protect individual servers from being crushed under the weight of too much traffic. With no (formal) load balancer and just round-robin DNS, you do not achieve your goal. By the luck of the draw, all your customers could get a single server in your server bank. Or, by similar coincidence, only heavy users might single out a particular server. This is not load balancing: it's random request (or user, depending on DNS attitude of the client) distribution. With Apache httpd out front, mod_jk can monitor the status of the connected Tomcats and choose the best one for any given request. Apache httpd is not doing too much work: mostly just copying data between buffers. This does in fact load balance the two Tomcats. The question was what to do at this point?. Well, if Apache httpd goes down, you're completely hosed. So, a solution would be to setup another Apache httpd in parallel. This way, when one Apache goes down, the other is available (though not necessarily reachable when using round-robin DNS). The point is that you are not 100% down. Using round-robin DNS is not load balancing, but it will increase the robustness of your deployment. AFAICT, this robustness is not possible using Tomcats only. One needs to have something like mod_jk working to load balance the app servers. I'd be glad to hear that Tomcat can offload work to another server in a cluster, but I have heard nothing about such a feature, so I assume that it does not exist. Load balancing pretty much always comes down to either: 1. A single point of failure (Apache httpd, BigIP, or whatever). or 2. Non-100% reachability (for instance, due to one of the round-robin'd web servers going down). It seems to me that the most robust deployment for a webapp is: Random request distribution + Apache httpd + lb'd Tomcat - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF7xwK9CaO5/Lv0PARAn4SAKCQyaWTBmiDrcGt0YxR5WL+C6TyJgCfcEUi DZ26oLSl/xT0oRBg6Y+rmDA= =x1/N -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SSL on Tomcat 5 problem.
WOW!! It worked, all i did now was rename tcnative-1.dll. Yes I read the fine print but miss interpret it. I thought I was using JSSE since i used the keytool to generate my own key. So what i generated is a non-APR, but the guide didn't say anything about renaming tcnative-1.dll. But for curiosity what is tcnative-1.dll used for? Thank you again, Hoa Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Hoa Doan [mailto:[EMAIL PROTECTED] Subject: SSL on Tomcat 5 problem. I have gone through the steps provided on Tomcat SSL document and generated a .keystore file. Unfortunately, you didn't look at the fine print. Mar 2, 2007 4:24:07 PM org.apache.coyote.http11.Http11AprProtocol init INFO: Initializing Coyote HTTP/1.1 on http-443 The above shows that you're using APR; the SSL config for that is quite different from that of the pure Java connector. The first paragraph under the ssl-howto page reads: IMPORTANT NOTE: This Howto refers to usage of JSSE. When using APR, Tomcat will use OpenSSL, which uses a different configuration. If you want to use your existing non-APR SSL config, delete or rename the tcnative-1.dll in Tomcat's bin directory. If you want to continue using APR, read the doc at the following link to configure it: http://tomcat.apache.org/tomcat-5.5-doc/apr.html#HTTPS - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta.
Is APR worth it (for me?)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, Apologies for the pretty vague question, but I was wondering if looking at using APR is worth it for me. To answer that, you'll need to know a bit about my setup. I'm running Tomcat 5.5 on Linux, connected via mod_jk 1.2.21 to Apache httpd 2.0.x. I try to serve all static content using Apache, so sendFile isn't exactly going to get me anywhere. I have Apache httpd handle SSL for me, so increased speed through APR/OpenSSL isn't going to get me anywhere, either. However, the APR description page suggests that scalability is improved through the use of socket-polling -- not something that I generally think of as performance-enhancing. Can someone comment on the applicability of APR in my case? And before anyone asks about skipping Apache httpd altogether, I need it to switch between multiple parallel Tomcats, so I can't dump it (nor do I really want to). Thanks in advance, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF7ylW9CaO5/Lv0PARAm3QAJwMPi8jJp6fwm3K3MXwo1K3PYpQ7gCggz4b +naAvTqtBNaNk4U/fBPzlOg= =TvzR -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is APR worth it (for me?)
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Is APR worth it (for me?) However, the APR description page suggests that scalability is improved through the use of socket-polling The scalability is improved due to not having to keep a thread around for each persistent HTTP connection. (The new NIO connector in Tomcat 6 also achieves this.) Whether or not that aspect improves your performance due to less context switching, CPU cache loading/unloading, etc., will depend almost entirely on your workload. Do you have a simulated production environment where you can just try the two connectors back-to-back? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
On 3/7/07, Christopher Schultz [EMAIL PROTECTED] wrote: Load balancing pretty much always comes down to either: 1. A single point of failure (Apache httpd, BigIP, or whatever). or 2. Non-100% reachability (for instance, due to one of the round-robin'd web servers going down). At which point you use `ifconfig` to add the failed IP to the working httpd box and it's back to 100% :-) -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Root context setup
From: Jim Goodspeed [mailto:[EMAIL PROTECTED] Subject: Re: Root context setup Should I delete the contents of this directory everytime I deploy a new war file? I don't really know if it's required, but I always do (or rather, the deployment script always does). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
General mappings in Workers2.properties
Hi all, I am using apache 2.0.59 and tomcat 5.5.20. I would like to setup a general mapping in the workers2.properties file that will allow all contexts that are starting with foo go to a particular tomcat. So in my worker2.properties file, I have the following setup: [uri:/foo*] Those this work - if I tried and hit http://localhost/fooApp - I get the URL Not Found error. Can some please let me know if I have set this up right. Thank you for your help. Ajay - This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited. All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto. The recipient of this e-mail is solely responsible for checking for the presence of Viruses or other Malware. Monsanto accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment. -
RE: SSL on Tomcat 5 problem.
From: Hoa Doan [mailto:[EMAIL PROTECTED] Subject: RE: SSL on Tomcat 5 problem. But for curiosity what is tcnative-1.dll used for? It's essentially the same code that httpd uses to handle HTTP traffic, written in C. Since it's a bit closer to the comm hardware it provides somewhat better throughput than the pure Java HTTP and AJP connectors in Tomcat 5.5. When employed for HTTPS, it's noticeably faster, since it uses the native code OpenSSL for encryption, rather than Sun's JSSE logic. It also reduces the number of threads required for persistent HTTP connections (using keep-alives), since it employs socket polling rather than dedicated threads for that purpose (the NIO connector in Tomcat 6 also uses a poll/select mechanism to avoid dedicated threads). Whether or not the additional complexity and reduced portability is worth the performance delta is entirely dependent on your workload and environment. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Installing Apache Portable Runtime on Linux
Hi, I'm tring to install the Apache Portable Runtime on Linux as per the instructions here: http://tomcat.apache.org/tomcat-6.0-doc/apr.html When I run configure I get the following output [EMAIL PROTECTED] native]# ./configure checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking for working mkdir -p... yes Tomcat Native Version: 1.1.8 checking for chosen layout... tcnative checking for APR... no configure: error: APR could not be located. Please use the --with-apr option. I think the problem might be that I have version 0.9.4 of the apr-devel package installed, because the installation instructions seem to indicate that I need version 1.2+. I tried finding a more up-to-date version of this package for Red Hat Enterprise Linux 4 (the system I'm using), but failed. Can someone tell me whether it is the version of the apr-devel package that is causing the install to fail, and if so, where I might get a more up-to-date version? Many Thanks, DM ___ The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is APR worth it (for me?)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Is APR worth it (for me?) However, the APR description page suggests that scalability is improved through the use of socket-polling The scalability is improved due to not having to keep a thread around for each persistent HTTP connection. I see. The new NIO connector in Tomcat 6 also achieves this. ...without regard to the presence of APR, I would imagine. Do you have a simulated production environment where you can just try the two connectors back-to-back? I do, but I don't have a load test scenario right now that I can use to get some good numbers. We currently serve very light load on a one-box wonder, so I would imagine that any performance improvement would not be observable in production today. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF70F/9CaO5/Lv0PARAn+nAJ9kLBN49mKT8x3rqXAt9Wq2ww+7yACgwEjj fKgknH/YsLK1flQVvVEVBOY= =al8l -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
On 3/7/07, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leon, In my opinion, Tomcat is the resource that needs to be load-balanced, since it's doing most of the work. You want to protect individual servers from being crushed under the weight of too much traffic. actually usually the resources behind tomcat doing the most work. In a good scaling system you have a factor 1:5 or something... 1 DB - 5 APP servers - 25 tomcats... to give an example. But ok, its not related to the example. With no (formal) load balancer and just round-robin DNS, you do not achieve your goal. By the luck of the draw, all your customers could get a single server in your server bank. Or, by similar coincidence, only heavy users might single out a particular server. This is not load balancing: it's random request (or user, depending on DNS attitude of the client) distribution. Right, but this is something the tomcat could easily handle itself. By a filter or a valve. Would mean one more request per client. With Apache httpd out front, mod_jk can monitor the status of the connected Tomcats and choose the best one for any given request. Apache httpd is not doing too much work: mostly just copying data between buffers. This does in fact load balance the two Tomcats. The question was what to do at this point?. Well, if Apache httpd goes down, you're completely hosed. So, a solution would be to setup another Apache httpd in parallel. This way, when one Apache goes down, the other is available (though not necessarily reachable when using round-robin DNS). The point is that you are not 100% down. Using round-robin DNS is not load balancing, but it will increase the robustness of your deployment. AFAICT, this robustness is not possible using Tomcats only. One needs to have something like mod_jk working to load balance the app servers. I'd be glad to hear that Tomcat can offload work to another server in a cluster, but I have heard nothing about such a feature, so I assume that it does not exist. Maybe, but its not hard to implement, especially if you are implementing it for one app knowing exactly the load on this app and the use-cases. Load balancing pretty much always comes down to either: 1. A single point of failure (Apache httpd, BigIP, or whatever). Loadbalancers usually come in pairs :-) or 2. Non-100% reachability (for instance, due to one of the round-robin'd web servers going down). It seems to me that the most robust deployment for a webapp is: Random request distribution + Apache httpd + lb'd Tomcat paired firewalls + paired loadbalancers + tomcat cluster. Performs much better as the above :-) Try it out, give it a chance. Leon - -chris - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 :-) We just had this discussion last week on the Debian ISP mailing list. Round Robin DNS is a nasty fix to this problem, and isn't guaranteed to work correctly. Either a real load balancer (like a BigIP) or some form of Linux HA are the only real ways of dealing with this. Cheers Andrew On 07/03/2007, at 6:26 PM, Christopher Schultz wrote: Andrew Miehs wrote: Balancing the 2 Tomcats behind one Apache (with sticky sessions) works. Now you add a second Apache HTTPD. How do you choose which one of these gets used? You now have the original problem all over again... How do you load between the two web servers? Perhaps round-robin DNS? That's how I would do it, unless I wanted to buy a real load balancer like a BigIP. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF70R+W126qUNSzvURAvenAJ9Z53iM+L5wzca7TbMx86hyuFzXnQCfQJSy kzvxgXrEVlzWcgJyuJA2uAo= =2cYH -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/03/2007, at 7:47 PM, Leon Rosenberg wrote: On 3/7/07, Christopher Schultz [EMAIL PROTECTED] wrote: Perhaps round-robin DNS? That's how I would do it, unless I wanted to buy a real load balancer like a BigIP. Ok, round-robin dns will work. But it will probably work with pure tomcats too, wouldn't it? If you round-robin the load between two httpds, why dont you do the same between two tomcats? You may want to have a look at this http://homepages.tesco.net/J.deBoynePollard/FGA/dns-round-robin-is- useless.html and http://en.wikipedia.org/wiki/Round_robin_DNS Some desktop clients may even try alternate addresses after a connection time out of 30-45 seconds. This behavior is unfortunately not specified - and could be changed at any time. I don't know if I would want to define my failover via a not specified mechanism. Regards Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF70WDW126qUNSzvURAvDQAJ9nPySRDp3cDs9BSqHb+A3t6dAEmgCePuTu 025lDxVLvPXpX/GYbSC22Gg= =0FVL -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to set role for JAASRealm
Shahab- I am hardly an expert, but I have just created a custom principal. Here is what I learned. The RealmBase class is responsible for creating principals for the context. Normally, this is just a Principal class. Since I extended Principal, I also needed to extend BaseRealm. The realm class must be placed in server/classes. I put the custom principal class in common/classes so my application can see it as well. No other special coding was required; I simply had to configure security and define my realm class to the context. Extending BaseRealm is not complicated, but I suspect extending JAASRealm might be. I hope this helps... Thanks, Steve -Original Message- From: shahab [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 06, 2007 10:21 PM To: users@tomcat.apache.org Subject: how to set role for JAASRealm Hi: I am trying to implement authentication and authorization using JAASRealm. (I am following the instruction provided at - http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html). However, looks like the role that I set (in the RolePrincipal) is not taking effect. I have created a class extending Principal for the role. I am setting the right name of the role (which I fetch from DB) and add the class to Subject as follows - LoginContext lc = null; try { lc = new LoginContext(TMSLogin, new AuthCallBackHandler(username, password)); } catch (LoginException le) { .. } try { lc.login(); } catch (LoginException le) { } // now I am trying to set the rolePrincipal Subject mySubject = lc.getSubject(); TMSRoles tmsRoles = new TMSRoles(role); mySubject.getPrincipals().add(tmsRoles); I have also made entries in server.xml as follows (i set debug to 0 hoping for more debug info, TMSLogin is defined in jaas.config in tomcat's conf directory) - Realm className=org.apache.catalina.realm.JAASRealm appName=TMSLogin userClassNames=tms.core.authentication.TMSPrincipal roleClassNames=tms.core.authentication.TMSRoles debug=0/ my entry in web.xml is the following - security-constraint display-nameAdminConstraint/display-name web-resource-collection web-resource-nameTMSAdmin/web-resource-name descriptionOnly for administrators/description url-pattern/admin/*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint description/ role-nameADMIN/role-name /auth-constraint /security-constraint security-role descriptionADMIN/description role-nameADMIN/role-name /security-role the getName() of the TMSRoles instance returns ADMIN, which should allow url /admin/*. However, I am still getting HTTP 403. Please help. thanx Shahab -- View this message in context: http://www.nabble.com/how-to-set-role-for-JAASRealm-tf3359888.html#a9346 104 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to set role for JAASRealm
From: Page, Steve C. [mailto:[EMAIL PROTECTED] Subject: RE: how to set role for JAASRealm Since I extended Principal, I also needed to extend BaseRealm. That doesn't necessarily follow. We're using custom Principal, RolePrincipal, and LoginModule classes with Tomcat's standard JAASRealm. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Possible JSTL/EL bug in 6.0.10
On 3/7/07, David Delbecq [EMAIL PROTECTED] wrote: [1] unified EL refers to jsp 2.1 specifications, i was referring to 2.0 specifications. To ensure you are using 2.1 specifications, check mainly that - your taglib contains jsp-version2.1/jsp-version - your webapplication is properly configured to use the webapp2.5 specifications. The root element of web.xml should be like web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; I would be ok to spend the time to look at it (just in case) if Gerald sends me a ready to run WAR (please include the JSF and JSTL JARs in lib) privately at my gmail address. Rémy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is APR worth it (for me?)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rémy, Rémy Maucherat wrote: The scalability improvement is twofold for AJP: - when running many Apache frontend servers (each with a sizeable number of workers), Tomcat would need a huge amount of AJP worker threads with the java.io connector Makes sense. So, instead of a Java thread waiting in every single ajp connection, you're using one native listener thread waiting on a select(), right? It's sad that you can't do this in Java :( - threads will only be used for actually executing requests, thus making concurrency in business logic a bit more predictable (if you have 2000 threads, it's ok most of the time, as long as no lock gets contested by too many threads, in which case it's far better if you had only 200 threads) Definitely. Unless I'm mistaken, Java threads on Linux are pthreads, which are relatively heavy. Reducing them is certainly going to reduce memory, thread counts (wrt system limits), and thread dump lengths. It also saves memory (no surprise). Socket polling will only be used for keepalive: during the processing of a request, the connector uses regular blocking IO. Cool. So, it /does/ sound like something worth looking into. APR installation looks like a snap, too, so it shouldn't be painful at all. Thanks for the explanation, Rémy. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF71aP9CaO5/Lv0PARAk7yAKCmhD9Xg5yH1yb5FNSrkeuP8uc0fQCeI9i8 E2Yjiq1jJR9SNcAOMErVJjQ= =FEvG -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is APR worth it (for me?)
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Is APR worth it (for me?) Makes sense. So, instead of a Java thread waiting in every single ajp connection, you're using one native listener thread waiting on a select(), right? It's sad that you can't do this in Java :( You can, but only with NIO, not with the older comm APIs. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leon, Leon Rosenberg wrote: On 3/7/07, Christopher Schultz [EMAIL PROTECTED] wrote: Load balancing pretty much always comes down to either: 1. A single point of failure (Apache httpd, BigIP, or whatever). Loadbalancers usually come in pairs :-) Er, you can buy a single load balancer off the shelf. One input port, many output ports (virtually, that is). It's not uncommon to see a single device acting as a load balancer. Load-balanced /resources/, on the other hand, generally come in multiples (otherwise, what's the point?). If you had a pair of load balancers, how would you pick which one handles the request? ... R-R DNS, anyone? It seems to me that the most robust deployment for a webapp is: Random request distribution + Apache httpd + lb'd Tomcat paired firewalls + paired loadbalancers + tomcat cluster. Performs much better as the above :-) Try it out, give it a chance. But the request has to come from somewhere and go to a single device. If you have pairs of things, you have to divide the traffic, which brings me back to R-R DNS. Otherwise, you have a set of hardware that never gets used. There's always the possibility of redirecting to another machine name, such as rack0.foo.com versus rack1.foo.com, each of which point to a particular piece of load-balancing hardware (or logical equivalent such as a firewall /in front/ of a load balancer). I'm not sure how your better layout is any different than mine, except that you've replaced Apache-httpd-based-load-balancing with what looks like appliance-based-load-balancing and put firewalls out front (which is logically insignificant). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF71gr9CaO5/Lv0PARAitgAJ49c8f9YTEclevh6P54J3dIJmUbhQCeJgnT kZglVgOgx96gJ6hogCbjPtw= =lHsr -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrew, Andrew Miehs wrote: We just had this discussion last week on the Debian ISP mailing list. Round Robin DNS is a nasty fix to this problem, and isn't guaranteed to work correctly. Certainly not. But it's one way to /actually/ divide requests between physical hardware devices. Either a real load balancer (like a BigIP) or some form of Linux HA are the only real ways of dealing with this. I totally agree. A single BigIP is a single point of failure, though. R-R DNS with multiple BigIPs is better than single IP - single BigIP, no? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF71i39CaO5/Lv0PARAlhlAKCnL8RFO0HCyFZwEGd2nLemNnZQPwCfYVM6 OEx8KwCo062JcXgYbjeDoe8= =CxuF -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: More domains
From: Marcell Kiss-Toth [mailto:[EMAIL PROTECTED] Subject: Re: More domains The ROOT folder is the same as in the top ROOT folder. I don't really understand the above statement. What do you mean by top ROOT folder? The appBase settings for the two Host elements should be completely independent. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] General mappings in Workers2.properties
Hi, Workers2.properties was used for mod_jk2. This product is not maintained anymore. Use mod_jk which is actively maintained by some cool developer(s) :-) It is much better documented and featured. see http://tomcat.apache.org/connectors-doc/ Rgds, FredK -- View this message in context: http://www.nabble.com/General-mappings-in-Workers2.properties-tf3365337.html#a9366291 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrew, Andrew Miehs wrote: You may want to have a look at this http://homepages.tesco.net/J.deBoynePollard/FGA/dns-round-robin-is-useless.html No offense taken, but I wasn't (as the author of this piece asserts) claiming that R-R DNS is an effective load balancer. In fact, I have said quite the opposite: load balancing is best done by a component which actually understands loads: 1. mod_jk (right? I've never done it) 2. BigIP or some other hardware load balancer The /only/ reason, IMO, to ever use R-R DNS is to avoid single points of failure. The author claims that there is no reason, ever (ever ever ever) to use R-R DNS. I respectfully disagree. If your client attempts to lookup www.foo.com, it resolves to a single IP address, which points to a single piece of hardware in your data center, you might be screwed by: 1. Faulty wiring that happens to go bad at an inconvenient time. 2. Faulty hardware device (fw, lb, switch, anything) that dies. 3. Network or power going down (which is a stretch, since data centers are pretty good at keeping the lights on) R-R DNS allows you to /partially/ weather this storm by diverting an unpredictable amount of traffic to another hardware device (possibly in another data center, which gets you around all of the above). Sure, some of your clients won't be able to connect. But, not /all/ of them will be denied service. This author claims that the following foundations are flawed reasons for using R-R DNS. Note that I do not claim a single one of them: 1. Shuffling resource records affects client connection behavior. (I don't care... my only assumption is that not every client can possibly conspire to choose the same IP address every single time). 2. Shuffling resource records provides even or predictable distribution (I don't care... it's enough that not all requests go to the same place. The distribution is is irrelevant, as long as not every single request goes to the same IP every time). The whole point is that you have to suffer 100% loss of your frontend hardware in order to shut off 100% of your users. This is true no matter how many points of failure you have... it's just that 1 point if failure means that only one device has to go. If you have a dozen lb's (or fw's with lb's, as Leon suggests), then losing 1 device loses you a completely unpredictable 1/12th of your users. If R-R DNS works perfectly (which it doesn't), then you still lose 1/12th of all requests. But the worst case simply can't be that 1 of 12 servers going down results in 100% request loss. I am unaware of any other strategy which allows you to lose a primary piece of hardware such as a load balancer and still be able to limp along with at least /some/ requests going through. I'm open to suggestions. (And SRV doesn't count, since not a single web browser supports them). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF712f9CaO5/Lv0PARAs02AJ0b1mJWg+bRXidicTpQH5NNYaDg3QCdEpDX hUtDnuLQH8k2KT5mOaWYWqA= =3BXP -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Kerberose+tomcat
Hello All, i want to use Single Sign On for my application,to achive this i need to use kerberose. how to use krb5LoginModule. thanks for your understanding. Regards Kumar.
When webapps/ROOT does not exist the status code is 400 instead of 404, why?
Hi, In Tomcat 5.5.16 - I forgot to define a context xml file for my application and got status error code 400 which was puzzling. After I added a ROOT subdirectory to my webapps directory I got the status code 404, which was less confusing. Questions: - I checked the http://tomcat.apache.org site but cannot find documentation for ROOT. Is there any? - why code 400 and not 404 ? Many thanks - Fred Test: Before ROOT was created: --- bash$ telnet localhost 8080 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET /test HTTP/1.1 Host: localhost HTTP/1.1 400 No Host matches server name localhost Server: Apache-Coyote/1.1 Transfer-Encoding: chunked Date: Wed, 07 Mar 2007 23:45:04 GMT Connection: close After ROOT was created: --- bash-2.04$ telnet localhost 8080 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET /test HTTP/1.1 Host: localhost HTTP/1.1 404 /test Server: Apache-Coyote/1.1 Content-Type: text/html;charset=utf-8 Content-Length: 986 Date: Thu, 08 Mar 2007 00:48:46 GMT error html from tomcat -- View this message in context: http://www.nabble.com/When-webapps-ROOT-does-not-exist-the-status-code-is-400-instead-of-404%2C-why--tf3366756.html#a9367005 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/03/2007, at 1:28 AM, Christopher Schultz wrote: Either a real load balancer (like a BigIP) or some form of Linux HA are the only real ways of dealing with this. I totally agree. A single BigIP is a single point of failure, though. R-R DNS with multiple BigIPs is better than single IP - single BigIP, no? IMHO, not really. If you need two devices load balancers to deal with your current load, then you already have a problem. We run our BigIPs Active/Standby - and when the one BigIP dies, the other takes over the 'VIPs' - virtual ips - from the other box. The one IP address points to a floating address which is shared by the load balancer. HA solutions work the same way, moving a floating addresses between the multiple boxes... Andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFF747wW126qUNSzvURAoSqAJ9O+TKKJ85J2GtU1PW2T6HpYI/dpwCdGciA HAZLfdqboHY8aCI+EwEVdqY= =/Abo -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat process on windows
Hello all, I have a little curiosity, that may seem trivial for some of you. I usually do my work on linux, but sometime I work on a laptop that runs windows, and because i do lots of application reloads using tomcat manager, i usually ran out of memory, and then it comes the PermGem space exception. Then i have to go to task manager and kill the tomcat process because it wont even stop using regular ways, and restart again. But the strange is that sometimes i got a tomcat5 and a tomcat5w process using the memory, and some other times i got a javaw process. Can anyone tell me why this happens? It's not a annoying problem, is just a bit strange for me... Cheer's, Hernâni - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More domains
From: Marcell Kiss-Toth [mailto:[EMAIL PROTECTED] Subject: Re: More domains The ROOT folder is the same as in the top ROOT folder. I don't really understand the above statement. What do you mean by top ROOT folder? The appBase settings for the two Host elements should be completely independent. I mean that I copied the entire webapps\ROOT folder to webapps\mydomain.com\ROOT. The Host configuration looks like the following (server.xml): Host name=www.mydomain.com appBase=together.hu unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Aliasmydomain.com/Alias ... (the same as for the localhost) /Host So localhost's working but for mydomain.com I only get a blank page (alias is working too). What could be wrong? Thanks, Marcelll
Re: Console Logging
BTW found the bug it wasn't in tomcat ;^ but in the client :) In any case the logger info was very helpful! PK At 13:18 3/7/2007, you wrote: I did what it says here http://minaret.biz/tips/log4j.html but no results. I havn't found other decent instructions yet. PK try this one: http://www.vipan.com/htdocs/log4jhelp.html with http://minaret... you need to install another jar... Regards. FC - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat process on windows
From: Hernâni Cerqueira [mailto:[EMAIL PROTECTED] Subject: Tomcat process on windows But the strange is that sometimes i got a tomcat5 and a tomcat5w process using the memory, and some other times i got a javaw process. The tomcat5 process is Tomcat running as a Windows service. The tomcat5w process is the Tomcat service manager program, not Tomcat itself. A javaw process is a special Windows-only launcher that does not create a command prompt window for the target Java application; it's intended primarily for GUI apps. As far as I can tell, it is not used by any of the standard Tomcat scripts. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat connector through cgi-bin?
Pid wrote: I'd suggest getting a new webserver then: 1) hosting is cheap, 2) you can configure the server to do what you really need it to do. There's little point in trying to force a cgi environment to forward requests into Tomcat, if your server doesn't support it. It's a false economy if you spend more than the equivalent hosting cost in your time trying to resolve this - not a really a good idea at all. I agree, that is the best option, and that is the most logical thing! However there are external issues which prevent this from happening right now *sigh*! I would like to work in a place where the cheapest/best thing is the thing that can be done! Anyway, In case anyone is interested, I have now written a perl script which does exactly that. So if anyone needs a perl tomcat connector send me an email. (: Best Regards, Jacob __ Jacob Rhoden - http://www.jacobrhoden.com/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Location to override global error-page
I would actually LOVE to have errors directed to a servlet like interface to reply to the client. In my case we are going to be routing requests from a lot of mobile devices using a compressed form for traffic. PK At 14:05 3/7/2007, you wrote: This seems basic, but apparently not. A similar question has been asked recently, and there are a few posts on the web, but the answers aren't enough to solve my problem. I am trying to override the global default error page by using directives such as error-page location/catch_all_errors.html/location /error-page or even error-page error-code404/error-code location/catch_all_errors.html/location /error-page If I include this in the bottom of my webapps web.xml file, it will catch 404 errors for requests under my web-app: http://myhost.com/myWebapp/thisPageDoesNotExist.html but when I modify the global deployment descripter conf/web.xml, I cannot catch top-level errors like this one: http://myhost.com/thisPageDoesNotExist.html More specifically, as a previous poster pointed out: http://marc.theaimsgroup.com/?l=tomcat-userm=116059712510694w=2 it will catch the errors and display a blank page, but it won't display my customized page. A related problem is that even when I display customized errors under my webapp, the error-page text displays, but loaded graphics sometimes do not (it seems to depend on the URL). At least part of my problem is that I am not sure where to locate the error page if I create one. That is, what the root directory is for the statements: location/catch_all_errors.html/location or locationcatch_all_errors.html/location Thanks. -- View this message in context: http://www.nabble.com/Location-to-override-global-%3Cerror-page%3E-tf3364166.html#a9359765 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] getting context path name
David, Many thanks. This was the sort of solution I was searching for. It is working fine Santhosh David Smith-2 wrote: request.getContextPath() should supply what you need. If the webapp is the ROOT webapp, it will return an empty string. That just makes it easy to write stuff like: ${pageContext.request.contextPath}/images/myMasthead.jpg If you really need the ROOT webapp to return /, then you'll just have to test for an empty string and handle that as a special case. --David santhoshihrd wrote: Hi all, I have an issue I have a context nemed demo with the following configuration Context path=/demo docBase=webapps/MyWebApp.war debug=0 privileged=true /Context I want to get the context name demo in a servlet . I am using Spring framework. It will be more usefule if I get it in Dispatcher servlet. If I am deploying the context in / , I should get it as / Context path=/ docBase=webapps/MyWebApp.war debug=0 privileged=true /Context Thanks in advance - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/getting-context-path-name-tf3362065.html#a9368900 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: More domains
From: Marcell Kiss-Toth [mailto:[EMAIL PROTECTED] Subject: Re: More domains I mean that I copied the entire webapps\ROOT folder to webapps\mydomain.com\ROOT. Why did you pick that location when the appBase for the www.mydomain.com Host is together.hu? Your default app should be in together.hu/ROOT. Host name=www.mydomain.com appBase=together.hu unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Aliasmydomain.com/Alias ... (the same as for the localhost) /Host - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is APR worth it (for me?)
Doesn't AJP multiplex traffic, that is queued up requests are serialized through one connection that remains connected and it switches between servlets on the receiving end? and recycles the execution thread? At 19:19 3/7/2007, you wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rémy, Rémy Maucherat wrote: The scalability improvement is twofold for AJP: - when running many Apache frontend servers (each with a sizeable number of workers), Tomcat would need a huge amount of AJP worker threads with the java.io connector Makes sense. So, instead of a Java thread waiting in every single ajp connection, you're using one native listener thread waiting on a select(), right? It's sad that you can't do this in Java :( - threads will only be used for actually executing requests, thus making concurrency in business logic a bit more predictable (if you have 2000 threads, it's ok most of the time, as long as no lock gets contested by too many threads, in which case it's far better if you had only 200 threads) Definitely. Unless I'm mistaken, Java threads on Linux are pthreads, which are relatively heavy. Reducing them is certainly going to reduce memory, thread counts (wrt system limits), and thread dump lengths. It also saves memory (no surprise). Socket polling will only be used for keepalive: during the processing of a request, the connector uses regular blocking IO. Cool. So, it /does/ sound like something worth looking into. APR installation looks like a snap, too, so it shouldn't be painful at all. Thanks for the explanation, Rémy. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF71aP9CaO5/Lv0PARAk7yAKCmhD9Xg5yH1yb5FNSrkeuP8uc0fQCeI9i8 E2Yjiq1jJR9SNcAOMErVJjQ= =FEvG -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat process on windows
Caldarale, Charles R escreveu: As far as I can tell, it is not used by any of the standard Tomcat scripts. Someone uses it ;-) ... But that isn't a problem. Thanks for a good ansewr to a silly question. Hernâni - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another howto: Load Balancer + fail over (two active Tomcats, one backup Tomcat)
On 3/8/07, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leon, Leon Rosenberg wrote: On 3/7/07, Christopher Schultz [EMAIL PROTECTED] wrote: Load balancing pretty much always comes down to either: 1. A single point of failure (Apache httpd, BigIP, or whatever). Loadbalancers usually come in pairs :-) Er, you can buy a single load balancer off the shelf. One input port, many output ports (virtually, that is). It's not uncommon to see a single device acting as a load balancer. Load-balanced /resources/, on the other hand, generally come in multiples (otherwise, what's the point?). If you had a pair of load balancers, how would you pick which one handles the request? ... R-R DNS, anyone? one is active one is standby. Same applies to the firewall and the switches. It seems to me that the most robust deployment for a webapp is: Random request distribution + Apache httpd + lb'd Tomcat paired firewalls + paired loadbalancers + tomcat cluster. Performs much better as the above :-) Try it out, give it a chance. But the request has to come from somewhere and go to a single device. If you have pairs of things, you have to divide the traffic, which brings me back to R-R DNS. Otherwise, you have a set of hardware that never gets used. andrew already explained how this works with a pair of lbs. I'm not sure how your better layout is any different than mine, except that you've replaced Apache-httpd-based-load-balancing with what looks like appliance-based-load-balancing and put firewalls out front (which is logically insignificant). much more availability? Ideally, in a stateless or session-lbed application the user will never be affected if a machine dies :-) And yes the firewalls are insignificant. But nowerdays, with all that bot-nets and stuff, you really want them to handle the dos :-) - -chris regards Leon - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple Instances on one Machine
I am using Tomcat 5.5 to run multiple instances of Tomcat (JVM) on one machine (localhost) using Eclipse. I have two webapps a and b with their respective web.xml files in $CATALINA_HOME\webapps\WEB-INF. I have two server.xml files (server-a.xml and server-b.xml), one for each webapp with different server and connector ports. The $CATALINA_BASE/conf/Catalina/localhost directory contains a.xml and b.xml files with Context path=/a docBase=a debug=0 reloadable=true/ and Context path=/b docBase=b debug=0 reloadable=true/ entries respectively. Issue: When I start one webapp b using Eclipse (program argument = -config ${CATALINA_BASE}\conf\server-b.xml start), the webapp a is started first and then webapp b is started. Vice versa is not true. I am unable to find a reason *why* this webapp a is getting started. While trying to debug that I am wondering if my way of using two server.xml files for this scenario correct or is there any other way? (A similar solution is mentioned at http://tomcat.apache.org/tomcat-3.3-doc/tomcat-apache-howto.html although it's a bit legacy version.) Thanks, Rahul. It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is APR worth it (for me?)
Peter Kennard wrote: Doesn't AJP multiplex traffic, that is queued up requests are serialized through one connection that remains connected and it switches between servlets on the receiving end? and recycles the execution thread? No multiplexing on connections. Regards, Rainer At 19:19 3/7/2007, you wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rémy, Rémy Maucherat wrote: The scalability improvement is twofold for AJP: - when running many Apache frontend servers (each with a sizeable number of workers), Tomcat would need a huge amount of AJP worker threads with the java.io connector Makes sense. So, instead of a Java thread waiting in every single ajp connection, you're using one native listener thread waiting on a select(), right? It's sad that you can't do this in Java :( - threads will only be used for actually executing requests, thus making concurrency in business logic a bit more predictable (if you have 2000 threads, it's ok most of the time, as long as no lock gets contested by too many threads, in which case it's far better if you had only 200 threads) Definitely. Unless I'm mistaken, Java threads on Linux are pthreads, which are relatively heavy. Reducing them is certainly going to reduce memory, thread counts (wrt system limits), and thread dump lengths. It also saves memory (no surprise). Socket polling will only be used for keepalive: during the processing of a request, the connector uses regular blocking IO. Cool. So, it /does/ sound like something worth looking into. APR installation looks like a snap, too, so it shouldn't be painful at all. Thanks for the explanation, Rémy. - -chris - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is APR worth it (for me?)
Christopher Schultz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Is APR worth it (for me?) However, the APR description page suggests that scalability is improved through the use of socket-polling The scalability is improved due to not having to keep a thread around for each persistent HTTP connection. I see. The new NIO connector in Tomcat 6 also achieves this. ...without regard to the presence of APR, I would imagine. There is a fairly old NIO/AJP Connector that ships with TC 5.5 6, but it sort of died due to lack of anybody caring it was there. Do you have a simulated production environment where you can just try the two connectors back-to-back? I do, but I don't have a load test scenario right now that I can use to get some good numbers. We currently serve very light load on a one-box wonder, so I would imagine that any performance improvement would not be observable in production today. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF70F/9CaO5/Lv0PARAn+nAJ9kLBN49mKT8x3rqXAt9Wq2ww+7yACgwEjj fKgknH/YsLK1flQVvVEVBOY= =al8l -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]