Re: Scripting variable is not generated
Have a look at http://issues.apache.org/bugzilla/show_bug.cgi?id=21390 and http://issues.apache.org/bugzilla/show_bug.cgi?id=23425 Mark Wei Zhao wrote: I am migrating some code from tomcat 4.* to 5.5. However, I got some compilation error regarding the scripting variable from taglib. This is the definition of the scripting variable in TEI file: VariableInfo vSystemName = new VariableInfo( SystemName, String, true, VariableInfo.AT_END ); This is how this tag is used in the JSP page: If( some condition ) { system:getSystemName/ %=SystemName% } else { system:getSystemName/ %=SystemName% } But a got a Java compilation error saying the second SystemName cannot be resolved. I looked into the generated java code and it seems that only one SystemName is declared which is within the “if� and not visible in the “else�. If I remove the “system:getSystemName� inside if, “SystemName� is now declared inside “else�. This works differently from Tomcat 4.* which always generate the declaration of the “SystemName� in above case. And I don’t think it’s consistent with the spec. The variable is defined as “AT_END� scope and “declare� is set to true. So it should always be declared or a lot of existing code will be broken. Any thoughts? Did I miss anything? Thanks Wei __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
basic authentication problem 5.5.9
Hi I suspect I am running into this bug in tomcat 5.5.9 which has been solved in tomcat 5.5.11 and I was wondering if there is a workaround: http://issues.apache.org/bugzilla/show_bug.cgi?id=22617 Let me first explain my situation. I have a webapplication which we use in production on multiple sites on tomcat 5.0.28. We have a major version upcoming in a few months and want to take the opportunity to move to tomcat 5.5.x (several technical reasons and not much going on on the 5.0 branch). We need a stable version of course (our customers don't like alpha stuff) and 5.5.9 appears to be it for the moment. Yesterday when I tried our web application in 5.5.9 it mostly worked as far as I could see. The only thing that didn't work was that our admin context was no longer password protected. I spent quite some time rechecking the configuration (which works fine on 5.0.28). Quite annoyingly the server.xml has a different, semantically equivalent notation for defining user databases but that was easy to fix. Still no luck. Then I searched google and eventually came up with the bug above which might explain things. The simple workaround there of defining a null user or a user didn't work though. To confirm I was running into a (solved) bug I tested on 5.5.11 and indeed authentication works fine there with identical configuration. So my question is threefold: - Is the bug above the problem I am running into or is it something else - Is there a workaround for it in 5.5.9. We can't support alpha versions on production sites so we need this fixed in the stable release. - If the answer is no, we'll have to put off support for 5.5.x until there is a stable version with the fix (and hopefully no new issues): is there a rough time schedule when that might happen? Regards, Jilles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot connect to database using DataSource
I have a MySQL database in which I created a database named, javatest, and I am using Tomcat 5.5.9. I have unable to connect my database using Java's DataSource method. Here is my ROOT.xml setup for my application context: Context path= docBase=/home/tomcat/applications/ debug=0 reloadable=true Resource name=jdbc/DBTest type=javax.sql.DataSource auth=Container / ResourceParams name=jdbc/DBTest parameter nameusername/name valuejavauser/value /parameter parameter namepassword/name valuejavadude/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://localhost/javatest?autoReconnect=true/value /parameter /ResourceParams /Context I created a simple servlet to test the database connection: public class TestSQL extends HttpServlet { private Connection conn = null; public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType(text/html); PrintWriter out = response.getWriter(); try { Context ctx = new InitialContext(); Context appContext = (Context)ctx.lookup(java:comp/env); DataSource ds = (DataSource)appContext.lookup(jdbc/DBTest); conn = ds.getConnection(); } catch (Exception e) { e.printStackTrace(); } if (conn != null) { out.println(Connection successful); } else { out.println(Unsuccessful); } } It prints out Unsuccessful. I also tried using the traditional DriverManager and that works. Here is my web.xml in case it is needed for analysis: ?xml version=1.0 encoding=ISO-8859-1? web-app version=2.4 uri=http://java.sun.com/xml/ns/j2ee; resource-ref res-ref-namejdbc/DBTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref servlet servlet-nameTestSQL/servlet-name servlet-classTestSQL/servlet-class /servlet servlet-mapping servlet-nameTestSQL/servlet-name url-pattern/servlet/TestSQL/url-pattern /servlet-mapping /web-app I would appreciate it very much if someone can have a look at this and tell me what I am doing wrong with the DataSource alternative. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
large content directory out of the webapp
Hello, my webapplication consists of a rather small set of classes, jsps and so on but has got a rather large content directory (some GB). My problem is now if I want to update only the application itself but not the content by uploading a new war-file I nevertheless have to upload the content again. I cannot use a combination of Apache and Tomcat, letting Apache serve the content (and thus using another docbase) as this content has to be protected by a security-mechanism of the application. Is there any way to store the content data out of the webapplication directory but still being able to serve those files to the client? Of course I could write a servlet to do this job, but what about the performance if every request to a file goes through a servlet that looks for the file in another directory, parses it and then sends the stream back to the client? Anyone solved this problem that way and got any positive or negative experience? Or is it better to leave the content where it is and just update the application incrementally? If yes has anyone got a good hint how to manage this update process without the need of doing this manually (i.e. deleting old files, jsps, classes and uploading new ones)? Bjoern Eickvonder Virus checked by G DATA AntiVirusKit Version: AVK 16.474 from 14.09.2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?
[Sorry for the repost but I still don't have an answer to this one] On Fri, 2005-09-09 at 15:50, Steve Dodge wrote: 1. VirtualHostis an apache http server directive. Right, but it was put there by Tomcat's auto-config. What I was trying to find out was, by localhost did Tomcat mean my (Tomcat's) localhost -- the server on 8080 -- or Apache's localhost, which is the server on port 80, which responds to many Virtual Hosts already in the httpd.conf file. 2. With JkMount you're not actually mapping a physical directory, it's a url pattern. Yes, but all the ones that Tomcat auto-config'd into mod_jk.conf are relative to the Tomcat webapps directory. How do I write a url pattern that can be interpreted as relative to Apache's document root, so that JSP files in there will be passed to Tomcat for serving? If you have a tomcat webapp that serves jsp's such as http://localhost:8080/mywebapp, then you can map jsp requests to that webapp using JkMount /mywebapp/*.jsp Ah...this exposes the gap in my understanding. Where do I get a tomcat webapp that serves jsp's? This is what I need. I thought one was built into Tomcat -- in fact I thought JSP serving was the original purpose of Tomcat. If Tomcat doesn't have any such webapp, where do I get one? I certainly can't write one, as I'm not a Java programmer. ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot connect to database using DataSource
Hi! For TC 5.5.x, put the name-value-pairs of all parameter elements inside the Resource start tag as attributes. Good luck! Am Mittwoch, den 14.09.2005, 16:30 +0800 schrieb Michael Lai: I have a MySQL database in which I created a database named, javatest, and I am using Tomcat 5.5.9. I have unable to connect my database using Java's DataSource method. Here is my ROOT.xml setup for my application context: Context path= docBase=/home/tomcat/applications/ debug=0 reloadable=true Resource name=jdbc/DBTest type=javax.sql.DataSource auth=Container / ResourceParams name=jdbc/DBTest parameter nameusername/name valuejavauser/value /parameter parameter namepassword/name valuejavadude/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://localhost/javatest?autoReconnect=true/value /parameter /ResourceParams /Context I created a simple servlet to test the database connection: public class TestSQL extends HttpServlet { private Connection conn = null; public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType(text/html); PrintWriter out = response.getWriter(); try { Context ctx = new InitialContext(); Context appContext = (Context)ctx.lookup(java:comp/env); DataSource ds = (DataSource)appContext.lookup(jdbc/DBTest); conn = ds.getConnection(); } catch (Exception e) { e.printStackTrace(); } if (conn != null) { out.println(Connection successful); } else { out.println(Unsuccessful); } } It prints out Unsuccessful. I also tried using the traditional DriverManager and that works. Here is my web.xml in case it is needed for analysis: ?xml version=1.0 encoding=ISO-8859-1? web-app version=2.4 uri=http://java.sun.com/xml/ns/j2ee; resource-ref res-ref-namejdbc/DBTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref servlet servlet-nameTestSQL/servlet-name servlet-classTestSQL/servlet-class /servlet servlet-mapping servlet-nameTestSQL/servlet-name url-pattern/servlet/TestSQL/url-pattern /servlet-mapping /web-app I would appreciate it very much if someone can have a look at this and tell me what I am doing wrong with the DataSource alternative. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?
Peter Flynn wrote: If you have a tomcat webapp that serves jsp's such as http://localhost:8080/mywebapp, then you can map jsp requests to that webapp using JkMount /mywebapp/*.jsp Ah...this exposes the gap in my understanding. Where do I get a tomcat webapp that serves jsp's? This is what I need. I thought one was built into Tomcat -- in fact I thought JSP serving was the original purpose of Tomcat. If Tomcat doesn't have any such webapp, where do I get one? I certainly can't write one, as I'm not a Java programmer. I am limited in my knowledge of tomcat but from my understanding, tomcat can be ran either as a standalone server or behind a webserver. In your case, it seems like you don't actually need a webserver in front so you should be able to connect to tomcat using the url: http://localhost:8080/ Just make sure in your server.xml that you have this line: Connector port=8080 / or whatever port you want to connect to. In fact, I don't think you even need mod_jk if you are using tomcat as a standalone. Hope that helps. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Storing a request
Hi Peter, Peter Crowther wrote: There was a similar thread a couple of months back. The conclusion of that thread was that you cannot clone the original or create a new request, and that there are sound architectural reasons for this. Instead, you'll have to do it the proper way - store the data you need from the original request in some appropriate manner, then handle the new request using that stored data when it comes in. I guess I'll have to use the proper way, by writing the saved parameters in the response and redirecting the user to my location. Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to loggin
Hello , I am new to Tomcat and i am finding some difficulty handling Tomcat. I am not able to login into the manager or the administrator link. I have username= cdac and password =cdac and with manager roles in the tomcat-users.xml file . Kindly help __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Unable to loggin
On Wednesday 14 September 2005 06:19, V.K.M.RAJA wrote: did you restart tc? Hello , I am new to Tomcat and i am finding some difficulty handling Tomcat. I am not able to login into the manager or the administrator link. I have username= cdac and password =cdac and with manager roles in the tomcat-users.xml file . Kindly help __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to loggin
Hello, Thanks for your prompt reply. Yes i did restarted the server. Actually i am using tomcat which is comming bundled with Netbean4.1. Even after resarting i am not able to access these links. - Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort.
Re: How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?
On Wed, 2005-09-14 at 10:17, Michael Lai wrote: Peter Flynn wrote: If Tomcat doesn't have any such webapp, where do I get one? I certainly can't write one, as I'm not a Java programmer. I am limited in my knowledge of tomcat but from my understanding, tomcat can be ran either as a standalone server or behind a webserver. In your case, it seems like you don't actually need a webserver in front so you should be able to connect to tomcat using the url: Unfortunately I have to keep the main port 80 httpd, as it's serving 20Gb of other material (the entire campus web site). All I need is the trick to make Apache httpd hand off any .jsp files to Tomcat. ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple Remote Debugging of TOMCAT
hi all, We are three people working on three different application which are deployed on a single remote machine We all want to remotely debug our application. Is it possible with one instance of tomcat? (I think no) If not, then there is only one solution which is running multiple instance of tomcat Can anyone tell me how to go with this Thanks RahulJoshi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple Remote Debugging of TOMCAT
From: rahul [mailto:[EMAIL PROTECTED] We are three people working on three different application which are deployed on a single remote machine We all want to remotely debug our application. Is it possible with one instance of tomcat? (I think no) At the same time? Not to my knowledge - JPDA expects a single remote connection, I think. If not, then there is only one solution which is running multiple instance of tomcat Can anyone tell me how to go with this What OS? I run up to five instances on this machine, and have examples of startup files for Windows... Contact me off-list for copies if you want them. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SSI Servlet Character Encoding Problem
Hi people, I use Tomcat 5.5.9 with Apache 2.0.54 and jk 1.2.10 to serve my websites. I want to set custom error pages to be served when an error like 404, 500 etc. occurs. The website uses the iso-8859-9 character set on every page, and the error pages are encoded with iso-8859-9 too. Only *.jsp pages and servlets are mapped to Tomcat through jk. All other static content is served by Apache. My error pages are all Server Side Include shtml files. These error files include some jsp files with: !--#include virtual=file-name -- I have set up SSI (correctly I hope) on both Apache and Tomcat, and also set up custom error file handling on both httpd.conf and the default web.xml for the site I want to customize. On my server.xml file, my site is configured like this: Host name= http://www.foo.com www.foo.com appBase=/usr/www/foo Context path= docBase=/ Context path=/servlet docBase=servlet/ /Host On my default web.xml for tomcat configuration, SSI servlet has these directives added: init-param param-nameinputEncoding/param-name param-valueiso-8859-9/param-value /init-param init-param param-nameoutputEncoding/param-name param-valueiso-8859-9/param-value /init-param When I go to some nonexistent foo.html on my website, Apache handles the customized error page and everything works fine. On the other hand I have two problems: One is, if the isVirtualWebappRelative variable in web.xml is set to 0, and I go to a nonexistent foo.jsp on my server, jk sends the request to Tomcat and when Tomcat tries to handle the customized error page, it cannot find the included files in SSI and an error is written in the Tomcat error log like: SEVERE: ssi: #include--Couldn't include file: /include/footer.jsp java.io.IOException: Couldn't get context for path: /include/footer.jsp The /include folder is in the server root. I think it should be able to find these pages, as it looks at the server root because of the state of isVirtualWebappRelative variable, am I wrong? When I set isVirtualWebappRelative to 1, this problem is solved only for server root, my servlets (say /servlet) still cannot get the customized page includes, because this time the SSI includes become web app relative and I have to copy the /include folder into /servlet/include directory to work around this problem. My second problem is, when I go to this nonexistent foo.jsp with isVirtualWebappRelative set to 1, and when Tomcat tries to handle the error page, the encoding is always UTF-8 regardless of inputEncoding or outputEncoding variables. So my error page becomes full of garbled characters because the encoding should be iso-8859-9. Is there any suggestions about these problems? Best regards, Kerem
AW: cross context info
Hi Alain, First of all the session is ALWAYS on application scope, this is not an Tomcat specific behaviour but a requirement of the Specification: SRV.7.3 Session Scope HttpSession objects must be scoped at the application (or servlet context) level. The underlying mechanism, such as the cookie used to establish the session, can be the same for different contexts, but the object referenced, including the attributes in that object, must never be shared between contexts by the container. So there is no way around this, if the sessions were replicated across the applications it would violate the specification. When you enable crossConext for your application: Context crossContext=true docBase=testapp path=/testapp reloadable=true /Context you can get the context for another application: ServletContext context2 = context.getContext(/testapp); and set attributes: context2.setAttribute(test,JSP is great!); But you cannot get to the session in the other application. So what you can do is implement the session swapping on your own (Cookies, via the Database) or merge your applications into one. Some links from the Sun Forums: http://forum.java.sun.com/thread.jsp?forum=33thread=259394 http://forum.java.sun.com/thread.jsp?forum=45thread=492484 http://forum.java.sun.com/thread.jsp?forum=33thread=318569 Cheers Bernhard -Ursprüngliche Nachricht- Von: Alain Gaeremynck [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 14. September 2005 03:03 An: Tomcat Users List Betreff: cross context info I have 2 webapps living on the same server and they are linked to the same user experiance.. Now both apps require login but i don't want my users to have to login on both apps. Also while they are browsing in one context i don't want the session to expire for the other context. so the question is Is there a way to do session.setAtribute in one context and retrieve it from another and also to link the 2 session so that they don't expire or expire at the same time? i'd like not to have to use hidden iframe and stuff like that thanks! -- Alain Gaeremynck CTO Le Groupe Interstructure (514) 374-1110 (514) 825-7810 cell weblog: http://www.sanssucre.ca (En informatique, comme en musique, n'importe quoi sauf du commercial) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to serve just JSP (was: Re: JSP on RHEL4 with Apache http d RPM?
Unfortunately I have to keep the main port 80 httpd, as it's serving 20Gb of other material (the entire campus web site). All I need is the trick to make Apache httpd hand off any .jsp files to Tomcat. As I am newly subscribed to this list, I don't know if you have got a satisfactory answer for your question, but if you don't; I have the same configuration like yours, static files are served by Apache and *.jsp files are served by Tomcat. All you have to do is to use Java Connector to mount jsp files to Tomcat. You can find the necessary documentation in Connectors part of Tomcat documentation. If you can't get out of it, I can help you set it up off or on list. Cheers, Kerem
Re: cross context info
Alain Gaeremynck wrote: I have 2 webapps living on the same server and they are linked to the same user experiance.. Now both apps require login but i don't want my users to have to login on both apps. Also while they are browsing in one context i don't want the session to expire for the other context. so the question is Is there a way to do session.setAtribute in one context and retrieve it from another and also to link the 2 session so that they don't expire or expire at the same time? i'd like not to have to use hidden iframe and stuff like that thanks! with tomcat there's also a different approach to this problem using the SSOValve (org.liland.tomcat.valve.sso.SingleSignOn). however, in order to use this valve, the webapps need to let tomcat handle the authentication (see http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html or http://jakarta.apache.org/tomcat/tomcat-5.5-doc/realm-howto.html). depending on your webapps this kind of setup may be anything from simply a matter of configuration to impossible. Edmund - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to loggin
Did you make sure that the manager Context is defined somewhere? Take a look into server.xml, perhaps you find a outcommented declaration there. Am Mittwoch, den 14.09.2005, 03:50 -0700 schrieb V.K.M.RAJA: Hello, Thanks for your prompt reply. Yes i did restarted the server. Actually i am using tomcat which is comming bundled with Netbean4.1. Even after resarting i am not able to access these links. - Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -- Sonja Löhr [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to serve just JSP (was: Re: JSP on RHEL4 with Apache http d RPM?
On Wed, 2005-09-14 at 12:19, KEREM ERKAN wrote: Unfortunately I have to keep the main port 80 httpd, as it's serving 20Gb of other material (the entire campus web site). All I need is the trick to make Apache httpd hand off any .jsp files to Tomcat. As I am newly subscribed to this list, I don't know if you have got a satisfactory answer for your question, but if you don't; I have the same configuration like yours, static files are served by Apache and *.jsp files are served by Tomcat. That's exactly what I want. All you have to do is to use Java Connector to mount jsp files to Tomcat. You can find the necessary documentation in Connectors part of Tomcat documentation. Aha! Yes, AJP connector looks like what I need. Unfortunaely the documentation doesn't seem to show how to do this. If you can't get out of it, I can help you set it up off or on list. That would be great, many thanks. ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk performance
Hi, I just read an article about webapp benchmarks [1] and they mentioned that apache+mod_jk+tomcat is about 30% slower than pure tomcat. This is sad. Until now I believed that the performance decrease with apache/mod_jk would be marginal. Putting apache/mod_jk before tomcat is very nice. I don't want to miss it because it is a good way to integrate other modules. Is there any way to speed up apache/tomcat cooperation? Marc [1] (german only) http://www.heise.de/ix/artikel/2005/10/124/ _ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk performance
Well I tried both, and as my websites do not have a very high traffic (I have approximately a total of 50 GB per month) the speed is not primarily a concern to me, I am looking to the security side of the problem and Apache+mod_jk does its job better than only Tomcat concerning security. I have stress tested Apache+Tomcat and only Tomcat and it seems like %30 is too high. I can suggest using mod_jk 1.2.10 with Tomcat 5.5.9, surprisingly you get very similar results. Mod_jk 1.2.10 had some performance problems but I did not thoroughly test why. I hope this may help a little. Cheers, Kerem -Original Message- From: marc ratun [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 14, 2005 2:47 PM To: tomcat-user@jakarta.apache.org Subject: mod_jk performance Hi, I just read an article about webapp benchmarks [1] and they mentioned that apache+mod_jk+tomcat is about 30% slower than pure tomcat. This is sad. Until now I believed that the performance decrease with apache/mod_jk would be marginal. Putting apache/mod_jk before tomcat is very nice. I don't want to miss it because it is a good way to integrate other modules. Is there any way to speed up apache/tomcat cooperation? Marc [1] (german only) http://www.heise.de/ix/artikel/2005/10/124/ _ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
Marc If the performance of your app is not acceptable using mod_jk , you could try other alternatives and still keep apache in front to serve static content and use other modules. You can use apache mod_proxy to forward request on 8080 [or whatever your run tomcat on] to tomcat without going through mod_jk There are pros and cons to take this approach, but it may suffice in your case. Hope it helps. Bruno Georges Glencore International AG Tel. +41 41 709 3204 Fax +41 41 709 3000 marc ratun [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org ail.com cc: Subject: mod_jk performance 14.09.05 13:46 Please respond Distribute: to Tomcat Users Personal? |---| List| [ ] x | |---| Hi, I just read an article about webapp benchmarks [1] and they mentioned that apache+mod_jk+tomcat is about 30% slower than pure tomcat. This is sad. Until now I believed that the performance decrease with apache/mod_jk would be marginal. Putting apache/mod_jk before tomcat is very nice. I don't want to miss it because it is a good way to integrate other modules. Is there any way to speed up apache/tomcat cooperation? Marc [1] (german only) http://www.heise.de/ix/artikel/2005/10/124/ _ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL DISCLAIMER. The contents of this e-mail and any attachments are strictly confidential and they may not be used or disclosed by someone who is not a named recipient. If you have received this email in error please notify the sender by replying to this email inserting the word misdirected as the message and delete this e-mail from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk performance
AFAIK mod_proxy performs worse than mod_jk. Just my 2 cents. Kerem -Original Message- From: Bruno Georges [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 14, 2005 2:58 PM To: Tomcat Users List Cc: tomcat-user@jakarta.apache.org Subject: Re: mod_jk performance Marc If the performance of your app is not acceptable using mod_jk , you could try other alternatives and still keep apache in front to serve static content and use other modules. You can use apache mod_proxy to forward request on 8080 [or whatever your run tomcat on] to tomcat without going through mod_jk There are pros and cons to take this approach, but it may suffice in your case. Hope it helps. Bruno Georges Glencore International AG Tel. +41 41 709 3204 Fax +41 41 709 3000 marc ratun [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org ail.com cc: Subject: mod_jk performance 14.09.05 13:46 Please respond Distribute: to Tomcat Users Personal? |---| List | [ ] x | |---| Hi, I just read an article about webapp benchmarks [1] and they mentioned that apache+mod_jk+tomcat is about 30% slower than pure tomcat. This is sad. Until now I believed that the performance decrease with apache/mod_jk would be marginal. Putting apache/mod_jk before tomcat is very nice. I don't want to miss it because it is a good way to integrate other modules. Is there any way to speed up apache/tomcat cooperation? Marc [1] (german only) http://www.heise.de/ix/artikel/2005/10/124/ _ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL DISCLAIMER. The contents of this e-mail and any attachments are strictly confidential and they may not be used or disclosed by someone who is not a named recipient. If you have received this email in error please notify the sender by replying to this email inserting the word misdirected as the message and delete this e-mail from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
marc ratun wrote: Hi, I just read an article about webapp benchmarks [1] and they mentioned that apache+mod_jk+tomcat is about 30% slower than pure tomcat. This is sad. Until now I believed that the performance decrease with apache/mod_jk would be marginal. Why would that be sad? 30% performance decrease still offers you a 300% performance increase over CGI or mod_proxy. Since you decided to use mod_jk that uses AJP protocol for both binary HTTP and constant connection pool, you have also the load balancer capabilities that will allow you to either segment or double your backend application servers. Thus with two backend servers you will have both speed increase and failover over a single box implementation. OTOH if you just wish Apache with all the goodies, but with Servlet support, then 30% performance decrease is very much acceptable thought. If OTOH you don't need legacy Apache modules, use Tomcat 5.5 with Native support that will both outperform any Apache httpd server (and most others) for both for dynamic and static content. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
KEREM ERKAN wrote: ... I am looking to the security side of the problem and Apache+mod_jk does its job better than only Tomcat concerning security. How so? -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk performance
Kerem, You are probably right, I personnaly never faced any issues with any of them. However, Tom can you be more specific about the type of traffic your app has to serve and what are performance/response time requirements. Hardware and network, server and JVM configuration can also be either a bottleneck or a way to improve the overall performance of your syste. Ideally, when you have metrics on the different parts of the systems it is easier to tune . Bruno Georges Glencore International AG Tel. +41 41 709 3204 Fax +41 41 709 3000 KEREM ERKAN [EMAIL PROTECTED] To: 'Tomcat Users List' tomcat-user@jakarta.apache.org ari.com.tr cc: Subject: RE: mod_jk performance 14.09.05 14:00 Please respond Distribute: to Tomcat Users Personal? |---| List| [ ] x | |---| AFAIK mod_proxy performs worse than mod_jk. Just my 2 cents. Kerem -Original Message- From: Bruno Georges [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 14, 2005 2:58 PM To: Tomcat Users List Cc: tomcat-user@jakarta.apache.org Subject: Re: mod_jk performance Marc If the performance of your app is not acceptable using mod_jk , you could try other alternatives and still keep apache in front to serve static content and use other modules. You can use apache mod_proxy to forward request on 8080 [or whatever your run tomcat on] to tomcat without going through mod_jk There are pros and cons to take this approach, but it may suffice in your case. Hope it helps. Bruno Georges Glencore International AG Tel. +41 41 709 3204 Fax +41 41 709 3000 marc ratun [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org ail.com cc: Subject: mod_jk performance 14.09.05 13:46 Please respond Distribute: to Tomcat Users Personal? |---| List | [ ] x | |---| Hi, I just read an article about webapp benchmarks [1] and they mentioned that apache+mod_jk+tomcat is about 30% slower than pure tomcat. This is sad. Until now I believed that the performance decrease with apache/mod_jk would be marginal. Putting apache/mod_jk before tomcat is very nice. I don't want to miss it because it is a good way to integrate other modules. Is there any way to speed up apache/tomcat cooperation? Marc [1] (german only) http://www.heise.de/ix/artikel/2005/10/124/ _ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL DISCLAIMER. The contents of this e-mail and any attachments are strictly confidential and they may not be used or disclosed by someone who is not a named recipient. If you have received this email in error please notify the sender by replying to this email inserting the word misdirected as the message and delete this e-mail from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk performance
Apache has better directory/file restricting and handling than Tomcat, it is more customizable and it is much user/admin friendly to configure :-) (at least for me) I configure all security related stuff on Apache and have my Tomcat listen only on AJP connector with 127.0.0.1:8009. Tomcat is harder to configure and -sadly- it has a far worse documentation than Apache (for now). Best regards, Kerem -Original Message- From: Hassan Schroeder [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 14, 2005 3:13 PM To: Tomcat Users List Subject: Re: mod_jk performance KEREM ERKAN wrote: ... I am looking to the security side of the problem and Apache+mod_jk does its job better than only Tomcat concerning security. How so? -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: large content directory out of the webapp
Eickvonder Bjoern wrote: Hello, my webapplication consists of a rather small set of classes, jsps and so on but has got a rather large content directory (some GB). My problem is now if I want to update only the application itself but not the content by uploading a new war-file I nevertheless have to upload the content again. I cannot use a combination of Apache and Tomcat, letting Apache serve the content (and thus using another docbase) as this content has to be protected by a security-mechanism of the application. Can you neither split it into two pure Tomcat apps? Paul S. Is there any way to store the content data out of the webapplication directory but still being able to serve those files to the client? Of course I could write a servlet to do this job, but what about the performance if every request to a file goes through a servlet that looks for the file in another directory, parses it and then sends the stream back to the client? Anyone solved this problem that way and got any positive or negative experience? Or is it better to leave the content where it is and just update the application incrementally? If yes has anyone got a good hint how to manage this update process without the need of doing this manually (i.e. deleting old files, jsps, classes and uploading new ones)? Bjoern Eickvonder Virus checked by G DATA AntiVirusKit Version: AVK 16.474 from 14.09.2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.10.24/101 - Release Date: 13/Sep/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to serve just JSP (was: Re: JSP on RHEL4 with Apache http d RPM?
-Original Message- From: Peter Flynn [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 14, 2005 2:40 PM To: Tomcat Users List Subject: RE: How to serve just JSP (was: Re: JSP on RHEL4 with Apache http d RPM? On Wed, 2005-09-14 at 12:19, KEREM ERKAN wrote: Unfortunately I have to keep the main port 80 httpd, as it's serving 20Gb of other material (the entire campus web site). All I need is the trick to make Apache httpd hand off any .jsp files to Tomcat. As I am newly subscribed to this list, I don't know if you have got a satisfactory answer for your question, but if you don't; I have the same configuration like yours, static files are served by Apache and *.jsp files are served by Tomcat. That's exactly what I want. OK, start with downloading and installing a binary version of Tomcat for your OS and also download the 1.2.10 version of mod_jk. I think we should handle the rest off list not to bother the list anymore.
Re: mod_jk performance
Apache is easier to configure, but at a 50% performance hit for pure JSP pages Andrew On Sep 14, 2005, at 2:18 PM, KEREM ERKAN wrote: Apache has better directory/file restricting and handling than Tomcat, it is more customizable and it is much user/admin friendly to configure :-) (at least for me) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
KEREM ERKAN wrote: Apache has better directory/file restricting and handling than Tomcat better in what way? What actual *security* issue are we talking about -- in other words, what exploit is Tomcat susceptible to that Apache is not? -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk performance
-Original Message- From: Hassan Schroeder [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 14, 2005 3:30 PM To: Tomcat Users List Subject: Re: mod_jk performance KEREM ERKAN wrote: Apache has better directory/file restricting and handling than Tomcat better in what way? What actual *security* issue are we talking about -- in other words, what exploit is Tomcat susceptible to that Apache is not? I am not aware of any critical exploits Apache or Tomcat have. As I said, I only think about restricting access to some of my server files. You may be able to do this with Tomcat but from my point of view, it is harder to configure. That's all. Cheers, Kerem smime.p7s Description: S/MIME cryptographic signature
Re: mod_jk performance
I use Apache/mod_jk/Tomcat for a long time on production servers with load balancing/failover (and with high traffic sites) and I'm sure it's not 30% slower than a pure Tomcat. I use Apache to deliver static files, manage SSL and other apache specifics modules. Then, Tomcat only manage dynamics requests (servlets and JSPs) without SSL. With this distribution of the functions, the Tomcat is less stressed and its performances increase. And when the Tomcat load increase, I add a Tomcat in the cluster... So, I think it's a good way to use it. On Wed, 14 Sep 2005 11:46:51 + marc ratun [EMAIL PROTECTED] wrote: Hi, I just read an article about webapp benchmarks [1] and they mentioned that apache+mod_jk+tomcat is about 30% slower than pure tomcat. This is sad. Until now I believed that the performance decrease with apache/mod_jk would be marginal. Putting apache/mod_jk before tomcat is very nice. I don't want to miss it because it is a good way to integrate other modules. Is there any way to speed up apache/tomcat cooperation? Marc [1] (german only) http://www.heise.de/ix/artikel/2005/10/124/ _ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
We did some comparisons between running Tomcat 5.0 standalone, or TC 5.0 and Apache 2.0 If you are ONLY delivering JSPs, we found that we could only deal with 50% of the requests when running combined Apache TC and mod_jk Andrew On Sep 14, 2005, at 2:45 PM, Lionel Farbos wrote: I use Apache/mod_jk/Tomcat for a long time on production servers with load balancing/failover (and with high traffic sites) and I'm sure it's not 30% slower than a pure Tomcat. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
On Wed, 14 Sep 2005 14:55:08 +0300 KEREM ERKAN [EMAIL PROTECTED] wrote: Mod_jk 1.2.10 had some performance problems but I did not thoroughly test why. Is is proved ? Where do you find this ? I tested mod_jk 1.2.14 (but not stressed it) and it seems to be a good version... What sort of performance problems do you mention ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
But, in a web site, there is never only JSPs : there is a lot of static files (images, css, js, ...) So, if you don't have a apache in the frontend to deliver theses static files, there is an overload for the TC server... So, your tests stressed only light JSPs or a real site ? and what is your solution for load-balancing/failover ? On Wed, 14 Sep 2005 14:50:52 +0200 Andrew Miehs [EMAIL PROTECTED] wrote: We did some comparisons between running Tomcat 5.0 standalone, or TC 5.0 and Apache 2.0 If you are ONLY delivering JSPs, we found that we could only deal with 50% of the requests when running combined Apache TC and mod_jk Andrew On Sep 14, 2005, at 2:45 PM, Lionel Farbos wrote: I use Apache/mod_jk/Tomcat for a long time on production servers with load balancing/failover (and with high traffic sites) and I'm sure it's not 30% slower than a pure Tomcat. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?
KEREM ERKAN wrote: OK, start with downloading and installing a binary version of Tomcat for your OS and also download the 1.2.10 version of mod_jk. I think we should handle the rest off list not to bother the list anymore. Just to give you another option if you like. I don't even use mod_jd. I make use of Apache's reverse proxy feature. In my httpd.conf, I add the following lines in my virtual host: ProxyPass /app http://localhost:8081/ ProxyPassReverse /app http://localhost:8081/ Just make sure you have loaded the following modules: LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_ftp_module modules/mod_proxy_ftp.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_connect_module modules/mod_proxy_connect.so What the above does is when Apache sees an url like: http://www.myhost.com/app It passes all traffic to tomcat which is listening to port 8081 (on the same machine). The beauty of this is that you can put this in your ssl.conf too and Apache will handle all encrypted traffic and passes it on to tomcat. The only advantage I see from mod_jk is if you are using it for load balancing too. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
We run F5 BigIPs as our loadbalancers, and have seperated images, etc onto another server IE: i.domain.com for images, and www.domain.com for dynamic content. F5 provides a feature call iRules to do the splitting between hosts for you, but I would NOT use this on a high traffic site. Andrew On Sep 14, 2005, at 2:58 PM, Lionel Farbos wrote: But, in a web site, there is never only JSPs : there is a lot of static files (images, css, js, ...) So, if you don't have a apache in the frontend to deliver theses static files, there is an overload for the TC server... So, your tests stressed only light JSPs or a real site ? and what is your solution for load-balancing/failover ? On Wed, 14 Sep 2005 14:50:52 +0200 Andrew Miehs [EMAIL PROTECTED] wrote: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk performance
Well, mod_jk 1.2.10 seems slower than 1.2.10 when stress tested. The tests completed in more time. I do not have the actual test results, because we have been using 1.2.10 for several months, maybe I can send them when I test 1.2.14. By the way mod_jk site mentions 1.2.13 as its testing version. Is there a 1.2.14 really or did you write 14 by mistake? Cheers, Kerem -Original Message- From: Lionel Farbos [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 14, 2005 3:51 PM To: Tomcat Users List Cc: KEREM ERKAN Subject: Re: mod_jk performance On Wed, 14 Sep 2005 14:55:08 +0300 KEREM ERKAN [EMAIL PROTECTED] wrote: Mod_jk 1.2.10 had some performance problems but I did not thoroughly test why. Is is proved ? Where do you find this ? I tested mod_jk 1.2.14 (but not stressed it) and it seems to be a good version... What sort of performance problems do you mention ?
RE: SSL mutual communication problem with Tomcat5 --- Remote host closed connection during handshake
Hi, Mark, I have the both server and client .cer imported to cacerts but the problem persists commands to generate the server and client key: Keytool -genkey -alias server -keyalg RSA -keystore serverstore.jks Keytool -genkey -alias client -keyalg RSA -keystore clientstore.jks commands to create client certificate keytool -export -alias client -file clientcert.cer -keystore clientstore.jks commands to create server certificate keytool -export -alias server -file servercert.cer -keystore serverstore.jks commands to import certificates keytool -import -alias client -file clientcert.cer -keystore serverstore.jks under $JAVA_HOME/jre/lib/security/ keytool -import -v -trustcacerts -alias server -file servercert.cer -keystore cacerts -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 13, 2005 5:12 PM To: Tomcat Users List Subject: Re: SSL mutual communication problem with Tomcat5 --- Remote host closed connection during handshake Hector Adolfo Alonso wrote: Hi Xia: I think you cannot use an self-signed certificate (as keytool generates) for mutual authentication. User certificate's certificate authority signer shoul be the same that signs the server certificate. In this case, the server certificate is self-signed. On the othe hand, who signs the client certificate ? It's self signed too ? In this case, there is a problem, because both of them are self signed -- both of them are signed by different CAs -- there is a handshake failure. INHO, Tomcat's cert shoud be signed by a true CA ... then the browser should recognize CA's cert. I'm sure there is a more technical and deep explanation, but I hope this help. This is simply wrong. There is *no* requirement that the client and server certificates must be signed by the same CA for the handshake to work. Possible causes of the problem are: - CA cert client not in $JAVA_HOME/jre/lib/security/cacerts on server - client certificate not created with correct usage types - wrong key algorithm / signing algorithm selected First, get HTTPS working with a server certificate. Then get it working over HTTPS using BASIC auth and then get it working using CLIENT-CERT auth. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Storing a request
Hi Mark, Take a look at how form authenticator does it. See http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java?rev=1.24view=markup and the SavedRequest class in the same package. Note that the way this restores the request, particularly the body content, is *very* Tomcat specific. Mark thanks for your help. But I still find some trouble: the authenticate method in FormAuthenticator receives a org.apache.catalina.connector.Request object, and the filter I'm developing has to implement the doFilter method, which receives a RequestFacade object (keeping inside a org.apache.catalina.connector.Request object, but i'm unable to set or get it's value). Regards Ajay -- = Ajay Arjandas Daryanani Area de Middleware RedIRIS / Red.es Edificio Bronce Plaza de Manuel Gómez Moreno, s/n - 2ª planta 28020 Madrid Tel.: 91 212 76 20 (Ext. 5541) Fax : 91 556 88 64 e-mail: [EMAIL PROTECTED] jid: [EMAIL PROTECTED] http://www.rediris.es = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
On Wed, 14 Sep 2005 16:16:59 +0300 KEREM ERKAN [EMAIL PROTECTED] wrote: Well, mod_jk 1.2.10 seems slower than 1.2.10 when stress tested. The tests completed in more time. I do not have the actual test results, because we have been using 1.2.10 for several months, maybe I can send them when I test 1.2.14. I'm interested in such tests (or a link if it exists). By the way mod_jk site mentions 1.2.13 as its testing version. Is there a 1.2.14 really or did you write 14 by mistake? I wanted to say mod_jk 1.2.14 : it's not a mistake... but I don't understand what this meens ...?!? I receive this mail (see Announce_mod_jk_1.2.14 above) on July 26th and, at this date, the mod_jk site mentioned 1.2.14 as the latest and stable version (you can see the content of this version on the changelog : http://jakarta.apache.org/tomcat/connectors-doc/changelog.html) Now, the mod_jk site mention 1.2.13 as the latest stable version... But the latest source version is : 1.2.14 !!! http://www.apache.org/dist/jakarta/tomcat-connectors/jk/source/ So, Mladen, what this means ? What is the current stable version ? - Announce_mod_jk_1.2.14 received on July 26th : - Delivery-date: Tue, 26 Jul 2005 23:35:01 +0200 List-Post: mailto:announcements@jakarta.apache.org List-Id: Jakarta Announcements List announcements.jakarta.apache.org Reply-To: Jakarta General List general@jakarta.apache.org Delivered-To: mailing list announcements@jakarta.apache.org Received: (qmail 226 invoked by uid 99); 26 Jul 2005 21:26:36 - Date: Tue, 26 Jul 2005 23:26:31 +0200 From: Jean-frederic Clere [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041023 X-Accept-Language: en, fr MIME-Version: 1.0 To: announcements@jakarta.apache.org, tomcat-user@jakarta.apache.org, tomcat-dev@jakarta.apache.org, announce@apache.org Subject: [ANN] Apache Tomcat mod_jk 1.2.14 Web Server Connector released Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org The Apache Tomcat team is pleased to announce the release of version 1.2.14 of the Apache Tomcat mod_jk web server connector. Tomcat is the reference implementation of a web application server which implements the Java Servlet and JavaServer Pages specifications. mod_jk is a connector which allows a web server such as Apache HTTPD to act as a front end to the Tomcat web application server. This version fixes a number of minor bugs. See http://jakarta.apache.org/tomcat/connectors-doc/changelog.html for a complete list of changes. Source distribtions can be downloaded from an Apache Software Foundation mirror at: (they are named jakarta-tomcat-connectors-1.2.14.1-src.tar.gz and jakarta-tomcat-connectors-1.2.14.1-src.zip) http://jakarta.apache.org/site/sourceindex.cgi Binary distributions for a number of different operating systems and web servers can be downloaded from an Apache Software Foundation mirror at: http://jakarta.apache.org/site/binindex.cgi Documentation for using mod_jk with Tomcat 3.3, 4.1, 5.0 and 5.5 can be found at: http://jakarta.apache.org/tomcat/ The Apache Tomcat team. - Cheers, Kerem -Original Message- From: Lionel Farbos [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 14, 2005 3:51 PM To: Tomcat Users List Cc: KEREM ERKAN Subject: Re: mod_jk performance On Wed, 14 Sep 2005 14:55:08 +0300 KEREM ERKAN [EMAIL PROTECTED] wrote: Mod_jk 1.2.10 had some performance problems but I did not thoroughly test why. Is is proved ? Where do you find this ? I tested mod_jk 1.2.14 (but not stressed it) and it seems to be a good version... What sort of performance problems do you mention ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SSL mutual communication problem with Tomcat5 --- Remote host closed connection during handshake
Hi, Mark, I forgot to mention that if set 'clientAuth=false' in the Connector, https works with server certificate. The problem happens only with 'clientAuth=true'. What key type is IE6 requires for installing certificate as Personal? Thanks again. Hong -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 13, 2005 5:12 PM To: Tomcat Users List Subject: Re: SSL mutual communication problem with Tomcat5 --- Remote host closed connection during handshake Hector Adolfo Alonso wrote: Hi Xia: I think you cannot use an self-signed certificate (as keytool generates) for mutual authentication. User certificate's certificate authority signer shoul be the same that signs the server certificate. In this case, the server certificate is self-signed. On the othe hand, who signs the client certificate ? It's self signed too ? In this case, there is a problem, because both of them are self signed -- both of them are signed by different CAs -- there is a handshake failure. INHO, Tomcat's cert shoud be signed by a true CA ... then the browser should recognize CA's cert. I'm sure there is a more technical and deep explanation, but I hope this help. This is simply wrong. There is *no* requirement that the client and server certificates must be signed by the same CA for the handshake to work. Possible causes of the problem are: - CA cert client not in $JAVA_HOME/jre/lib/security/cacerts on server - client certificate not created with correct usage types - wrong key algorithm / signing algorithm selected First, get HTTPS working with a server certificate. Then get it working over HTTPS using BASIC auth and then get it working using CLIENT-CERT auth. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
So, I think your solution with F5 BigIPs-Tomcat is equivalent to the solution with Apache/mod_jk-Tomcat But the last is free and I don't know the difference in performances between the 2 solutions. On Wed, 14 Sep 2005 15:14:01 +0200 Andrew Miehs [EMAIL PROTECTED] wrote: We run F5 BigIPs as our loadbalancers, and have seperated images, etc onto another server IE: i.domain.com for images, and www.domain.com for dynamic content. F5 provides a feature call iRules to do the splitting between hosts for you, but I would NOT use this on a high traffic site. Andrew On Sep 14, 2005, at 2:58 PM, Lionel Farbos wrote: But, in a web site, there is never only JSPs : there is a lot of static files (images, css, js, ...) So, if you don't have a apache in the frontend to deliver theses static files, there is an overload for the TC server... So, your tests stressed only light JSPs or a real site ? and what is your solution for load-balancing/failover ? On Wed, 14 Sep 2005 14:50:52 +0200 Andrew Miehs [EMAIL PROTECTED] wrote: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk performance
Well, mod_jk 1.2.10 seems slower than 1.2.10 when stress tested. The tests completed in more time. I do not have the actual test results, because we have been using 1.2.10 for several months, maybe I can send them when I test 1.2.14. I'm interested in such tests (or a link if it exists). You can try Microsoft's Web Stress Tool which is free but it is old. I am also actually searching for a better stress tool. http://www.microsoft.com/downloads/details.aspx?FamilyID=E2C0585A-062A-439E- A67D-75A89AA36495displaylang=en By the way mod_jk site mentions 1.2.13 as its testing version. Is there a 1.2.14 really or did you write 14 by mistake? I wanted to say mod_jk 1.2.14 : it's not a mistake... but I don't understand what this meens ...?!? It seems there is a confusion in mod_jk's own site :-) I will download and compile 1.2.14 in a spare time and see how it performs. Cheers, Kerem smime.p7s Description: S/MIME cryptographic signature
Re: mod_jk performance
On Wed, 14 Sep 2005 17:27:29 +0300 KEREM ERKAN [EMAIL PROTECTED] wrote: Well, mod_jk 1.2.10 seems slower than 1.2.10 when stress tested. The tests completed in more time. I do not have the actual test results, because we have been using 1.2.10 for several months, maybe I can send them when I test 1.2.14. I'm interested in such tests (or a link if it exists). You can try Microsoft's Web Stress Tool which is free but it is old. I am also actually searching for a better stress tool. http://www.microsoft.com/downloads/details.aspx?FamilyID=E2C0585A-062A-439E- A67D-75A89AA36495displaylang=en I don't search a Stress Tool; I say I'm interest in the result of the stress. Another free Stress Tool is JMeter (http://jakarta.apache.org/jmeter/) Under Linux, I also used httperf (http://www.hpl.hp.com/research/linux/httperf/) and autobench (http://www.xenoclast.org/autobench/) Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk performance
-Original Message- From: Lionel Farbos [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 14, 2005 5:49 PM To: Tomcat Users List Cc: KEREM ERKAN Subject: Re: mod_jk performance On Wed, 14 Sep 2005 17:27:29 +0300 KEREM ERKAN [EMAIL PROTECTED] wrote: Well, mod_jk 1.2.10 seems slower than 1.2.10 when stress tested. The tests completed in more time. I do not have the actual test results, because we have been using 1.2.10 for several months, maybe I can send them when I test 1.2.14. I'm interested in such tests (or a link if it exists). You can try Microsoft's Web Stress Tool which is free but it is old. I am also actually searching for a better stress tool. http://www.microsoft.com/downloads/details.aspx?FamilyID=E2C0585A-062A -439E- A67D-75A89AA36495displaylang=en I don't search a Stress Tool; I say I'm interest in the result of the stress. Well as I said, I do not have the results for now, but when I test 1.2.14, I will surely share the results with the list. Cheers, Kerem smime.p7s Description: S/MIME cryptographic signature
Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
Hi fellas, I'm working on Tomcat 5.5.7 on a webapp compiled by Ant using shared and common libraries in their respective tomcat folders. My mysql driver (mysql-connector-java-3.1.10-bin.jar) is in the $CATALINA_HOME/common/lib/ folder and I still get the following message : Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver' It happens when the dataSourceVariable.getConnection() method of type org.apache.commons.dbcp.BasicDataSource is called in my program. The thing is, it works fine when I put all my libraries in the wabapp/application/WEB-INF/lib/ folder but I need to share (for production purposes) the mysql driver. My Ant build.xml file includes the following directives, which include the libraries in a path variable : path id=compile.classpath pathelement location=${tomcat.home}/common/classes/ fileset dir=${tomcat.home}/common/endorsed include name=*.jar/ /fileset fileset dir=${tomcat.home}/common/lib include name=*.jar/ /fileset pathelement location=${tomcat.home}/shared/classes/ fileset dir=${tomcat.home}/shared/lib include name=*.jar/ /fileset /path And my compile target is as follows : target name=compile depends=prepare description=Compiler les sources Java mkdir dir=${build.home}/WEB-INF/classes/ javac srcdir=${src.dir} destdir=${build.dir} debug=${compile.debug} deprecation=${compile.deprecation} optimize=${compile.optimize} classpath refid=compile.classpath/ /javac !-- Copy application resources -- copy todir=${build.home}/WEB-INF/classes fileset dir=${build.dir} excludes=**/*.java/ /copy copy todir=${build.home}/WEB-INF/ fileset dir=${basedir}/WEB-INF/ includes=**/*.xml, **/*.tld, **/*.dtd/ /copy copy todir=${build.home}/WEB-INF/lib fileset dir=${basedir}/WEB-INF/lib includes=*.jar / /copy /target I've been working for over a week on this one and I'm out of ideas... if anyone has a flash, feel free to express it, who knows, it might help. Luc Boudreau SID - Université du Québec [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
Just my 2 cents: Have you tried putting it under shared/lib? Also, are you sure it's a .jar and not a .zip extension for you file? Am using here an oracle connector in various webapp. The driver is under common/lib of tomcat 5.5.7 and i have no problems, so i bet this is the right location Perhaps your file is corrupted (check you can unzip it and the driver file exist in it). Le Mercredi 14 Septembre 2005 17:01, [EMAIL PROTECTED] a écrit : Hi fellas, I'm working on Tomcat 5.5.7 on a webapp compiled by Ant using shared and common libraries in their respective tomcat folders. My mysql driver (mysql-connector-java-3.1.10-bin.jar) is in the $CATALINA_HOME/common/lib/ folder and I still get the following message : Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver' It happens when the dataSourceVariable.getConnection() method of type org.apache.commons.dbcp.BasicDataSource is called in my program. The thing is, it works fine when I put all my libraries in the wabapp/application/WEB-INF/lib/ folder but I need to share (for production purposes) the mysql driver. My Ant build.xml file includes the following directives, which include the libraries in a path variable : path id=compile.classpath pathelement location=${tomcat.home}/common/classes/ fileset dir=${tomcat.home}/common/endorsed include name=*.jar/ /fileset fileset dir=${tomcat.home}/common/lib include name=*.jar/ /fileset pathelement location=${tomcat.home}/shared/classes/ fileset dir=${tomcat.home}/shared/lib include name=*.jar/ /fileset /path And my compile target is as follows : target name=compile depends=prepare description=Compiler les sources Java mkdir dir=${build.home}/WEB-INF/classes/ javac srcdir=${src.dir} destdir=${build.dir} debug=${compile.debug} deprecation=${compile.deprecation} optimize=${compile.optimize} classpath refid=compile.classpath/ /javac !-- Copy application resources -- copy todir=${build.home}/WEB-INF/classes fileset dir=${build.dir} excludes=**/*.java/ /copy copy todir=${build.home}/WEB-INF/ fileset dir=${basedir}/WEB-INF/ includes=**/*.xml, **/*.tld, **/*.dtd/ /copy copy todir=${build.home}/WEB-INF/lib fileset dir=${basedir}/WEB-INF/lib includes=*.jar / /copy /target I've been working for over a week on this one and I'm out of ideas... if anyone has a flash, feel free to express it, who knows, it might help. Luc Boudreau SID - Université du Québec [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Delbecq Royal Meteorological Institute of Belgium - Is there life after /sbin/halt -p? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to define contexts?
Hassan, Well, maybe I misunderstood the original question :-) No, it's just me unfamiliar with the idea of contexts. So far I've figured out that there is a file context.xml that can define extra parameters for an application, but I'm not sure about: 1) Whether it's possible to direct two contexts at the same codebase. I'm looking at Catalina/localhost/manager.xml and host-manager.xml, and they use different codebases. 2) How to tie a particular context to a particular URL, as you indicate below. Currently I have dev and www DNS aliases both pointing to virtual host in apache, and these hosts ProxyPass everything to two different Tomcat applications (/dev and /pro). Ideally, I'd like to have one Tomcat application, but I'm not sure how to list two contexts for one application. Thanks, Simon My presumption was that the same code exists at, say, http://dev.example.com/ and http://www.example.com which are clearly different Contexts, even if they're on the same machine being run as virtual hosts. So each Context has a Resource addressing the appropriate DB. -- Simon (Vsevolod ILyushchenko) [EMAIL PROTECTED] http://www.simonf.com Terrorism is a tactic and so to declare war on terrorism is equivalent to Roosevelt's declaring war on blitzkrieg. Zbigniew Brzezinski, U.S. national security advisor, 1977-81 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session timeout issues
I have two issues relating to sessions: 1) Sessions seem to be expired too soon. This happens very infrequently for me (perhaps 1 in 1000 requests). I'm adding some HttpSessionListeners and HttpSessionAttributeListeners to attempt to locate this problem, but have little to go on at the moment. 2) Session objects are being expired too late. Some session objects are persisting for far longer than the 30 minutes I've specified in web.xml. I've checked this with an HttpSessionListener today, for example: Timestamp: Wed Sep 14 12:26:21 BST 2005 ID:C945C8BC10E58E3947A5475C001DBA35 Last Accessed: Wed Sep 14 11:35:43 BST 2005 Backtrace: at presentation.listener.DebugSessionListener.sessionDestroyed(DebugSessionListener.java:54) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:675) at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:567) at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:655) at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:640) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1283) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1568) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1557) at java.lang.Thread.run(Unknown Source) I realise that this isn't enough information to really diagnose the problem but I'm hoping that you may be able to give me some suggestions for what to do next. Thanks in advance James Shaw - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't change servlet path
Hi; I'm not understanding something here I think. On (1) you say (I think) that I must put Context in server.xml for the path attribute. But in (2) you tell me (I think) to not put Context in server.xml? What am I not getting here? Thanks - dave -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 13, 2005 9:27 PM To: Tomcat Users List Subject: RE: Can't change servlet path From: David Thielen [mailto:[EMAIL PROTECTED] Subject: RE: Can't change servlet path 1) Why is this forced in server.xml when otherwise we are supposed to put everything in our META-INF? You should consider the use of Context in server.xml as merely a migration mechanism from older Tomcat versions. The path attribute has to be used in this situation, since there is no other means of determining the application name. For the other two cases, the application name is derivable from either the location or the name of the .xml file. 2) In this case, is the context.xml in my META-INF used also? In other words, should I put the JDBC Resource node in the Context node in server.xml or in my context.xml? You simply shouldn't have a Context tag in server.xml (see above). 3) While /abc now works, /store still does too. Is this by design? I suspect that your app has actually been deployed twice - once for each of the Context instances you have. I believe the normal way of handling a single app that you want to use under multiple path names is to have trivial secondary apps that merely forward requests to the real one. (Others may have better solutions, since I primarily work on the inside of the JVM, not on J2EE apps.) - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Two Service elements problems
I have two Service elements defined like this in my server.xml file, each one listening to a different IP address and serving requests for different web sites. (Using 5.0.28) Service name=MyService1 Connector port=80 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true address=166.70.163.138 / Connector port=443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS address=166.70.163.138 / Engine name=Catalina1 defaultHost=host1 debug=0 Host name=host1 debug=0 appBase=/webapps/host1 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service Service name=MyService2 Connector port=80 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true address=166.70.163.140 / Connector port=443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS address=166.70.163.140 / Engine name=Catalina2 defaultHost=host2 debug=0 Host name=host2 debug=0 appBase=/webapps/host2 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service My Tomcat folder structure looks like this: conf --Catalina1 host1 --[various .xml files (context files)] --Catalina2 host2 --[various .xml files (context files)] webapps --host1 [various webapps] --host2 [various webapps] I can browse successfully to all the web apps that are deployed in webapps/host1 but when I browse to host 2 I get the following error: (Error message from Firefox when browsing to http://166.70.163.140) The connection was refused when attempting to contact 166.70.163.140. In the stdout.log file, mention is made of the context files in /Catalina1/host1 but no mention is made of context files in /Catalina2/host2. Sep 14, 2005 10:53:04 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina1\host1\admin.xml Sep 14, 2005 10:53:12 AM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Sep 14, 2005 10:53:12 AM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Sep 14, 2005 10:53:13 AM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Sep 14, 2005 10:53:18 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina1\host1\balancer.xml Sep 14, 2005 10:53:19 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina1\host1\gapay.xml Sep 14, 2005 10:53:23 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina1\host1\manager.xml Sep 14, 2005 10:53:23 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina1\host1\webshare.xml I wondered if 166.70.163.140 was accessible at all, so I just tried having one Service defined without specifying an IP address. Both IPs were accessible in this case, so I assumed 166.70.163.140 was configured correctly. I tried it with and without Windows XP firewall enabled and got same results. Can someone shed some light on what could be the problem(s)? Thanks, Brian Barnett This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network.
RE: Problem making my servlet the default servlet (instead of ROOT)
Hi; We have some ASP stuff too so we have to have IIS. I think I'll just put my servlet in root and stop trying to change what root is (yuck). Thanks - dave -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 13, 2005 10:45 PM To: Tomcat Users List Subject: Re: Problem making my servlet the default servlet (instead of ROOT) If I do Context path=/ docBase=store., then http://localhost:8080/cart.faces returns an error 404. Yep. It will. Since you are using the path attribute I assume this is in the server.xml and to set it as the root you would use . If you specify a context path of an empty string (), you are defining the default web application for this Host, which will process all requests not assigned to other Contexts. If this is not in the server.xml then remove the path attribute completely. Name your package ROOT.war and deploy it. (Someone correct me if I am wrong here.) I figured it should be / and not ? No. See above. If I do Context path= docBase=store., then it works. But. http://localhost:8080/store/cart.faces works http://localhost/store/cart.faces works (via IIS) http://localhost:8080/cart.faces works http://localhost/cart.faces - error 404 Any idea why the error only if using the root? I don't use IIS but I would say it is a configuration issue in the connector, as you are connecting to two different apps in the first two URLs than you are in the last two. And since both :8080 URLs work then Tomcat is working. Out of curiosity is there any particular reason you are using IIS and not Tomcat alone? Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't change servlet path
From: David Thielen [mailto:[EMAIL PROTECTED] Subject: RE: Can't change servlet path I'm not understanding something here I think. On (1) you say (I think) that I must put Context in server.xml for the path attribute. But in (2) you tell me (I think) to not put Context in server.xml? What am I not getting here? You should not put Context elements in server.xml, nor should you use the path attribute. Name the application appropriately. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Issue with the admin webapp
Sastry Malladi wrote: I filed a bug for this (http://issues.apache.org/bugzilla/show_bug.cgi?id=35835) and it seems this is fixed in 5.5.10. But I don't see a 5.5.10 download and wanted clarification on whether 5.5.11-alpha contains the fix as well. I'm going to check it out anyways when I get a chance. Yes it does include the fix. More generally, any x.y.z+1 release contains all the fixes in x.y.z Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SSL mutual communication problem with Tomcat5 --- Remote host closed connection during handshake
Xia, Hong wrote: Hi, Mark, I have the both server and client .cer imported to cacerts but the problem persists commands to generate the server and client key: Keytool -genkey -alias server -keyalg RSA -keystore serverstore.jks Keytool -genkey -alias client -keyalg RSA -keystore clientstore.jks commands to create client certificate keytool -export -alias client -file clientcert.cer -keystore clientstore.jks commands to create server certificate keytool -export -alias server -file servercert.cer -keystore serverstore.jks commands to import certificates keytool -import -alias client -file clientcert.cer -keystore serverstore.jks under $JAVA_HOME/jre/lib/security/ keytool -import -v -trustcacerts -alias server -file servercert.cer -keystore cacerts You are not signing your certificates. Look at keytool -selfcert Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
KEREM ERKAN wrote: Tomcat is harder to configure and -sadly- it has a far worse documentation than Apache (for now). I look forward to seeing your documentation patches in Bugzilla ;) Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Two Service elements problems
If you do a netstat -ln (cygwin) do you see two network sockets listening on port 80? 166.70.163.138:80 166.70.163.140:80 If not, the problem is at a lower level than tomcat. Steve Barnett, Brian W. wrote: I have two Service elements defined like this in my server.xml file, each one listening to a different IP address and serving requests for different web sites. (Using 5.0.28) Service name=MyService1 Connector port=80 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true address=166.70.163.138 / Connector port=443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS address=166.70.163.138 / Engine name=Catalina1 defaultHost=host1 debug=0 Host name=host1 debug=0 appBase=/webapps/host1 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service Service name=MyService2 Connector port=80 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true address=166.70.163.140 / Connector port=443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS address=166.70.163.140 / Engine name=Catalina2 defaultHost=host2 debug=0 Host name=host2 debug=0 appBase=/webapps/host2 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service My Tomcat folder structure looks like this: conf --Catalina1 host1 --[various .xml files (context files)] --Catalina2 host2 --[various .xml files (context files)] webapps --host1 [various webapps] --host2 [various webapps] I can browse successfully to all the web apps that are deployed in webapps/host1 but when I browse to host 2 I get the following error: (Error message from Firefox when browsing to http://166.70.163.140) The connection was refused when attempting to contact 166.70.163.140. In the stdout.log file, mention is made of the context files in /Catalina1/host1 but no mention is made of context files in /Catalina2/host2. Sep 14, 2005 10:53:04 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina1\host1\admin.xml Sep 14, 2005 10:53:12 AM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Sep 14, 2005 10:53:12 AM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Sep 14, 2005 10:53:13 AM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Sep 14, 2005 10:53:18 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina1\host1\balancer.xml Sep 14, 2005 10:53:19 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina1\host1\gapay.xml Sep 14, 2005 10:53:23 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina1\host1\manager.xml Sep 14, 2005 10:53:23 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina1\host1\webshare.xml I wondered if 166.70.163.140 was accessible at all, so I just tried having one Service defined without specifying an IP address. Both IPs were accessible in this case, so I assumed 166.70.163.140 was configured correctly. I tried it with and without Windows XP firewall enabled and got same results. Can someone shed some light on what could be the problem(s)? Thanks, Brian Barnett This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Two Service elements problems
netstat -an results (snippet) Proto Local Address Foreign AddressState TCP166.70.163.138:80 0.0.0.0:0 LISTENING TCP166.70.163.138:139 0.0.0.0:0 LISTENING TCP166.70.163.138:2109166.70.163.131:2433ESTABLISHED TCP166.70.163.138:2110166.70.163.138:8093ESTABLISHED TCP166.70.163.138:2113166.70.163.138:8093ESTABLISHED TCP166.70.163.138:2115166.70.163.138:8093ESTABLISHED TCP166.70.163.138:2117166.70.163.138:8093ESTABLISHED TCP166.70.163.138:2119166.70.163.138:8093ESTABLISHED TCP166.70.163.138:2122166.70.163.138:8093ESTABLISHED TCP166.70.163.138:2125166.70.163.131:2433ESTABLISHED TCP166.70.163.138:338963.253.57.180:4881 ESTABLISHED TCP166.70.163.138:8093166.70.163.138:2110ESTABLISHED TCP166.70.163.138:8093166.70.163.138:2113ESTABLISHED TCP166.70.163.138:8093166.70.163.138:2115ESTABLISHED TCP166.70.163.138:8093166.70.163.138:2117ESTABLISHED TCP166.70.163.138:8093166.70.163.138:2119ESTABLISHED TCP166.70.163.138:8093166.70.163.138:2122ESTABLISHED UDP166.70.163.138:123 *:* UDP166.70.163.138:137 *:* UDP166.70.163.138:138 *:* UDP166.70.163.138:520 *:* UDP166.70.163.140:123 *:* UDP166.70.163.140:520 *:* UDP166.70.163.140:1900*:* No TCP info for 166.70.163.140, only UDP info. Not sure where to turn for help on this one. I'm not a network guy :( Any suggestions? -Original Message- From: Steve Dodge [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 14, 2005 12:32 PM To: Tomcat Users List Subject: Re: Two Service elements problems If you do a netstat -ln (cygwin) do you see two network sockets listening on port 80? 166.70.163.138:80 166.70.163.140:80 If not, the problem is at a lower level than tomcat. Steve Barnett, Brian W. wrote: I have two Service elements defined like this in my server.xml file, each one listening to a different IP address and serving requests for different web sites. (Using 5.0.28) Service name=MyService1 Connector port=80 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true address=166.70.163.138 / Connector port=443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS address=166.70.163.138 / Engine name=Catalina1 defaultHost=host1 debug=0 Host name=host1 debug=0 appBase=/webapps/host1 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service Service name=MyService2 Connector port=80 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true address=166.70.163.140 / Connector port=443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS address=166.70.163.140 / Engine name=Catalina2 defaultHost=host2 debug=0 Host name=host2 debug=0 appBase=/webapps/host2 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service My Tomcat folder structure looks like this: conf --Catalina1 host1 --[various .xml files (context files)] --Catalina2 host2 --[various .xml files (context files)] webapps --host1 [various webapps] --host2 [various webapps] I can browse successfully to all the web apps that are deployed in webapps/host1 but when I browse to host 2 I get the following error: (Error message from Firefox when browsing to http://166.70.163.140) The connection was refused when attempting to contact 166.70.163.140. In the stdout.log file, mention is made of the context files in /Catalina1/host1 but no mention is made of context files in /Catalina2/host2. Sep 14, 2005 10:53:04 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina1\host1\admin.xml Sep 14, 2005 10:53:12 AM org.apache.struts.util.PropertyMessageResources init INFO:
RE: SSL mutual communication problem with Tomcat5 --- Remote host closed connection during handshake
Both client and server certificates are self certified by: keytool -selfcert -alias server -keystore serverstore.jks keytool -selfcert -alias client -keystore serverstore.jks The problem still exists. When install the self certified client certificate in IE6, put certificate in Personal Store, the install finished with 'The import was successful' message, however the certificate does not show up under Personal tab. It is seems when import the certificate, IE6 only install it as CA root. What type should I specify with keytool to generate a certificate which IE6 can install as non CA root? -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 14, 2005 1:51 PM To: Tomcat Users List Subject: Re: SSL mutual communication problem with Tomcat5 --- Remote host closed connection during handshake Xia, Hong wrote: Hi, Mark, I have the both server and client .cer imported to cacerts but the problem persists commands to generate the server and client key: Keytool -genkey -alias server -keyalg RSA -keystore serverstore.jks Keytool -genkey -alias client -keyalg RSA -keystore clientstore.jks commands to create client certificate keytool -export -alias client -file clientcert.cer -keystore clientstore.jks commands to create server certificate keytool -export -alias server -file servercert.cer -keystore serverstore.jks commands to import certificates keytool -import -alias client -file clientcert.cer -keystore serverstore.jks under $JAVA_HOME/jre/lib/security/ keytool -import -v -trustcacerts -alias server -file servercert.cer -keystore cacerts You are not signing your certificates. Look at keytool -selfcert Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to get user name after login
After implementation of JDBCRealm, how to retrieve the username in Servlet after login? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get user name after login
梁炳場 wrote: After implementation of JDBCRealm, how to retrieve the username in Servlet after login? getRemoteUser() - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk performance
Well since I don't understand German, I don't konw how he tested. However in my stress testing which lots of static and JSPs, I found Apache + mod_jk performance is a littlle higher than TOMCAT only. I configured Apache with mod_cache. So I think only handling JSPs, TC only could be better than Apache + mod_jk. However in the real world, there is never only JSPs, there must have lots of static files. Thx, Xuekun - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat4 does not close database connections on reload context
hi list! this is my first post to this list :) i have searched this list's archives but could not find a lot about that topic so i am posting it. i am not sure if this is really a tomcat issue; if it is not i hope someone may point me the right direction. i develop JSP applications (tomcat4, java 1.4, postgres database7.4 with jdbc connectivity, the OS is linux 2.6.8, debian sarge) with CodeCharge Studio (yessoftware.com) which create a connection pool of, say 10 connections. when i upload a new version of an application to the server tomcat reloads the context correctly but it seems that open database connections continue to exist forever and are never closed. on initialisation the newly uploaded app creates new database connections so after so-many uploads i of course run into a max_connections_exceeded error from the database. the connections are closed only when i restart tomcat. who should take care of open db connections? my guess is that tomcat should do so when it reloads the context. is that assumption wrong? is there a way to make tomcat close idle db connections after some timeout? -- best rgds, armin walland focus media research IT :: development, administration focusmr.com maculangasse 8 1220 wien +43 (0)1-258 97 01 291 please try not to send me HTML emails! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]