Re: Cluster and notifications to nodes
Hi, Why do you want your application to send a notification ? If you configure Session Replication in each of your Tomcat servers, every time there will be a change in your HTTP session, the others AS in the cluster will be notified and synchronized automatically. You have nothing to do... On Fri, 16 Sep 2005 15:18:58 +0100 (BST) Eino Lilius [EMAIL PROTECTED] wrote: Hi, I have successfully installed a Tomcat cluster :) I need to notify other nodes in the cluster when a state is changed in my web application. My problem is that I don't know how to send those notifications. I've found one reply to similar question: You can register your own Cluster Message Listener and with SimpleTcpCluster.send(ClusterMessage) you can send your message to all cluster nodes. How is that done in practice? Does someone have an example how to get the reference to that SimpleTcpCluster instance? Any help is appreciated :) Thanks, Eino ___ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 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
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: 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: 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
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: data push
You can see JMS and joram (http://joram.objectweb.org/) Note : Joram is embedded in Jonas (http://jonas.objectweb.org/) and Tomcat too... On Thu, 11 Aug 2005 11:41:34 +0100 Darryl L. Miles [EMAIL PROTECTED] wrote: Paul Wallace wrote: Thanks Len, And what of other protocols? Are sockets then required? What are some other protocols that might be used to push/pull data? (off Tomcat I know ;)) Paul. I'm interested in the answer to this too. What terms do I stick into google to find generic socket based communication systems between isolated JVMs ? Protocols, Frameworks, something that will slot in with TC but not as raw as HTTP I want the API to be a POJO as possible but with a open / setup / work / close cycle. Idealy I'm really after a multiplexing (read as single socket) messaging framework that can deliver command / event like objects to a remote JVM for processing then return the appropiate reponse object and have multiple events outstanding all in different states with any sized payload. -- Darryl L. Miles - 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: jkstatus
Hi, I think your worker.properties is OK I suppose your tomcat.conf is included into httpd.conf So, in my own tests, it works with (in tomcat.conf) : Location /jkstatus JkMount status Order deny,allow Deny from all Allow from 127.0.0.1 /Location Regards On Wed, 20 Jul 2005 11:00:04 -0300 Rogerio Baldini das Neves [EMAIL PROTECTED] wrote: Hi, I have installed a cluster using Apache2.0.54 + mod_jk 1.2.13 + Tomcat5.5.9. And it_s working fine. I want to configure jkstatus but I haven_t been success. My worker.properties worker.tomcat1.type=ajp13 worker.tomcat1.host=localhost worker.tomcat1.port=8009 worker.tomcat1.lbfactor=1 worker.tomcat1.cachesize=1 worker.tomcat2.type=ajp13 worker.tomcat2.host=localhost worker.tomcat2.port=8010 worker.tomcat2.lbfactor=1 worker.tomcat2.cachesize=1 worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=tomcat1,tomcat2 worker.status.type=status worker.list=loadbalancer, status My tomcat.conf IfModule !mod_jk.c LoadModule jk_module modules/mod_jk.so /IfModule JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkLogStampFormat [%a %b %d %H:%M:%S %Y] #JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat %w %V %T JkMount /servlets-examples/* loadbalancer JkMount /jkstatus/* status When I try /jkstatus/ I receive Internal Server Error. Can anybody help me ? Thanks Rogerio Baldini - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validation of HowTo Deploy
Because of no answer, I create a bug enhancement in bugzilla (http://issues.apache.org/bugzilla/show_bug.cgi?id=35063) with the HowTo document and an example more complete. ... On Mon, 23 May 2005 19:12:07 +0200 Lionel Farbos [EMAIL PROTECTED] wrote: 2nd test with the doc HTML inside... Hi, Because there is a lot of informations on several documents for deploying a webapp in Tomcat, it is difficult to define a simple and standard way to do it on a production server. Moreover, the deployment is different with Tomcat 3, 4, 5.0 or 5.5 So I decided to initialize a document which would be available for all Tomcat versions = 5.5.7 If you have a well knowledge of Tomcat in a production environment, Can you help me to validate (correct and/or complete) a simple document like the one attach ? Notes : - The goal of this document is only to be a as simple as possible starting point for this theme. - I'm not sure the re-deployment paragraph when Automatic deployment is disabled is correct ... In advance, thank you. Regards. !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html ... see in the bugzilla attachment for more details - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accesing private resources with Tomcat
As Tim said, there is nothing bundled with Tomcat to do this, but you can easily write your own proxy to do this. You'll have something like : http://[MyPublicProxy]/mail http://[MyPublicProxy]/accountWebManager http://[MyPublicProxy]/phpApps with mail, accountWebManager, phpApps that are servlets in the proxy webapp that send HTTP request to the correct server. These servlets can use an HTTP client like http://jakarta.apache.org/commons/httpclient/ It's not a very light solution (I think it is better to do a reverse proxy and filter your requests in apache) but it can work. Regards On Tue, 24 May 2005 12:12:30 +0200 (CEST) Borja Bravo Alférez [EMAIL PROTECTED] wrote: Dear Tomcat Users, I have been working on an interesting problem. I need to give access to several servers in a private network. Lets say that there are: http://192.168.1.2/mail http://192.168.1.3/accountWebManager http://192.168.1.4/phpApps http://192.168.1.5/aspApps http://192.168.1.6/... And I need to give access from the exterior. So, It will be great to be able con make theh visible in tomcat. Something like: http://[MyPublicIP]/[myContext]/[Route]/mail http://[MyPublicIP]/[myContext]/[Route]/accountWebManager http://[MyPublicIP]/[myContext]/[Route]/phpApps http://[MyPublicIP]/[myContext]/[Route]/aspApps http://[MyPublicIP]/[myContext]/[Route]/... I Know this can be done at least with the Apache server but I need to do it in Tomcat in order to use a Java filter con controll access to some resources. It is possible to do this with Tomcat? Where could yoyu help me with this? Thanks in advance, Borja - 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: war deploy
On Fri, 20 May 2005 22:52:08 +0200 Pfingstl Gernot [EMAIL PROTECTED] wrote: How can I depoly a war to a path like '/x/y'? You can't deploy in a path like this (on several levels) : you can deploy x.war in /x ROOT.war in / but nothing in /x/y You can search more details in the archive (recently I saw an answer for this) ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validation of HowTo Deploy
Hi, Because there is a lot of informations on several documents for deploying a webapp in Tomcat, it is difficult to define a simple and standard way to do it on a production server. Moreover, the deployment is different with Tomcat 3, 4, 5.0 or 5.5 So I decided to initialize a document which would be available for all Tomcat versions = 5.5.7 If you have a well knowledge of Tomcat in a production environment, Can you help me to validate (correct and/or complete) a simple document like the one attach ? Notes : - The goal of this document is only to be a as simple as possible starting point for this theme. - I'm not sure the re-deployment paragraph when Automatic deployment is disabled is correct ... In advance, thank you. Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validation of HowTo Deploy
2nd test with the doc HTML inside... Hi, Because there is a lot of informations on several documents for deploying a webapp in Tomcat, it is difficult to define a simple and standard way to do it on a production server. Moreover, the deployment is different with Tomcat 3, 4, 5.0 or 5.5 So I decided to initialize a document which would be available for all Tomcat versions = 5.5.7 If you have a well knowledge of Tomcat in a production environment, Can you help me to validate (correct and/or complete) a simple document like the one attach ? Notes : - The goal of this document is only to be a as simple as possible starting point for this theme. - I'm not sure the re-deployment paragraph when Automatic deployment is disabled is correct ... In advance, thank you. Regards. !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head meta content=text/html; charset=ISO-8859-1 http-equiv=content-type titleHowto deploy/title /head body div style=text-align: center; pbig style=text-decoration: underline;HOWTO deploy a webapp on a Tomcat production server/big/p /div br Currently, when you want to deploy your webapp as a standard way on a Tomcat production server, you have to take informations in several documents (even threads in mailing list).br The goal of this document is to describe a way that is as simple and standard as possible to do this, in a single document and with a concrete example (to avoid misunderstanding).br For more details, you'll have to follow some links (at the end of this document).br br a href=#I_The_contextI) The context/abr a href=#II_The_furnituresII) The furnitures/abr nbsp;nbsp;nbsp; a href=#II.1_the_warII.1) the .war file/abr nbsp;nbsp;nbsp; a href=#II.2_an_external_config_FileII.2) an external config file/abr a href=#III_The_deploymentIII) The deployment/abr nbsp;nbsp;nbsp; a href=#III.1_on_the_localhost_HOSTIII.1) on the localhost HOST/abr nbsp;nbsp;nbsp; a href=#III.2_on_a_custom_Virtual_HostIII.2) on a custom Virtual Host/abr nbsp;nbsp;nbsp; a href=#III.3_on_a_custom_Virtual_HostIII.3) on a custom Virtual Host as Context ROOT/abr nbsp;nbsp;nbsp; a href=#III.4_The_re-deploymentIII.4) The re-deployment/abr a href=#IV_The_static_filesIV) The static files/abr nbsp;nbsp;nbsp; a href=#IV.1_delivered_by_TomcatIV.1) delivered by Tomcat/abr nbsp;nbsp;nbsp; a href=#IV.2_delivered_by_ApacheIV.2) delivered by Apache/abr a href=#V_Some_linksV) Some links/abr h1a name=I_The_context/aspan style=font-weight: bold; text-decoration: underline;/spanspan style=font-weight: normal;I) The context/span/h1 - You are in a development team. You produce a webapp and have to provide it to an exploitation team. So, you don't have access to the pre-production and production servers.br - A production server is a machine that must work all the time (24x7).br - This document supposes you are using Tomcat Servers gt;= 5.5.7br Because there is only one set of documentations for all Tomcat 5.x versions but it can be bugs on certain versions, this document try to indicate the correct way for each Tomcat version.br - As in Tomcat documentations, span style=font-style: italic;the descriptions below uses the variable name $CATALINA_HOME to refer to the directory into which you have installed Tomcat5/span.br h1a name=II_The_furnitures/aspan style=font-weight: bold; text-decoration: underline;/spanspan style=font-weight: normal;II) The furnitures/span/h1 h2a name=II.1_the_war/aspan style=font-weight: bold;/spanspan style=font-weight: normal;II.1) the .war filebr /span/h2 You must package your web application in a single piece : myWebApp.war.br br The content of this package is :br META-INF/br META-INF/MANIFEST.MFnbsp;nbsp; #The manifest filebr WEB-INF/br WEB-INF/lib/nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; #All the libraries needed for your webapp that are not present in the tomcat commons directories br WEB-INF/classesnbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp;nbsp;nbsp; #All your personal classes for the dynamic of the sitebr WEB-INF/web.xmlnbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; #The config file for your webappbr lt;static and/or JSP filesgt;nbsp;nbsp; nbsp;nbsp; nbsp;nbsp; nbsp; #All your static files (.html, .js, .css, .jpg, .gif, .png, .ico, ...)br br This file concerns only development needs and can be the same for test, pre-production or production servers.br Note :br For more details on libraries to be present in the war file and the ones in tomcat commons directories, see the a href=http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html;ClassLoader Howto/abr br h2a name=II.2_an_external_config_File/aspan style=font-weight: bold;/spanspan style=font-weight: normal;II.2) an external config File/span/h2 All your webapp properties can be put in the WEB-INF/web.xml file. But, if some properties are handled by the Tomcat context administrators, they must be
Re: Where to put version information in war file?
On Wed, 11 May 2005 15:03:37 -0400 Henri Dupre [EMAIL PROTECTED] wrote: I was wondering what is the best place to put version information in a war file? I'd like to put a build version and date at built time to my application and have a way to retrieve them from the servlets. I'm used to add the META-INF Implementation-version tag with jar files but with Tomcat war files it doesn't work. Are there other standard places where to put version information? Henri. Hi, I use this mecanism and it works. I put version information in the META-INF/MANIFEST.MF of the war, then thanks to getServletContext().getResource(/META-INF/MANIFEST.MF), you can get this file and parse it. Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat connectors
Hi, As described here : http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html the goal of socket_timeout is very different than recyle_timeout : socket_timeout is a timeout during the activity (between apache and tomcat) recycle_timeout is a timeout after the activity; when the exchanges between apache and tomcat are finished, the socket remains open during recycle_timeout of inactivity (this feature is close to cache_timeout). Regards. On Wed, 20 Apr 2005 17:30:32 -0700 (PDT) Patty O'Reilly [EMAIL PROTECTED] wrote: The descriptions of recycle_timeout and socket_timeout seem very similar in the Jakarta Tomcat Connector doc. Does anyone know when you would use one over the other, or should both directives be used together? I'm using 1.2.8 for Apache 2.0.52 + RHAS3. Many thanks --patty - 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: Clustering application scope replication
Hi For your needs, you can use session replication (http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html) or your own mechanisms and tables with datas in a database ... Regards. On Fri, 22 Apr 2005 15:15:54 +0200 Joakim Ahlén [EMAIL PROTECTED] wrote: Ok, too bad. Is there any way of storing objects if we want them in cluster scope? An ugly hack would be to use one single HttpSession with a special session-id to store global objects, and somehow fetch objects from within this HttpSession from inside requests that belongs to other sessions. I can't see how this could be done though, since request.getSession() can't fetch other sessions than its own. This would probably also have to include some tomcat specific magic which i wouldn't want. Any help is appreciated on how to handle this problem! Thanks Joakim On Fri, Apr 22, 2005 at 08:07:21AM -0500, Jess Holle wrote: The servlet spec says this data is local to a given JVM. I suppose a servlet engine could expand beyond the spec, but I'd be surprised if Tomcat did here. Joakim Ahlén wrote: Hi! We have a cluster of two tomcat 5.5.9-machines using session replication. However, we also have data in application scope (set with getServletContext().setAttribute(...)) which as far as i have found in the docs, is not replicated. Is there any way to accomplish this with tomcat? If not, is there any plan to develop support for it? Do other application servers have support for this? Hope you can help me. Regards Joakim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clustering application scope replication
As it is explained in the doc : All your session attributes must implement java.io.Serializable On Fri, 22 Apr 2005 09:44:01 -0500 J. Ryan Earl [EMAIL PROTECTED] wrote: How does Tomcat know what to serialize? Does it just use the Reflection package and serialize out -everything- that implements java.io.Serializable? -ryan -Original Message- From: Lionel Farbos [mailto:[EMAIL PROTECTED] Sent: Friday, April 22, 2005 9:11 AM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Clustering application scope replication Hi For your needs, you can use session replication (http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html) or your own mechanisms and tables with datas in a database ... Regards. On Fri, 22 Apr 2005 15:15:54 +0200 Joakim Ahlén [EMAIL PROTECTED] wrote: Ok, too bad. Is there any way of storing objects if we want them in cluster scope? An ugly hack would be to use one single HttpSession with a special session-id to store global objects, and somehow fetch objects from within this HttpSession from inside requests that belongs to other sessions. I can't see how this could be done though, since request.getSession() can't fetch other sessions than its own. This would probably also have to include some tomcat specific magic which i wouldn't want. Any help is appreciated on how to handle this problem! Thanks Joakim On Fri, Apr 22, 2005 at 08:07:21AM -0500, Jess Holle wrote: The servlet spec says this data is local to a given JVM. I suppose a servlet engine could expand beyond the spec, but I'd be surprised if Tomcat did here. Joakim Ahlén wrote: Hi! We have a cluster of two tomcat 5.5.9-machines using session replication. However, we also have data in application scope (set with getServletContext().setAttribute(...)) which as far as i have found in the docs, is not replicated. Is there any way to accomplish this with tomcat? If not, is there any plan to develop support for it? Do other application servers have support for this? Hope you can help me. Regards Joakim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: Apache_MaxClients, AJP_maxThreads and jkWorker.cachesize
On Wed, 20 Apr 2005 19:12:17 +0200 Mladen Turk [EMAIL PROTECTED] wrote: Lionel Farbos wrote: Thank you again. So it means than I can have 1 local JkShmFile on my web1 and other local JkShmFile on my web2. But, if, in web1_jkStatus, I disable 1 worker from my cluster (loadbalancer), I also have to disable it from my web2_jkStatus ? Right ? Well, you can try to use the single shm file. It won't hurt trying ;) Frankly never tested that on NSF and with multiple httpd's. So, tell us if it works. Sorry Mladen, but when I put 1 shm file on a nfs mount, it doesn't work :-( So, I use 1 local shm file/web but I use a script to invoke, in one time, the disable or enable of worker on each web_jkStatus. Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk 1.2.10 + apache 1.3 issue
I also have a problem with JkMountFile and apache 1.3 on Linux. The problem is the same if I use Virtual Hosts or not : the workers don't work. If I use JkMount : it works. For more details : In my config with Virtual Hosts (and JkMountFile), I have : in /etc/apache/httpd.conf : ... Include /usr2/web/VirtualHosts/myVhost1 Include /usr2/web/etc/mod_jk.conf ... in /usr2/web/VirtualHosts/myVhost1 : VirtualHost myHost ... ServerName myVhost1 #this works : # JkMount /testServlet/* ajp13 #this doesn't work : #JkMountFile /usr2/web/VirtualHosts/testServlet.properties JkMountFile /usr2/web/etc/testServlet.properties /VirtualHost in /usr2/web/etc/testServlet.properties : /testServlet/*.jgi=ajp13 in /usr2/web/etc/mod_jk.conf : JkWorkersFile /usr2/web/etc/workers.properties JkMountCopy On JkShmFile /usr2/web/logs/mod_jk.shm Location /jkstatus JkMount status Order deny,allow Deny from all Allow from 127.0.0.1 /Location in /usr2/web/etc/workers.properties : workers.tomcat_home=/usr/local/jonas workers.java_home=/usr/local/jdk_home ps=/ worker.list=ajp13,status worker.status.type=status worker.ajp13.type=ajp13 worker.ajp13.host=myHost worker.ajp13.port=8009 worker.ajp13.lbfactor=1 When I restart apache, it's OK (so the JkMountFile is found), But when I want to get http://myVhost1/testServlet/myServlet == 404 [Wed Apr 20 18:03:47 2005] [2940:] [debug] map_uri_to_worker::jk_uri_worker_map.c (455): Attempting to map URI '/testServlet/myServlet' from 0 maps On Wed, 20 Apr 2005 11:49:26 -0400 Guernsey, Byron \(GE Consumer Industrial\) [EMAIL PROTECTED] wrote: Why have worker.list? The goal of the worker.list is to publish a worker to make it available to JkMount, correct? Why not have: worker.jvmRoute.type=ajp13 worker.jvmRoute.host=10.0.0.1 worker.jvmRoute.port=8009 worker.jvmRoute.mountable=1 And then construct the available workers for jkmount after the initialization of each worker, eliminating the worker.list altogether? Thanks for the response. I haven't found the issue yet. There is no VirtualHost setup on this particular server. I had changed JK1 to allow for long worker.list lines by increasing the LINE_LENGTH to 4K. This worked just fine under Apache 2 and we haven't seen any issues in the JK1 code or cookies with respect to the ':' in the JVM Routes. To you it might seem easier to change the jvmRoute, but unfortunately there are literally 100's of production app servers that would need changed and restarted. It wouldn't be easy at all and would require every app to be retested- which is quite a task with this many applications. We face some large scale problems that most users of tomcat/jk don't see because we have so many applications. I'm going to try loading the same jk config files on an apache 2 build of JK1 and see if I have the same issues- if so then I'll know its somewhere in my config. If not, then I'll know that there is some difference in behavior between jk1 on apache 1.3 and apache 2.0. As I mentioned before, the error I saw in the logs NULL factory for ajp13*ajp13 makes me believe there was a problem during parsing of the config since I never explicitly specify ajp13*ajp13 as a value anywhere. So perhaps the modified LINE_LENGTH of 4K works fine with apache 2, but runs into issues on Apache 1.3. Byron -Original Message- From: Mladen Turk [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 20, 2005 8:19 AM To: Tomcat Users List Subject: Re: jk 1.2.10 + apache 1.3 issue Guernsey, Byron (GE Consumer Industrial) wrote: It uses a urimap.properties file instead of JkMounts. OK. The config directives in httpd.conf look like: IfDefine MOD_JK JkLogLeveldebug JkShmSize 300 JkShmFile /usr/local/apache/logs/jk1-ssodev.shm JkWorkersFile /usr/local/apache/conf/workers_sso.properties JkMountFile /usr/local/apache/conf/uriworkermap_sso.properties JkLogFile /usr/local/apache/logs/mod_jk-ssodev.log JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkRequestLogFormat %w %V %T Location /jkstatus/ JkMount jkstatus Order deny,allow Deny from all Allow from 3. Allow from 127. /Location /IfDefine As you can see from my previous posting, not even jkstatus works, nor do any workers. Yet, they are configured properly and the jk log shows that it finds them: Well, just try the worker names without a colon. The reason for why we are forcing the alnum chars only is because the special chars needs to be url encoded if the client does not support the cookies. So it's easier and safer anyhow to rename the jvmRoutes in server.xml. Also for jkstatus. If you are calling that from some virtual host, you will need to have 'JkMountCopy On' directive in root, or define the Location in that virtual host. Also any workers.propeties
Apache_MaxClients, AJP_maxThreads and jkWorker.cachesize
Hi, I have 1 Linux Virtual Server (with round robin) + 2 apache 1.3 servers + 3 Tomcat servers load-balanced with mod_jk1.2.10. 1) If each Apache define : MaxClients=150 1.1) what must be the value for each Tomcat Connector AJP maxThread ? 1.2) is the value for each worker.cachesize have to be put ? 2) for my 2 apache 1.3 servers, I must have only 1 JkShmFile on an nfs mount RW ? Right ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk 1.2.10 + apache 1.3 issue
On Wed, 20 Apr 2005 18:48:24 +0200 Mladen Turk [EMAIL PROTECTED] wrote: Lionel Farbos wrote: VirtualHost myHost ServerName myVhost1 #this works : # JkMount /testServlet/* ajp13 #this doesn't work : #JkMountFile /usr2/web/VirtualHosts/testServlet.properties JkMountFile /usr2/web/etc/testServlet.properties Well, the mount files are overriden if JkMountCopy On is set. So if you have: JkMountFile A JkMountCopy On VirtualHost ... JkMountFile B # This file will never be used, because # mount copy says: Use the file from the Root /VirtualHost Thank you Mladen, but I tried also this : VirtualHost ... JkMountFile B /VirtualHost (without JkMountFile A and JkMountCopy On) and this doesn't work either :-( - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache_MaxClients, AJP_maxThreads and jkWorker.cachesize
Thank you again. On Wed, 20 Apr 2005 18:56:06 +0200 Mladen Turk [EMAIL PROTECTED] wrote: Each apache instance needs it's own shared memory. So it means than I can have 1 local JkShmFile on my web1 and other local JkShmFile on my web2. But, if, in web1_jkStatus, I disable 1 worker from my cluster (loadbalancer), I also have to disable it from my web2_jkStatus ? Right ? Lionel Farbos wrote: Hi, I have 1 Linux Virtual Server (with round robin) + 2 apache 1.3 servers + 3 Tomcat servers load-balanced with mod_jk1.2.10. 2) for my 2 apache 1.3 servers, I must have only 1 JkShmFile on an nfs mount RW ? Right ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk 1.2.10 + apache 1.3 issue
On Wed, 20 Apr 2005 19:07:28 +0200 Mladen Turk [EMAIL PROTECTED] wrote: Lionel Farbos wrote: but I tried also this : VirtualHost ... JkMountFile B /VirtualHost (without JkMountFile A and JkMountCopy On) and this doesn't work either :-( Well, then it's a bug :) I'll check that, to see how it can be fixed. When you test this feature, I think it was OK for you. So what is your test config ? Apache 2 ? Windows ? If I want to use this feature with this jk1.2.10, I have to upgrade my web server in apache 2.0.54 ? Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom 404 page when a webapp is stopped by the manager
Hi, If you use apache and mod_jk, an issue could be : when you stop your Context, you change your JkMount towards a custom Tomcat Context that display your desired error-page. If you use a Tomcat standalone, I don't kown how to ... :-( Regards. On Wed, 6 Apr 2005 13:08:30 -0400 Pascal Gauthier [EMAIL PROTECTED] wrote: Hi, we have a tomcat webapp that needs to be down if we are doing a maintenance to the database. The manager seems to be the perfect solution to make the application unavailable but we found out that the 404 error-page cannot be customized. Even if we modified the default web.xml (in conf/) to add the error-page 404, it doesn't seems to be resolved when the context is stopped. If I type an URL that doesn't exists, that doesn't map to any context, I get the right error page. But if it match a context path of a webapp that is stopped, I have the Tomcat default error page. Is there a way to fix this? Are we the only one trying to have a custom error page when the webapp is down? thanks in advance pascal. - 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: Tomcat scalability
Hi, If you want to use Tomcat for high loads, I suggest you to use apache/mod_jk and a cluster of Tomcat instances. With this solution you'll have load-balancing and failover for a lot of users. I don't use a HP very powerful, so, for the performances, I don't know if it is better to have one instance or several instances, but for the administration (applications upgrades, ...) and failover it is better to have several ones. For high performances, some readings : http://cvs.apache.org/~woolfel/benchmark_summary.pdf http://cvs.apache.org/~woolfel/tc_results.html http://brandlay.com/wojtek/publ/tomcat.jsp http://marc.theaimsgroup.com/?l=tomcat-userm=110906276815396w=2 http://www.servlets.com/cos/javadoc/com/oreilly/servlet/CacheHttpServlet.html http://simpleweb.sourceforge.net/performance/comparison.php a tool to test performances : Jmeter (http://jakarta.apache.org/jmeter/) Regards. On Thu, 07 Apr 2005 10:29:22 +0530 Shrikant Navelkar [EMAIL PROTECTED] wrote: Hi, We are planning to deploy an application (JSP/Tomcat/Oracle) for 300-400 concurrent users. The hardware is HP/True UNIX platform and it is very powerful. Unfortunately we can not deploy the application in a phased wise manner. Can somebody help us to understand : 1. How scalable Tomcat is ? Are there sufficient examples of Tomcat for 300 + users ? 1. What are the tools available for scalability testing ? 2. Any document describing performance tuning of Tomcat server 3. Can we implement multiple tomcat instances on same server for better performance ? Thanks in advance Shrikant - 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: session management
Hi, A cookie is attached to one IP/browser. So, if the same browser do : httpServletRequest.getSession() it recovers the same httpSession as before (if it already exists). But when you come from another browser, the same httpSession is not recovered. For your needs, I think you can do something like this : Use a database in which you store sessionIds when they are created, and you can associate all the parameters you want to this Id (login,context,...). When a new browser wants to use to same session as other, it invokes a special servlet with the required parameters; Then, this servlet take the desired sessionId in database and returns it as a cookie (So, here, you case use httpServletResponse.addCookie(...)). So, your second browser will store the same sessionId as the 1st one and will use the same Context... Perhaps there are other ways to do this, but I think this one can work. Regards. On Sat, 2 Apr 2005 12:07:26 -0800 (PST) Jagadeesha T [EMAIL PROTECTED] wrote: Hi, Thanks the reply, My requirement is little different. I want to have many browser instaces (2 or more)to use the same session. In my first.jsp, on first hit, i will get the session and store it. Again,if the first jsp is hit for the second time. It should use the same session. SO, I will not let it allow to create a new one. Instead use the one already stored for user. I have to do like this since the user login is done from a Java Applacition(Swing). If the user wants to go to a browser. User has to click on the button (Swing UI) that will launch the browser. each click on the button should launch a browser. I want all those browsers launched for that login to use a shared session object. Could you tell How can I do it. I tried by setting the cookie at the first.jsp when the second browser launch(Coolke which had created at the first hit). addCookie, In one of the middle jsps, there is response.sendRedirect(response.encodeURL(samepage?somename=somevalue)) Every time,it is failing here, response.sendRedirect(); //When it is reloaded i have observerd that it is not getting the cookie in the headers. I don't understand why the browser not sending the cookie. cookie is not disabled. Scenario 2. If all browser uses different session objects. then it works fine. could you tell me is there any way to get this done? Thanks, Jagadish Lionel Farbos [EMAIL PROTECTED] wrote: On Thu, 31 Mar 2005 11:41:55 -0800 (PST) Jagadeesha T wrote: Hi all, I want to set session in httpservletresponse object, Is there any way to do it. Otherthan response.addCookie(), or response.encodeURL(); Is there any way to set the Jsession In headers, So that it gets that in the next Jsp by request object, If I use addCookie of response object, It fails if any where encodeURL is used. If i user encodeURL, every JSP needs to updated with that method. Please if anybody knows tell the way that can be done. You don't have to create yourself the cookie. You create the HttpSession with HttpServletRequest.getSession() or HttpServletRequest.getSession(boolean) Then, the session is created and the cookie JSESSIONID is added to the HttpServletResponse. So, the next time you'll invoke a servlet or JSP in the same Context (with the same browser), the Cookie JSESSIONID will be attached to your request. If you have clustered your Tomcat, the JSESSIONID will have a suffix ., so, if you use the mod_jk to load-balance your tomcat clustered servers, your request will be sent to the same tomcat (as the precedent). Enjoy Thanks, Jagadeesha T - Do you Yahoo!? Better first dates. More second dates. Yahoo! Personals - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Better first dates. More second dates. Yahoo! Personals - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Kill running thread before tomcat stop
On Mon, 4 Apr 2005 17:04:39 +0200 Edouard Dalla-Costa [EMAIL PROTECTED] wrote: Hello, I am using tomcat 5.0.30 which is working well. However I encountered a problem when I want to stop it. When I stop Tomcat, it calls the destroy method which is supposed to kill all my running threads but it goes to fast. So I was wondering if there was a proper way to make tomcat waiting until all my threads are down?? No there is no proper way to do this with Tomcat. You have to hack your code. More details here : http://issues.apache.org/bugzilla/show_bug.cgi?id=33589 http://issues.apache.org/bugzilla/show_bug.cgi?id=33967 Regards Thanx by advance Edouard - 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: session management
On Thu, 31 Mar 2005 11:41:55 -0800 (PST) Jagadeesha T [EMAIL PROTECTED] wrote: Hi all, I want to set session in httpservletresponse object, Is there any way to do it. Otherthan response.addCookie(), or response.encodeURL(); Is there any way to set the Jsession In headers, So that it gets that in the next Jsp by request object, If I use addCookie of response object, It fails if any where encodeURL is used. If i user encodeURL, every JSP needs to updated with that method. Please if anybody knows tell the way that can be done. You don't have to create yourself the cookie. You create the HttpSession with HttpServletRequest.getSession() or HttpServletRequest.getSession(boolean) Then, the session is created and the cookie JSESSIONID is added to the HttpServletResponse. So, the next time you'll invoke a servlet or JSP in the same Context (with the same browser), the Cookie JSESSIONID will be attached to your request. If you have clustered your Tomcat, the JSESSIONID will have a suffix .jvmRoute, so, if you use the mod_jk to load-balance your tomcat clustered servers, your request will be sent to the same tomcat (as the precedent). Enjoy Thanks, Jagadeesha T - Do you Yahoo!? Better first dates. More second dates. Yahoo! Personals - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Proper way to open threads in a servlet
Your question is not really Tomcat so I put it Off Topic. On Fri, 1 Apr 2005 15:24:10 +1000 Steve Vanspall [EMAIL PROTECTED] wrote: Hi there, I am concerned that opening a thread in my serlvet using new Thread(Runnable) style code, is causing a massive hang in my system. I don't understand why this hang your system !?... You can't do like this but don't forget to daemonize your thread. If you don't want your thread to run in the same JVM as Tomcat, you can send a message to a daemon; then the daemon (in another JVM and/or another server) will receive the messages and treat them (in new Threads). To send messages, you can use JMS (so, you need a JMS server) or sockets TCP or UDP (see java.net). Basically what the thread does is email people to notify them of a change in an order on the system. I want the emails to be sent in a separate thread so that the user doesn't have to wait for this to complete to return to the system. Basically the email is a non crucial part, the action has already been performed. I know this isn't specifically a Tomcat question, but I thought I would ask it anyway. The two ways this could work is that the email is placed in a queue, that is checked periodically, or just somehow the email(s) are sent in the background, but without opening a new thread using code. Can anyone give me some pointers on how to do this. Yes I have been searching around, but haven't found much information. Tahnks in advance Steve - 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: [OT] Proper way to open threads in a servlet
On Fri, 1 Apr 2005 11:45:40 +0100 Mark Benussi [EMAIL PROTECTED] wrote: I would place your e-mail in a MailManager that queues the messages and sends them out on a TimerTask (Every 10 seconds???). Secondly from a pernickety perspective I would not have a Servlet doing any of what you described. At least place this code a level down in a Manager class that can coordinate with the MailManager. But the MailManager you speak about, doesn't exist in Tomcat. So, it runs in the Tomcat's jvm (I understood Steve didn't want this) or in other jvm ? And, if it is in another jvm, how your servlet communicate with the MailManager ? Rather than TimerTasks, a good issue for these needs could be Quartz (http://www.opensymphony.com/quartz/) -Original Message- From: Lionel Farbos [mailto:[EMAIL PROTECTED] Sent: 01 April 2005 11:39 To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: [OT] Proper way to open threads in a servlet Your question is not really Tomcat so I put it Off Topic. On Fri, 1 Apr 2005 15:24:10 +1000 Steve Vanspall [EMAIL PROTECTED] wrote: Hi there, I am concerned that opening a thread in my serlvet using new Thread(Runnable) style code, is causing a massive hang in my system. I don't understand why this hang your system !?... You can't do like this but don't forget to daemonize your thread. If you don't want your thread to run in the same JVM as Tomcat, you can send a message to a daemon; then the daemon (in another JVM and/or another server) will receive the messages and treat them (in new Threads). To send messages, you can use JMS (so, you need a JMS server) or sockets TCP or UDP (see java.net). Basically what the thread does is email people to notify them of a change in an order on the system. I want the emails to be sent in a separate thread so that the user doesn't have to wait for this to complete to return to the system. Basically the email is a non crucial part, the action has already been performed. I know this isn't specifically a Tomcat question, but I thought I would ask it anyway. The two ways this could work is that the email is placed in a queue, that is checked periodically, or just somehow the email(s) are sent in the background, but without opening a new thread using code. Can anyone give me some pointers on how to do this. Yes I have been searching around, but haven't found much information. Tahnks in advance Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: annoying popup in manager app
On Fri, 01 Apr 2005 06:47:15 -0500 Tim Funk [EMAIL PROTECTED] wrote: sorry if I find this funny, but I just saw a bugzilla complaint requesting another confirmation screen. As to your question, i don't know. -Tim teknokrat wrote: Whenever i need to reload a webapp in the manager in tomcat 5.5.7 I get an annoying popup asking me if i am sure Is there any way to turn off this annoying thing. I think you can configure your browser to not activate javaScript.. But you'll have perhaps other problems... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WAR files and web.xml
For the same needs, I use the Context.xml outside the war. use the tags Parameter .../ to pass your admin parameters. Regards. On Fri, 1 Apr 2005 08:26:37 -0500 Mark [EMAIL PROTECTED] wrote: I have a question concerning the generation of a war file and my web.xml file. I want to create a WAR file for my web application using Ant, and place my web.xml file into the WAR file. The problem I have is that once the web.xml file is placed into the web.xml file, users/admins will not be able to make changes to the configuration parameters in the web.xml file. For instance, I have a servlet that I load at tomcatstartup and it reads configuration information from the web.xml. Now if the web.xml file has to be placed into the WAR file, a customer will not be able to customize the values contained in the web.xml file. So, am I missing something, or is this how everything is supposed to work? Thank you. - 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: [ANN] JK 1.2.10 Released
Hi Mladen, Thank you for this release. Some questions : - Why don't you provide any more a binary release for linux (since 1.2.6) ? - I've not found any documentation on the status worker (and web page) and the ability to reload jk configuration without a reload of apache. Can you tell me more about these new features (or give me a link I missed) ? Thanks in advance. Regards. On Thu, 31 Mar 2005 08:52:31 +0200 Mladen Turk [EMAIL PROTECTED] wrote: The Apache Jakarta Tomcat team is proud to announce the immediate availability of Jakarta Tomcat Connectors 1.2.10. The release contains a significant number of bug fixes and new features. Please see the http://jakarta.apache.org/tomcat/connectors-doc/changelog.html for a full list of changes. With release 1.2.10 the JkShmFile property has been added for Apache 1.3.x and Apache 2.x web servers on UNIX and LINUX platforms. Load balancer will not work properly if this directive is not present. Please refer to the change log for the list of changes: http://jakarta.apache.org/tomcat/connectors-doc/changelog.html Sources can be found at: http://www.apache.org/dist/jakarta/tomcat-connectors/jk/source/jk-1.2.10/ Binaries can be found at: http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/ For now there is only a set of win32 binaries: http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/win32/jk-1.2.10/ If you find any bugs while using this release, please fill in the http://issues.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%205 Bug Report. When entering bug select Native:JK Component. The Jakarta Tomcat Connectors Team. - 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: Apache as front-end for several tomcat
Use one Logger per apache Virtual Host; something like that : VirtualHost demo1.myweb.org:81 ServerName demo1.myweb.org CustomLog /var/log/demo1_vhost_access.log combined JkMount / demo1 ... /VirtualHost VirtualHost demo2.myweb.org:81 ServerName demo2.myweb.org CustomLog /var/log/demo2_vhost_access.log combined JkMount / demo2 ... /VirtualHost ... And, I think you have to have a config with a JkMount on / Regards On Thu, 31 Mar 2005 13:50:15 +0200 Christophe Lemaire [EMAIL PROTECTED] wrote: Oh, I forgot to say I can't see which virtual host is used in the access_log. How can I do that? Here is what I have in the access log : 194.78.221.136 - - [31/Mar/2005:13:41:11 +0200] GET / HTTP/1.1 401 942 194.78.221.136 - - [31/Mar/2005:13:41:11 +0200] GET / HTTP/1.1 401 942 Christophe There are 3 backend servers, 2 servers run one Tomcat on standard ports and 1 server runs two Tomcat on different ports (see file workers.porperties). For the log file, I have only 1 log file for all the workers defined in mod_jk.conf by the following line : # Where to put jk logs JkLogFile logs/mod_jk.log So I don't have any info about the other workers. If you are talking about the other tomcat, I can access them directly via their IP and port with a browser on the LAN. So I can say all the tomcat servers are up and running. The strange thing is that this setup works fine with mod_JK2. But I would like to have a setup with JK1 since JK2 is not supported anymore. Regards, Christophe On 31-mars-05, at 01:28, Montz, James C. (James Tower) wrote: Are the Tomcat instance running on the same physical server and you are just using IP Aliases, or are the workers running on 3 sperate backend machines? You apache config looks OK, so I don't believe its an issue with Apache Virtual Host configuration. I believe all work in being forwarded to Demo1 only. I believe you can have multiple instances of tomcat listening on the same port by specifying an IP address in the connector. But I find it much easier just to congigure each instance to listen on a different port. If you check your other 2 workers log files, you will probably see an error similar to Bind address already in use. Modify each Tomcat instance to the SHUTDOWN and AJP listener are each on unique ports; For example, In each respective instance server.xml use; Demo1 Shutdown: 8001 Demo1 HTTP: 8081 Demo1 AJP Listener: 8101 Demo2 Shutdown: 8002 Demo2 HTTP: 8082 Demo2 AJP Listeer: 8102 Demo3 Shutdown: 8003 Demo3 HTTP: 8083 Demo3 AJP Listern: 8103 Restart each instance (check the catalina.out for errors) Modify your workers.properties file to relect the new AJP listen ports Restart Apache -Original Message- From: Dan Barron [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 30, 2005 3:48 PM To: Tomcat Users List; Tomcat Users List Subject: Re: Apache as front-end for several tomcat If you are running multiple instances of Tomcat, from what I understand and from my configuration (i run two Tomcat/mod_jk2 with Apache) you would then need each of them to listen on a different port. Right now the only instance that will receive requests via the worker is the instance that is using port 8009. At 01:33 PM 3/30/2005, Christophe Lemaire wrote: Not sure. I have seen several config of name based virtual hosts that listen on the same port. On 30-mars-05, at 23:02, Didier McGillis wrote: would it be the fact that your sending the requests through the same port number? From: Christophe Lemaire [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: tomcat-user@jakarta.apache.org Subject: Apache as front-end for several tomcat Date: Wed, 30 Mar 2005 22:12:27 +0200 Hello, I would like to setup a Apache 2.0.53 as front-end for several Tomcat 5.0.19. I use JK1.2.8 as connector. I have defined one worker per tomcat server. I use three name based virtual hosts in the apache config. The problem is only the first virtual host works. In the mod_jk.log, I can see that every request sent to the apache are checked with the JkMount from the first virtual host only. Here are my config files : workers.properties --- worker.list=demo1,demo2,demo3,stat worker.demo1.type=ajp13 worker.demo1.host=192.168.0.1 worker.demo1.port=8009 worker.demo2.type=ajp13 worker.demo2.host=192.168.0.2 worker.demo2.port=8009 worker.demo3.type=ajp13 worker.demo3.host=192.168.0.3 worker.demo3.port=8009 worker.stat.type=ajp13 worker.stat.host=192.168.0.3 worker.stat.port=7201 - end of workers.properties --- In the httpd.conf file, I include the file mod_jk.conf (no other virtual hosts are defined in httpd.conf):
Re: use of Delegate ...
On Sat, 26 Mar 2005 16:46:44 +0100 Simon Kitching [EMAIL PROTECTED] wrote: I don_t understand; If you want jars from the war-specific WEB-INF/lib to be used BEFORE the common/lib version, then the default classloading order (child-first) is exactly what you want, isn_t it? yes, in my example, it's exactly this. It_s the other order I_m puzzled about: why someone would want common/lib to come before WEB-INF/lib (parent-first). Sorry, I have no example for this use; Perhaps for better performances (when you know that classes are in the parent classloader) ... or perhaps this feature is mandatory ?... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No bug with Delegate !
Hi, Sorry but my preceding analysis was false : I have a problem but NOT with the delegate. So, I reexplain the case : 1- I have $CATALINA_HOME/common/lib/mysql-connector-java-2.0.14-bin.jar $CATALINA_HOME/common/lib/naming-factory-dbcp.jar 2- I have a war with WEB-INF/lib/mysql-connector-java-3.0.15-ga-bin.jar WEB-INF/lib/naming-factory-dbcp.jar in my test, I do : Class driver = Class.forName(org.gjt.mm.mysql.Driver); URL ressource = driver.getClassLoader().getResource(org/gjt/mm/mysql/Driver.class); out.println( ClassForname==+ressource ); If, in my Context element, I put a Loader with delegate=false (the default), it prints : ClassForname==jar:file:/usr/local/tomcat/webapps/myContext/WEB-INF/lib/mysql-connector-java-3.0.15-ga-bin.jar!/org/gjt/mm/mysql/Driver.class If I put delegate=true, it prints : ClassForname==jar:file:/usr/local/tomcat/common/lib/mysql-connector-java-2.0.14-bin.jar!/org/gjt/mm/mysql/Driver.class So delegate works as it is expected. My problem is that, in my first test, I did : Context ctx = new InitialContext(); DataSource dataSource = (DataSource)ctx.lookup(java:/comp/env/jdbc/myDB); URL ressource = dataSource.getClass().getClassLoader().getResource(org/gjt/mm/mysql/Driver.class); out.println( JndiForname==+ressource ); and, in this case, I always have : ClassForname==jar:file:/usr/local/tomcat/common/lib/mysql-connector-java-2.0.14-bin.jar!/org/gjt/mm/mysql/Driver.class So, for now, I don't find the solution to use the Driver inside the war :-( But this is another problem... Sorry Remy for the bad bug report. On Wed, 23 Mar 2005 17:26:34 +0100 Lionel Farbos [EMAIL PROTECTED] wrote: Hi Simon, I wanted to use this flag because, in my $CATALINA_HOME/common/lib, I have mysql-connector-java-2.0.14-bin.jar but, in some wars, I have WEB-INF/lib/mysql-connector-java-3.0.15-ga-bin.jar WEB-INF/lib/naming-factory-dbcp.jar and in other wars, I don't have any Driver Mysql So, I'd want the war_WEB-INF/lib/Mysql_jar to be taken BEFORE the common/lib/Mysql_jar one when it is possible and the common/lib/Mysql_jar to be taken in other cases. So I tried to put Loader className=org.apache.catalina.loader.WebappLoader delegate=false / or Loader className=org.apache.catalina.loader.WebappLoader delegate=true / in my Context.xml But it is always the common/lib/jar one which is taken :-(( I don't know if it is a bug or a bad config from me If a Tomcat Developer can say to me what I am wrong ... Note : To confirm the Driver version, I print : dataSource.getClass().getClassLoader().getResource(org/gjt/mm/mysql/Driver.class); Cheers On Sat, 19 Mar 2005 17:44:40 +1300 Simon Kitching [EMAIL PROTECTED] wrote: Hi, I see here that there is an option for the webapp-specific classloader to use parent-first classloading instead of the (default) child-first classloading. Can someone suggest why this might be useful? Clearly someone thought so, but I can't see any point in it. It is in catalina since version 1.1 (committer: Remy Maucherat). See delegate option in this page: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/loader.html Using this option makes life exceedingly complicated for some libs like commons-beanutils and commons-logging, so I would like to know under what conditions someone might enable this feature. Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HELP: How the DBCP works ? (and the JMXProxy)
On Wed, 23 Mar 2005 17:40:05 +0100 Lionel Farbos [EMAIL PROTECTED] wrote: Hi all (tomcat 5.5 developers), In my context.xml, I use a DataSource like this : Resource auth=Container name=myDB type=javax.sql.DataSource .../ So, I suppose the dataSource.getConnection() is taken from DataBase Connection Pool... 1- But How do this works ? 2- If all my contexts have their own DataSource, each context have their own Pool ? No response but I suppose there is one pool for each DataSource... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unpackWARs incomplete when deployed with context.xml
On Wed, 16 Mar 2005 18:01:47 +0100 Lionel Farbos [EMAIL PROTECTED] wrote: Hi all, After some tests on TC4.1.31, deployment with context.xml and war unpacked, my unpacked tree is incomplete : static files, JSPs files and properties files (including web.xml) are missing :-( (but the Context is working fine) Is it the normal behaviour or I miss something ? I don't know This is the same with TC5.5 ? NO : it works well on TC5.5.7 : the war is copied in Host.appBase, then completely unpacked - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 5.0.25 question
Eric, If you can, rather than upgrading the only jdk in development, I suggest you upgrading the tomcat version too (-5.5) Some arguments : - Tomcat 5.5 is natively implemented for jdk1.5 - Tomcat 5.0 has no maintainer (so Tomcat 5.0.30 is always in beta because nobody can vote for it...); all the developpers work on Tomcat5.5 - Tomcat 5.5 is more performant than Tomcat 5.0. Cheers, and good tests. On Wed, 23 Mar 2005 14:33:29 -0800 Eric Moreo [EMAIL PROTECTED] wrote: David and Lionel, Thank you both for your input. I think I am going to experiment with upgrading to jdk 1.5 in development to see how it works. I'll post my results just in case anyone else ever has this issue. Eric -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 23, 2005 11:25 AM To: Tomcat Users List Subject: Re: tomcat 5.0.25 question I have it working here on Tomcat 5.0.x, JDK 5, WinXP -- no problems to note so far and I installed it from a binary download. The only gotcha that I know about is you can't build for JDK 5 and then use it on JDK 1.4.x --David Lionel Farbos wrote: I don't know where you can find more details ... but Tomcat 5.0.x is built for jdk1.4 So, I don't think you can use jdk1.5 with it... On Wed, 23 Mar 2005 09:32:28 -0800 Eric Moreo [EMAIL PROTECTED] wrote: Hello, Last year I downloaded the Tomcat 5.0.25 binary for Solaris and installed it with java sdk 1.4.2. I now want to upgrade to the java sdk 1.5 but I don't want to upgrade Tomcat yet. I am trying to determine if this upgrade will affect my version of Tomcat. One piece of information that I cannot find on the Tomcat website is information about how the Tomcat binaries were built. Specifically, was it compiled using the java compiler from sdk 1.4, 1.5 or some other version of the sdk? If my version of Tomcat was built with javac from the java sdk 1.5 then I know my upgrade should go smoothly. If anyone knows where I can find the details of how the Tomcat binaries were built it would be greatly appreciated. Thanks, Eric Moreo Web Developer Art Center College of Design x2392 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Address localhost:8080 already in use
killall java and re-start only one Tomcat instance On Wed, 23 Mar 2005 16:29:58 -0800 Fredrik Liden [EMAIL PROTECTED] wrote: Here is a big problem that I've run into so many times. I run start tomcat. And then by accident I start it again while it is running. After that I can't shut it down again. And if I try to run it it says the address is in use. Have someone found any solution to this problem? Any suggestions would be appreciated. /Fredrik - 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]
HELP: How the DBCP works ? (and the JMXProxy)
Hi all (tomcat 5.5 developers), In my context.xml, I use a DataSource like this : Resource auth=Container name=myDB type=javax.sql.DataSource .../ So, I suppose the dataSource.getConnection() is taken from DataBase Connection Pool... 1- But How do this works ? 2- If all my contexts have their own DataSource, each context have their own Pool ? 3- How Do I Manage these Pools ? I'd want to test with the JMX Proxy but I don't succeed in the good URL for asking the only MBean I'm interested in... I test : http://localhost:8080/manager/jmxproxy/?get=%3Atype=RequestProcessor%3C I have a section with the desired MBean : Name: Catalina:type=DataSource,path=/myContext,host=localhost,class=javax.sql.DataSource,name=myDB But I don't succeed with : http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DDataSource%2Cpath%3D/myContext%2Chost%3Dlocalhost%2Cclass%3Djavax.sql.DataSource%2Cname%3D%22myBD%22%3Catt=maxActive ... or something like this... I need help, please. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bug with Delegate ?
Hi Simon, I wanted to use this flag because, in my $CATALINA_HOME/common/lib, I have mysql-connector-java-2.0.14-bin.jar but, in some wars, I have WEB-INF/lib/mysql-connector-java-3.0.15-ga-bin.jar WEB-INF/lib/naming-factory-dbcp.jar and in other wars, I don't have any Driver Mysql So, I'd want the war_WEB-INF/lib/Mysql_jar to be taken BEFORE the common/lib/Mysql_jar one when it is possible and the common/lib/Mysql_jar to be taken in other cases. So I tried to put Loader className=org.apache.catalina.loader.WebappLoader delegate=false / or Loader className=org.apache.catalina.loader.WebappLoader delegate=true / in my Context.xml But it is always the common/lib/jar one which is taken :-(( I don't know if it is a bug or a bad config from me If a Tomcat Developer can say to me what I am wrong ... Note : To confirm the Driver version, I print : dataSource.getClass().getClassLoader().getResource(org/gjt/mm/mysql/Driver.class); Cheers On Sat, 19 Mar 2005 17:44:40 +1300 Simon Kitching [EMAIL PROTECTED] wrote: Hi, I see here that there is an option for the webapp-specific classloader to use parent-first classloading instead of the (default) child-first classloading. Can someone suggest why this might be useful? Clearly someone thought so, but I can't see any point in it. It is in catalina since version 1.1 (committer: Remy Maucherat). See delegate option in this page: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/loader.html Using this option makes life exceedingly complicated for some libs like commons-beanutils and commons-logging, so I would like to know under what conditions someone might enable this feature. Regards, Simon - 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: bug with Delegate ?
Hi Simon, I wanted to use this flag because, in my $CATALINA_HOME/common/lib, I have mysql-connector-java-2.0.14-bin.jar but, in some wars, I have WEB-INF/lib/mysql-connector-java-3.0.15-ga-bin.jar WEB-INF/lib/naming-factory-dbcp.jar and in other wars, I don't have any Driver Mysql So, I'd want the war_WEB-INF/lib/Mysql_jar to be taken BEFORE the common/lib/Mysql_jar one when it is possible and the common/lib/Mysql_jar to be taken in other cases. So I tried to put Loader className=org.apache.catalina.loader.WebappLoader delegate=false / or Loader className=org.apache.catalina.loader.WebappLoader delegate=true / in my Context.xml But it is always the common/lib/jar one which is taken :-(( I don't know if it is a bug or a bad config from me If a Tomcat Developer can say to me what I am wrong ... Note : To confirm the Driver version, I print : dataSource.getClass().getClassLoader().getResource(org/gjt/mm/mysql/Driver.class); Cheers On Sat, 19 Mar 2005 17:44:40 +1300 Simon Kitching [EMAIL PROTECTED] wrote: Hi, I see here that there is an option for the webapp-specific classloader to use parent-first classloading instead of the (default) child-first classloading. Can someone suggest why this might be useful? Clearly someone thought so, but I can't see any point in it. It is in catalina since version 1.1 (committer: Remy Maucherat). See delegate option in this page: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/loader.html Using this option makes life exceedingly complicated for some libs like commons-beanutils and commons-logging, so I would like to know under what conditions someone might enable this feature. Regards, Simon - 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: tomcat 5.0.25 question
I don't know where you can find more details ... but Tomcat 5.0.x is built for jdk1.4 So, I don't think you can use jdk1.5 with it... On Wed, 23 Mar 2005 09:32:28 -0800 Eric Moreo [EMAIL PROTECTED] wrote: Hello, Last year I downloaded the Tomcat 5.0.25 binary for Solaris and installed it with java sdk 1.4.2. I now want to upgrade to the java sdk 1.5 but I don't want to upgrade Tomcat yet. I am trying to determine if this upgrade will affect my version of Tomcat. One piece of information that I cannot find on the Tomcat website is information about how the Tomcat binaries were built. Specifically, was it compiled using the java compiler from sdk 1.4, 1.5 or some other version of the sdk? If my version of Tomcat was built with javac from the java sdk 1.5 then I know my upgrade should go smoothly. If anyone knows where I can find the details of how the Tomcat binaries were built it would be greatly appreciated. Thanks, Eric Moreo Web Developer Art Center College of Design x2392 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with BASIC authentication
Hi, Compared to Manager's web.xml, it seems you don't have the section resource-env-ref with the link to your user DataBase. Perhaps, try to put the role names without a - (rather a _ or nothing) Cheers. On Thu, 17 Mar 2005 10:49:29 +0530 Karanjkar, Sanjay V \(IT\) [EMAIL PROTECTED] wrote: Hi, Anyone had a chance to look at this one yet? Thanks Sanjay -Original Message- From: Karanjkar, Sanjay V (IT) Sent: 15 March 2005 11:19 To: tomcat-user@jakarta.apache.org Subject: Problem with BASIC authentication Hi, I have the following setup: 1. A copied version of Tomcat 4.1.24 on Unix (i.e. I have merely *copied* the entire tomcat folder from another installed location instead of installing it) 2. My application WAR file referenced by the following Context in Server.xml: Context path=/ieg-sc docBase=/var/tmp/DEV/install/common/lib/tc.ieg.war reloadable=true debug=99 privileged=true ResourceLink name=users type=org.apache.catalina.UserDatabase global=UserDatabase/ /Context 3. My app's web.xml has the following: security-constraint web-resource-collection web-resource-nameMy Application/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-nameieg-sc-user/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint !-- Define the Login Configuration for this Application -- login-config auth-methodBASIC/auth-method realm-nameMy Application/realm-name /login-config security-role role-nameieg-sc-user/role-name /security-role 4. I have defined the user/role in conf/tomcat-users.xml: ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=ieg-sc-user/ user username=userid password=passwd roles=ieg-sc-user/ /tomcat-users When I start tomcat, everything seems to run fine except that I do not get a login window! I have gone over the setup so many times now, I'm going madHave I missed something? Is it because I've copied the tomcat binaries instead of installing it? If so, why does authentication work correctly for the inbuilt Manager application..? Appreciate if you could help me.. Thanks and regards Sanjay Karanjkar NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - 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: Reload webapp and context
Hi, To reload, start, stop, deploy, undeploy contexts see the Manager : http://jakarta.apache.org/tomcat/tomcat-5.5-doc/manager-howto.html I don't know your tomcat version, but it works since TC 4. Cheers. On Thu, 17 Mar 2005 08:32:54 +0100 Roland Carlsson [EMAIL PROTECTED] wrote: Hi! I have a problem with an webapp with deploying webapps. The problem is the contextfile that since my development environment differs a little to my deployment environment have to be edited a little after deployment. But how do I force tomcat to re-load the context? Right now the only way I know about is to reboot tomcat witch leads to a full stop of all my web-apps instead of only one witch in turn leads to more complaints from my users. So, is there a way to force reload of the context when reloading the web-app? Thanks in advance Roland Carlsson - 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: Loading System Library After Reloading Webapp
Hi, see the lifecycle listeners in your Context : http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html You receive start Events or Stop Events. Another issue: Your problem is because the native library is loaded by the Application ClassLoader. If you can loaded it by the Common ClassLoader, perhaps you won't have this problem... see there: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html Cheers. On Thu, 17 Mar 2005 09:22:55 +0100 Thomas Chille [EMAIL PROTECTED] wrote: Nobody out there who could help me, please? Could this this eventuelly be a solution: Is it possible to register a class on tomcat wich is listening to tomcat startup and then loads the native library? Can i then access their native functions from every webapp? regards and thanks in advance, thomas On Wed, 16 Mar 2005 17:01:54 +0100, Thomas Chille [EMAIL PROTECTED] wrote: Hi, in our webapp we are using a native c sytem library. after reloading this webapp via the manager app i step into the following error: java.lang.UnsatisfiedLinkError: Native Library C:\eclipse3\eclipse\workspace\Phoenix\etc\bin\resmgr.dll already loaded in another classloader I know that for every webapp would be one classloader used. 1. Would be different classloaders used for every loaded instance of a webapp? 2. Could i register a listener to unloading (is this possible in java?) the library if tomcat unloading the webapp? I am using tomcat 5.0.29 regards, thomas - 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: Application install problem
Hi, I post a problem like yours yesterday : http://marc.theaimsgroup.com/?l=tomcat-userm=111099252030422w=2 In our case, the warfile is not deployed in the Host.appBase. I think it's deployed in the Host.workDir. see there : http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html Note: If you don't provide a Context.xml and you only provide a warfile, it is deployed in the Host.appBase. Cheers. On Thu, 17 Mar 2005 10:44:30 +0100 (MET) Mario Bittermann [EMAIL PROTECTED] wrote: Hi, i_m using tomcat 4.1.31 and try to install an application via manager console. my application consists of an xml-file containing a context section and a war-file. when i try to install my application, the xml-file is copied into the webapps folder, but the warfile is not deployed in a folder in the webapps folder. Ist there a possibility to do this? thanks mario -- DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen! AKTION Kein Einrichtungspreis nutzen: http://www.gmx.net/de/go/dsl - 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: Problem with BASIC authentication
On Thu, 17 Mar 2005 16:35:43 +0530 Karanjkar, Sanjay V \(IT\) [EMAIL PROTECTED] wrote: Hi Lionel, Thanks for your response. I tried both suggestions but no luck.. Maybe it's something to do with the fact that I've not *installed* tomcat but only copied the binaries from an installed location (then how come the maanger app works? :-( The Manager, by default, is installed but not activated. In your installation, you have - $CATALINA_HOME/server/lib/servlets-manager.jar - $CATALINA_HOME/webapps/manager.xml You have to add: role rolename=manager/ user username=userid password=password roles=manager/ And you can access to the HTML manager (in the default installation) with : http://localhost:8080/manager/html/ Anyways, I also have a problem when shutting down tomcat. When I run shutdown.sh, I get the following error and there are process threads that I have to kill manually I have not altered the default server.xml (Ajp13 connector is not commented out) so can someone help me? Catalina.stop: java.net.ConnectException: Connection refused java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:350) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:137) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:124) at java.net.Socket.init(Socket.java:268) at java.net.Socket.init(Socket.java:95) at org.apache.catalina.startup.Catalina.stop(Catalina.java:581) at org.apache.catalina.startup.Catalina.execute(Catalina.java:402) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) gmake: *** [stop_tomcat] Error 1 I think you have to re-install properly your Tomcat... (and verify your port 8080 is free, otherwise change it). Thanks in advance Sanjay Karanjkar fc3sdi team -Original Message- From: Lionel Farbos [mailto:[EMAIL PROTECTED] Sent: 17 March 2005 09:58 To: Tomcat Users List Cc: Karanjkar, Sanjay V (IT) Subject: Re: Problem with BASIC authentication Hi, Compared to Manager's web.xml, it seems you don't have the section resource-env-ref with the link to your user DataBase. Perhaps, try to put the role names without a - (rather a _ or nothing) Cheers. On Thu, 17 Mar 2005 10:49:29 +0530 Karanjkar, Sanjay V \(IT\) [EMAIL PROTECTED] wrote: Hi, Anyone had a chance to look at this one yet? Thanks Sanjay -Original Message- From: Karanjkar, Sanjay V (IT) Sent: 15 March 2005 11:19 To: tomcat-user@jakarta.apache.org Subject: Problem with BASIC authentication Hi, I have the following setup: 1. A copied version of Tomcat 4.1.24 on Unix (i.e. I have merely *copied* the entire tomcat folder from another installed location instead of installing it) 2. My application WAR file referenced by the following Context in Server.xml: Context path=/ieg-sc docBase=/var/tmp/DEV/install/common/lib/tc.ieg.war reloadable=true debug=99 privileged=true ResourceLink name=users type=org.apache.catalina.UserDatabase global=UserDatabase/ /Context 3. My app's web.xml has the following: security-constraint web-resource-collection web-resource-nameMy Application/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-nameieg-sc-user/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint !-- Define the Login Configuration for this Application -- login-config auth-methodBASIC/auth-method realm-nameMy Application/realm-name /login-config security-role role-nameieg-sc-user/role-name /security-role 4. I have defined the user/role in conf/tomcat-users.xml: ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=ieg-sc-user/ user username=userid password=passwd roles=ieg-sc-user/ /tomcat-users When I start tomcat, everything seems to run fine except that I do not get a login window! I have gone over the setup so many times now, I'm going madHave I missed something? Is it because I've copied the tomcat binaries instead of installing it? If so, why does authentication work correctly for the inbuilt Manager application..? Appreciate if you could help me.. Thanks and regards Sanjay Karanjkar NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited
Re: SV: Reload webapp and context
On Thu, 17 Mar 2005 14:12:06 +0100 Roland Carlsson [EMAIL PROTECTED] wrote: Hi and thanks for your answer! Do I read you correctly that there are no solution but to restart Tomcat to reload the context completly? False. Lionel, the manager doesn't seem to re-read the context file under /conf/Catalina/mydomain/myapp.xml and that is the one I have have to change. If you try a reload, or stop then start, effectively no change :-( but if you try undeploy then deploy : it works :-)) so, it is possible without restarting entirely tomcat Thanks in advance Roland Carlsson Den 05-03-17 13.58, skrev QM [EMAIL PROTECTED]: On Thu, Mar 17, 2005 at 08:32:54AM +0100, Roland Carlsson wrote: : do I force tomcat to re-load the context? Right now the only way I know : about is to reboot tomcat witch leads to a full stop of all my web-apps : instead of only one witch in turn leads to more complaints from my users. Perhaps a non-technical solution would help: 1/ schedule regular deployment times. Apps expect downtime during these windows, and you're free to start/stop at will. 2/ Put each app in its own JVM. Such isolation solves several headaches, not the least of which is the ability for each app to choose its own downtime window. -QM - 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: Servlet pops up as download
and, in your browser, what is the default action for this mapping ? On Thu, 17 Mar 2005 16:19:06 +0100 Nick Wolters [EMAIL PROTECTED] wrote: In mozilla the download window says: text/vnd.wap.wml The file itself begins with the following: ?xml version=1.0 encoding=iso-8859-1? !DOCTYPE wml PUBLIC -//WAPFORUM//DTD WML 1.1//EN http://www.wapforum.org/DTD/wml_1.1.xml; wml . /wml In web.xml I found the following: mime-mapping !-- WML Source -- extensionwml/extension mime-typetext/vnd.wap.wml/mime-type /mime-mapping Didn't write the servlet myself though. Nick -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: donderdag 17 maart 2005 15:59 To: Tomcat Users List Subject: Re: Servlet pops up as download What is your content type set to? Doug - Original Message - From: Nick Wolters [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Thursday, March 17, 2005 9:51 AM Subject: Servlet pops up as download Hello, Having some issues with an ensim tomcat 4 installation. Whenever I surf to www.mysite.com/servlet/MyServlet my browser pops up a download dialog instead of showing the page. It downloads MyServlet which does contain all the code it should normally display in the browser. I don't have much experience yet with tomcat, planning to read-up on it next month, but could someone help me with this for now? What things should I check ? Kind regards, Nick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet pops up as download
On Thu, 17 Mar 2005 16:57:04 +0100 Omar Adobati [EMAIL PROTECTED] wrote: To browse a wml file you need to use a wml browser, You can't do it just using Ie or Mozilla. Maybe you can find a wml browser on the Internet. I think Opera do it. On Thu, 17 Mar 2005 16:52:30 +0100, Lionel Farbos [EMAIL PROTECTED] wrote: and, in your browser, what is the default action for this mapping ? On Thu, 17 Mar 2005 16:19:06 +0100 Nick Wolters [EMAIL PROTECTED] wrote: In mozilla the download window says: text/vnd.wap.wml The file itself begins with the following: ?xml version=1.0 encoding=iso-8859-1? !DOCTYPE wml PUBLIC -//WAPFORUM//DTD WML 1.1//EN http://www.wapforum.org/DTD/wml_1.1.xml; wml . /wml In web.xml I found the following: mime-mapping !-- WML Source -- extensionwml/extension mime-typetext/vnd.wap.wml/mime-type /mime-mapping Didn't write the servlet myself though. Nick -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: donderdag 17 maart 2005 15:59 To: Tomcat Users List Subject: Re: Servlet pops up as download What is your content type set to? Doug - Original Message - From: Nick Wolters [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Thursday, March 17, 2005 9:51 AM Subject: Servlet pops up as download Hello, Having some issues with an ensim tomcat 4 installation. Whenever I surf to www.mysite.com/servlet/MyServlet my browser pops up a download dialog instead of showing the page. It downloads MyServlet which does contain all the code it should normally display in the browser. I don't have much experience yet with tomcat, planning to read-up on it next month, but could someone help me with this for now? What things should I check ? Kind regards, Nick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Adobati Omar [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Start and stop Tomcat + Cron
Yes and it depends on your crontab version. In my version, the system-wide crontab seems like this : 00 22 * * * /PATH/TO/JAKARTA/bin/shutdown.sh and the user-wide crontab seems like this : 00 22 * * * /PATH/TO/JAKARTA/bin/shutdown.sh ... but are not executed by the same user. On Thu, 17 Mar 2005 10:27:58 -0600 Robert r. Sanders [EMAIL PROTECTED] wrote: Are your JAVA_HOME and other vars defined in a global context? Other than that I don't really know. Cédric Buschini wrote: Hi I'd like to stop and start my tomcat using cron so I added this in the root's crontab and /etc/crontab : 00 22 * * * root /PATH/TO/JAKARTA/bin/shutdown.sh 02 22 * * * root /PATH/TO/JAKARTA/bin/startup.sh but it does work :s Any got ideas ??? Thk Cedric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Robert r. Sanders Chief Technologist iPOV (334) 821-5412 www.ipov.net - 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: Which tomcat 5.0 version to use?
Hi, TC 5.0.30 is the best (of TC5.0.x versions) but it is beta because nobody work for it and they didn't vote for passing it stable. TC 5.0.28 is stable for production. TC 5.5 is the only one to pay attention for developpers. On Wed, 16 Mar 2005 16:05:31 +0100 Zsolt Koppany [EMAIL PROTECTED] wrote: Hi, Right now we use tc-5.0.27 in production. There are some enhancements in 5.0.28 that are important for us such as collections-3.1. I see that 5.0.29 and 30 are also available but they are beta. Is 5.0.28 as stable as 5.0.20? Which version should I use? Zsolt - 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]
JkMount or JkUnMount ?
Hi, on a performance point of view, is it better to configure (for example) JkMount /toto/*.jgi ajp13 or JkUnMount /toto/*.htm JkUnMount /toto/*.gif JkUnMount /toto/*.jpeg JkUnMount /toto/*.gif JkUnMount /toto/*.png JkUnMount /toto/*.css JkUnMount /toto/*.js ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
unpackWARs incomplete when deployed with context.xml
Hi all, After some tests on TC4.1.31, deployment with context.xml and war unpacked, my unpacked tree is incomplete : static files, JSPs files and properties files (including web.xml) are missing :-( (but the Context is working fine) Is it the normal behaviour or I miss something ? This is the same with TC5.5 ? Some details : My testServlets.war is composed with : myStaticPages (html, images, css, ...) myJSPs META-INF/my_internal_resources.properties WEB-INF/classes/my_classes WEB-INF/lib/my_libs WEB-INF/web.xml I put $CATALINA_HOME/conf/Standalone/localhost/testServlets.xml with Context path=/testServlets docBase=testServlets debug=1 reloadable=true ... Resource name=jdbc/testServletsDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/testServletsDB ... /ResourceParams Parameter name=PROJECT_NAME value=testServlets override=false/ /Context In server.xml, Engine = Standalone Host = localhost , appBase=webapps unpackWARs=true autoDeploy=false deployOnStartup=false deployXML=true I deploy with Tomcat Manager : /manager/html/install?installPath=/testServletsinstallConfig=file:///usr/local/tomcat/conf/Standalone/localhost/testServlets.xmlinstallWar=file:///tmp/testServlets.war When I test my servlet, ALMOST ALL IS FINE : getServletContext().getInitParameter(PROJECT_NAME) = testServlets ((DataSource)ctx.lookup(java:/comp/env/jdbc/testServletsDB)).getConnection() works getServletContext().getResource(/META-INF/my_internal_resources.properties) is valid BUT - getServletContext().getRealPath(/) = null - the war is unpacked in $CATALINA_HOME/work/Standalone/localhost/testsServlet/ (not in Context_docBase or Host_appBase) and is INCOMPLETE !!! (only WEB-INF directory but not my static files) So, If I want Apache to serve this static files,... how to ? In advance, thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: choice of JVM
For Tomcat, you need a JVM : so a jsdk or a jre. You have choosen a J2EE SDK (too complete). re-try with : j2sdk 1.4.2 for example, install it in a directory and put JAVA_HOME=this directory On Wed, 16 Mar 2005 17:43:12 +0100 (CET) Christoph Kukulies [EMAIL PROTECTED] wrote: I'm in the process of installing tomcat (5.0.28) under Windows (XP). Installed apache 1.13.33 and ran tomcat installer. At this point I was asked for a JVM to choose (with an empty listbox). So I downloaded j2eesdk-1_4_01_2005Q1 from java.sun.com and installed it. Strange install, this Sun environment. Want me to run an application server. Hell, Tomcat should be my application server. I chose, not to register an application server. Anyway, I'm still at a loss to choose a JVM. Where is my JVM? The directory browser of the tomcat installer only allows me to choose a directory, not a specific binary. Help, please. -- Chris Christoph P. U. Kukulies kuku_at_kukulies.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat CVS Versions
Hi, I'd want to get the latest version of TC4.1 Manager. Where is it ? jakarta-tomcat-4.0 ? (is yes, which tag) ? I search within http://jakarta.apache.org/site/cvsindex.html If I am right : jakarta-tomcat is for TC3.2 and TC3.3 jakarta-tomcat-4.0 is for TC4.0 (and TC 4.1?) jakarta-tomcat-5 is for TC5.0 and TC5.5 jakarta-tomcat-catalina is for TC5.0 ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Query on mod_jk.log
in your mod_jk.conf : JkLogFile /var/log/apache/mod_jk.log On Thu, 10 Mar 2005 11:58:03 +0530 [EMAIL PROTECTED] wrote: Hi All, I need to change the location of mod_jk.log file. Presently it gets logged in /apache/logs. I need to put it in /var/log/apache. How to accomplish this? Thanks and Regards, Mandar M Kelvekar Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trying to retrieve the ROOT context in Servlet.
I'd want to say the Default context (see bug 33831 for more explanations) This is the tomcat behaviour if your put crossContext=true (but you already have solved your needs, no ?). On Tue, 8 Mar 2005 09:30:01 -0600 Jeffrey Lanham [EMAIL PROTECTED] wrote: So, hitting an invalid context gets you the root context? Isn't that a little insecure? Jeff -Original Message- From: Lionel Farbos [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 3:49 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Trying to retrieve the ROOT context in Servlet. Hi Jeffrey, I use Tomcat 5.0.30 and, when I use getServletContext().getContext(/toto), if the Context toto doesn't exist, it returns the root context. On Mon, 7 Mar 2005 15:32:25 -0600 Jeffrey Lanham [EMAIL PROTECTED] wrote: I have been trying for days and tons of google searches and mail archive searches and can't find an answer to the quandry I find myself in. I need to allow users to upload to a directory in the ROOT context of my tomcat server. For some reason, and it may be a security deal, I can't retrieve the server context for / so I can get the actual path to upload the file. It always comes back null. I know that the Java servlet specifications say the null may be returned if the container, for some reason, doesn't want to return the context. I don't know if it's a tomcat configuration, or if there is some other mechanism to use besides getServletContext().getContext(/). Any help would be appreciated. Thanks, Jeffrey Lanham Miller Curtain Company - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
stop context properly or in a forced way
Hi all, When I want to upgrade my webapp, I want to stop my context without interrupting its running threads. But, for exploitation needs, I can want to force the stop of my context. For this 2 needs, Tomcat provide only one solution : within the manager, a force stop context. And they don't want to provide another solution for the proper stop context (bug 33589 WONTFIX). So, I can hack my code in order to have a proper stop context (see the MotherSerlvet proposed in bug 33589), BUT now, I don't know HOW TO hack my code for the force stop context ... :-( Any suggest would be appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: stop context properly or in a forced way
I receive no response, so I think there is, for now, no solution without a patch of Tomcat (for example : new Stop Context in Tomcat Manager + info added in the ServletContext...). But I am alone for this needs ? Or a lot of people need this but they don't know how to do because it is not possible with Tomcat ? On Wed, 9 Mar 2005 10:59:57 +0100 Lionel Farbos [EMAIL PROTECTED] wrote: Hi all, When I want to upgrade my webapp, I want to stop my context without interrupting its running threads. But, for exploitation needs, I can want to force the stop of my context. For this 2 needs, Tomcat provide only one solution : within the manager, a force stop context. And they don't want to provide another solution for the proper stop context (bug 33589 WONTFIX). So, I can hack my code in order to have a proper stop context (see the MotherSerlvet proposed in bug 33589), BUT now, I don't know HOW TO hack my code for the force stop context ... :-( Any suggest would be appreciated. - 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: Trying to retrieve the ROOT context in Servlet.
Hi Jeffrey, I use Tomcat 5.0.30 and, when I use getServletContext().getContext(/toto), if the Context toto doesn't exist, it returns the root context. On Mon, 7 Mar 2005 15:32:25 -0600 Jeffrey Lanham [EMAIL PROTECTED] wrote: I have been trying for days and tons of google searches and mail archive searches and can't find an answer to the quandry I find myself in. I need to allow users to upload to a directory in the ROOT context of my tomcat server. For some reason, and it may be a security deal, I can't retrieve the server context for / so I can get the actual path to upload the file. It always comes back null. I know that the Java servlet specifications say the null may be returned if the container, for some reason, doesn't want to return the context. I don't know if it's a tomcat configuration, or if there is some other mechanism to use besides getServletContext().getContext(/). Any help would be appreciated. Thanks, Jeffrey Lanham Miller Curtain Company - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Equivalent of Resin run-at servlet configuration
I'm not a Tomcat developer, I'm an outside observer too, but I agree with Tim. If you want such a feature, I think you have to implement such a package, which could be an optional additional package for Tomcat (like the apache commons packages, ... or other), and, why not, available in a tomcat add-ons site (just a thought too)... Your solution or the Jonathan Wilson's solution could be an issue ... if you run your webapp on a single tomcat. But if you run it on a cluster, perhaps you don't want your servlet running (at xx:yy) on each node; only on one node... For this need, a daemon will be better if you need to run your servlet run-at only once per webapp... For this reason, even if a lot of developpers need such a feature, I think Tomcat has nothing to implement for this : it is a servlet container, not a full J2EE container. On Thu, 3 Mar 2005 22:28:41 -0500 Parsons Technical Services [EMAIL PROTECTED] wrote: And so the best way is to have a set of classes to add to your project that add this feature. It then moves with the app and can be applied per app or even as a jar in common lib for use by all apps. Tim, am I thinking right on this? Remember that Tomcat follows the spec which is developed and created by others. So impossible is not an accurate statement. Anything is possible. But this is not the forum to lobby. Tomcat nor Apache are the creators of the spec. They only follow it. Now if you want to lobby these folks, fell free to. You never know, it may be something that is being considered and another voice may help. As for Tomcat if you start adding things that are not spec driven you open yourself up for controversy and problems down the road. Just trying to follow the spec can be a pain in itself, for each creator of a container will interpret some areas differently. Knowing that you app will run on any container because the container you run on follows the spec can be a big load off a developers mind. Although I am not one of the developers working on Tomcat, I think this is why you are seeing some of the changes that have occurred in the last year. Tomcat is moving away from non spec features and trying to tow a tighter line. NOTE: This is my opinion as an outside observer. I know the developers sound a little rude or abrupt, but remember that is many way their hands are tied. They are committed to building a reliable product that is widely accepted and compatible/comparable to other containers. To accomplish this they must do their best to follow the spec for failure to do so would result in just that, failure. I am sure there are tons of features and ideas that they would love to add, but can't because of the spec. I have spoke up, many times, in defense of the wonderful folks who spend so much of their time on Tomcat. I do this because it is one way that I can contribute back. I do this not to belittle you or anyone else, but to inform you and help you and others understand. These guys do a great job and I for one am very thankful. So if someone will write these classes, and someone will host them maybe we can get a link off the Tomcat in the FAQ section??? Just a thought. Doug - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 8:51 PM Subject: Re: Equivalent of Resin run-at servlet configuration run-at is an extension to web.xml that is not portable across containers. That's why it will not be implemented. -Tim Aris Javier wrote: No, meaning impossible? cause if it would be very beneficial to many then why not change the specs to accommodate such service? Pardon me, maybe because I really don't understand the specs. I was just thinking in a layman's way. Thanks Aris -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Friday, March 04, 2005 9:42 AM To: Tomcat Users List Subject: Re: Equivalent of Resin run-at servlet configuration no. (unless the spec says so) -Tim Aris Javier wrote: If this is not supported in Tomcat, is there a way or a plan to have this kind of service? This would really be a big help to many developers. Just a thought Aris -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 9:34 PM To: Tomcat Users List Subject: Re: Equivalent of Resin run-at servlet configuration I think the Cocoon project has such a facility. I'm not sure how complicated it would be to pull out that functionality, but their work might be worth looking at for this. --David Parsons Technical Services wrote: With all the questions and suggestions flying around, a question to the other programmers: If one was to write a class for the purpose of running classes at set times, what pitfalls would one need to watch for? I have a
Re: Equivalent of Resin run-at servlet configuration
I think that what you want, with this feature, is a daemon (but not a servlet that respond to requests). So, Tomcat don't have to implement anything for this (it's not in its sphere of activities). I think that crons (eventually with httpclients), TimerTasks, ... are more usefull for this need... On Thu, 3 Mar 2005 08:27:46 -0500 Parsons Technical Services [EMAIL PROTECTED] wrote: With all the questions and suggestions flying around, a question to the other programmers: If one was to write a class for the purpose of running classes at set times, what pitfalls would one need to watch for? I have a class that loads on startup and runs a continuous loop that is timed (sleeps, wakes up, does something, sleeps again). It runs fine, but I know that it could be better. Any guidance or suggestions would be appreciated. And maybe we could create an add-on and post it for use in apps that need such a device. Thanks Doug - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, March 03, 2005 6:55 AM Subject: Re: Equivalent of Resin run-at servlet configuration Subramanya Sastry wrote: Hello, I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its run-at configuration element for servlets in web.xml Example Resin configuration: servlet servlet-namedownload/servlet-name servlet-classDownloadNewsServlet/servlet-class run-at period='360m'/ /servlet However, I haven't found an equivalent configuration for Tomcat. I searched the web and was unsuccessful. So, any pointers as to how I could achieve this for Tomcat would be appreciated. There is none and shouldn't be any. I understand the need to run periodical tasks, but J2EE specification, prior to 1.4 has no such provisions. Further, Servlet/JSP specification has no such provision, even in J2EE 1.4. You'd be best advised to setup a cron-job to perform this periodic activity. There are several good HTTP client packages out there, Jakarta-Commons HTTPclient, to name one, that will help you in building the client side of your cron-job. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RequestDispatcher.forward: SOLVED
Thanks to Tim and Remy for the answers; For more explanations for those who have the same problem like me : - see bugs 23211 and 33831 on http://issues.apache.org/bugzilla/ - In my example, after ctx = ctx.getContext(/myNewContext); but before dispatcher = ctx.getRequestDispatcher(/myNewServlet); I can verify if my context (ctx) is the good one (or the context root) thanks to : ctx.getServletContextName() //if servlet API is 2.4 or ctx.getInitParameterNames() return a initParameter present in my desired Context or ctx.getAttributeNames() return an attribute present in my desired Context or ctx.getRealPath(/myNewServlet) is a Path valid for my desired Context On Wed, 2 Mar 2005 16:34:42 +0100 Lionel Farbos [EMAIL PROTECTED] wrote: Yes : it's my problem. ctx.getContext(/myNewContext) always return a Context (even if myNewContext is not deployed :-( and ctx.getRequestDispatcher(/myNewServlet) always return a dispatcher (even if myNewServlet is not here :-( So How can I avoid a 404 ? On Wed, 02 Mar 2005 10:24:37 -0500 Tim Funk [EMAIL PROTECTED] wrote: getRequestDispatcher() will always return a servlet. (The default servlet) -Tim Lionel Farbos wrote: Hi, (I work on Tomcat 5.0.30). When my servlet (http://myVhost/proxy/testProxy) forward to another servlet : try { ServletContext ctx = getServletContext(); ctx = ctx.getContext(/myNewContext); RequestDispatcher dispatcher = ctx.getRequestDispatcher(/myNewServlet); dispatcher.forward(request, response); } catch (Exception e) {e.printStackTrace();} (in server.xml, in the Context /proxy of myVhost, I put crossContext=true) If the Context /myNewContext is deployed in myVhost, the HTTPresponse is : HTTP/1.1 200 OK ... response of myNewServlet If the Context /myNewContext is not deployed, the HTTPresponse is : HTTP/1.1 404 /myNewServlet :-( 1) In other servlets containers, I read that ctx.getRequestDispatcher(...) returns null if the resource is absent. So, Why Tomcat reacts differently ? Is it a bug ? 2) In my case, I'd want to forward to myNewServlet if it is present, BUT, if it is absent, I'd want to call another url distant (with httpclient)... How can I do this with 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RequestDispatcher.forward: a bug?
Hi, (I work on Tomcat 5.0.30). When my servlet (http://myVhost/proxy/testProxy) forward to another servlet : try { ServletContext ctx = getServletContext(); ctx = ctx.getContext(/myNewContext); RequestDispatcher dispatcher = ctx.getRequestDispatcher(/myNewServlet); dispatcher.forward(request, response); } catch (Exception e) {e.printStackTrace();} (in server.xml, in the Context /proxy of myVhost, I put crossContext=true) If the Context /myNewContext is deployed in myVhost, the HTTPresponse is : HTTP/1.1 200 OK ... response of myNewServlet If the Context /myNewContext is not deployed, the HTTPresponse is : HTTP/1.1 404 /myNewServlet :-( 1) In other servlets containers, I read that ctx.getRequestDispatcher(...) returns null if the resource is absent. So, Why Tomcat reacts differently ? Is it a bug ? 2) In my case, I'd want to forward to myNewServlet if it is present, BUT, if it is absent, I'd want to call another url distant (with httpclient)... How can I do this with Tomcat ? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RequestDispatcher.forward: a bug?
Yes : it's my problem. ctx.getContext(/myNewContext) always return a Context (even if myNewContext is not deployed :-( and ctx.getRequestDispatcher(/myNewServlet) always return a dispatcher (even if myNewServlet is not here :-( So How can I avoid a 404 ? On Wed, 02 Mar 2005 10:24:37 -0500 Tim Funk [EMAIL PROTECTED] wrote: getRequestDispatcher() will always return a servlet. (The default servlet) -Tim Lionel Farbos wrote: Hi, (I work on Tomcat 5.0.30). When my servlet (http://myVhost/proxy/testProxy) forward to another servlet : try { ServletContext ctx = getServletContext(); ctx = ctx.getContext(/myNewContext); RequestDispatcher dispatcher = ctx.getRequestDispatcher(/myNewServlet); dispatcher.forward(request, response); } catch (Exception e) {e.printStackTrace();} (in server.xml, in the Context /proxy of myVhost, I put crossContext=true) If the Context /myNewContext is deployed in myVhost, the HTTPresponse is : HTTP/1.1 200 OK ... response of myNewServlet If the Context /myNewContext is not deployed, the HTTPresponse is : HTTP/1.1 404 /myNewServlet :-( 1) In other servlets containers, I read that ctx.getRequestDispatcher(...) returns null if the resource is absent. So, Why Tomcat reacts differently ? Is it a bug ? 2) In my case, I'd want to forward to myNewServlet if it is present, BUT, if it is absent, I'd want to call another url distant (with httpclient)... How can I do this with 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: EJB
On Wed, 2 Mar 2005 19:23:19 +0300 Bogomolov Sergey [EMAIL PROTECTED] wrote: Dear Friends, please tell me, whether server TomCat with EJB is able to work no : Tomcat is a servlet container. For EJBs, you can use full J2EE servers like JBoss, JOnAS, WebSphere, WebLogic, ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error-page directive
Perhaps, try to put error-page BEFORE taglib... On Tue, 1 Mar 2005 10:07:49 +0100 Ian van der Neut [EMAIL PROTECTED] wrote: Hello all, I have a web.xml (attached) that works fine if I remove the error-page directive, but gives a Exception initializing TldLocationsCache: XML parsing error on file /WEB-INF/web.xml: (line 72, col 11): The content of element type web-app must match (icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*). message when the indicated (java.lang.ClassNotFoundException) is encountered. I checked docs and books, but I can't find anything wrong with the web.xml. The template web.xml I used is the one from the struts 1.2.4 package. Could anyone please tell me what is wrong with this deployment descriptor? Thank you very much in advance for any input, Ian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session load-balancing and clustering of tomcat
1) In server.xml : - uncomment the AJP 1.3 Connector (on port 8009), - set the jvmRoute in each Engine example : Engine name=Standalone defaultHost=host1 debug=0 jvmRoute=t1_ajp13 2) then add the module mod_jk in apache with jk workers defined like this : worker.list=t1_ajp13,t2_ajp13,loadbalancer worker.t1_ajp13.type=ajp13 worker.t1_ajp13.host=host1 worker.t1_ajp13.port=8009 worker.t1_ajp13.lbfactor=1 worker.t1_ajp13.socket_timeout=5 worker.t1_ajp13.recycle_timeout=10 worker.t2_ajp13.type=ajp13 worker.t2_ajp13.host=host2 worker.t2_ajp13.port=8009 worker.t2_ajp13.lbfactor=1 worker.t2_ajp13.socket_timeout=5 worker.t2_ajp13.recycle_timeout=10 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers= t1_ajp13,t2_ajp13 then, you can load-balance your virtual host like this : JkMount /*.jsp loadbalancer 3) Conclusion : Thanks to mod_jk, you'll have load-balancing (with sticky sessions with JSESSION_ID like this : x.t1_ajp13 or y.t2_ajp13), and failover. This feature work with all tomcats (TC3.3-TC5) On Tue, 1 Mar 2005 18:08:59 +0800 Sng Wee Jim [EMAIL PROTECTED] wrote: Hi, I am using tomcat 5.0.28. My question is how to setup sticky-session load-balancing and clustering of tomcat? Do I need to upgrade to tomcat 5.5.X? Note the requirement is on sticky-session. - Jim The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorized. If you are not an intended recipient, please notify the sender of this email immediately. You should not copy, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session load-balancing and clustering of tomcat
On Tue, 01 Mar 2005 17:55:15 +0100 Mladen Turk [EMAIL PROTECTED] wrote: Lionel Farbos wrote: 2) then add the module mod_jk in apache with jk workers defined like this : worker.list=t1_ajp13,t2_ajp13,loadbalancer This is not quite correct, although it will work. You should set worker.list only for workers that have JkMount directive registered. Also workers that are member of load balancer *should* not be listed within worker.list I put this example because it can be useful for maintenance (the JkMount directive at the instant t is possibly not the same as at the instant t+x) Example : My webapp testAppli is now loadbalanced on hosts h1 and h2. If want to upgrade my webapp testAppli. So, 1) I mono-balance testAppli on h2 (with JkMount /*.jsp h2 + apache reload) 2) I restart testAppli on the Tomcat_h1 instance 3) I mono-balance testAppli on h1 4) I restart testAppli on the Tomcat_h2 instance 5) I re-loadbalance testAppli With this principle + mod_jk 1.2.9 (with dynamic change of properties) + a graceful restart of Context I hope upgrading my webapp transparently (without interruptions)... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JK1.2.9 and dynamic change of properties
Hi, A question for JK workers : I see in the JK 1.2.9 roadmap that a dynamic change of workers'properties will be possible at runtime. But, actually, when I do apache reload, the change is possible at runtime without loosing requests. No ? So, what is the innovation of this feature ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: stop context properly
No response, so nobody knows how to ?... Perhaps this feature doesn't exist in TC4.1?... Is this feature (stop context without interrupt running threads) available in TC5.0 or TC5.5 ? On Wed, 9 Feb 2005 19:36:50 +0100 Lionel Farbos [EMAIL PROTECTED] wrote: Hi all, I work with Tomcat 4.1.31, with the Manager, and I search how to stop a context without interrupting its running threads ? When I test a stop on my Context (/testServlet), I see a log like this : 2005-02-08 17:37:16 HTMLManager: stop: Stopping web application at '/testServlet' 2005-02-08 17:37:16 StandardHost[localhost]: standardHost.stop /testServlet 2005-02-08 17:37:16 StandardWrapper[/testServlet:Fille4Servlet]: Waiting for 1 instance(s) to be deallocated 2005-02-08 17:37:17 Fille4Servlet: destroy deFille4Servlet==0 And all the servlets in my Context are deleted. So, - If my servlet had already send datas on the response outputstream, I have a 200 HTTP response with a truncated response, - If my servlet had not send datas before, I can have a 500 HTTP response with NullPointerException, XML11Configuration not found, ... - If I try something like that : public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { PrintWriter out = res.getWriter(); try { ... } catch (Exception e) { out.println( exception +e+ in this servlet, so bad result!!! ); } } I have an Exception on the out.println line :-( So, - is there a configuration parameter, in Tomcat, that let the running threads of a Context to finish before stopping them ? - if not, how to return a correctly response to the HTTP request client ? Thanks in advance for your ideas. - 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]
stop context properly
Hi all, I work with Tomcat 4.1.31, with the Manager, and I search how to stop a context without interrupting its running threads ? When I test a stop on my Context (/testServlet), I see a log like this : 2005-02-08 17:37:16 HTMLManager: stop: Stopping web application at '/testServlet' 2005-02-08 17:37:16 StandardHost[localhost]: standardHost.stop /testServlet 2005-02-08 17:37:16 StandardWrapper[/testServlet:Fille4Servlet]: Waiting for 1 instance(s) to be deallocated 2005-02-08 17:37:17 Fille4Servlet: destroy deFille4Servlet==0 And all the servlets in my Context are deleted. So, - If my servlet had already send datas on the response outputstream, I have a 200 HTTP response with a truncated response, - If my servlet had not send datas before, I can have a 500 HTTP response with NullPointerException, XML11Configuration not found, ... - If I try something like that : public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { PrintWriter out = res.getWriter(); try { ... } catch (Exception e) { out.println( exception +e+ in this servlet, so bad result!!! ); } } I have an Exception on the out.println line :-( So, - is there a configuration parameter, in Tomcat, that let the running threads of a Context to finish before stopping them ? - if not, how to return a correctly response to the HTTP request client ? Thanks in advance for your ideas. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Apache Jakarta Tomcat 5.5.7-alpha Released
On Thu, 20 Jan 2005 19:05:52 + Mark Thomas [EMAIL PROTECTED] wrote: Lionel Farbos wrote: Question : What is the reference or stable version for servlet 2.4 ? Is it Tomcat 5.0.28 or Tomcat 5.5.4 ? I don't understand why you implement 2 versions (2 branches) for this servlet API ...? http://jakarta.apache.org/tomcat/index.html has answers to these questions and more. If I post theses questions, it's because theses answers are not clear for me... So, I re-post my question differently : For production purposes, I want the most stable Tomcat Version (Servlet API 2.3 or 2.4); so, what version should I use ? TC4.1.31, TC5.0.28 or TC5.5.4 ? In my memories, TC5.0.x was not usable before 5.0.19 but she was announced stable... So I prefer requiring Tomcat developers' point of view. In advance, Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Apache Jakarta Tomcat 5.5.7-alpha Released
Question : What is the reference or stable version for servlet 2.4 ? Is it Tomcat 5.0.28 or Tomcat 5.5.4 ? I don't understand why you implement 2 versions (2 branches) for this servlet API ...? On Thu, 20 Jan 2005 15:31:28 +0100 Remy Maucherat [EMAIL PROTECTED] wrote: The Apache Jakarta Tomcat team is proud to announce the immediate availability of Tomcat 5.5.7-alpha. This build contains numerous bug fixes, documentation updates, and other improvements. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: new Host without restarting Tomcat
So nobody knows how to deploy a new Host without the restart of Tomcat ? On Tue, 11 Jan 2005 16:05:06 +0100 Lionel Farbos [EMAIL PROTECTED] wrote: Hi all, I'd want to create and deploy new Virtual(s) Host(s) and Contexts without having to restart the entire Tomcat Server (4.1.31 or 5.0.28). This works if my Host(s) exist in server.xml when I start Tomcat (I follow http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html). BUT, if I want to create and deploy new Hosts before deploying new Contexts, I don't succeed (I tried this with the Tomcat Admin tool and the Tomcat Manager Tool) In my test, I create a new Host (myHOST) with the Tomcat Admin tool. I put a Logger and a manager Context into it. The problem is : With the Admin GUI, it is not possible to put privileged=true, so, when I launch http://myHost:8080/manager/html/list, I have a SecurityException because the HTMLManagerServlet est privileged and cannot be loaded by this web app... I don't find a solution in the mailing lists, so, what is the solution for this ? - 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: new Host without restarting Tomcat
Thank you for your response. server.xml is read only once, but, with the Tomcat Admin Tool, we can increase this config and save it. So, I think the only (perhaps?) missing feature to do the creation of the Host is the ability to declare the privileged=true within the Context Manager. I'll try to declare a bug for this. Thank you. On Wed, 12 Jan 2005 07:51:20 -0500 Parsons Technical Services [EMAIL PROTECTED] wrote: I may be incorrect, but in all I have read, the server.xml is only read once, during Tomcat startup. This is the reason for the context.xml fragment files which can be read and loaded without a restart. So the answer is it can't be done at this point. To the best of my knowledge. http://jakarta.apache.org/tomcat/tomcat-5.0-doc/architecture/startup/serverStartup.txt Section b4 Doug - Original Message - From: Lionel Farbos [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Wednesday, January 12, 2005 6:38 AM Subject: Re: new Host without restarting Tomcat So nobody knows how to deploy a new Host without the restart of Tomcat ? On Tue, 11 Jan 2005 16:05:06 +0100 Lionel Farbos [EMAIL PROTECTED] wrote: Hi all, I'd want to create and deploy new Virtual(s) Host(s) and Contexts without having to restart the entire Tomcat Server (4.1.31 or 5.0.28). This works if my Host(s) exist in server.xml when I start Tomcat (I follow http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html). BUT, if I want to create and deploy new Hosts before deploying new Contexts, I don't succeed (I tried this with the Tomcat Admin tool and the Tomcat Manager Tool) In my test, I create a new Host (myHOST) with the Tomcat Admin tool. I put a Logger and a manager Context into it. The problem is : With the Admin GUI, it is not possible to put privileged=true, so, when I launch http://myHost:8080/manager/html/list, I have a SecurityException because the HTMLManagerServlet est privileged and cannot be loaded by this web app... I don't find a solution in the mailing lists, so, what is the solution for this ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
new Host without restarting Tomcat
Hi all, I'd want to create and deploy new Virtual(s) Host(s) and Contexts without having to restart the entire Tomcat Server (4.1.31 or 5.0.28). This works if my Host(s) exist in server.xml when I start Tomcat (I follow http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html). BUT, if I want to create and deploy new Hosts before deploying new Contexts, I don't succeed (I tried this with the Tomcat Admin tool and the Tomcat Manager Tool) In my test, I create a new Host (myHOST) with the Tomcat Admin tool. I put a Logger and a manager Context into it. The problem is : With the Admin GUI, it is not possible to put privileged=true, so, when I launch http://myHost:8080/manager/html/list, I have a SecurityException because the HTMLManagerServlet est privileged and cannot be loaded by this web app... I don't find a solution in the mailing lists, so, what is the solution for this ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: To have SetCookie in the Response
In fact, there is no special configuration to obtain this. Only : SessionId cookiesFirst=true noCookies=false / to authorize cookies. My problem was : I invoke LoginServlet (in which I do ...request.getSession( true );) and at the end of this servlet, I do : request.getRequestDispatcher(response.encodeURL(../servlet/DisplayHomePageServlet)).forward(request,response); So, in this way, there is no SetCookie in the response. To correct this, I do : request.getRequestDispatcher(../servlet/DisplayHomePageServlet).forward(request,response); and there is the SetCookie in my response : -) Lionel FARBOS wrote: Hi, I configure my Tomcat 3.3.1 Final server with : SessionId cookiesFirst=true noCookies=false / and my servlet do HttpSession session = req.getSession( true ); but in my HTTP Response, I don't have the SetCookie parameter : HTTP/1.0 200 OK Content-Type: text/html Pragma: No-cache Cache-Control: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT Date: Fri, 12 Apr 2002 14:53:12 GMT Server: Tomcat Web Server/3.3a Final ( JSP 1.1; Servlet 2.2 ) Is there a special configuration to obtain this ? Note : with a telnet localhost 8080 : I have this header with Netscape, I see the sessionId which is created... Thanks -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
To have SetCookie in the Response
Hi, I configure my Tomcat 3.3.1 Final server with : SessionId cookiesFirst=true noCookies=false / and my servlet do HttpSession session = req.getSession( true ); but in my HTTP Response, I don't have the SetCookie parameter : HTTP/1.0 200 OK Content-Type: text/html Pragma: No-cache Cache-Control: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT Date: Fri, 12 Apr 2002 14:53:12 GMT Server: Tomcat Web Server/3.3a Final ( JSP 1.1; Servlet 2.2 ) Is there a special configuration to obtain this ? Note : with a telnet localhost 8080 : I have this header with Netscape, I see the sessionId which is created... Thanks -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]