Re: Problem with Apache Portable Runtime (APR) based Native library for Tomcat
Hi, Do you have somebody some tip where could be a problem? Thanks in advance. J. Fikker - Hello Konstantin, There is output of ls command: ls -la /opt/tomcat_6_0/lib/ total 9484 drwxr-x--- 3 wasadmin wasadmin4096 Apr 11 07:30 . drwxr-x--- 11 wasadmin wasadmin4096 Apr 11 07:30 .. -rwxr-x--- 1 wasadmin wasadmin5881 Sep 11 2009 AMTomcatValve.jar -rwxr-x--- 1 wasadmin wasadmin 15239 Feb 2 20:04 annotations-api.jar -rwxr-x--- 1 wasadmin wasadmin 53756 Feb 2 20:04 catalina-ant.jar -rwxr-x--- 1 wasadmin wasadmin 129895 Feb 2 20:04 catalina-ha.jar -rwxr-x--- 1 wasadmin wasadmin 1216210 Feb 2 20:04 catalina.jar -rwxr-x--- 1 wasadmin wasadmin 237317 Feb 2 20:04 catalina-tribes.jar -rwxr-x--- 1 wasadmin wasadmin 1563059 Feb 2 20:04 ecj-3.3.1.jar -rwxr-x--- 1 wasadmin wasadmin 33410 Feb 2 20:04 el-api.jar -rwxr-x--- 1 wasadmin wasadmin 112550 Feb 2 20:04 jasper-el.jar -rwxr-x--- 1 wasadmin wasadmin 526946 Feb 2 20:04 jasper.jar -rwxr-x--- 1 wasadmin wasadmin 76692 Feb 2 20:04 jsp-api.jar -rwxr-xr-- 1 wasadmin wasadmin 156 Apr 11 07:30 libtcnative-1.a -rwxr-xr-x 1 wasadmin wasadmin 893 Apr 11 07:30 libtcnative-1.la lrwxrwxrwx 1 wasadmin wasadmin 23 Apr 11 07:30 libtcnative-1.so ->libtcnative-1.so.0.1.20 lrwxrwxrwx 1 wasadmin wasadmin 23 Apr 11 07:30 libtcnative-1.so.0 ->libtcnative-1.so.0.1.20 -rwxr-xr-x 1 wasadmin wasadmin 874046 Apr 11 07:30 libtcnative-1.so.0.1.20 -rwxr-x--- 1 wasadmin wasadmin 1890499 Sep 11 2009 ojdbc5.jar drwxr-xr-x 2 wasadmin wasadmin4096 Apr 11 07:30 pkgconfig -rwxr-x--- 1 wasadmin wasadmin 88210 Feb 2 20:04 servlet-api.jar -rwxr-x--- 1 wasadmin wasadmin 764743 Feb 2 20:04 tomcat-coyote.jar -rwxr-x--- 1 wasadmin wasadmin 253526 Feb 2 20:04 tomcat-dbcp.jar -rwxr-x--- 1 wasadmin wasadmin 70034 Feb 2 20:04 tomcat-i18n-es.jar -rwxr-x--- 1 wasadmin wasadmin 51971 Feb 2 20:04 tomcat-i18n-fr.jar -rwxr-x--- 1 wasadmin wasadmin 55036 Feb 2 20:04 tomcat-i18n-ja.jar J. Fikker __ Od: "Konstantin Kolinko" Komu: Tomcat Users List Datum: 11.04.2011 09:09 Předmět: Re: Problem with Apache Portable Runtime (APR) based Native library forTomcat 2011/4/11 Jaroslav Fikker : I installed APR library with these commands: ./configure --with-apr=/usr --prefix=/opt/tomcat_6_0 make make install I also create /opt/tomcat_6_0/bin/setenv.sh file with this content: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/lib export LD_LIBRARY_PATH But when I start server with startup.sh script I can find next warning incatalina.out file (but Tomcat application server runs and works): Apr 11, 2011 8:44:15 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimalperformance in production environments was not found on the java.library.path:/usr/lib/jvm/java-1.6.0-ibm-1.6.0.9.1/jre/lib/i38 6::/opt/tomcat_6_0/lib:/usr/lib Where could be a problem? Thank you very much for your help. What is the output of "ls /opt/tomcat_6_0/lib" ? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] servlet-specific error pages
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 János, On 4/12/2011 4:56 PM, János Löbb wrote: > Look the 10.9 Error Handling in the 3.0 specifications. It is maya > to me but you might find what you are looking for. Being somewhat familiar with the servlet specification, I was hoping for something more helpful than "RTFM". :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2kz2oACgkQ9CaO5/Lv0PAuBgCfV6ZCaVybXg8lwOgYzIpr+hcA yvkAoKUR90RVh86CPyPvGkwtZmOyCpoH =H/dk -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?
Hi Chris, I'm improving my apps frecuently, so everytime I do it I need to upload a new WAR file. When that happens, I face the leaking problem that so far I haven't solved. For that reason, I'm restarting Tomcat. My new app should not be hosted in the same Tomcat instance for that reason. I will definitely think about redundancy soon, as soon as my new idea shows some profit and I'm able to spend some more, thanks for mentioning that! On Tue, Apr 12, 2011 at 10:57 AM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Brian, > > On 4/11/2011 6:52 PM, Brian Braun wrote: > > I have a new project, for a web service that must be running all the > time. > > It should never be offline, and if it does, my clients will leave me, so > I > > can not run this app in the same Tomcat installation. > > If you need 100% uptime, you'll need more than one server. If you have > more than one server, don't restart all Tomcat instances at once. > Instead, use clustering (which includes session fail-over) and re-start > each Tomcat instance individually. That should ensure that no service > interruption is ever encountered. > > In order to cluster, you'll need some kind of server out in front that > can load balance and direct requests to one of several running Tomcat > instances on the back-end. Don't forget to set up redundancy at that > level, too. > > If you're going to run a lb, you can just do what we do and run each > webapp in it's own JVM and Tomcat instance, and have the lb direct the > traffic to the right place. The cluster isn't necessary in that scenario > unless you truly need 100% uptime (which is impossible IMHO). > > The real question is why you have to restart Tomcat instead of just > restarting the webapp itself. We separate ours for flexibility and > isolation (one OOME doesn't bring-down all services, we can run > different JVMs or Tomcat versions for each webapp, etc.). Why do you > restart your entire JVM just to bounce your webapp? > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk2kdoIACgkQ9CaO5/Lv0PCgdwCeMbJN8pVk6jr+5897Llat5UxF > el0AoIAzWQoS+UyffBmvH2xPcarOA2Hy > =RmPT > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?
Thanks, I will read that. On Mon, Apr 11, 2011 at 7:19 PM, Caldarale, Charles R < chuck.caldar...@unisys.com> wrote: > > From: Brian Braun [mailto:brianbr...@gmail.com] > > Subject: Re: Two Tomcat 7.0.11 installations in the same Linux instance, > running both on port 80, without conflicts? > > > Is it so easy? wow, I thought it was going to be more complex. Thanks! > > Forgot to mention that you can either install two copies of Tomcat (in > separate directories, of course), or use the technique described in the > RUNNING.txt file to run multiple Tomcats from one installation. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you received > this in error, please contact the sender and delete the e-mail and its > attachments from all computers. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: [OT] servlet-specific error pages
On Apr 12, 2011, at 4:38 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > All, > > I have a webapp where some of the servlets are expected to return XML > all the time, even for error conditions. I'd like to be able to set an > error page for those servlets so the response will be in XML instead of > HTML like you'd get with the default Tomcat error page or an error page > we might have configured for the rest of the site. > > I didn't see anything in web.xml that would allow me to set an error > page for a particular servlet. > > Any good ideas? > > Obviously, I can create a system-wide "error" resource that determines > the resource that was being used and then dispatch to either an > HTML-oriented or XML-oriented error page, but I was wondering if > something like that already existed or if there was a better approach. > > Thanks, > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk2kuEEACgkQ9CaO5/Lv0PBpqACfVky6ZZvG/Rgpt4XK804jdbei > JpEAnj/NF2td4NNHoBAbFBRAgsUDkC0v > =xjBP > -END PGP SIGNATURE- > Chris, Look the 10.9 Error Handling in the 3.0 specifications. It is maya to me but you might find what you are looking for. János - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: OT: Versioning in Javascript Files
Thanks to everyone that responded. I'll make a few comments. DOJO tends to make a million calls for images/scripts/css files. The ETag solution isn't going to optimize well because there will still be a ton of 304 requests which all take time to make happen. Also, I'm not using Apache in front of tomcat. I'm using Tomcat bare. Besides, let's face it. If the browser were doing the right thing then they would pick up that the script file changed using the last_modified header that tomcat presents. The problem is that the browsers are just using the cached version rather than making an if-modified-since request. The .js?arg=someval option is a pretty reasonable idea. It offers the advantage that I don't have to do hocus-pocus with my scripts path name. The problem I'm seeing here though is that with something like the dojo library which makes its own internal calls to load child javascript files it won't work. For example, dojo loads the dijit files including dijit/_Dialog.js. There's no way to attach the argument to the dojo request into the dijit directory. So, I think this is a fragile solution. My previous best plan was to rename my scripts directory to scripts-x.x.x. The downside of the scripts-x.x.x is that when I upgrade my customers, I've got to make the old scripts-x.x.x directory go away. I'll also have to do some hocus pocus to make CVS, the version control system OK with it. Perhaps I can just make scripts a symlink to scripts-x.x.x and keep it happy that way. The other big problem I see is that if I make the dir name change on every build, then even the tiniest of changes will force me to rename the directory. I run a hosted application and this would have to be done across hundreds of deployments. The rewrite solution is OK. It solves the problems but adds another component to my request cycle, and to my distribution load. On the other hand, it doesn't have the icky problem of needing to rename the directory every time I push out a trivial change. The other advantage I see is that using this, I can set arbitrarily long expires headers on my responses so that the browser "should" only request files when the program version changes. This is probably the solution I should go with. Again, thanks to everyone who responded. George Sexton MH Software, Inc. 303 438-9585 www.mhsoftware.com > -Original Message- > From: Ognjen Blagojevic [mailto:ognjen.d.blagoje...@gmail.com] > Sent: Tuesday, April 12, 2011 1:06 PM > To: users@tomcat.apache.org > Subject: Re: OT: Versioning in Javascript Files > > Chris, > > >>href="some.css?v=${parameter}" > > > > Some clients and proxies will refuse to cache resources with a query > > string. In those cases, caching (obviously) won't work and there > might > > be a significant loss in performance of the web site. > > Exactly. I tested on one usecase (no proxy, limited number of web > browsers), which is not representative. Now I see that it should not be > used as a general solution. > > -Ognjen > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
[OT] servlet-specific error pages
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I have a webapp where some of the servlets are expected to return XML all the time, even for error conditions. I'd like to be able to set an error page for those servlets so the response will be in XML instead of HTML like you'd get with the default Tomcat error page or an error page we might have configured for the rest of the site. I didn't see anything in web.xml that would allow me to set an error page for a particular servlet. Any good ideas? Obviously, I can create a system-wide "error" resource that determines the resource that was being used and then dispatch to either an HTML-oriented or XML-oriented error page, but I was wondering if something like that already existed or if there was a better approach. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2kuEEACgkQ9CaO5/Lv0PBpqACfVky6ZZvG/Rgpt4XK804jdbei JpEAnj/NF2td4NNHoBAbFBRAgsUDkC0v =xjBP -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?
- Original Message (edited) > Subject: Two Tomcat 7.0.11 installations in the same Linux instance, running >both on port 80, without conflicts? > I'm considering a parallel Tomcat installation in the same > Linux VPS, both running at the same time. I perfectly know > that it can be done, but how do I do with the port conflict? Use different IP addresses for each Tomcat; specify the IP address chosen via the address attribute. - Chuck - Original Message (edited) Don't forget to either add an address attribute in the element (or change the port) for the shutdown command. BTW, nice new attribute (address) for the element. . . . just my two cents. /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Help with CsrfPreventionFilter
Hi, We don't make use of JSTL so I can't access it that way. We do use XSL that is run through a transform. And of course relevant values are retrieved from the back end too. So, in the back-end, would I have to essentially subclass org.apache.catalina.filters.CsrfPreventionFilter (since that would be the only way I could invoke the protected method generateNonce) in order to create the nonce? Or am I over-complicating matters as there exists a simpler way keeping in mind we don't use JSTL? I apologize, I am new at this so I am try to learn this all as I go along. Cheers, Matt -Original Message- From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: Sunday, April 10, 2011 6:22 PM To: Tomcat Users List Subject: Re: Help with CsrfPreventionFilter 2011/4/11 Mathew Samuel : > Hi Konstantin, > > I will try to avoid mapping the filter to those paths as you have suggested > as yes that is another approach I can try. > > You had mentioned that the filter works by providing its own > implementation of encodeURL(). Is this a function I have to explicitly call > or is it something that is already called as a result of using the > CsrfPreventionFilter? Something that you have to call explicitly. Though there are a number other means to call it, e.g. c:url tag of JSTL calls it. The filter wraps original request/response and provides implementation for this function. See the Servlet Spec for what encodeURL() is. BTW, the source code of the filter is available. You can read or debug it, if there are more questions. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to hide tomcat console when installed as service
On 04/12/2011 11:43 AM, Amit k wrote: Hi, Tomcat documentation says that if tomcat is installed as service, it doesn't show up the console. But in my case this doesn't hold true. Again if the console is required for std out/err, then redirecting them to file etc wont help to display the console? Really is there not any way out? Nope. As soon you say: "Allow service to interact with desktop" the window will be shown. Hey you said you won't that. Services are console applications, and usually need a Console. Our reason is because JVM uses stderr/stdout which only work when the process has active console. Earlier versions of Commons Daemon didn't allocate that so lot of startup/shudown info was lost (no Console :) But I already said all of that. You have few choices: 1) Create a proper GUI<->Service interaction by using IPC 2) Use javaw.exe to run your Tomcat in user session and forget about services. 3) Modify Daemon code and comment out the AllocConsole API call, loosing Tomcat console messages. 4) Convince Microsoft to ditch the UAC IMHO anything but 1) is a complete waste of time. Since Microsoft says you should use IPC to interact with services from desktop well: When in Rome, do as Romans do. Or just use Linux and forget everything about GUI, desktops, services, Session0, etc ... Regards -- ^TM - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
[Cluster] Sanity check
Hi, /Httpd 2.2.17, mod_jk 1.2.31, tomcat 7.0.10, OSX 10.6.5/ Looks like there is something I do not get regarding Tomcat clustering, so I do here a sanity check :-) I have two machines with one tomcat on both. I use one of the machines as reverse proxy. here is the reverse proxy conf from the httpd.conf file: ProxyRequests Off BalancerMember http://bml0065.yalepath.org loadfactor=10 BalancerMember http://bml0066.yalepath.org loadfactor=10 ProxySet lbmethod=bytraffic ProxyPass /tc/ balancer://pathCluster/ ProxyPassReverse/tc/ balancer://pathCluster/ ProxyPassReverseCookiePAth / / ProxyPassReverseCookieDomain/ / The reverse proxy passes the request to one of the balance members. The balance member see that the request is for tomcat and passes it to mod_jk. Mod_jk is checking its workers.properties file and based upon the load it passes the request to one of the two Tomcat instances. Here is one of the workers.properties file: bml0065:local administrator$ cat apache2/conf/workers.properties worker.list = lb,jkstatus worker.lb.type=lb worker.lb.balance_workers=tomcat1,tomcat3 worker.lb.sticky_session = True worker.lb.sticky_session_force = False worker.jkstatus.type=status worker.tomcat1.type = ajp13 worker.tomcat1.host = bml0066.yalepath.org worker.tomcat1.port = 8109 worker.tomcat1.lbfactor = 1 worker.tomcat1.redirect=tomcat3 worker.tomcat3.type = ajp13 worker.tomcat3.host = bml0065.yalepath.org worker.tomcat3.port = 8309 worker.tomcat3.lbfactor = 1 worker.tomcat3.redirect=tomcat1 To check session replication and session failover, I use the SessionExmaple servlet from the supplied examples webapp this way: http://bml0065.yalepath.org/tc/examples/servlets/servlet/SessionExample bml0065 is the reverse proxy. When I see that the session is created I shut down that tomcat which hosts the session and add another session attribute via the SessionExample servlet. The mechanism is working fine, the session fails over to the other tomcat instance. I add more session attribute, and start up the previously shouted down tomcat instance, add more attribute, then I shut down the other tomcat instance and check for fail over, etc..etc.. Everything works. Then I do not shut down tomcat, just stop the examples webapp on that tomcat instance where currently the session resides and try to add more session attribute. Instead of failing over, I receive a 404 error: HTTP Status 404 - /examples/servlets/servlet/SessionExample type Status report message /examples/servlets/servlet/SessionExample description The requested resource (/examples/servlets/servlet/SessionExample) is not available. Apache Tomcat/7.0.10 My understanding is that the request should be rerouted to the other tomcat instance and present the sessions from that machine, the same way when tomcat itself was stopped. However that is not what happen. So the question is what do I miss in this process ? Thanks ahead, János - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: OT: Versioning in Javascript Files
Chris, href="some.css?v=${parameter}" Some clients and proxies will refuse to cache resources with a query string. In those cases, caching (obviously) won't work and there might be a significant loss in performance of the web site. Exactly. I tested on one usecase (no proxy, limited number of web browsers), which is not representative. Now I see that it should not be used as a general solution. -Ognjen - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat manager fails and can't tell why.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, On 4/12/2011 12:02 PM, David kerber wrote: > On 4/12/2011 11:52 AM, Christopher Schultz wrote: >> >> Why would you think that "&" would be some kind of verboten character >> for a password? > > Because of its uses in windows as a special character (triggering the > underline), and in browsers for marking request parameters. I would be > glad to be wrong, though... Windows filename restrictions have nothing to do with request parameters. Query string parameters have a very specific way to encode characters that would otherwise interfere with the query string. Otherwise, it would not be possible to pass & and ? and = as any request parameter. The fact that the is a "password" makes no difference in how parameters are passed from the client to the server. In any event, the OP was talking about the manager app which is configured by default to use HTTP BASIC authentication, which doesn't use request parameters at all: it uses request headers, and a specific way of safely passing both the username and the password to the server which avoids any problems with the content of those values. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2kickACgkQ9CaO5/Lv0PB/wwCguT0y32fk63+IfR1dPczKHt4z nFEAoJa8LjFBYJQxQi4XHg90GKyiIaPy =9NmY -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat manager fails and can't tell why.
Most don't, and XML is typically very picky about all that. I learned that lesson several years ago trying to pass along characters in some XSL documents and files, and it balks at many special characters. I wouldn't even think of attempting that for a password embedded in XML, but that's me. -Original Message- From: David kerber [mailto:dcker...@verizon.net] Sent: Tuesday, April 12, 2011 10:29 AM To: Tomcat Users List Subject: Re: Tomcat manager fails and can't tell why. On 4/12/2011 11:17 AM, Yucca Nel wrote: > Indeed :D, > > Seems to be an issue when I add an ampersand to the password! That doesn't surprise me a bit. I don't think I've run into any password system that will accept that character, though I guess there must be some since you're using it. D > > -Original Message- From: David kerber Sent: Tuesday, April 12, > 2011 5:07 PM To: Tomcat Users List Subject: Re: Tomcat manager fails and > can't tell why. > On 4/12/2011 11:04 AM, Yucca Nel wrote: >> I do.. :) It confuses the heck out of me. >> >> Seems to fail because I change to alphanumeric password that is longer >> than 4 chars long. I also make sure to close all browser tabs so that I > > Do you close the entire browser? I don't think just closing tabs will > clear the session. > > D > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat manager fails and can't tell why.
On 4/12/2011 11:52 AM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, On 4/12/2011 11:28 AM, David kerber wrote: On 4/12/2011 11:17 AM, Yucca Nel wrote: Indeed :D, Seems to be an issue when I add an ampersand to the password! That doesn't surprise me a bit. I don't think I've run into any password system that will accept that character, though I guess there must be some since you're using it. Our password system takes that character. Anything you can fit into a UTF-8 code point, we'll take. Actually, we don't even care about the encoding. We'll take up to 4096 characters of whatever you want to send to us and use it. None of this "8 character maximum" bullshit. Why would you think that "&" would be some kind of verboten character for a password? Because of its uses in windows as a special character (triggering the underline), and in browsers for marking request parameters. I would be glad to be wrong, though... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Two Tomcat 7.0.11 installations in the same Linux instance, running both on port 80, without conflicts?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian, On 4/11/2011 6:52 PM, Brian Braun wrote: > I have a new project, for a web service that must be running all the time. > It should never be offline, and if it does, my clients will leave me, so I > can not run this app in the same Tomcat installation. If you need 100% uptime, you'll need more than one server. If you have more than one server, don't restart all Tomcat instances at once. Instead, use clustering (which includes session fail-over) and re-start each Tomcat instance individually. That should ensure that no service interruption is ever encountered. In order to cluster, you'll need some kind of server out in front that can load balance and direct requests to one of several running Tomcat instances on the back-end. Don't forget to set up redundancy at that level, too. If you're going to run a lb, you can just do what we do and run each webapp in it's own JVM and Tomcat instance, and have the lb direct the traffic to the right place. The cluster isn't necessary in that scenario unless you truly need 100% uptime (which is impossible IMHO). The real question is why you have to restart Tomcat instead of just restarting the webapp itself. We separate ours for flexibility and isolation (one OOME doesn't bring-down all services, we can run different JVMs or Tomcat versions for each webapp, etc.). Why do you restart your entire JVM just to bounce your webapp? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2kdoIACgkQ9CaO5/Lv0PCgdwCeMbJN8pVk6jr+5897Llat5UxF el0AoIAzWQoS+UyffBmvH2xPcarOA2Hy =RmPT -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat manager fails and can't tell why.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, On 4/12/2011 11:28 AM, David kerber wrote: > On 4/12/2011 11:17 AM, Yucca Nel wrote: >> Indeed :D, >> >> Seems to be an issue when I add an ampersand to the password! > > That doesn't surprise me a bit. I don't think I've run into any > password system that will accept that character, though I guess there > must be some since you're using it. Our password system takes that character. Anything you can fit into a UTF-8 code point, we'll take. Actually, we don't even care about the encoding. We'll take up to 4096 characters of whatever you want to send to us and use it. None of this "8 character maximum" bullshit. Why would you think that "&" would be some kind of verboten character for a password? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2kdTAACgkQ9CaO5/Lv0PCHDACgraBwFnV2ky8GwquYaPXlCI9e YJEAnjXFAaT8aIBCbZKLnyonw5Ybe8Bv =iLuI -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat manager fails and can't tell why.
On 4/12/2011 11:28 AM, David kerber wrote: > On 4/12/2011 11:17 AM, Yucca Nel wrote: >> Indeed :D, >> >> Seems to be an issue when I add an ampersand to the password! > That doesn't surprise me a bit. I don't think I've run into any > password system that will accept that character, though I guess there > must be some since you're using it. > > D > > I suspect tomcat would be fine with &, < and > as long as you properly encode them in your tomcat-users.xml file. It is an xml file and requires proper encoding: & = & < = < > = > --David >> -Original Message- From: David kerber Sent: Tuesday, April 12, >> 2011 5:07 PM To: Tomcat Users List Subject: Re: Tomcat manager fails and >> can't tell why. >> On 4/12/2011 11:04 AM, Yucca Nel wrote: >>> I do.. :) It confuses the heck out of me. >>> >>> Seems to fail because I change to alphanumeric password that is longer >>> than 4 chars long. I also make sure to close all browser tabs so that I >> Do you close the entire browser? I don't think just closing tabs will >> clear the session. >> >> D >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat manager fails and can't tell why.
Apologies, I seem to confuse myself, but am happy enough with that explanation :D I am ill with a brain tumour and trying to get back in swing of things after surgery. Prayers are welcome:D Yucca -Original Message- From: Caldarale, Charles R Sent: Tuesday, April 12, 2011 5:23 PM To: Tomcat Users List Subject: RE: Tomcat manager fails and can't tell why. From: Yucca Nel [mailto:yucca...@live.co.za] Subject: Re: Tomcat manager fails and can't tell why. Seems to be an issue when I add an ampersand to the password! Which is not an alphanumeric character, contrary to your earlier postings. Probably some escaping required when using non-alphanumeric, but I don't know the details. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat manager fails and can't tell why.
On 4/12/2011 11:17 AM, Yucca Nel wrote: Indeed :D, Seems to be an issue when I add an ampersand to the password! That doesn't surprise me a bit. I don't think I've run into any password system that will accept that character, though I guess there must be some since you're using it. D -Original Message- From: David kerber Sent: Tuesday, April 12, 2011 5:07 PM To: Tomcat Users List Subject: Re: Tomcat manager fails and can't tell why. On 4/12/2011 11:04 AM, Yucca Nel wrote: I do.. :) It confuses the heck out of me. Seems to fail because I change to alphanumeric password that is longer than 4 chars long. I also make sure to close all browser tabs so that I Do you close the entire browser? I don't think just closing tabs will clear the session. D - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat manager fails and can't tell why.
> From: Yucca Nel [mailto:yucca...@live.co.za] > Subject: Re: Tomcat manager fails and can't tell why. > Seems to be an issue when I add an ampersand to the password! Which is not an alphanumeric character, contrary to your earlier postings. Probably some escaping required when using non-alphanumeric, but I don't know the details. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat manager fails and can't tell why.
Indeed :D, Seems to be an issue when I add an ampersand to the password! -Original Message- From: David kerber Sent: Tuesday, April 12, 2011 5:07 PM To: Tomcat Users List Subject: Re: Tomcat manager fails and can't tell why. On 4/12/2011 11:04 AM, Yucca Nel wrote: I do.. :) It confuses the heck out of me. Seems to fail because I change to alphanumeric password that is longer than 4 chars long. I also make sure to close all browser tabs so that I Do you close the entire browser? I don't think just closing tabs will clear the session. D - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat manager fails and can't tell why.
On 4/12/2011 11:04 AM, Yucca Nel wrote: I do.. :) It confuses the heck out of me. Seems to fail because I change to alphanumeric password that is longer than 4 chars long. I also make sure to close all browser tabs so that I Do you close the entire browser? I don't think just closing tabs will clear the session. D - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat manager fails and can't tell why.
I do.. :) It confuses the heck out of me. Seems to fail because I change to alphanumeric password that is longer than 4 chars long. I also make sure to close all browser tabs so that I start a new session. Are there any illegal chars when using the xml? -Original Message- From: André Warnier Sent: Tuesday, April 12, 2011 4:57 PM To: Tomcat Users List Subject: Re: Fw: Tomcat manager fails and can't tell why. Yucca Nel wrote: From: yucca...@hotmail.com Sent: Tuesday, April 12, 2011 4:45 PM To: Tomcat Users List Subject: Tomcat manager fails and can't tell why. Hello Tomcat is playing games and I donno why. I copy my tomcat-users.xml to production and use credentials(tomcat username and password tomcat) As expected I am able to log in, but the moment I change these to more secure credentials in the xml, authentication fails. I know the xml is not meant for production authentication, but this is just to test the manager application is working before I continue with setting up rest of the server? Stupid question : do you restart Tomcat after you have changed the contents of tomcat-users.xml ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Fw: Tomcat manager fails and can't tell why.
Yucca Nel wrote: From: yucca...@hotmail.com Sent: Tuesday, April 12, 2011 4:45 PM To: Tomcat Users List Subject: Tomcat manager fails and can't tell why. Hello Tomcat is playing games and I donno why. I copy my tomcat-users.xml to production and use credentials(tomcat username and password tomcat) As expected I am able to log in, but the moment I change these to more secure credentials in the xml, authentication fails. I know the xml is not meant for production authentication, but this is just to test the manager application is working before I continue with setting up rest of the server? Stupid question : do you restart Tomcat after you have changed the contents of tomcat-users.xml ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Fw: Tomcat manager fails and can't tell why.
From: yucca...@hotmail.com Sent: Tuesday, April 12, 2011 4:45 PM To: Tomcat Users List Subject: Tomcat manager fails and can't tell why. Hello Tomcat is playing games and I donno why. I copy my tomcat-users.xml to production and use credentials(tomcat username and password tomcat) As expected I am able to log in, but the moment I change these to more secure credentials in the xml, authentication fails. I know the xml is not meant for production authentication, but this is just to test the manager application is working before I continue with setting up rest of the server? Using version 7.05 and users.xml looks as follows: This works but changing the password to alphanumeric causes it to fail!
Re: OT: Versioning in Javascript Files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tim, On 4/12/2011 7:31 AM, Tim Funk wrote: > The second is trickier. Relying on random query string is not fun since > it may cause some browsers/proxies to be less prone to caching which can > really affect performance. Especially if the the query string is > dynamic. An easier solution is to use place your scripts is a "special" > directory - then use a rewrite (or similar) rule to access them. So that > the path is dynamic (and somewhat bogus). For example: > /scripts/2011-04-11-072730/dojo.js - and in this case - you can have a > rewrite rule look for a pattern and remove it from the path and forward > to the script and let the default servlet handle things. This is exactly what we've done in a particular case, mostly for testing: we have a service provider that handles IVR telephone calls and we have to provide the audio files for them to use via HTTP. They cache all audio files so, ideally, the file is only obtained from us once (at least once per server in the cluster, I suppose). Unfortunately, they don't have an automated way to EXPIRE a particular cache entry, so we invented a bogus path element that we can change to force a cache miss and a reload. Something like this: http://www.oursite.com/audio/version/1.wav We have mapped /audio/*/ mapped to /audio so the "version" is just a random string that gets ignored by the web server -- but it's important for clients so they can properly cache. Whenever we have to update an audio clip, we just change the version number in the URL and the new file gets used. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2kXzsACgkQ9CaO5/Lv0PD/nACgjCDevK8RBSG+sHkUTC/dN1DE qFMAn13KseQKN5Qw0dLPDAKRedutYcz9 =sIHp -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: OT: Versioning in Javascript Files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ognjen, On 4/12/2011 5:37 AM, Ognjen Blagojevic wrote: > For all static resources (css, images, js) you might add artificial > parameter that will trigger reload, like this: > > href="some.css?v=${parameter}" Some clients and proxies will refuse to cache resources with a query string. In those cases, caching (obviously) won't work and there might be a significant loss in performance of the web site. Changing the path is safer and more effective. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2kXlcACgkQ9CaO5/Lv0PDWtACfQI42BqpvM+Lus3YKKOwWbjXe SfcAnR3zITZa0muhZcQYj/NzO3qMa1eD =zmBL -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [ win xp and win server 2003 ] tomcat utf8 encoding
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom, On 4/12/2011 4:22 AM, Tomislav Brkljačić wrote: > After that i added the whole spring distro, ran the test scenarios and > didn't find any problems. I guess if that works I just think it's unnecessary because you can use a filter from somewhere else (Tomcat, for instance). > Christopher Schultz-2 wrote: >> >> I don't think you want this: you only want to set the encoding when the >> client has provided none. If the client provides an encoding and you >> override it, you are probably making a bit mistake. > > I see. > The app i'm building will be accessible on intranet only. > Guessing on what can a client send as attach is not wise, i know. > > Could this issue be handled with a smarter custom filter in place of the > generic one ? Just set forceEncoding=false (or don't set it at all: the default /should/ be not to force the encoding because it's a bad idea). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2kW/wACgkQ9CaO5/Lv0PBriwCfYsjBk1b5YWGGKLYUDghs4ESW MmMAniI9+VHADDcznoZy2JWVY6qqsn/x =wA6L -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Simple Tomcat monitoring ?
Caldarale, Charles R wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Simple Tomcat monitoring ? 5396 root 20 0 832m 610m 9224 S 100 5.1 12:32.43 java the second task visible above is the interface to the search engine). Which seems to be single-thread and thus a possible bottleneck. The 100% CPU usage is very suspicious. I thought so too, but it does not seem to be. When I use the command ps -p 5396 -Lf I see multiple "instances", all running the same command. They all have the same PID, but different numbers in the "LWP" column (Light-Weight-Process ?). which would be the easiest/quickest way of starting to figure out what this tomcat is doing, and where the system/application bottleneck might be ? This has proven to be a useful tool to look inside a running Tomcat: http://moskito.anotheria.net/ I had a (very) quick look at the website. From what I gather at this first look though, it seems already a bit "invasive", in the sense that it seems that to start collecting any information at all about a servlet or tomcat, the least one can do (unless one controls the source code of the application, which I do not), is to configure another classloader etc.. That means changing the Tomcat configuration and restarting Tomcat. That's maybe a bit more than what I am looking for right now. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to hide tomcat console when installed as service
> From: Amit k [mailto:opteemuspr...@gmail.com] > Subject: Re: How to hide tomcat console when installed as service > Really is there not any way out? Did you bother to read the link that Mladen provided? http://msdn.microsoft.com/en-us/library/ms683502%28v=vs.85%29.aspx - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Simple Tomcat monitoring ?
On Tue, Apr 12, 2011 at 14:26, André Warnier wrote: > Francis GALIEGUE wrote: >> >> On Tue, Apr 12, 2011 at 12:20, André Warnier wrote: >> [...] >>> >>> Considering all the above, which would be the easiest/quickest way of >>> starting to figure out what this tomcat is doing, and where the >>> system/application bottleneck might be ? >>> >> >> We have the following tools, all very easy to setup and run: >> >> * SNMP monitoring of the JVM (allows to see the amount of memory >> consumed, the number of threads, and others - the MIB is well >> defined); >> * a shell script sending the results of a kill -3 on the JVM (a thread >> dump); >> * a script which triggers when a java.lang.OutOfMemoryError is thrown. >> >> If you are interested in any of it, I can tell you how we do it. >> >> And, considering that your server has 12 GB RAM, you could indeed do >> with a little more heap space! >> > > Thanks. I think I'll accept your offer of details. > > I don't think that OOM is a problem, but the first 2 would be a good start. > > About SNMP monitoring : I already have a "munin agent" installed on that > system, and a munin server collecting stuff like overall cpu and memory > usage. > To your knowledge, does there exist a way to collect this JVM SNMP > information via a munin plugin ? > I don't use Munin, I use cacti, but if Munin can collect SNMP information then it's only a matter of having Munin fetch the appropriate OIDs. More details in a separate mail. > > About the script doing a kill -3 : where does the thread dump go, when you > do that ? and how does the script know which PID is Tomcat ? > Mine does since the environment fetches the PID file and sends the signal to that process. It sends output to either stdout or stderr, I don't know. Script attached. Read the comments carefully, it is somewhat a hack (could be improved by detecting, say, if the output went to stderr). > On that system, the tomcat processes look like this : > > # ps -ef | grep java > root 20997 1 0 12:18 ? 00:00:00 /usr/bin/jsvc -user tomcat55 > -cp > /usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar > -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat5.5.pid > -Djava.awt.headless=true -Xms128M -Xmx128M > -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed > -Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5 > -Djava.io.tmpdir=/var/lib/tomcat5.5/temp > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager > -Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties > org.apache.catalina.startup.Bootstrap > root 20998 20997 0 12:18 ? 00:00:00 /usr/bin/jsvc -user tomcat55 > -cp > /usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar > -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat5.5.pid > -Djava.awt.headless=true -Xms128M -Xmx128M > -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed > -Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5 > -Djava.io.tmpdir=/var/lib/tomcat5.5/temp > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager > -Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties > org.apache.catalina.startup.Bootstrap > tomcat55 20999 20997 0 12:18 ? 00:00:04 /usr/bin/jsvc -user tomcat55 > -cp > /usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar > -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat5.5.pid > -Djava.awt.headless=true -Xms128M -Xmx128M > -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed > -Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5 > -Djava.io.tmpdir=/var/lib/tomcat5.5/temp > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager > -Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties > org.apache.catalina.startup.Bootstrap > vogon2:~# > > So there are 3 Tomcat-related processes, all running under jsvc. I am not > quite sure which one does what. > Wild guess: it's the one in the PID file that matters (-pidfile /xxx). It should be a variable in the Tomcat base configuration file. -- Francis Galiegue ONE2TEAM Ingénieur système Mob : +33 (0) 683 877 875 Tel : +33 (0) 178 945 552 f...@one2team.com 40 avenue Raymond Poincaré 75116 Paris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Simple Tomcat monitoring ?
> From: André Warnier [mailto:a...@ice-sa.com] > Subject: Simple Tomcat monitoring ? > 5396 root 20 0 832m 610m 9224 S 100 5.1 12:32.43 java > the second task visible above is the interface to the search engine). Which seems to be single-thread and thus a possible bottleneck. The 100% CPU usage is very suspicious. > which would be the easiest/quickest way of starting to figure > out what this tomcat is doing, and where the system/application > bottleneck might be ? This has proven to be a useful tool to look inside a running Tomcat: http://moskito.anotheria.net/ - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: Simple Tomcat monitoring ?
You could check it apache threads are the problem by using something like: ps -feH | grep httpd | wc (or something else instead httpd to hit only apache processes) If the line number gets close to 150 (Apache (prefork) MaxClients) then that is the problem. On Tue, Apr 12, 2011 at 2:18 PM, André Warnier wrote: > Borut Hadžialić wrote: >> >> I'm gonna try to make a guess here :) >> >>> top - 08:20:02 up 72 days, 9:39, 4 users, load average: 6.83, 5.63, >>> 3.16 >>> Tasks: 265 total, 1 running, 264 sleeping, 0 stopped, 0 zombie >>> Cpu(s): 0.2%us, 0.1%sy, 0.0%ni, 99.2%id, 0.5%wa, 0.0%hi, 0.0%si, >>> 0.0%st >>> Mem: 12328624k total, 11382976k used, 945648k free, 123400k buffers >>> Swap: 4882424k total, 860k used, 4881564k free, 7565012k cached >> >> - somewhat large load average (6.83) >> - but no io waiting (0.5%wa), >> - app is heavily used >> - tomcat requests take long time (sometimes takes few seconds to >> produce the answer). >> >> Could it be a lack of threads at apache or tomcat? > > Spot on for the observation. > > That is one of the things that puzzle me : overall CPU usage is very low, > and there is no i/o wait. Yet the load average is high (which should mean > that a number of processes are constantly waiting for something), and Tomcat > is using 333% of CPU time (which may be very little time in an absolute > sense, but is puzzling anyway). > And the clients are waiting. > So where are the time/resources being spent ? > > About threads : > - Apache (prefork) MaxClients is set to 150 > - Tomcat AJP Connector does not specify any thread parameters, so defaults > apply, which should be : > maxThreads : 200 > maxSpareThreads : 50 > minSpareThreads : 4 > > Considering that Apache handles most requests for static contents, I think > that the numbers should be about right. > But not having so far done any real monitoring, that may be wrong. Which is > one of the things I'd like to check. > > I think I'll start by making the Tomcat AJP Connector parameters explicit, > and raise the minSpareThreads a bit. And also its Heap size. > But I don't like to start changing things left and right, without knowing > exactly why I'm doing it. > > Is there for example any parameter or command-line switch that I can use for > the JVM or Tomcat, which would tell me a bit more (in the logs) about when > Tomcat is starting a new thread, how many are alive on average etc.. ? > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Why? Because YES! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Simple Tomcat monitoring ?
Francis GALIEGUE wrote: On Tue, Apr 12, 2011 at 12:20, André Warnier wrote: [...] Considering all the above, which would be the easiest/quickest way of starting to figure out what this tomcat is doing, and where the system/application bottleneck might be ? We have the following tools, all very easy to setup and run: * SNMP monitoring of the JVM (allows to see the amount of memory consumed, the number of threads, and others - the MIB is well defined); * a shell script sending the results of a kill -3 on the JVM (a thread dump); * a script which triggers when a java.lang.OutOfMemoryError is thrown. If you are interested in any of it, I can tell you how we do it. And, considering that your server has 12 GB RAM, you could indeed do with a little more heap space! Thanks. I think I'll accept your offer of details. I don't think that OOM is a problem, but the first 2 would be a good start. About SNMP monitoring : I already have a "munin agent" installed on that system, and a munin server collecting stuff like overall cpu and memory usage. To your knowledge, does there exist a way to collect this JVM SNMP information via a munin plugin ? About the script doing a kill -3 : where does the thread dump go, when you do that ? and how does the script know which PID is Tomcat ? On that system, the tomcat processes look like this : # ps -ef | grep java root 20997 1 0 12:18 ?00:00:00 /usr/bin/jsvc -user tomcat55 -cp /usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat5.5.pid -Djava.awt.headless=true -Xms128M -Xmx128M -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed -Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5 -Djava.io.tmpdir=/var/lib/tomcat5.5/temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties org.apache.catalina.startup.Bootstrap root 20998 20997 0 12:18 ?00:00:00 /usr/bin/jsvc -user tomcat55 -cp /usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat5.5.pid -Djava.awt.headless=true -Xms128M -Xmx128M -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed -Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5 -Djava.io.tmpdir=/var/lib/tomcat5.5/temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties org.apache.catalina.startup.Bootstrap tomcat55 20999 20997 0 12:18 ?00:00:04 /usr/bin/jsvc -user tomcat55 -cp /usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat5.5.pid -Djava.awt.headless=true -Xms128M -Xmx128M -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed -Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5 -Djava.io.tmpdir=/var/lib/tomcat5.5/temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties org.apache.catalina.startup.Bootstrap vogon2:~# So there are 3 Tomcat-related processes, all running under jsvc. I am not quite sure which one does what. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Simple Tomcat monitoring ?
Borut Hadžialić wrote: I'm gonna try to make a guess here :) top - 08:20:02 up 72 days, 9:39, 4 users, load average: 6.83, 5.63, 3.16 Tasks: 265 total, 1 running, 264 sleeping, 0 stopped, 0 zombie Cpu(s): 0.2%us, 0.1%sy, 0.0%ni, 99.2%id, 0.5%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 12328624k total, 11382976k used, 945648k free, 123400k buffers Swap: 4882424k total, 860k used, 4881564k free, 7565012k cached - somewhat large load average (6.83) - but no io waiting (0.5%wa), - app is heavily used - tomcat requests take long time (sometimes takes few seconds to produce the answer). Could it be a lack of threads at apache or tomcat? Spot on for the observation. That is one of the things that puzzle me : overall CPU usage is very low, and there is no i/o wait. Yet the load average is high (which should mean that a number of processes are constantly waiting for something), and Tomcat is using 333% of CPU time (which may be very little time in an absolute sense, but is puzzling anyway). And the clients are waiting. So where are the time/resources being spent ? About threads : - Apache (prefork) MaxClients is set to 150 - Tomcat AJP Connector does not specify any thread parameters, so defaults apply, which should be : maxThreads : 200 maxSpareThreads : 50 minSpareThreads : 4 Considering that Apache handles most requests for static contents, I think that the numbers should be about right. But not having so far done any real monitoring, that may be wrong. Which is one of the things I'd like to check. I think I'll start by making the Tomcat AJP Connector parameters explicit, and raise the minSpareThreads a bit. And also its Heap size. But I don't like to start changing things left and right, without knowing exactly why I'm doing it. Is there for example any parameter or command-line switch that I can use for the JVM or Tomcat, which would tell me a bit more (in the logs) about when Tomcat is starting a new thread, how many are alive on average etc.. ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: OT: Versioning in Javascript Files
On Tue, Apr 12, 2011 at 13:31, Tim Funk wrote: [...] > > The second is trickier. Relying on random query string is not fun since it > may cause some browsers/proxies to be less prone to caching which can really > affect performance. Especially if the the query string is dynamic. An easier > solution is to use place your scripts is a "special" directory - then use a > rewrite (or similar) rule to access them. So that the path is dynamic (and > somewhat bogus). For example: > /scripts/2011-04-11-072730/dojo.js - and in this case - you can have a > rewrite rule look for a pattern and remove it from the path and forward to > the script and let the default servlet handle things. > > Then to populate "2011-04-11-072730" - you can do that one of 3 ways: > - At build time - calculate the timestamp and replace it > - At run time - use a configuration parameter in context.xml > - A combo of both - I like this one best since a build can trigger a new > name, but sometimes you may run into situations where you don't need a build > but you need it refreshed - so a server parameter tweak makes this easy too > (and if savvy enough can be done via JMX to save a restart from occurring) > No need... Just have the server part calculate an appropriate ETag for this case. It is no replacement for the first solution (which is, and always will be, the best one), but it allows the client to query the server with an If-None-Match header. Apache does this by default with a combination of mtime and inode number IIRC. I don't know, I never use ETags but only adapted Cache-Control directives. -- Francis Galiegue ONE2TEAM Ingénieur système Mob : +33 (0) 683 877 875 Tel : +33 (0) 178 945 552 f...@one2team.com 40 avenue Raymond Poincaré 75116 Paris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Simple Tomcat monitoring ?
I'm gonna try to make a guess here :) > top - 08:20:02 up 72 days, 9:39, 4 users, load average: 6.83, 5.63, 3.16 > Tasks: 265 total, 1 running, 264 sleeping, 0 stopped, 0 zombie > Cpu(s): 0.2%us, 0.1%sy, 0.0%ni, 99.2%id, 0.5%wa, 0.0%hi, 0.0%si, 0.0%st > Mem: 12328624k total, 11382976k used, 945648k free, 123400k buffers > Swap: 4882424k total, 860k used, 4881564k free, 7565012k cached - somewhat large load average (6.83) - but no io waiting (0.5%wa), - app is heavily used - tomcat requests take long time (sometimes takes few seconds to produce the answer). Could it be a lack of threads at apache or tomcat? On Tue, Apr 12, 2011 at 12:20 PM, André Warnier wrote: > Hi. > > I have a Linux application server running Apache + mod_jk + tomcat 5.5 (I > know that it is relatively old; and to compound the heresy, it is installed > from a Debian package). > The hardware is quite OK (quad-core fast CPU, 12 GB RAM). > > Apache is serving most of the static content, and passing some requests to > Tomcat via AJP. Tomcat runs basically a single application, but this > webapp, although itself quite small, can be heavily used : it is an > interface to a text retrieval system (a kind of database specialised for > textual data), and some of the searches made by users can take several > seconds to come back with results, which may themselves be several pages of > data. > > I can access the host remotely via SSH and via HTTP, and have full control > of it. > But it is a productive customer server, so there are limits to what I can > do. > > I am having performance issues with that system : users at times complain > that "they cannot access the application", and I see things like this in a > "top" display : > > top - 08:20:02 up 72 days, 9:39, 4 users, load average: 6.83, 5.63, 3.16 > Tasks: 265 total, 1 running, 264 sleeping, 0 stopped, 0 zombie > Cpu(s): 0.2%us, 0.1%sy, 0.0%ni, 99.2%id, 0.5%wa, 0.0%hi, 0.0%si, > 0.0%st > Mem: 12328624k total, 11382976k used, 945648k free, 123400k buffers > Swap: 4882424k total, 860k used, 4881564k free, 7565012k cached > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 2023 tomcat55 20 0 627m 184m 9344 S 333 1.5 32:00.47 jsvc > 5396 root 20 0 832m 610m 9224 S 100 5.1 12:32.43 java > 1 root 20 0 10316 760 624 S 0 0.0 0:33.14 init > > (where I presume that if tomcat is showing 333% CPU usage, it is because it > is running on multiple cores; the second task visible above is the interface > to the search engine). > > Anyway, my question is : > > Considering all the above, which would be the easiest/quickest way of > starting to figure out what this tomcat is doing, and where the > system/application bottleneck might be ? > > My preference would be in an easy tool to install and run, to first get a > rough idea, and then maybe select more specific tools to examine one or the > other area more in-depth. > Or maybe I can just first add some command-line switches to the JVM running > tomcat, to give me more information in the logs ? > > (My workstation is Windows XP, and I can install anything I want on it.) > > Additional details : > > Platform : (Linux 64-bit) > # uname -a > Linux vogon2 2.6.26-2-amd64 #1 SMP Thu Nov 25 04:30:55 UTC 2010 x86_64 > GNU/Linux > > Tomcat and Java : > > Using CATALINA_BASE: /usr/share/tomcat5.5 > Using CATALINA_HOME: /usr/share/tomcat5.5 > Using CATALINA_TMPDIR: /usr/share/tomcat5.5/temp > Using JRE_HOME: /usr/lib/jvm/java-6-sun > Server version: Apache Tomcat/5.5 > Server built: Oct 15 2008 12:57:44 > Server number: 5.5.26.0 > OS Name: Linux > OS Version: 2.6.26-2-amd64 > Architecture: amd64 > JVM Version: 1.6.0_22-b04 > JVM Vendor: Sun Microsystems Inc. > vogon2:/usr/share/tomcat5.5/bin# > > Tomcat is started as : > tomcat55 2023 2021 6 Apr11 ? 00:31:58 /usr/bin/jsvc -user tomcat55 > -cp > /usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar > -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat5.5.pid > -Djava.awt.headless=true -Xms128M -Xmx128M > -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed > -Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5 > -Djava.io.tmpdir=/var/lib/tomcat5.5/temp > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager > -Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties > org.apache.catalina.startup.Bootstrap > > (which I don't think is a lot of heap space, which may be a problem here. > But before I change it, I'd like to know why I change it; the server.xml > settings are pretty much the standard issue, all defaults for threads > etc..). > > Apache and mod_jk : > > Apache/2.2.9 (Debian) DAV/2 mod_jk/1.2.26 mod_apreq2-20051231/2.6.0 > mod_perl/2.0.4 Perl/v5.10.0 configured > > Thanks in advance for any recommendation > > >
Re: OT: Versioning in Javascript Files
I've loathed this issue too. There are 2 major cases to deal with - Libraries changing (like dojo, prototype, etc) - Your external files changing The first is "easy" to change .. in that you create a /scripts/ dir and all 3rd party libraries go into their own directory with version number. New version - new directory (and hope the file names remain the same). Then *hopefully* you have a common include file that you just need to change once to point to the new directory. (Of course a global find/replace in this case is easy) The second is trickier. Relying on random query string is not fun since it may cause some browsers/proxies to be less prone to caching which can really affect performance. Especially if the the query string is dynamic. An easier solution is to use place your scripts is a "special" directory - then use a rewrite (or similar) rule to access them. So that the path is dynamic (and somewhat bogus). For example: /scripts/2011-04-11-072730/dojo.js - and in this case - you can have a rewrite rule look for a pattern and remove it from the path and forward to the script and let the default servlet handle things. Then to populate "2011-04-11-072730" - you can do that one of 3 ways: - At build time - calculate the timestamp and replace it - At run time - use a configuration parameter in context.xml - A combo of both - I like this one best since a build can trigger a new name, but sometimes you may run into situations where you don't need a build but you need it refreshed - so a server parameter tweak makes this easy too (and if savvy enough can be done via JMX to save a restart from occurring) Good luck ... -Tim On 4/11/2011 5:47 PM, George Sexton wrote: I'm looking for ideas on how other people are doing versioning in Javascript files. I'm hitting issues if I change my files in an incompatible way, or I upgrade files. For example, if I upgrade from DOJO 1.5 to DOJO 1.6, the user's browsers are not always refreshing the DOJO files, and things don't work. Similarly, if I update a javascript function to take additional arguments, then the browser using the old version throws an error. I've spent a lot of time in the past few days telling users to click on the refresh button of their browser and I'm pretty sick of it. I've thought of versioning my whole "scripts" directory. IOW, if my app version is 3.4.9, make the scripts directory scripts-3.4.9 to force the browser to get files from the new location. This is kind of a pain for version control reasons but otherwise it's OK. I'm really looking for ideas on how other web developers are handling this problem. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Simple Tomcat monitoring ?
On Tue, Apr 12, 2011 at 12:20, André Warnier wrote: [...] > > Considering all the above, which would be the easiest/quickest way of > starting to figure out what this tomcat is doing, and where the > system/application bottleneck might be ? > We have the following tools, all very easy to setup and run: * SNMP monitoring of the JVM (allows to see the amount of memory consumed, the number of threads, and others - the MIB is well defined); * a shell script sending the results of a kill -3 on the JVM (a thread dump); * a script which triggers when a java.lang.OutOfMemoryError is thrown. If you are interested in any of it, I can tell you how we do it. And, considering that your server has 12 GB RAM, you could indeed do with a little more heap space! -- Francis Galiegue ONE2TEAM Ingénieur système Mob : +33 (0) 683 877 875 Tel : +33 (0) 178 945 552 f...@one2team.com 40 avenue Raymond Poincaré 75116 Paris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Simple Tomcat monitoring ?
Hi. I have a Linux application server running Apache + mod_jk + tomcat 5.5 (I know that it is relatively old; and to compound the heresy, it is installed from a Debian package). The hardware is quite OK (quad-core fast CPU, 12 GB RAM). Apache is serving most of the static content, and passing some requests to Tomcat via AJP. Tomcat runs basically a single application, but this webapp, although itself quite small, can be heavily used : it is an interface to a text retrieval system (a kind of database specialised for textual data), and some of the searches made by users can take several seconds to come back with results, which may themselves be several pages of data. I can access the host remotely via SSH and via HTTP, and have full control of it. But it is a productive customer server, so there are limits to what I can do. I am having performance issues with that system : users at times complain that "they cannot access the application", and I see things like this in a "top" display : top - 08:20:02 up 72 days, 9:39, 4 users, load average: 6.83, 5.63, 3.16 Tasks: 265 total, 1 running, 264 sleeping, 0 stopped, 0 zombie Cpu(s): 0.2%us, 0.1%sy, 0.0%ni, 99.2%id, 0.5%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 12328624k total, 11382976k used, 945648k free, 123400k buffers Swap: 4882424k total, 860k used, 4881564k free, 7565012k cached PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 2023 tomcat55 20 0 627m 184m 9344 S 333 1.5 32:00.47 jsvc 5396 root 20 0 832m 610m 9224 S 100 5.1 12:32.43 java 1 root 20 0 10316 760 624 S0 0.0 0:33.14 init (where I presume that if tomcat is showing 333% CPU usage, it is because it is running on multiple cores; the second task visible above is the interface to the search engine). Anyway, my question is : Considering all the above, which would be the easiest/quickest way of starting to figure out what this tomcat is doing, and where the system/application bottleneck might be ? My preference would be in an easy tool to install and run, to first get a rough idea, and then maybe select more specific tools to examine one or the other area more in-depth. Or maybe I can just first add some command-line switches to the JVM running tomcat, to give me more information in the logs ? (My workstation is Windows XP, and I can install anything I want on it.) Additional details : Platform : (Linux 64-bit) # uname -a Linux vogon2 2.6.26-2-amd64 #1 SMP Thu Nov 25 04:30:55 UTC 2010 x86_64 GNU/Linux Tomcat and Java : Using CATALINA_BASE: /usr/share/tomcat5.5 Using CATALINA_HOME: /usr/share/tomcat5.5 Using CATALINA_TMPDIR: /usr/share/tomcat5.5/temp Using JRE_HOME: /usr/lib/jvm/java-6-sun Server version: Apache Tomcat/5.5 Server built: Oct 15 2008 12:57:44 Server number: 5.5.26.0 OS Name:Linux OS Version: 2.6.26-2-amd64 Architecture: amd64 JVM Version:1.6.0_22-b04 JVM Vendor: Sun Microsystems Inc. vogon2:/usr/share/tomcat5.5/bin# Tomcat is started as : tomcat55 2023 2021 6 Apr11 ?00:31:58 /usr/bin/jsvc -user tomcat55 -cp /usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat5.5.pid -Djava.awt.headless=true -Xms128M -Xmx128M -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed -Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5 -Djava.io.tmpdir=/var/lib/tomcat5.5/temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties org.apache.catalina.startup.Bootstrap (which I don't think is a lot of heap space, which may be a problem here. But before I change it, I'd like to know why I change it; the server.xml settings are pretty much the standard issue, all defaults for threads etc..). Apache and mod_jk : Apache/2.2.9 (Debian) DAV/2 mod_jk/1.2.26 mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 configured Thanks in advance for any recommendation - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to hide tomcat console when installed as service
Hi, Tomcat documentation says that if tomcat is installed as service, it doesn't show up the console. But in my case this doesn't hold true. Again if the console is required for std out/err, then redirecting them to file etc wont help to display the console? Really is there not any way out? On Mon, Apr 11, 2011 at 11:26 AM, Mladen Turk wrote: > On 04/11/2011 07:01 AM, Amit k wrote: > >> Hi, >> >> I actually tried that option. I know it works but under one situation it >> fails. When your application require tomcat to interact with desktop it >> fails and in my case, application in tomcat interacts with Desktop through >> JNI call. So I cant use this option. >> >> And moreover it is required to be done with script and not manually. >> >> Hope someone has solution for this problem or specifically for scenario. >> >> > Usually services and desktop interaction are mutually exclusive. > What happens when you boot the box and no user is present. > > It might work with XP, but making it work with Vista+ is > almost impossible cause services run in a different session. > > Console window will be shown (not with older versions of > Commons Daemon, so that's why an older 5.5 didn't pop-up) > because it is needed for stdout/stderr redirection since > we explicitly call 'AllocConsole' which isn't displayed > with services cause services don't have GUI. > "Interact with desktop" usage is strongly discouraged since > you need some pretty complex stuff to make it work. > See: > http://msdn.microsoft.com/en-us/library/ms683502%28v=vs.85%29.aspx > > We have a sort of service interaction (for making thread dumps) > but this is done via an mutex registered to a Global session. > (Basically a sort of IPC) > > So I'd suggest you modify your application to use some sort > of IPC to communicate between the service and desktop processes > like suggested by MSDN. > > > > Regards > -- > ^TM > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: OT: Versioning in Javascript Files
On 11.4.2011 23:47, George Sexton wrote: I'm looking for ideas on how other people are doing versioning in Javascript files. I'm hitting issues if I change my files in an incompatible way, or I upgrade files. For example, if I upgrade from DOJO 1.5 to DOJO 1.6, the user's browsers are not always refreshing the DOJO files, and things don't work. Similarly, if I update a javascript function to take additional arguments, then the browser using the old version throws an error. I've spent a lot of time in the past few days telling users to click on the refresh button of their browser and I'm pretty sick of it. I've thought of versioning my whole "scripts" directory. IOW, if my app version is 3.4.9, make the scripts directory scripts-3.4.9 to force the browser to get files from the new location. This is kind of a pain for version control reasons but otherwise it's OK. I'm really looking for ideas on how other web developers are handling this problem. For all static resources (css, images, js) you might add artificial parameter that will trigger reload, like this: href="some.css?v=${parameter}" Where 'parameter' might be: 1. Static resource last modification time. This will trigger reload every time resource is changed. 2. Static resource hash, this will trigger reload every time static resource is changed (except for the insignificant number of cases) 3. Application version (1.3.1, 1.3.2...). This will trigger reload every time new version of application is released. This requires proper release process, and triggers some extra reloads even when there is no need for that. 4. Current system time. This will trigger reload of resource every time. We use no. 3, since Maven packaging makes it really easy to implement (${pom.version}}. Regards, Ognjen - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Question about HttpSessionBindingListener and getAttribute in valueBound()
I found the answer in the servlet specification : SRV.7.4Binding Attributes into a Session "The valueBound method must be called before the object is made available via the getAttribute method of the HttpSession interface." Sorry for the noise :-\ Le 12/04/2011 11:05, Thomas Chabaud a écrit : Hi, I have problem with Tomcat 6.0 StandardSession implementation. We have an application who calls setAttribute("myAttr", myValue), and try to get this attribute in a method launched in valueBound(), but only gets null value. According to source code, the setAttribute() method calls valueBound *before* setting attribute in attributes Map : public void setAttribute(String name, Object value, boolean notify) { [...] // Call the valueBound() method if necessary if (notify && value instanceof HttpSessionBindingListener) { // Don't call any notification if replacing with the same value Object oldValue = attributes.get(name); if (value != oldValue) { event = new HttpSessionBindingEvent(getSession(), name, value); try { ((HttpSessionBindingListener) value).valueBound(event); } catch (Throwable t) { manager.getContainer().getLogger().error(sm.getString("standardSession.bindingEvent"), t); } } } // Replace or add this attribute Object unbound = attributes.put(name, value); // Call the valueUnbound() method if necessary [...] } Why valueBound() is called before setting the attribute in the map ? Is it allowed to call getAttribute() from valueBound() ? Is the following code correct ? setAttribute("myAttr", myValue); -> valueBound() event fired In the valueBound() : // getAttribute() always returns null Object myAttr = getAttribute("myAttr"); Thanks in advance. Regards, Thomas Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe. This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe. This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Question about HttpSessionBindingListener and getAttribute in valueBound()
Hi, I have problem with Tomcat 6.0 StandardSession implementation. We have an application who calls setAttribute("myAttr", myValue), and try to get this attribute in a method launched in valueBound(), but only gets null value. According to source code, the setAttribute() method calls valueBound *before* setting attribute in attributes Map : public void setAttribute(String name, Object value, boolean notify) { [...] // Call the valueBound() method if necessary if (notify && value instanceof HttpSessionBindingListener) { // Don't call any notification if replacing with the same value Object oldValue = attributes.get(name); if (value != oldValue) { event = new HttpSessionBindingEvent(getSession(), name, value); try { ((HttpSessionBindingListener) value).valueBound(event); } catch (Throwable t) { manager.getContainer().getLogger().error(sm.getString("standardSession.bindingEvent"), t); } } } // Replace or add this attribute Object unbound = attributes.put(name, value); // Call the valueUnbound() method if necessary [...] } Why valueBound() is called before setting the attribute in the map ? Is it allowed to call getAttribute() from valueBound() ? Is the following code correct ? setAttribute("myAttr", myValue); -> valueBound() event fired In the valueBound() : // getAttribute() always returns null Object myAttr = getAttribute("myAttr"); Thanks in advance. Regards, Thomas Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe. This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [ win xp and win server 2003 ] tomcat utf8 encoding
Cris, Christopher Schultz-2 wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Tom, > > On 4/9/2011 12:53 PM, Tomislav Brkljačić wrote: >> I gave the "add the filter and bunch of Spring jars" method a try and it >> turned out to be a success! > > You don't need a "bunch of Spring jars"... just use the one that comes > with Tomcat and be done with it: there's no reason to add unnecessary > libraries to your webapp. > > Well there seemed to be more than 3 dependancies. I tried with org.springframework.web-3.1.0.M1.jar only, but it didn't work. Then i added the *-core.jar", but still problems. Tried adding "*-beans.jar", but still problems with loading. After that i added the whole spring distro, ran the test scenarios and didn't find any problems. Christopher Schultz-2 wrote: > > I don't think you want this: you only want to set the encoding when the > client has provided none. If the client provides an encoding and you > override it, you are probably making a bit mistake. > > I see. The app i'm building will be accessible on intranet only. Guessing on what can a client send as attach is not wise, i know. Could this issue be handled with a smarter custom filter in place of the generic one ? Christopher Schultz-2 wrote: > >> Andre & Cris, a beer in your name tonight. > > You should send me a Belgian beer and Andre an American one. :) > > (PS there actually are decent American beers) > > - -chris > I've heard of Corsendonk beer as a fine one. Don't know any American beers (beside B) :) -- View this message in context: http://old.nabble.com/--win-xp-and-win-server-2003---tomcat-utf8-encoding-tp31342723p31377067.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: OT: Versioning in Javascript Files
On Mon, Apr 11, 2011 at 23:47, George Sexton wrote: > I'm looking for ideas on how other people are doing versioning in Javascript > files. I'm hitting issues if I change my files in an incompatible way, or I > upgrade files. > > For example, if I upgrade from DOJO 1.5 to DOJO 1.6, the user's browsers are > not always refreshing the DOJO files, and things don't work. > > Similarly, if I update a javascript function to take additional arguments, > then the browser using the old version throws an error. > > I've spent a lot of time in the past few days telling users to click on the > refresh button of their browser and I'm pretty sick of it. > > I've thought of versioning my whole "scripts" directory. IOW, if my app > version is 3.4.9, make the scripts directory scripts-3.4.9 to force the > browser to get files from the new location. This is kind of a pain for > version control reasons but otherwise it's OK. > > I'm really looking for ideas on how other web developers are handling this > problem. > Simple solution: change paths if you change versions! 1.5 would be /static/dojo-1.5.js, 1.6 would be /static/dojo-1.6.js, etc. I don't know your setup exactly, but it is highly probable that the server sends back cache control headers saying that this file at this URL expires some time in the future. If the URL doesn't change, the browser won't even bother reloading. It is only if the path changes that you can be sure that the new version will be reloaded. -- Francis Galiegue ONE2TEAM Ingénieur système Mob : +33 (0) 683 877 875 Tel : +33 (0) 178 945 552 f...@one2team.com 40 avenue Raymond Poincaré 75116 Paris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org