Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
Peter Crowther wrote: From: André Warnier [mailto:a...@ice-sa.com] Christopher Schultz wrote: What about forwarding X through the tunnel instead? You can't, because it is variable. It is the result of some internal negotiation between Jconsole and the remote JVM. Apparently, anyway. I haven't managed to make it work so far. To expand Chris' suggestion: What about forwarding the X11 protocol through the tunnel instead, such that you can run Jconsole on the same machine as the JVM? X11 has a fixed port number, and ssh has support for this. I've used this trick when needing to do something graphical on a box with ssh-only access; works a treat. Sorry to be so obtuse. X is not something I use regularly, so when Chris mentioned X, I thought he was talking about the secondary connection/port that the JVM/Jconsole agree on, not about X-terminal and so. So thanks for the tip, but could you expand even more ? I realise this isn't really a Tomcat matter, but maybe this can help someone else in a similar situation. At which level would X11 kick in ? Layout is as follows : Office A : workstation (me) -- firewall/router - internet modem -- internet Office B : internet - internet modem - firewall/router - Tomcat host There is no VPN setup between A and B. My workstation is a Windows laptop. I don't presently have an X emulator on it. It has Java JDK 6, an SSH terminal-like program (putty), WinSCP, etc.. I'd rather avoid installing Cygwin on the laptop, because it interferes with other Unix-like things I have on it. The Tomcat host has a fixed internal IP address. I could also fix the internal IP address of my workstation. I have full control of the routers/firewalls/hosts. The firewall/router at B automatically tunnels ports 22,80,8080 and some others to the Tomcat host. I can add more tunnels. I can also build on-demand tunnels from outside to any inside host/port via the firewall and SSH. Doing something in the other direction is more tricky , because both Office A and B have variable internet IP addresses which change once per 24h (both with dynamic DNS though). I'm usually at A. B is my home office, and when my laptop is there, I have no problem running JConsole on it and connecting to the Tomcat host, because both are then on the same LAN. But I haven't managed that yet from A. ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Steps to build mod_jk.so
Rhandir, after you've downloaded the source of mod_jk and extracting them, you'll find a file there BUILD.txt. = [ extract ] === For the impatient Apache admins: $ cd native $ ./configure --with-apxs=/usr/sbin/apxs (or where ever the apxs/apxs2 is) $ make $ su -c 'make install' = I ran those steps here on Debian with one little adaption: $ ./configure --with-apxs=/usr/bin/apxs2 If you're running APache 1.x, you'll need apxs, when running Apache2, you'll need apxs2 If you don't know what I'm talking about, ask auntie Google about Apache apxs. Furthermore, make sure you've got the necessary packages installed (libtool etc.) as stated in the docs of mod_jk. I'm appreciating that you're trying to figure things out, however, I seriously believe you should get some hands on the basics of Apache, Tomcat and maybe (?) your favourite Linux. Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Location of download of mod_jk-1.2.26-httpd-2.2.4.so
On Wed, Feb 4, 2009 at 11:39 PM, randhir.si...@elitecore.com wrote: I wanted to know of the site or place to download mod_jk-1.2.26-httpd-2.2.4.so that I can rename it to mod_jk.so to include it in the $APACHE_HOME/libexec path as my httpd.conf is having the line:- Ok, Randir, this is my last answer for you - your ignorance is unbelievable: - an .so-file in Linux is a compiled file - in the docs which I pointed out is also a link to download the binaries (meaning the compiled files) - however, it's not recommended to download a compiled file but to download the sources and compile them yourself - if you don't know what the commands configure, make and make install meand within Linux - don't get only a training on Apache, and Tomcat, but also get a training on Linux Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
http://solaris.reys.net/english/2006/04/x11_forwarding Works pretty much the same on any other Linux Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
epicwin...@hotmail.com wrote: Is there any advantage why I should not just jar all my class files and put them in WEB-INF/lib rather than exploding the jar file to the classes directory? I like developing with the classes and I understand it is nice to let tomcat deploy a .war file but it also creates some problems for me because i deploy to multiple production servers with different settings that get overwritten every time my war file is expanded. Use ant/maven and build preconfigured war files. It's much, much easier to distribute/deploy single war file instead of expanded directory (not to mention single .class files for updates). You can keep site-specific configuration files outside of webapplication, so they will not get overwritten with deploys. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Basic IIS Authentication
Hello everybody, I have a webservice created, who has to fill-out a remote form on a website to publish articles remotely. Now the Server has an IIS with Basic Authentication and in my Java File, I get 401 - Access denied. Has somebody a simple example to fill-out a form? Greetings Alexander
request for advice Tomcat-weblogic
Hello there, I need an advice about how to transfer the settings in tomcat-users.xml to weblogic. And I hope someone is familiar with both and could help. For example, in tomcat-users.xml I have role rolename=configurator/ user username=tomcat password=tomcat roles=tomcat,admin,administrator,manager,configurator/ And in the application, there are some parts restricted like /management/* which needs user with the specified role to authenticate itself before get access (here is the example) security-constraint web-resource-collection web-resource-nameHTMLManger and Manager command/web-resource-name url-pattern/management/*/url-pattern /web-resource-collection auth-constraint !-- NOTE: This role is not present in the default users file -- role-nameconfigurator/role-name /auth-constraint /security-constraint Does someone know how to setup weblogic so I can get the same functionality like in tomcat. -- Best regards, Niki - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
ignoring the maven fanatics, Tomcat's classloader searches the WEB-INF/classes directory before the WEB-INF/lib/*.jar. This means that it is sometimes nice to use WEB-INF/classes for a development server. But for a production server you won't see much difference. epicwin...@hotmail.com wrote in message news:blu145-w4482e2db3f2697c2cf7c5dc3...@phx.gbl... Is there any advantage why I should not just jar all my class files and put them in WEB-INF/lib rather than exploding the jar file to the classes directory? I like developing with the classes and I understand it is nice to let tomcat deploy a .war file but it also creates some problems for me because i deploy to multiple production servers with different settings that get overwritten every time my war file is expanded. _ Windows Live: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_022009 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: request for advice Tomcat-weblogic
Niki, you seriously expect help for weblogic on a *Tomcat*-userlist? Guess you'll be more happy with a Weblogic-mailinglist. Anyways, mybe this helps for a start: http://edocs.bea.com/wls/docs61/adminguide/cnfgsec.html#1052257 Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
From: André Warnier [mailto:a...@ice-sa.com] X is not something I use regularly, so when Chris mentioned X, I thought he was talking about the secondary connection/port that the JVM/Jconsole agree on, not about X-terminal and so. So thanks for the tip, but could you expand even more ? I realise this isn't really a Tomcat matter, but maybe this can help someone else in a similar situation. At which level would X11 kick in ? It ships the stream of commands to display JConsole on your local desktop. Rough sequence of events: - Start an X11 server on your workstation. Find out its DISPLAY variable. - If using PuTTY, tell it about your X11 DISPLAY variable. It can't guess! - Use ssh/PuTTY with X11 tunnelling enabled to remote to your Tomcat host. - echo $DISPLAY to make sure it's come across OK. - Start Jconsole on the Tomcat host. It will display on your local desktop, via the ssh tunnel. The network part of this is no more complex than you already have. Layout is as follows : Office A : workstation (me) -- firewall/router - internet modem -- internet Office B : internet - internet modem - firewall/router - Tomcat host There is no VPN setup between A and B. My workstation is a Windows laptop. I don't presently have an X emulator on it. It has Java JDK 6, an SSH terminal-like program (putty), WinSCP, etc.. I'd rather avoid installing Cygwin on the laptop, because it interferes with other Unix-like things I have on it. OK. If you don't want to put Cygwin on - which is certainly the easiest+cheapest way of getting an X11 display on your laptop - then you still have options. You could, for example, install something like VMware (Server is free, which would be plenty for this job). You could then run, say, Ubuntu on the VM and ssh across from Ubuntu. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
On Thu, Feb 5, 2009 at 11:11 AM, Peter Crowther peter.crowt...@melandra.com wrote: OK. If you don't want to put Cygwin on http://sourceforge.net/projects/xming Just a simple install, very small, convinient and works like charm. Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlet use. TC6, FC10
2009/2/4 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 2009/2/4 Gregor Schneider rc4...@googlemail.com: what gives uname -n ? 2.6.27.12-170.2.5.fc10.i686 Is it just me, or does that look like a really, really weird result for uname -n? Did someone mistake an n for an r? Who! Me! Never... well, OK, yes. [dpaw...@marge ~]$ uname -n marge.localdomain which is 'odd' since /etc/hosts 127.0.0.1 localhost localhost.localdomain marge ::1 localhost.localdomain localhost6 localhost marge marge I.e. uname seems to be picking up the 'second' entry? Thanks Gregor. Now I can see how it impacts TC :-) regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
Bill Barker wrote: ignoring the maven fanatics, Tomcat's classloader searches the WEB-INF/classes directory before the WEB-INF/lib/*.jar. This means that it is sometimes nice to use WEB-INF/classes for a development server. But for a production server you won't see much difference. Sorry to butt in, but with I believe a question related to what the OP was asking, and to the above : Also ignoring the Maven and Ant fanatics (just quoting Bill's words), if I have a webapp consistig of just a couple of classes and a WEB-INF/web.xml config file, but this web.xml file contains some parameters that are each-client-dependent, and some customers are insisting to receive the updates as a war file, how can I achieve that ? Someone earlier here mentioned that you could put the settings in a file outside the application, but that is not possible in this case, or is it ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
Hi. Thanks Chris and Peter and Gregor. Gregor sent me a link to an article that looks promising, and says basically the same as Peter below, using XMing as the X11 server (client?, I can never remember..). I will try that tonight. Peter Crowther wrote: From: André Warnier [mailto:a...@ice-sa.com] X is not something I use regularly, so when Chris mentioned X, I thought he was talking about the secondary connection/port that the JVM/Jconsole agree on, not about X-terminal and so. So thanks for the tip, but could you expand even more ? I realise this isn't really a Tomcat matter, but maybe this can help someone else in a similar situation. At which level would X11 kick in ? It ships the stream of commands to display JConsole on your local desktop. Rough sequence of events: - Start an X11 server on your workstation. Find out its DISPLAY variable. - If using PuTTY, tell it about your X11 DISPLAY variable. It can't guess! - Use ssh/PuTTY with X11 tunnelling enabled to remote to your Tomcat host. - echo $DISPLAY to make sure it's come across OK. - Start Jconsole on the Tomcat host. It will display on your local desktop, via the ssh tunnel. The network part of this is no more complex than you already have. Layout is as follows : Office A : workstation (me) -- firewall/router - internet modem -- internet Office B : internet - internet modem - firewall/router - Tomcat host There is no VPN setup between A and B. My workstation is a Windows laptop. I don't presently have an X emulator on it. It has Java JDK 6, an SSH terminal-like program (putty), WinSCP, etc.. I'd rather avoid installing Cygwin on the laptop, because it interferes with other Unix-like things I have on it. OK. If you don't want to put Cygwin on - which is certainly the easiest+cheapest way of getting an X11 display on your laptop - then you still have options. You could, for example, install something like VMware (Server is free, which would be plenty for this job). You could then run, say, Ubuntu on the VM and ssh across from Ubuntu. - Peter - 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: WEB-INF/classes vs WEB-INF/lib/classes.jar file
André Warnier wrote: if I have a webapp consistig of just a couple of classes and a WEB-INF/web.xml config file, but this web.xml file contains some parameters that are each-client-dependent, and some customers are insisting to receive the updates as a war file, how can I achieve that ? Someone earlier here mentioned that you could put the settings in a file outside the application, but that is not possible in this case, or is it ? You can have web.xml parameter, e.g. context-param param-nameconfig-file-location/param-name param-value/filesystem/path or URL or some-other-location/param-value /context-param And then you can retrieve parameter value, thus, read config file. Idea is, that param-value is the same for every client/build. E.g. points to configuration file in $CATALINA_HOME/conf. So you can have one war file and client dependant configurations. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: request for advice Tomcat-weblogic
However, figured out how to do this, if someone face the same problem. Additional file should exists in the WEB-INF folder file name weblogic.xml example which will solve the problem described below: ?xml version='1.0' encoding='UTF-8'? weblogic-web-app xmlns=http://www.bea.com/ns/weblogic/90; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; security-role-assignment role-nameconfigurator/role-name principal-nameweblogic/principal-name /security-role-assignment /weblogic-web-app Best regards, Niki Niki Diulgerov wrote: Hello there, I need an advice about how to transfer the settings in tomcat-users.xml to weblogic. And I hope someone is familiar with both and could help. For example, in tomcat-users.xml I have role rolename=configurator/ user username=tomcat password=tomcat roles=tomcat,admin,administrator,manager,configurator/ And in the application, there are some parts restricted like /management/* which needs user with the specified role to authenticate itself before get access (here is the example) security-constraint web-resource-collection web-resource-nameHTMLManger and Manager command/web-resource-name url-pattern/management/*/url-pattern /web-resource-collection auth-constraint !-- NOTE: This role is not present in the default users file -- role-nameconfigurator/role-name /auth-constraint /security-constraint Does someone know how to setup weblogic so I can get the same functionality like in tomcat. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
HTTP Status 404 - /openipmp/jsp/login.jsp
Dear all, Good afternoon. I need a help. I am trying to install an open source DRM server in my system.from OPENIPMP Here they are using Tomcat server. To access the DRM server we are using JBOSS Application server.After installation I am trying to acccess the server by http://localhost:8080/openipmp/jsp/login.jsp. But its giving error message HTTP Status 404 - /openipmp/jsp/login.jsp type Status report message /openipmp/jsp/login.jsp description The requested resource (/openipmp/jsp/login.jsp) is not available. Apache Tomcat/5.5.9 Whether any path settings to be changed or any files to be modified. please share your ideas? If anyone is having any idea to resolve this problem, please share it. Thanking you in advance.. GEETHAKRISHNAN P DD Senior Engineer Tata Elxsi Ltd Techno Park,Neyyar Building Kazhakootam Thiruvananthapuram Nothing happens in my life that God and I can't resolve... 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 proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
Mikolaj Rydzewski wrote: André Warnier wrote: if I have a webapp consistig of just a couple of classes and a WEB-INF/web.xml config file, but this web.xml file contains some parameters that are each-client-dependent, and some customers are insisting to receive the updates as a war file, how can I achieve that ? Someone earlier here mentioned that you could put the settings in a file outside the application, but that is not possible in this case, or is it ? You can have web.xml parameter, e.g. context-param param-nameconfig-file-location/param-name param-value/filesystem/path or URL or some-other-location/param-value /context-param And then you can retrieve parameter value, thus, read config file. Idea is, that param-value is the same for every client/build. E.g. points to configuration file in $CATALINA_HOME/conf. So you can have one war file and client dependant configurations. Ok, that would work if you wrote the webapp yourself, and all the filters that go with it. It would however not work if there are some customer-specific parameters in web.xml, that are outside of your control. (I'm thinking for example of a UrlRewrite or jCIFS filter) Would there be a way to create a war file that does not contain a WEB-INF/web.xml file, but maybe contains a soft link to a whole web.xml file located somewhere else ? The basic idea is : I could still give my customer a war-file that he can deploy containing my updated classes of jars or whatever, but it would not overwrite his customer-specific web.xml when he deploys it. I think this issue is so general/generic that there must exist some way, no ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
From: André Warnier [mailto:a...@ice-sa.com] using XMing as the X11 server (client?, I can never remember..). Yeah, X's terminology is very counter-intuitive - I get comments of you're kidding every time I teach it. An X server serves out the keyboard, mouse and display. X11 clients connect to the X11 display server in order to display their output and get their input. All of which means that you often use an X server running on your workstation or thin client to connect to X client programs running on your application/web/... server. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
From: Gregor Schneider [mailto:rc4...@googlemail.com] http://sourceforge.net/projects/xming Just a simple install, very small, convinient and works like charm. Thanks Gregor, I wasn't aware of that one. Think I may just have a new preferred X server :-). - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
Peter Crowther wrote: From: André Warnier [mailto:a...@ice-sa.com] using XMing as the X11 server (client?, I can never remember..). Yeah, X's terminology is very counter-intuitive - I get comments of you're kidding every time I teach it. An X server serves out the keyboard, mouse and display. X11 clients connect to the X11 display server in order to display their output and get their input. All of which means that you often use an X server running on your workstation or thin client to connect to X client programs running on your application/web/... server. You might also want to look at org.apache.catalina.mbeans.JMXAdaptorLifecycleListener in http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html Something similar also exists for 6.0.x Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: HTTP Status 404 - /openipmp/jsp/login.jsp
geet...@tataelxsi.co.in wrote: Dear all, Good afternoon. I need a help. Please don't hijack threads. Not only is it a general nuisance and makes searching of the archives confusing, many of the folks on this list will ignore any post that hijacks a thread. Mark I am trying to install an open source DRM server in my system.from OPENIPMP Here they are using Tomcat server. To access the DRM server we are using JBOSS Application server.After installation I am trying to acccess the server by http://localhost:8080/openipmp/jsp/login.jsp. But its giving error message HTTP Status 404 - /openipmp/jsp/login.jsp type Status report message /openipmp/jsp/login.jsp description The requested resource (/openipmp/jsp/login.jsp) is not available. Apache Tomcat/5.5.9 Whether any path settings to be changed or any files to be modified. please share your ideas? If anyone is having any idea to resolve this problem, please share it. Thanking you in advance.. GEETHAKRISHNAN P DD Senior Engineer Tata Elxsi Ltd Techno Park,Neyyar Building Kazhakootam Thiruvananthapuram Nothing happens in my life that God and I can't resolve... 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 proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. - 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: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
Mark Thomas wrote: Peter Crowther wrote: From: André Warnier [mailto:a...@ice-sa.com] using XMing as the X11 server (client?, I can never remember..). Yeah, X's terminology is very counter-intuitive - I get comments of you're kidding every time I teach it. An X server serves out the keyboard, mouse and display. X11 clients connect to the X11 display server in order to display their output and get their input. All of which means that you often use an X server running on your workstation or thin client to connect to X client programs running on your application/web/... server. You might also want to look at org.apache.catalina.mbeans.JMXAdaptorLifecycleListener in http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html Something similar also exists for 6.0.x Thanks Mark. That page is a bit obscure for someone like me not making Tomcat and Java their main focus, but do I understand it correctly in that it would mean that the variable second port connection would no longer be variable, thus allowing JConsole to connect to it through 2 pre-created SSH tunnels (as long as one inserts the indicated Listener element in the server.xml of a Tomcat 5.5.25+ ) ? (admittedly, some people might consider this question a bit obscure too) As a secondary question, does the fact of adding such a Listener have any discernable impact on Tomcat's performance (when JConsole is not in use) ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
epicwin...@hotmail.com wrote: Is there any advantage why I should not just jar all my class files and put them in WEB-INF/lib rather than exploding the jar file to the classes directory? I like developing with the classes and I understand it is nice to let tomcat deploy a .war file but it also creates some problems for me because i deploy to multiple production servers with different settings that get overwritten every time my war file is expanded. Functionally I don't think there is a difference between jars and classes. From a management prospective however, the jar solution implies that collection of classes has a separate development life cycle from the webapp. If you fix some problem in the classes, just rebuild and distribute the jar file. Provided you didn't make a breaking change, customers should just be able to drop in the updated jar and restart the webapp. A collection of classes splayed out in the classes folder creates a more challenging update scenario. In the case you describe above, the jar solution makes it easy to update a number of webapps with different configs. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlet use. TC6, FC10
Moving on, reading http://tomcat.apache.org/tomcat-6.0-doc/config/printer/context.html 2009/2/5 Dave Pawson dave.paw...@gmail.com: 2009/2/4 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 2009/2/4 Gregor Schneider rc4...@googlemail.com: what gives uname -n ? 2.6.27.12-170.2.5.fc10.i686 Is it just me, or does that look like a really, really weird result for uname -n? Did someone mistake an n for an r? Who! Me! Never... well, OK, yes. [dpaw...@marge ~]$ uname -n marge.localdomain which is 'odd' since /etc/hosts 127.0.0.1 localhost localhost.localdomain marge ::1 localhost.localdomain localhost6 localhost marge marge I've tweaked /etc/hosts so now [dpaw...@marge conf]$ uname -n marge [dpaw...@marge conf]$ cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost localhost.localdomain marge ::1 localhost.localdomain localhost6 localhost marge marge 10.0.0.137 homer From the docs Context elements may be explicitly defined: snip/ * in individual files (with a .xml extension) in the $CATALINA_BASE/conf/[enginename]/[hostname]/ directory. Which I interpret that to have my servlet deployed (found?) I need to set up an XML file as per that web page at {}/conf//marge/atom.xml What's the engine name please? Nothing clear at http://tomcat.apache.org/tomcat-6.0-doc/config/printer/engine.html I've a vague memory it may be 'catalina'? Is my logic right please? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlet use. TC6, FC10
Hi Dave, On Thu, Feb 5, 2009 at 2:52 PM, Dave Pawson dave.paw...@gmail.com wrote: From the docs Context elements may be explicitly defined: snip/ * in individual files (with a .xml extension) in the $CATALINA_BASE/conf/[enginename]/[hostname]/ directory. Which I interpret that to have my servlet deployed (found?) I need to set up an XML file as per that web page at {}/conf//marge/atom.xml Nope, you don't have to. Within your webapp, create a folder META-INF, and within this folder create a file named context.xml An example: ?xml version='1.0' encoding='utf-8'? Context Resource [.. put your ressource-defs here ] /Context Tomcat's deployer will do the rest and put that file into the correct directory, after renaming the file to ${your_webapp_name}.xml What's the engine name please? That's usually Catalina Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: servlet use. TC6, FC10
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 From the docs Context elements may be explicitly defined: snip/ * in individual files (with a .xml extension) in the $CATALINA_BASE/conf/[enginename]/[hostname]/ directory. Which I interpret that to have my servlet deployed (found?) I need to set up an XML file as per that web page at {}/conf//marge/atom.xml No. First off, unless you have something specific to define for your webapp (e.g., a Resource or Realm, you don't need a Context element. If you do need a Context, it is normally placed inside the webapp in META-INF/context.xml. If you wish to override the contecnt of that location, or you want to deploy the webapp somewhere outside of the normal Host appBase directory, then you place your Context element in conf/[engine]/[host]/[appName].xml. The [engine] name is whatever it's configured to be in server.xml; the default is Catalina (case sensitive), and there's almost never a reason to change it. The [host] name is NOT the DNS name, but rather the name of the associated Host element that you want your webapp to run under. By default, this is localhost - but that is not associated with the hosts file localhost. - 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: servlet use. TC6, FC10
2009/2/5 Gregor Schneider rc4...@googlemail.com: Which I interpret that to have my servlet deployed (found?) I need to set up an XML file as per that web page at {}/conf//marge/atom.xml Nope, you don't have to. Within your webapp, create a folder META-INF, and within this folder create a file named context.xml An example: ?xml version='1.0' encoding='utf-8'? Context Resource [.. put your ressource-defs here ] /Context Tomcat's deployer will do the rest and put that file into the correct directory, after renaming the file to ${your_webapp_name}.xml http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html#A%20word%20on%20Contexts mentions some of that. I note that Charles says I don't need this unless I need to define a realm or other resources. My aim is a restlet servlet (uses Jars in the atom/lib directory). I'll try based onhttp://tomcat.apache.org/tomcat-6.0-doc/config/context.html aside Is there a basic 'hello world' restlet that should just 'work' please/aside What's the engine name please? That's usually Catalina Thanks Gregor. regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlet use. TC6, FC10
On Thu, Feb 5, 2009 at 3:20 PM, Dave Pawson dave.paw...@gmail.com wrote: I note that Charles says I don't need this unless I need to define a realm or other resources. it's a wise decision to believe almost anything what Chuck mentions ;) aside Is there a basic 'hello world' restlet that should just 'work' please/aside Sorry, but we can't support every kind of software claiming to work within Tomcat. Might be a better idea to take a look here insted: http://www.restlet.org/ Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: servlet use. TC6, FC10
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 aside Is there a basic 'hello world' restlet that should just 'work' please/aside GIYF: http://temporary.name/java/index.php/spring/restlet-spring-integration - 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: servlet use. TC6, FC10
2009/2/5 Caldarale, Charles R chuck.caldar...@unisys.com: The [engine] name is whatever it's configured to be in server.xml; the default is Catalina (case sensitive), and there's almost never a reason to change it. The [host] name is NOT the DNS name, but rather the name of the associated Host element that you want your webapp to run under. By default, this is localhost - but that is not associated with the hosts file localhost. - Chuck Oh dear! Note my response to Gregors questions about uname -n? Were I to use this method would the 'path' then be $CATALINA_BASE/conf/Cataline/localhost/atom/atom.xml for my {}/webapps/atom 'webapp' regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: servlet use. TC6, FC10
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 Note my response to Gregors questions about uname -n? Were I to use this method would the 'path' then be $CATALINA_BASE/conf/Cataline/localhost/atom/atom.xml for my {}/webapps/atom 'webapp' No; if you need one at all, it should be conf/Catalina/localhost/atom.xml (and watch your spelling), assuming you have not modified anything in conf/server.xml. However, since your webapp is deployed under the webapps directory, a better location for the Context element is META-INF/context.xml inside your webapp, so you don't have to keep track of separate bits and pieces. - 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: servlet use. TC6, FC10
2009/2/5 Gregor Schneider rc4...@googlemail.com: On Thu, Feb 5, 2009 at 3:20 PM, Dave Pawson dave.paw...@gmail.com wrote: aside Is there a basic 'hello world' restlet that should just 'work' please/aside Sorry, but we can't support every kind of software claiming to work within Tomcat. No, agreed. I was wondering if there was a two liner that implements org.apache.catalina.Context as per the classname attribute at http://tomcat.apache.org/tomcat-6.0-doc/config/context.html? which I might use to get started? I want something simple working on TC before I try restlets? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlet use. TC6, FC10
2009/2/5 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 aside Is there a basic 'hello world' restlet that should just 'work' please/aside GIYF: Indeed (Last time I tried a day without internet access I most definately realised this :0( http://temporary.name/java/index.php/spring/restlet-spring-integration View from the other side. Not my idea of 'hello world' Charles? (Closer to 'go write a device driver for this real time Unix mc :-) I'm guessing you've used TC for a while... or longer? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlet use. TC6, FC10
2009/2/5 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 Note my response to Gregors questions about uname -n? Were I to use this method would the 'path' then be $CATALINA_BASE/conf/Cataline/localhost/atom/atom.xml ^ for my {}/webapps/atom 'webapp' No; if you need one at all, it should be conf/Catalina/localhost/atom.xml (and watch your spelling), assuming you have not modified anything in conf/server.xml. Understood, as Gregor suggested. However, since your webapp is deployed under the webapps directory, a better location for the Context element is META-INF/context.xml inside your webapp, so you don't have to keep track of separate bits and pieces. Trying that now. regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: servlet use. TC6, FC10
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 I was wondering if there was a two liner that implements org.apache.catalina.Context as per the classname attribute at http://tomcat.apache.org/tomcat-6.0-doc/config/context.html? which I might use to get started? ??? Why would you *ever* want to set the className attribute to anything other than the default? This is for Tomcat internal use, not something an application programmer would fiddle with. - 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: servlet use. TC6, FC10
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 Not my idea of 'hello world' Charles? (Closer to 'go write a device driver for this real time Unix mc :-) I'm guessing you've used TC for a while... or longer? Nothing in the proffered link was Tomcat-specific (it did make use of Spring, which is a commonly-used framework in servlet container environments). - 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: servlet use. TC6, FC10
2009/2/5 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 I was wondering if there was a two liner that implements org.apache.catalina.Context as per the classname attribute at http://tomcat.apache.org/tomcat-6.0-doc/config/context.html? which I might use to get started? ??? Why would you *ever* want to set the className attribute to anything other than the default? This is for Tomcat internal use, not something an application programmer would fiddle with. Quote. Java class name of the implementation to use. This class must implement the org.apache.catalina.Context interface. If not specified, the standard value (defined below) will be used. end quote. My interpretation, seemingly wrong is that my servlet class must implement org.apache.catalina.Context. Duly noted. Sorry. I created a context element in META-INF, filename atom.xml contents are Context reloadable=true/ Nothing showing in the log. http://marge:8080/atom/ shows type Status report message /atom/ description The requested resource (/atom/) is not available. http://localhost:8080/atom/ just the same. Hence my request for a 'hello' world to try and get a (any?) servlet working regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] servlet use. TC6, FC10
Caldarale, Charles R wrote: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 I was wondering if there was a two liner that implements org.apache.catalina.Context as per the classname attribute at http://tomcat.apache.org/tomcat-6.0-doc/config/context.html? which I might use to get started? [OT] I was just checking that page indicated above, and happened to read the caseSensitive attribute definition. Doesn't that explanation strike anyone as weird ? Or am I just not getting the double negatives somewhere ? I would expect a caseSensitive attribute to have a default value false under Windows for example. Or else be named caseInsensitive and be true. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] servlet use. TC6, FC10
2009/2/5 André Warnier a...@ice-sa.com: [OT] I was just checking that page indicated above, and happened to read the caseSensitive attribute definition. Doesn't that explanation strike anyone as weird ? Or am I just not getting the double negatives somewhere ? I would expect a caseSensitive attribute to have a default value false under Windows for example. Or else be named caseInsensitive and be true. Possibly, with a Windows perspective? All of Linux is case sensitive in terms of paths so I guess not with that perspective? Sounds good to me, meaning use Catalina as apposed to catalina? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: servlet use. TC6, FC10
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 My interpretation, seemingly wrong is that my servlet class must implement org.apache.catalina.Context. Definitely the wrong interpretation. Read the servlet spec. I created a context element in META-INF, filename atom.xml contents are Context reloadable=true/ O.K. Nothing showing in the log. http://marge:8080/atom/ shows type Status report message /atom/ description The requested resource (/atom/) is not available. And what is under the webapps/atom directory (or inside the webapps/atom.war file)? What's in WEB-INF/web.xml of your webbapp? Do you have any welcome files in your webapp? Hence my request for a 'hello' world to try and get a (any?) servlet working Do the sample servlets that come with Tomcat work? Most of those are small and easy to modify for experimentation purposes. - 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 use. TC6, FC10
From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: [OT] servlet use. TC6, FC10 I was just checking that page indicated above, and happened to read the caseSensitive attribute definition. Doesn't that explanation strike anyone as weird ? Only if you're not aware that both Java and URLs are case-sensitive. Or am I just not getting the double negatives somewhere ? Nope, you're not :-) I would expect a caseSensitive attribute to have a default value false under Windows for example. Because the Windows file system is not case sensitive, it would be easy to accidentally expose mandated hidden resources via such URLs as: http://host/myApp/wEb-Inf/dont-look-here.jsp if case sensitivity were disabled in Tomcat. - 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: servlet use. TC6, FC10
2009/2/5 Caldarale, Charles R chuck.caldar...@unisys.com: I created a context element in META-INF, filename atom.xml contents are Context reloadable=true/ O.K. Nothing showing in the log. http://marge:8080/atom/ shows type Status report message /atom/ description The requested resource (/atom/) is not available. And what is under the webapps/atom directory (or inside the webapps/atom.war file)? [dpaw...@marge webapps]$ tree atom atom |-- META-INF | |-- context.xml | `-- context.xml~ `-- WEB-INF |-- classes | `-- SimpleServlet.class |-- lib | |-- com.noelios.restlet.ext.servlet_2.5.jar | |-- com.noelios.restlet.jar | `-- org.restlet.jar |-- web.xml `-- web.xml~ What's in WEB-INF/web.xml of your webbapp? [dpaw...@marge webapps]$ cat atom/WEB-INF/web.xml ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 description Servlet example using atom. /description display-nameAtom example/display-name !-- Define servlets that are included in the application -- servlet servlet-nameatom/servlet-name servlet-classSimpleServlet/servlet-class /servlet servlet-mapping servlet-nameatom/servlet-name url-pattern/atom/*/url-pattern /servlet-mapping Do you have any welcome files in your webapp? I had an index.html in .../atom http://marge:8080/atom/index.html showed that fine. Hence my request for a 'hello' world to try and get a (any?) servlet working Do the sample servlets that come with Tomcat work? Most of those are small and easy to modify for experimentation purposes. grin/ 'Thats a view' as my manager used to say. Yes. http://marge:8080/examples/servlets/servlet/HelloWorldExample works fine. I was put off by the complexity of the examples hence avoided copying them and 'stripping out' the ??? unecessary parts. regards (Help appreciated btw) -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Backup of TOMCAT required
I had a doubt that should the backup of TOMCAT be taken as we are going to swap our server to a new one with better congifuration. I will explain the environment of our system a little 1) Application server- JBOSS 2) Web server- Apache tomcat 3) Application details- Java(1.4.2) Actually, I had taken the backup of TOMCAT around a week back in preparation of the swap for migration. But, one change is going to happen in our application in the form of a hotfix tomorrow and our migration is scheduled for day after. So, should a backup of TOMCAT be taken after our application hotfix is applied. Also, should a back of java($JAVA_HOME) and ant($ANT_HOME) be taken, we use j2sdk1.4.x for java and apache-ant-1.6.1 for ant. I hope, my question is clear. Please, help in solving the doubt. regards
Re: servlet use. TC6, FC10
Just had a quick view, but if I'm not mistaken: Change servlet-mapping servlet-nameatom/servlet-name url-pattern/atom/*/url-pattern /servlet-mapping to servlet-mapping servlet-nameatom/servlet-name url-pattern/*/url-pattern /servlet-mapping Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlet use. TC6, FC10
2009/2/5 Gregor Schneider rc4...@googlemail.com: Just had a quick view, but if I'm not mistaken: Change servlet-mapping servlet-nameatom/servlet-name url-pattern/atom/*/url-pattern /servlet-mapping to servlet-mapping servlet-nameatom/servlet-name url-pattern/*/url-pattern /servlet-mapping :-) Thanks Chaz. Now works. Are you going to tell me why please? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Backup of TOMCAT required
Good Morning Singh- any technical reasons for staying with an outdated 1.4 JVM..as you wont be able to take advantage of advanced gc and generics in JVM 6 ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: randhir.si...@elitecore.com To: users@tomcat.apache.org Subject: Backup of TOMCAT required Date: Thu, 5 Feb 2009 21:19:24 +0530 I had a doubt that should the backup of TOMCAT be taken as we are going to swap our server to a new one with better congifuration. I will explain the environment of our system a little 1) Application server- JBOSS 2) Web server- Apache tomcat 3) Application details- Java(1.4.2) Actually, I had taken the backup of TOMCAT around a week back in preparation of the swap for migration. But, one change is going to happen in our application in the form of a hotfix tomorrow and our migration is scheduled for day after. So, should a backup of TOMCAT be taken after our application hotfix is applied. Also, should a back of java($JAVA_HOME) and ant($ANT_HOME) be taken, we use j2sdk1.4.x for java and apache-ant-1.6.1 for ant. I hope, my question is clear. Please, help in solving the doubt. regards _ Windows Live™: E-mail. Chat. Share. Get more ways to connect. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_allup_howitworks_022009
RE: servlet use. TC6, FC10
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 Thanks Chaz. Now works. That was Gregor, not me, that gave you the answer. (Our corporate e-mail server hasn't passed your previous message through yet - must be a Homeland Security thing. :-) Are you going to tell me why please? Servlet mappings are relative to the context (webapp) part of the URL, not the host part. That allows the webapp to be deployed under any name you want without changing the web.xml settings. - 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
tomcat memory leak problem
My system environment is: Windows 2000 Server. JDK 1.5, tomcat 5.5, Oracle 9 The problems are: 1. After tomcat was started, the memory of the tomcat was normal, about 200M-300M. But after a certain time(this time was not set), the memory began to grow, and the growing speed was so fast that in about 5 minites the maximum would be reached. The difference of this problem with other problems I've checked is, in other problems, the memory growing speed is continual and not so fast, while in our problem the memory didn't grow at the beginning, but after a certain time instead. 2. There is another strange phenomenon here. We restarted tomcat at 23:30 last night. We checked the log at 8:00 this morning and found out the system was not used by anyone during this time. But the memory of tomcat had reached to 1.5G, which is the maximun of tomcat's memory. Later, after some users began to use this system, tomcat' memory dropped to 500M+. How and why was the memory collected? By the way, we have cheched the code for any optimization, including StringBuffer, Vector, datasource connections, etc., which only resulted with a faster response speed for users, not any influence for the memory problem. -- View this message in context: http://www.nabble.com/tomcat-memory-leak-problem-tp21855110p21855110.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: tomcat memory leak problem
Are you sure you don't have any thread or task (I mean, quartz or so) that is running and consume memory? I agree, this sounds quite strange (our app is running for several weeks and don't have any major issue, we sometimes need to restart tomcat because it hangs, but our memory is under control, and we use lotz of external api like spring, hibernate, wicket, etc.) Could you maybe profile it using Yourkit or any other tool? fcxjp a écrit : My system environment is: Windows 2000 Server. JDK 1.5, tomcat 5.5, Oracle 9 The problems are: 1. After tomcat was started, the memory of the tomcat was normal, about 200M-300M. But after a certain time(this time was not set), the memory began to grow, and the growing speed was so fast that in about 5 minites the maximum would be reached. The difference of this problem with other problems I've checked is, in other problems, the memory growing speed is continual and not so fast, while in our problem the memory didn't grow at the beginning, but after a certain time instead. 2. There is another strange phenomenon here. We restarted tomcat at 23:30 last night. We checked the log at 8:00 this morning and found out the system was not used by anyone during this time. But the memory of tomcat had reached to 1.5G, which is the maximun of tomcat's memory. Later, after some users began to use this system, tomcat' memory dropped to 500M+. How and why was the memory collected? By the way, we have cheched the code for any optimization, including StringBuffer, Vector, datasource connections, etc., which only resulted with a faster response speed for users, not any influence for the memory problem. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: No URL rewriting when cookies are disabled
nlif wrote: Hi all, I am using Tomcat 6.0.18, with Firefox 3.0.6. I have a simple servlet, which calls request.getSession(true), and expects to create a session only on the first request, and resume an existing session on all subsequent requests. As far as I know, according to the servlet-spec, servlet containers (e.g. Tomcat), should automatically fallback to URL rewriting (i.e. adding the jsessionid parameter to the url) when the browser refuses to accept cookies. This works fine with cookies enabled, however, as soon as I disable cookies in my browser, a new session is created for each request, and the jsessionid is not appended to the URL. Shouldn't this work by default? (I know I can modify the application code to handle this, but I assumed this is not necessary.) Actually, I was just perusing a page in the Tomcat 6 docs : http://tomcat.apache.org/tomcat-6.0-doc/config/context.html and it actually says, for the cookies attribute : Set to true if you want cookies to be used for session identifier communication if supported by the client (this is the default). Set to false if you want to disable the use of cookies for session identifier communication, and rely only on URL rewriting *by the application*. (emphasis is mine) That sounds to me as, if you want to use URL-rewriting, you have to do it explicitly in the application. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: No URL rewriting when cookies are disabled
It's a known bug in Tomcat, if I'm not mistaken: https://issues.apache.org/bugzilla/show_bug.cgi?id=43839 Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6: How to tell a Context/Webapp where to look for files?
From: Caldarale, Charles R chuck.caldar...@unisys.com Tomcat: 6.0 Tomcat Installation Directory: C:\Program Files\Apache Software Foundation\Tomcat 6.0 OS: Windows XP ( Windows 5.1 service pack 2 ) Java: JDK 1.6.0_10-beta snip.. I noticed that if I don't give my JSPs and my servlet a path that they look for files in CATALINA_HOME You should probably be using ServletContext.getResourceAsStream(), or possibly ClassLoader.getResourceAsStream(). Note that using ServletContext.getRealPath() can be problematic, since the container (Tomcat) is under no obligation to expose the file system (if any) to servlets. Good advice Charles. Unfortunately I don't have the option of altering the part of the code where the context(web application) reads in the file it needs. I could reset CATALINA_BASE to point to somewhere else, but I have multipe contexts(web applications ) and I need each to have its own unique directory to go look for files in. Right now I am only running instance of Tomcat ( for development purposes ) with my set up and if possible I would like to keep it that way. Is it possible that I could make each context get a different CATALINA_BASE (or other) variable or otherwise get accomplish the same goal? Thanks in advance for any help. I'm still new to navigating around the docs and the new tomcat Steve
Re: servlet use. TC6, FC10
2009/2/5 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 Thanks Chaz. Now works. That was Gregor, not me, that gave you the answer. (Our corporate e-mail server hasn't passed your previous message through yet - must be a Homeland Security thing. :-) I'm sure Obama will fix that :-) Sorry Gregor. And many thanks. Are you going to tell me why please? Servlet mappings are relative to the context (webapp) part of the URL, not the host part. That allows the webapp to be deployed under any name you want without changing the web.xml settings. Just testing my understanding. Not relative to ../webapp but relative to (in this case) .../webapps/atom hence I should use the url path relative to http://localhost:8080/atom which, as you say is /* So that my code would pick up http://localhost:8080/atom/AlmostAnything Thanks. That makes sense and helps (I think) When I deploy (upload) to my web visible server, the web.xml file will remain the same! I'm going to write this up. I'll post to this list and would appreciate any feedback. I want to start looking at restricting access now, but I'll start a new thread for that! Many thanks gents. regards regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
mod_jk
Couple of questions regarding mod_jk: 1. Does apache read worker.properties dynamically? So if I change worker.property would it be dynamically read by mod_jk. 2. Does mod_jk check if the system is up and running before forwarding that request to the server configured in worker.properties file? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: comet loop after webapp re-start
Thanks for the pointer. That bug does look related, as does this one: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6403933 -- fixed against java 7. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: servlet use. TC6, FC10
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 I want to start looking at restricting access now, but I'll start a new thread for that! Read section 12 of the servlet spec first. - 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: comet loop after webapp re-start
From: Peter Warren [mailto:tomcat.subscript...@gmail.com] Subject: Re: comet loop after webapp re-start Thanks for the pointer. That bug does look related, as does this one: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6403933 -- fixed against java 7. Or maybe not (comment from 05-SEP-2008): I have tested jdk6-u7 and jdk7 b34 and it is still not fixed. - 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 6: How to tell a Context/Webapp where to look for files?
From: Steve Mysterious [mailto:tinker...@gmail.com] Subject: Re: Tomcat 6: How to tell a Context/Webapp where to look for files? Unfortunately I don't have the option of altering the part of the code where the context(web application) reads in the file it needs. Then you're pretty much out of luck - that code is broken. I could reset CATALINA_BASE to point to somewhere else No, you can't. CATALINA_BASE is needed for the Tomcat startup scripts; don't even think about changing it. I have multipe contexts(web applications ) and I need each to have its own unique directory to go look for files in. Which is why you need to fix the code. Is it possible that I could make each context get a different CATALINA_BASE (or other) variable or otherwise get accomplish the same goal? Not without changing the code in the webapp. It appears to be blindly trying to open files under whatever the current directory is - never a wise thing to do. I'm still new to navigating around the docs and the new tomcat Nothing to do with Tomcat - this is bad application design. - 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: mod_jk
1) As far as I know, no, mod_jk does not read workers.properties dynamically. 2) Yes and no, it will not send a request unless communication has been established with the worker, it may happen that the worker fails, or someone shut it down. Depending on how you configure the workers and the number of workers, it can retry the request and/or try a different worker. Mod_jk will mark the worker on error when it does not respond, and it will try again after a configurable time -but it tries again with an actual request-. -Original Message- From: Mohit Anchlia [mailto:mohitanch...@gmail.com] Sent: Thursday, February 05, 2009 11:53 AM To: Tomcat Users List Subject: mod_jk Couple of questions regarding mod_jk: 1. Does apache read worker.properties dynamically? So if I change worker.property would it be dynamically read by mod_jk. 2. Does mod_jk check if the system is up and running before forwarding that request to the server configured in worker.properties file? - 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: No URL rewriting when cookies are disabled
From: Gregor Schneider [mailto:rc4...@googlemail.com] Subject: Re: No URL rewriting when cookies are disabled It's a known bug in Tomcat, if I'm not mistaken: https://issues.apache.org/bugzilla/show_bug.cgi?id=43839 That bug was fixed over a year ago, and the fix is in the version the OP is running. As Andre said, it's up to the code in the webapp to call the appropriate methods to rewrite URLs. If you don't want to change your code, you may be able to use this: http://tuckey.org/ - 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] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
The disadvantage of running these tools on the server that also runs Tomcat is that these tools generate certain load, which under some circumstances is not wanted as it might influence the stats. On Thu, 2009-02-05 at 14:15 +0100, André Warnier wrote: Mark Thomas wrote: Peter Crowther wrote: From: André Warnier [mailto:a...@ice-sa.com] using XMing as the X11 server (client?, I can never remember..). Yeah, X's terminology is very counter-intuitive - I get comments of you're kidding every time I teach it. An X server serves out the keyboard, mouse and display. X11 clients connect to the X11 display server in order to display their output and get their input. All of which means that you often use an X server running on your workstation or thin client to connect to X client programs running on your application/web/... server. You might also want to look at org.apache.catalina.mbeans.JMXAdaptorLifecycleListener in http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html Something similar also exists for 6.0.x Thanks Mark. That page is a bit obscure for someone like me not making Tomcat and Java their main focus, but do I understand it correctly in that it would mean that the variable second port connection would no longer be variable, thus allowing JConsole to connect to it through 2 pre-created SSH tunnels (as long as one inserts the indicated Listener element in the server.xml of a Tomcat 5.5.25+ ) ? (admittedly, some people might consider this question a bit obscure too) As a secondary question, does the fact of adding such a Listener have any discernable impact on Tomcat's performance (when JConsole is not in use) ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Pieter Temmerman email: ptemmerman@sadiel.es skype: ptemmerman.sadiel SADIEL TECNOLOGÍAS DE LA INFORMACIÓN, S.A. http://www.sadiel.es. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlet use. TC6, FC10
2009/2/5 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 I want to start looking at restricting access now, but I'll start a new thread for that! Read section 12 of the servlet spec first. chuckles/ Different kind of restriction in mind? I meant to application/xml rather than ... https type! section??? I wish there was an index to the docs. I'm beginning to think it's all there... just hard to find? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat memory leak problem
The problem may be in your web application and not in Tomcat itself. Duplicate your environment and use a memory profiler. (like the one included with Netbeans) Or use the extended JVM options to produce a HeapDump -Original Message- From: fcxjp [mailto:fc...@163.com] Sent: Thursday, February 05, 2009 11:14 AM To: users@tomcat.apache.org Subject: tomcat memory leak problem My system environment is: Windows 2000 Server. JDK 1.5, tomcat 5.5, Oracle 9 The problems are: 1. After tomcat was started, the memory of the tomcat was normal, about 200M-300M. But after a certain time(this time was not set), the memory began to grow, and the growing speed was so fast that in about 5 minites the maximum would be reached. The difference of this problem with other problems I've checked is, in other problems, the memory growing speed is continual and not so fast, while in our problem the memory didn't grow at the beginning, but after a certain time instead. 2. There is another strange phenomenon here. We restarted tomcat at 23:30 last night. We checked the log at 8:00 this morning and found out the system was not used by anyone during this time. But the memory of tomcat had reached to 1.5G, which is the maximun of tomcat's memory. Later, after some users began to use this system, tomcat' memory dropped to 500M+. How and why was the memory collected? By the way, we have cheched the code for any optimization, including StringBuffer, Vector, datasource connections, etc., which only resulted with a faster response speed for users, not any influence for the memory problem. -- View this message in context: http://www.nabble.com/tomcat-memory-leak-problem-tp21855110p21855110.htm l 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: servlet use. TC6, FC10
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: servlet use. TC6, FC10 I meant to application/xml rather than ... https type! I'm confused; what kind of access restrictions are you referring to? And whom do you want to restrict? (Perhaps this would be better under a new thread, as you suggested.) - 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
TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
I want to 'reject' (if that's the right word) any http get with mime type != application/xml I see in web.xml in the conf directory mime-mapping extensionxml/extension mime-typeapplication/xml/mime-type /mime-mapping Is this the right place to do it please? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? I want to 'reject' (if that's the right word) any http get with mime type != application/xml Do you mean .html and .jsp are not valid? That might make life interesting. It will be difficult to stop clients from accepting at least text/html in addition to application/xml. I see in web.xml in the conf directory mime-mapping extensionxml/extension mime-typeapplication/xml/mime-type /mime-mapping Is this the right place to do it please? No - that would pretty much certainly break things. Also, AFAIK, that's only used for responses, so that the container can set the mime type properly for whatever resource is being returned. You probably need to do this in a filter that will see the request before your servlets do. - 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: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
2009/2/5 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? I want to 'reject' (if that's the right word) any http get with mime type != application/xml Do you mean .html and .jsp are not valid? That might make life interesting. It will be difficult to stop clients from accepting at least text/html in addition to application/xml. Wrong way round? Background. Currently I generate a template (outline XML) for an atom feed I run. This is 'wrong' (IMHO). I have a tiny server visible to the web. I want to use REST to 'get' this template (hence restrict it to application/xml) so if you|anyone does a GET on this url I want to 'refuse' you content, by returning an http 'error'. code TBD, I'm sure Roy defined one :-) So unless the GET is for application/xml I want to return nothing. I see in web.xml in the conf directory mime-mapping extensionxml/extension mime-typeapplication/xml/mime-type /mime-mapping Is this the right place to do it please? No - that would pretty much certainly break things. Also, AFAIK, that's only used for responses, so that the container can set the mime type properly for whatever resource is being returned. You probably need to do this in a filter that will see the request before your servlets do. Makes sense (in my very limited view of http) Check if the GET is for the 'desired' mime type. If it isn't... respond accordingly. at the header level? 10.4.16 415 Unsupported Media Type The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method. (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) Does that make sense? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
On Feb 5, 2009, at 1:28 PM, Caldarale, Charles R wrote: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? I want to 'reject' (if that's the right word) any http get with mime type != application/xml The client doesn't send the mime-type it is requesting. It sends some set of types it is willing to accept. For example: accept=text/html,application/xhtml+xml,application/xml Why not just always send XML? or if they don't have an accept entry for application/xml the send and error with status code 406: 406 Not Acceptable The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request. Unless it was a HEAD request, the response SHOULD include an entity containing a list of available entity characteristics and location(s) from which the user or user agent can choose the one most appropriate. The entity format is specified by the media type given in the Content- Type header field. Depending upon the format and the capabilities of the user agent, selection of the most appropriate choice MAY be performed automatically. However, this specification does not define any standard for such automatic selection. Note: HTTP/1.1 servers are allowed to return responses which are not acceptable according to the accept headers sent in the request. In some cases, this may even be preferable to sending a 406 response. User agents are encouraged to inspect the headers of an incoming response to determine if it is acceptable. If the response could be unacceptable, a user agent SHOULD temporarily stop receipt of more data and query the user for a decision on further actions. best, -Rob Do you mean .html and .jsp are not valid? That might make life interesting. It will be difficult to stop clients from accepting at least text/html in addition to application/xml. I see in web.xml in the conf directory mime-mapping extensionxml/extension mime-typeapplication/xml/mime-type /mime-mapping Is this the right place to do it please? No - that would pretty much certainly break things. Also, AFAIK, that's only used for responses, so that the container can set the mime type properly for whatever resource is being returned. You probably need to do this in a filter that will see the request before your servlets do. - Chuck - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
On Feb 5, 2009, at 1:36 PM, Dave Pawson wrote: 2009/2/5 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? I want to 'reject' (if that's the right word) any http get with mime type != application/xml Do you mean .html and .jsp are not valid? That might make life interesting. It will be difficult to stop clients from accepting at least text/html in addition to application/xml. Wrong way round? Background. Currently I generate a template (outline XML) for an atom feed I run. This is 'wrong' (IMHO). I have a tiny server visible to the web. I want to use REST to 'get' this template (hence restrict it to application/xml) so if you|anyone does a GET on this url I want to 'refuse' you content, by returning an http 'error'. code TBD, I'm sure Roy defined one :-) So unless the GET is for application/xml I want to return nothing. Doesn't work that way. You basically want to authenticate the user (you) not restrict by mime-type, which IO believe you mean the accept header, which most browser will include the application/xml -Rob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
Hi Rob 2009/2/5 Robert Koberg r...@koberg.com: On Feb 5, 2009, at 1:28 PM, Caldarale, Charles R wrote: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? I want to 'reject' (if that's the right word) any http get with mime type != application/xml The client doesn't send the mime-type it is requesting. It sends some set of types it is willing to accept. For example: accept=text/html,application/xhtml+xml,application/xml Why not just always send XML? or if they don't have an accept entry for application/xml the send and error with status code 406: Tks for that. (I said my knowledge of http was 'limited' :-) Let me rephrase my request. Unless the client requests application/xml I want to refuse the request. 406 Not Acceptable The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request. Turned round to this format, that response seems incorrect Rob. What should I respond with when the 'customer' (client) says please give me (and I don't want to - my definition of an inappropriate request) Unless it was a HEAD request, grin/ Let me resolve the simple ones first please! regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: WEB-INF/classes vs WEB-INF/lib/classes.jar file
Thanks for all the replies. Nice to know i can do this without any side effects. I think I will have to look into maven and see if that fits my deployment needs. _ Windows Live™: E-mail. Chat. Share. Get more ways to connect. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_allup_explore_022009
Re: Tomcat 6: How to tell a Context/Webapp where to look for files?
Caldarale, Charles R wrote: From: Steve Mysterious [mailto:tinker...@gmail.com] [...] Well, if you really really need this, I suppose you could run several Tomcats, each sharing CATALINA_HOME (and thus the basic Tomcat code etc..), but each having its own CATALINA_BASE. Then, if you want to make this transparent for the users, you would put a nice Apache httpd in front, and have it proxy the requests to one or the other Tomcat depending on the URL. Graphically : User -- http://myserver:80 (Apache) | URL = /webapp1 ? -- Tomcat1:8081 | URL = /webapp2 ? -- Tomcat2:8082 etc.. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk
Mohit Anchlia wrote: Couple of questions regarding mod_jk: 1. Does apache read worker.properties dynamically? So if I change worker.property would it be dynamically read by mod_jk. 2. Does mod_jk check if the system is up and running before forwarding that request to the server configured in worker.properties file? Let's see what answers you get here .. :-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
JConsole with fixed ports
I posted this question previously, but it was OT in another thread, and I got the impression it's now buried a bit deep, so new more on-topic thread. referring to : About the possibilities to run JConsole remotely, through a firewalled connection. Mark Thomas wrote : You might also want to look at org.apache.catalina.mbeans.JMXAdaptorLifecycleListener in http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html Something similar also exists for 6.0.x Thanks Mark. That page is a bit obscure for someone like me not making Tomcat and Java their main focus, but do I understand it correctly in that it would mean that the variable second port connection would no longer be variable, thus allowing JConsole to connect to it through 2 pre-created SSH tunnels (as long as one inserts the indicated Listener element in the server.xml of a Tomcat 5.5.25+ ) ? (admittedly, some people might consider this question a bit obscure too) As a secondary question, does the fact of adding such a Listener have any discernable impact on Tomcat's performance (when JConsole is not in use) ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Backup of TOMCAT required
Thanks, for your answer. But, my real question is whether we need to copy the latest copy of $TOMCAT_HOME from the old server to the new server as it is just a web server and not our application code. regards -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Thursday, February 05, 2009 9:34 PM To: Tomcat Users List Subject: RE: Backup of TOMCAT required Good Morning Singh- any technical reasons for staying with an outdated 1.4 JVM..as you wont be able to take advantage of advanced gc and generics in JVM 6 ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: randhir.si...@elitecore.com To: users@tomcat.apache.org Subject: Backup of TOMCAT required Date: Thu, 5 Feb 2009 21:19:24 +0530 I had a doubt that should the backup of TOMCAT be taken as we are going to swap our server to a new one with better congifuration. I will explain the environment of our system a little 1) Application server- JBOSS 2) Web server- Apache tomcat 3) Application details- Java(1.4.2) Actually, I had taken the backup of TOMCAT around a week back in preparation of the swap for migration. But, one change is going to happen in our application in the form of a hotfix tomorrow and our migration is scheduled for day after. So, should a backup of TOMCAT be taken after our application hotfix is applied. Also, should a back of java($JAVA_HOME) and ant($ANT_HOME) be taken, we use j2sdk1.4.x for java and apache-ant-1.6.1 for ant. I hope, my question is clear. Please, help in solving the doubt. regards _ Windows LiveT: E-mail. Chat. Share. Get more ways to connect. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_allup_howitworks_0220 09 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.233 / Virus Database: 270.10.18/1935 - Release Date: 02/04/09 08:24:00 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? Unless the client requests application/xml I want to refuse the request. I don't think you quite appreciate the situation yet. An HTTP client does not *request* any particular mime type; the client *may* specify the mime types it would like to accept in response, but the server is pretty much allowed to return whatever it wants (or a 406, at the server's discretion). If the client doesn't like a response type of application/xml, too bad for the client. - 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: Backup of TOMCAT required
Quick answer: No. Copy over your app and configure the new tomcat to match the old one. I highly recommend hand configuring tomcat rather than just copying config files though. The review is good practice and config files -- particularly server.xml -- have changed over time. The thing that would concern me more is if tomcat and/or java version changes from old to new. If that's the case, you will have to test your app in the new environment before going live. --David Randhir singh wrote: Thanks, for your answer. But, my real question is whether we need to copy the latest copy of $TOMCAT_HOME from the old server to the new server as it is just a web server and not our application code. regards -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Thursday, February 05, 2009 9:34 PM To: Tomcat Users List Subject: RE: Backup of TOMCAT required Good Morning Singh- any technical reasons for staying with an outdated 1.4 JVM..as you wont be able to take advantage of advanced gc and generics in JVM 6 ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: randhir.si...@elitecore.com To: users@tomcat.apache.org Subject: Backup of TOMCAT required Date: Thu, 5 Feb 2009 21:19:24 +0530 I had a doubt that should the backup of TOMCAT be taken as we are going to swap our server to a new one with better congifuration. I will explain the environment of our system a little 1) Application server- JBOSS 2) Web server- Apache tomcat 3) Application details- Java(1.4.2) Actually, I had taken the backup of TOMCAT around a week back in preparation of the swap for migration. But, one change is going to happen in our application in the form of a hotfix tomorrow and our migration is scheduled for day after. So, should a backup of TOMCAT be taken after our application hotfix is applied. Also, should a back of java($JAVA_HOME) and ant($ANT_HOME) be taken, we use j2sdk1.4.x for java and apache-ant-1.6.1 for ant. I hope, my question is clear. Please, help in solving the doubt. regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
Dave Pawson wrote: Hi Rob 2009/2/5 Robert Koberg r...@koberg.com: On Feb 5, 2009, at 1:28 PM, Caldarale, Charles R wrote: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? Just to clear up your question above : no. In many more words : Part 1: the file ${CATALINA_HOME}/conf/web.xml is the default, tomcat-wide web.xml. It plays the same role as each webapp's web.xml that resides in the WEB-INF/web.xml of each webapp. But each of these applies only to its particular webapp, while the general webapp first named applies to all webapps, by default. Part 2: In each webapp, there is a default servlet provided by Tomcat, whose role is to handle each request that was directed to this webapp, but for which no specific url-mapping could be found in that webapp's web.xml. That default servlet handles, for instance, requests for static content, like /mywebapp/my_dog.jpg. Part 3 : When this servlet returns some static content, and since it is after all part of a specific webapp, it looks first in it's own webapp's web.xml for paramaters applicable to him. But since it probably doesn't find any, it defaults to the parameters of the default tomcat-wide web.xml, which is... ${CATALINA_HOME}/conf/web.xml. Part 4 : By some incredible clever setup, that default web.xml happens to contain a table of Mime mappings, telling the default servlet that if what it has to return this time is some file ending in .jpg, it should include a HTTP header Content-type: image/jpeg (so that the browser would know how to handle this correctly). Or if the file ends in .xls, it should return a header Content-type: application/vnd.ms-excel (or something like that).(*) So, in other words, if you change something in these Mime mappings, chances are that your Tomcat is going to start returning images while telling the browser they are Word documents, and things like that which make for an entertaining display in the web browser. Which is probably not what you want. (Proudly, based on recent teaching by Chuck. Have I got it right, Chuck ?) (*) Of course if the browser is IE, it doesn't matter anyway, because IE will not believe what the server tells it and do its own thing. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Backup of TOMCAT required
On Thu, Feb 5, 2009 at 8:44 PM, Randhir singh randhir.si...@elitecore.com wrote: Thanks, for your answer. But, my real question is whether we need to copy the latest copy of $TOMCAT_HOME from the old server to the new server as it is just a web server and not our application code. hey - why not copying the whole OS? scnr Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Backup of TOMCAT required
Gregor Schneider wrote: On Thu, Feb 5, 2009 at 8:44 PM, Randhir singh randhir.si...@elitecore.com wrote: Thanks, for your answer. But, my real question is whether we need to copy the latest copy of $TOMCAT_HOME from the old server to the new server as it is just a web server and not our application code. What the heck. Just move the disk then. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? (*) Of course if the browser is IE, it doesn't matter anyway, because IE will not believe what the server tells it and do its own thing. Now that part is absolute truth. (The rest was close enough.) - 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: Backup of TOMCAT required
theoretically if you're mirroring you should see no difference (although you might see different behaviour from the JVM binaries..but that *should be* negated by having same JVM version) specifically I would check OS specific binaries at.. %JRE_HOME%\bin\server %JRE_HOME%\bin\client %JRE_HOME%\bin Others? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: randhir.si...@elitecore.com To: users@tomcat.apache.org Subject: RE: Backup of TOMCAT required Date: Fri, 6 Feb 2009 01:14:53 +0530 Thanks, for your answer. But, my real question is whether we need to copy the latest copy of $TOMCAT_HOME from the old server to the new server as it is just a web server and not our application code. regards -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Thursday, February 05, 2009 9:34 PM To: Tomcat Users List Subject: RE: Backup of TOMCAT required Good Morning Singh- any technical reasons for staying with an outdated 1.4 JVM..as you wont be able to take advantage of advanced gc and generics in JVM 6 ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: randhir.si...@elitecore.com To: users@tomcat.apache.org Subject: Backup of TOMCAT required Date: Thu, 5 Feb 2009 21:19:24 +0530 I had a doubt that should the backup of TOMCAT be taken as we are going to swap our server to a new one with better congifuration. I will explain the environment of our system a little 1) Application server- JBOSS 2) Web server- Apache tomcat 3) Application details- Java(1.4.2) Actually, I had taken the backup of TOMCAT around a week back in preparation of the swap for migration. But, one change is going to happen in our application in the form of a hotfix tomorrow and our migration is scheduled for day after. So, should a backup of TOMCAT be taken after our application hotfix is applied. Also, should a back of java($JAVA_HOME) and ant($ANT_HOME) be taken, we use j2sdk1.4.x for java and apache-ant-1.6.1 for ant. I hope, my question is clear. Please, help in solving the doubt. regards _ Windows LiveT: E-mail. Chat. Share. Get more ways to connect. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_allup_howitworks_0220 09 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.233 / Virus Database: 270.10.18/1935 - Release Date: 02/04/09 08:24:00 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Windows Live™: E-mail. Chat. Share. Get more ways to connect. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_allup_explore_022009
Re: Apache/mod_jk serves random files from tomcat
LukeK wrote: yuvalperlov wrote: I am having the exact same symptoms with the latest versions of everything: Fedora 10 Tomcat 6.0.18 Apache Apache/2.2.10 mod_jk-1.2.27 (and the same problem with the built-in mod_proxy_ajp). It takes a day or so for the problem to start but once it does it happens more frequently - resources get mixed up. Tomcat logs show that the right resources are loaded in response to each call but on the browser end you can see images loaded in the wrong place. Restarting apache resets the problem for another day or so. This describes my issue as well. SuSE 10.3 64-bit, running Apache 2.2.11, Tomcat 6.0.16, APR 1.3.4 and mod_jk/1.2.27. I have downgraded mod_jk to 1.2.24 to see if this makes a difference. We, too, are experiencing similar issues: CentOS release 5, Apache 2.2.3, Tomcat 6.0.14, and mod_jk 1.2.23. Comparing tomcat and apache logs show discrepancies between tomcat's and apache's content sizes for given requests. We're clearly not up-to-date on any of these components, but we're trying to find the minimum we have to update in order to resolve this issue. * Have others (that now seem to be fixed) gotten things to work by updating to the latest mod_jk (1.2.27)? * Has anyone discovered a way to reproduce this issue? * Is periodically restarting apache a suitable (if not hackish) work-around until we can get our production environment upgraded? Thoughts? Thanks in advance for your assistance. -John Hardin -- View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p21861245.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
Upgrade .. a Tomcat
Hi. Now I'm going to ask a question, sotto-voce, humbly, and don't get upset. There happens to be this Tomcat 5.5.20 you see, running under Linux Debian Etch. It wasn't me who installed it, it was the sysadmin, and he's a really difficult guy to relate to, and he has the power switch. But suppose, just suppose, that I would quietly want to bring this Tomcat 5.5.20 up to the 5.5.25+ level, just so that I could try the Listener mentioned here : http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html Do you think I could download a real 5.5 Tomcat from tomcat.apache.org, untargz it to some temporary directory, and replace just the few bits that would bring it up to level, without the sysadmin even noticing ? And if so, any idea of which are the relevant bits for that Listener ? Or is that kind of thing really likely to bring the whole building down ? (I would of course backup any relevant bit before I do that, and this is a development system in a remote central European town, not the one controlling the airspace above Minnesota). If it matters, the current Tomcat is running so : 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-1.5.0-sun Server version: Apache Tomcat/5.5 Server built: Jan 20 2008 12:32:00 Server number: 5.5.20.0 OS Name:Linux OS Version: 2.6.18-6-686 Architecture: i386 JVM Version:1.5.0_14-b03 JVM Vendor: Sun Microsystems Inc. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache/mod_jk serves random files from tomcat
JohnHardin wrote: * Have others (that now seem to be fixed) gotten things to work by updating to the latest mod_jk (1.2.27)? I suspect that it's related to 1.2.27 - I have been playing around with older versions. .24 and .25 have had issues forwarding certain request headers, but so far .26 seems to be working OK. Is periodically restarting apache a suitable (if not hackish) work-around until we can get our production environment upgraded? That'd be my fallback position. Cheers! Luke -- View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p21861548.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: Upgrade .. a Tomcat
From: André Warnier [mailto:a...@ice-sa.com] Subject: Upgrade .. a Tomcat And if so, any idea of which are the relevant bits for that Listener ? From looking at the changelog, I think all you need is the one class file: org.apache.catalina.mbeans.JMXAdaptorLifecycleListener However, this does not appear to be in the binary downloads - you have to compile it from the source. (Which explains why the doc says supported with Tomcat 5.5.25 src release.) You should be able to take the resulting .class file and put it in 5.5.20's server/classes directory, configure the listener, and have at it. I'd suggest trying it on your own copy of 5.5.20 first, before upsetting the guy with the power switch. If you don't have that version, you can find 5.5.20 here: http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.20/ - 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
RealmBase's 'Container' requirement (revisited)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, Back in July, I asked about RealmBase requiring a Container object in order to function properly. This has to do with using securityfilter with Tomcat's built-in Realms. Here is a reference to the original thread: http://marc.info/?t=12175132313r=1w=2 I've started playing around with implementing a trivial ContainerBase subclass and I'm running into trouble again so I was hoping that some of the TC devs could weigh-in. My trivial ContainerBase subclass looks like this: private static class DummyContainer extends org.apache.catalina.core.ContainerBase { public String getInfo() { return securityfilter_dummy_container/1.0; } } ...and I essentially create a new Realm object and then call Realm.setContainer(). It looks like I'm getting farther than I was before, but I'm still getting errors deep down in Tomcat's internals. I'm getting an NPE in the DataSourceRealm (which is what I'm using as an example): java.lang.NullPointerException at org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:402) at org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:283) at org.securityfilter.realm.catalina.CatalinaRealmAdapter.authenticate(CatalinaRealmAdapter.java:105) The method in question (DataSourceRealm.open) looks like this: protected Connection open() { try { Context context = null; if (localDataSource) { context = ContextBindings.getClassLoader(); context = (Context) context.lookup(comp/env); } else { StandardServer server = (StandardServer) ServerFactory.getServer(); context = server.getGlobalNamingContext(); } DataSource dataSource = (DataSource)context.lookup(dataSourceName); /// THIS IS LINE 402 return dataSource.getConnection(); } catch (Exception e) { // Log the problem for posterity containerLog.error(sm.getString(dataSourceRealm.exception), e); } return null; } Since I've included catalina.jar and catalina-optional.jar in my webapp, classes like ServerFactory and friends haven't been initialized since they are dormant in my webapp. The real ServerFactory class being loaded by Tomcat's server ClassLoader are, I'm sure, doing quite well. My question is this: how much of Tomcat's internals do I have to mock-up in order to get a Realm working outside of a legitimately running server? That sound like a ridiculous question, but securityfilter used to work with Tomcat Realms back in the day (4.x?) and now they don't (definitely 5.5, possibly 5.0 and 6.0 as well) because of this reliance upon more of Tomcat internals. Should I continue down this road of trying to prop-up a Tomcat skeleton server inside the webapp's space, or would it be better to discontinue support for this feature? Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmLXusACgkQ9CaO5/Lv0PDa3wCgryhZIOIxJg1BrZu/cvaExoka y2wAn1Anr7EtHdXVj4merPdUmWkAwDCO =Hwel -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Location of properties file for web app in Tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Flavius, Flavius wrote: My ultimate goal is to give these instructions to a network admin: 1. Download and install Tomcat 2. Place war file in TomcatDir/webapps 3. Put the app.properties file at __ and set your database and email server info. 4. Start tomcat Something even cooler would be to provide a simple text editor that would load your properties file from the WAR and write it back into the WAR when you saved it. Then you get the best of both worlds. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmLZg0ACgkQ9CaO5/Lv0PDzqQCfW6JwuP3UxbsEy1Hj1zHCPD6j KacAoIRpTWwUo0hyTucngttCOgVEwVbc =IalH -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: RealmBase's 'Container' requirement (revisited)
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: RealmBase's 'Container' requirement (revisited) Should I continue down this road of trying to prop-up a Tomcat skeleton server inside the webapp's space I'm confused (seems to be happening a lot lately): Tomcat already supports context-specific Realm usage, so what is the real capability you're providing? Would JMX allow you to create (and destroy) a context-specific Realm on the fly? - 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: running tomcat with root user.....umask in jsvc?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, I know I'm a bit late, but... André Warnier wrote: André Warnier wrote: epicwin...@hotmail.com wrote: You are correct, I found a setting that relaxes the group access permissions on the jailkit. Now I just have one more problem. When tomcat creates files in these user directories I need the permissions to be set appropriately. What is the best way to set the umask value when running tomcat using jsvc? Replying to myself : upon further reflection, I am not even sure that Java would have a method to do this, since it is supposed to be platform-independent, and setting filesystem permissions and group ownership is rather on the platform-dependent side. Correct: Java does not provide any permissions-adjusting behavior except things like read-only through the java.io.File class. On the other hand, the umask of the JVM process should be whatever the umask was for the shell that started it. So, if the umask is 022, you should get files that are readable by anyone. Is that not what you are experiencing, epicwinter? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEUEARECAAYFAkmLZ8wACgkQ9CaO5/Lv0PCsqwCY32MByPxZLRu6dtyVq5+HD2tK DQCfWHH4qrLiOO2sO7wkHYeYZ66h3hU= =Enfl -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 on Linux - session - DB connections and other shared resources
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ray, Ray Holme wrote: I have a few web applications being moved to tomcat. They all share some commonality - I use Firebird not MySQL; I built my own ConnectionManager long ago [snip] Perhaps due to lack of knowledge, I try get the session's UserInfo (getAttribute(..)) and on failure intstantiate a new one in hundreds of servlets and/or JSP servlet codes sets (adding resources as needed). Since you wrote your own ConnectionManager, you have the opportunity to control everything about the JDBC objects handed-out to the application. Why not use that to your advantage and do all this housekeeping within either the ConnectionManager class (say, to create your UserInfo objects) or in wrappers around object such as Connection to do this in the close() method or others? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmLaMsACgkQ9CaO5/Lv0PASPwCcDExkP6TGlSWjUHCtdEeyYgJH jFcAmwcDrQMaRzjxDnd1LydLWEJAv6lG =eUQM -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat resets the connection during load
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, Mark Thomas wrote: There is a proposal to log a message when [the thread pool is exhausted and accept queue is full] but with current versions you won't see anything in the logs. Can Java even detect the second of those two conditions? I would think the best you could do is make a note that the last available request processor is being taken out of the pool to service a request. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmLacgACgkQ9CaO5/Lv0PCIFQCgpx7QWxqyrpqmVEIOnpfiPD6d knkAnArm/6Vx2IgsmrlsYMkun+Gw6loa =LKPe -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Backup of TOMCAT required
thanks, for your answer. I do not understand what you are trying to say. regards -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Friday, February 06, 2009 1:38 AM To: Tomcat Users List Subject: Re: Backup of TOMCAT required Gregor Schneider wrote: On Thu, Feb 5, 2009 at 8:44 PM, Randhir singh randhir.si...@elitecore.com wrote: Thanks, for your answer. But, my real question is whether we need to copy the latest copy of $TOMCAT_HOME from the old server to the new server as it is just a web server and not our application code. What the heck. Just move the disk then. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.233 / Virus Database: 270.10.18/1935 - Release Date: 02/04/09 16:35:00 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Backup of TOMCAT required
the java and tomcat version is same in the old and the new. We had copied $JAVA_HOME also from the old to the new. I guess, then, copying the tomcat again is not required? regards -Original Message- From: David Smith [mailto:d...@cornell.edu] Sent: Friday, February 06, 2009 1:31 AM To: Tomcat Users List Subject: Re: Backup of TOMCAT required Quick answer: No. Copy over your app and configure the new tomcat to match the old one. I highly recommend hand configuring tomcat rather than just copying config files though. The review is good practice and config files -- particularly server.xml -- have changed over time. The thing that would concern me more is if tomcat and/or java version changes from old to new. If that's the case, you will have to test your app in the new environment before going live. --David Randhir singh wrote: Thanks, for your answer. But, my real question is whether we need to copy the latest copy of $TOMCAT_HOME from the old server to the new server as it is just a web server and not our application code. regards -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Thursday, February 05, 2009 9:34 PM To: Tomcat Users List Subject: RE: Backup of TOMCAT required Good Morning Singh- any technical reasons for staying with an outdated 1.4 JVM..as you wont be able to take advantage of advanced gc and generics in JVM 6 ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: randhir.si...@elitecore.com To: users@tomcat.apache.org Subject: Backup of TOMCAT required Date: Thu, 5 Feb 2009 21:19:24 +0530 I had a doubt that should the backup of TOMCAT be taken as we are going to swap our server to a new one with better congifuration. I will explain the environment of our system a little 1) Application server- JBOSS 2) Web server- Apache tomcat 3) Application details- Java(1.4.2) Actually, I had taken the backup of TOMCAT around a week back in preparation of the swap for migration. But, one change is going to happen in our application in the form of a hotfix tomorrow and our migration is scheduled for day after. So, should a backup of TOMCAT be taken after our application hotfix is applied. Also, should a back of java($JAVA_HOME) and ant($ANT_HOME) be taken, we use j2sdk1.4.x for java and apache-ant-1.6.1 for ant. I hope, my question is clear. Please, help in solving the doubt. regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.233 / Virus Database: 270.10.18/1935 - Release Date: 02/04/09 16:35:00 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Why tomcat 6.0.18 looks for MySQL JDBC driver to be placed in CATALINA_HOME/lib folder?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ramesh, peterramesh wrote: On reading Tomcat help doc http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html, it recommends to place the MySQL JDBC driver in both places (CATALINA_HOME/lib and WEB-INF/lib folder of the app). I don't think so. The only place on that page where WEB-INF/lib is referenced is here (as application's lib folder): Note: placing these jars in both $CATALINA_HOME/lib and a web application's lib folder will cause an error, so ensure you have them in the $CATALINA_HOME/lib location only. Putting your JDBC driver in both place is a recipe for pain. 1. Why Tomcat look for the JDBC jar to be in CATALINA_HOME/lib folder? Tomcat creates the JNDI DataSource and loads your driver outside of the webapp's ClassLoader. I'm not sure why it does this, but it does. That requires you to make your driver available to Tomcat in CATALINA_HOME/lib. 2. If I copied more than one JDBC jars (with different version) in CATALINA_HOME/lib folder for couple of my applications, how each of them looks for the respective versions of JDBC driver? They can't. It'll be completely random which version of the driver wins. If you /need/ different JDBC driver versions for the same database, then you are better off with separate Tomcat instances. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmLa08ACgkQ9CaO5/Lv0PBFYwCfQOFXsDx64Vfpv/2W8nd+cF4N zqsAnjVkrMEclBYZ0uZRxRpLjthoL1QE =WQ7/ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Backup of TOMCAT required
what are you trying to say, can the OS be copied ever? regards -Original Message- From: Gregor Schneider [mailto:rc4...@googlemail.com] Sent: Friday, February 06, 2009 1:37 AM To: Tomcat Users List Subject: Re: Backup of TOMCAT required On Thu, Feb 5, 2009 at 8:44 PM, Randhir singh randhir.si...@elitecore.com wrote: Thanks, for your answer. But, my real question is whether we need to copy the latest copy of $TOMCAT_HOME from the old server to the new server as it is just a web server and not our application code. hey - why not copying the whole OS? scnr Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.233 / Virus Database: 270.10.18/1935 - Release Date: 02/04/09 16:35:00 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Backup of TOMCAT required
the jvm version is same as the old $JAVA_HOME was copied to the new one. I guess, then, copying the tomcat again is not required? regards -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Friday, February 06, 2009 2:23 AM To: Tomcat Users List Subject: RE: Backup of TOMCAT required theoretically if you're mirroring you should see no difference (although you might see different behaviour from the JVM binaries..but that *should be* negated by having same JVM version) specifically I would check OS specific binaries at.. %JRE_HOME%\bin\server %JRE_HOME%\bin\client %JRE_HOME%\bin Others? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: randhir.si...@elitecore.com To: users@tomcat.apache.org Subject: RE: Backup of TOMCAT required Date: Fri, 6 Feb 2009 01:14:53 +0530 Thanks, for your answer. But, my real question is whether we need to copy the latest copy of $TOMCAT_HOME from the old server to the new server as it is just a web server and not our application code. regards -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Thursday, February 05, 2009 9:34 PM To: Tomcat Users List Subject: RE: Backup of TOMCAT required Good Morning Singh- any technical reasons for staying with an outdated 1.4 JVM..as you wont be able to take advantage of advanced gc and generics in JVM 6 ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: randhir.si...@elitecore.com To: users@tomcat.apache.org Subject: Backup of TOMCAT required Date: Thu, 5 Feb 2009 21:19:24 +0530 I had a doubt that should the backup of TOMCAT be taken as we are going to swap our server to a new one with better congifuration. I will explain the environment of our system a little 1) Application server- JBOSS 2) Web server- Apache tomcat 3) Application details- Java(1.4.2) Actually, I had taken the backup of TOMCAT around a week back in preparation of the swap for migration. But, one change is going to happen in our application in the form of a hotfix tomorrow and our migration is scheduled for day after. So, should a backup of TOMCAT be taken after our application hotfix is applied. Also, should a back of java($JAVA_HOME) and ant($ANT_HOME) be taken, we use j2sdk1.4.x for java and apache-ant-1.6.1 for ant. I hope, my question is clear. Please, help in solving the doubt. regards _ Windows LiveT: E-mail. Chat. Share. Get more ways to connect. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_allup_howitworks_0220 09 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.233 / Virus Database: 270.10.18/1935 - Release Date: 02/04/09 08:24:00 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Windows LiveT: E-mail. Chat. Share. Get more ways to connect. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_allup_explore_022009 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.233 / Virus Database: 270.10.18/1935 - Release Date: 02/04/09 16:35:00 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AJP vs HTTP connectors?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Filip, Filip Hanik - Dev Lists wrote: So if you are using something that is working, don't even consider switching just cause some dude on a webinar told you so. Yeah, especially some dude named ... oh, wait. ;) Care to comment on an as-yet-unconfigured system? For instance, if you were starting from scratch, would you recommend one approach to the other, and why? Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmLbMUACgkQ9CaO5/Lv0PBP6QCeOdr41fJj0np/uLNTxnghIE0E SBIAnAmLtjDB9oKqXhHzYy9yzC4HTVOJ =bi6o -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Copy Apache
I copied the $APACHE_HOME from the old server to the new one and it works fine. I guess, this is contradictory to your answer. regards -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Tuesday, February 03, 2009 7:43 PM To: Tomcat Users List Subject: Re: Copy Apache Gregor, Gregor Schneider wrote: I'm sorry, but the whole question is rediculous Yes, but the correct word is ridiculous. and needs a rephrasing at least. And maybe your answer needs this also. - What does the OP want to copy? The whole of Apache? HTML only? To me it seems as if the OP doesn't have *any* clue when it comes to Apache / Tomcat (please also refer to his previous posts). That seems indeed to be the case. But no more so than quite a few other previous posters on this list. No need to get upset. I may appear rude, Yes. however, I believe that before asking questions in a list, ppl first should at least *try* to refer to the - in this case - excellent docs. Agreed. If there are still open questions left, everybody is very welcome to ask their questions here, and I believe the list-members are more than willing to help. Yes. However, most members of this list are helping during their spare time, free of charge, just because they like Tomcat and maybe believe in the principles of Open Source. On the other hand, most members of this list are also earning their pennies with software-development / administration / whatsoever. True, wherever they are. Still, this does not mean that the members of this list are helping some offshore-wannabies to fullfill their client's (!) requirements, thus cutting off the branch they're sitting on. Now that starts sounding a bit peculiar. What do you mean by offshore ? Anyone not in the same particular country where you presently are ? (because I don't think I am either) And I thought this was a global Internet forum, dedicated to helping Apache Tomcat users worldwide, irrespective of origin, culture, nationality, beliefs. Am I wrong or naive ? Ever wondered how some offshore-companies can come up with their prices? Have a look at some posts, and you'll know... I've been wondering about the same thing reading some posts, but the presumed cultural or geographical origin or off-shoreness is not well-correlated to the (lack of) quality of the posts. I don't have any problem with a fair competition and sharing information, But the way you write, makes it sound as if you do, because the only element you had to categorise this OP as unfair, offshore or whatever was his name. If I go by the names alone, I'd bet that quite a few of the Apache Tomcat developers and helpers on this list are not direct descendants of the Mayflower crew either. Your post could offend some of them too. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.233 / Virus Database: 270.10.17/1931 - Release Date: 02/02/09 19:21:00 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org