Re: Embedded Tomcat
i dont want tomcat mails hereafter because im not a member... - Original Message - From: Joe Walker [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, July 16, 2008 3:03 PM Subject: Re: Embedded Tomcat Thanks for the reply - I've been doing some digging into where the NPE happens, and while I'm sure it has something to do with my Embedded setup (it works just fine when I point a full Tomcat at the war file using a Context file), there are other things I need to look at, which are nothing to do with Embedding - I'll start another thread on CometProcessor, and maybe come back to this once I'm sure that comet isn't to blame. Thanks, Joe. On Tue, Jul 15, 2008 at 6:00 PM, Radcliffe, William H. [EMAIL PROTECTED] wrote: Joe wrote: I'm not getting any exceptions on startup, and the exact war file that I'm pointing is found because it's serving HTML and even my servlet just fine. But when I get a ServletContext, it's null. I've got a set of tomcat jars in the classpath (catalina, annorations-api, tomcat-coyote, tomcat-juli, servlet-api) I don't know if you are crossing contexts or not, but it doesn't look like you setCrossContext(true) on the context you created. Should you? The API only says the following for setCrossContext(boolean crossContext): Set the allow crossing servlet contexts flag. However, the Tomcat configuration reference seems to state that all calls to getContext will return null unless you set the context's crossContext parameter to true. When the parameter is true, the configuration reference specifically states that other contexts will have access through the ServletContext.getContext() method. When it is set to false, the reference no longer mentions other contexts, it states that getContext() will always return null. I'm assuming that the setCrossContext method and crossContext parameter have the same effect. I don't know if any of this applies in your case. From http://tomcat.apache.org/tomcat-6.0-doc/api/index.html: setCrossContext public void setCrossContext(boolean crossContext)Set the allow crossing servlet contexts flag. Specified by: setCrossContext in interface Context Parameters: crossContext - The new cross contexts flag From http://tomcat.apache.org/tomcat-6.0-doc/config/context.html: crossContex: Set to true if you want calls within this application to ServletContext.getContext() to successfully return a request dispatcher for other web applications running on this virtual host. Set to false (the default) in security conscious environments, to make getContext() always return null. Bill -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joe Walker Sent: Tuesday, July 15, 2008 10:59 AM To: users@tomcat.apache.org Subject: Embedded Tomcat Maybe I missed some docs somewhere, but my embedded Tomcat isn't working properly. I doing essentially this: Embedded embedded = new Embedded(); embedded.setCatalinaBase(.); Engine engine = embedded.createEngine(); Host host = embedded.createHost(localhost, .); engine.addChild(host); Context context = embedded.createContext(/dwr, target/ant/web/demo); host.addChild(context); embedded.addEngine(engine); Connector connector = embedded.createConnector(localhost, 8080, false); embedded.addConnector(connector); embedded.start(); And my web-app starts OK, however the ServletContext seems to be null, so the web-app fails. I'm not getting any exceptions on startup, and the exact war file that I'm pointing is found because it's serving HTML and even my servlet just fine. But when I get a ServletContext, it's null. I've got a set of tomcat jars in the classpath (catalina, annorations-api, tomcat-coyote, tomcat-juli, servlet-api) Any clues where to look? Joe. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deployment questions
i dont want tomcat!! im not a member of it!! dont send me emails hereafter... if im a member send me emails,but im not a member. Best Regards Ajmal - Original Message - From: Caldarale, Charles R [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, March 27, 2008 8:36 AM Subject: RE: deployment questions From: Kimberly Begley [mailto:[EMAIL PROTECTED] Subject: deployment questions 1) make a war file of my web app directory Yes. 2) add a context entry to the server.xml file on the remote server Unless you're deploying on an ancient version of Tomcat (you didn't bother to tell us), definitely not. Your Context element belongs in your webapp's META-INF/context.xml file, if you need one at all. Note that path and docBase attributes are not allowed in Context elements in this circumstance. Read the doc: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html 3) copy the war file to the remote server tomcat/webapp directory That's usually webapps, not webapp. 4) stop and start tomcat on the remote server Usually not necessary, unless autoDeploy is disabled. But then what is the process to see it online? The name of the .war file is the name of the webapp, so you reference it via a URL like: http://hostDNSname[:port]/appName If Tomcat on the remote host is configured to use port 80, you omit that from the URL, of course. If the host has no DNS entry, use its IP address. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: httpd cant talk to tomcat workers
ijncemkaosimgmail.com add him! - Original Message - From: Andy Smith [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org Sent: Wednesday, March 26, 2008 9:14 PM Subject: Re: httpd cant talk to tomcat workers Hi Peter, hey thanks a lot, got it working! As I had a number of files in the conf directory I was a bit confused and was also not reading what where comments and what where not very accuarately in the XML! :P So I just uncommented the connection in server.xml and straight off httpd can talk to tomcat :D Actually enabling the AJP in server.xml initially broke the app, Alfresco, which I manage to fix by adding this to the JAVA_OPTS in the startup script: -Djava.rmi.server.hostname=myhostname.net Not sure exactly why I needed that as it wasnt needed before, but hey! thanks for your help! cheers Andy. PS Can't claim to be a Mancunian but will confess to working with them ;) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk gmake recursion error on solaris 10 x86
dont send me tomcat hereafter!! - Original Message - From: Rainer Jung [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, March 06, 2008 5:56 AM Subject: Re: mod_jk gmake recursion error on solaris 10 x86 Hi Chris, ChrisS schrieb: I installed Sun Studio 11 and included it first in the $PATH env variable. This cleaned up the nasty warnings about CC. Then I built it with: gmake and then gmake clean this was also successful. Libtool was then used to pass the mod_jk.so file to its location in this case: /www/apache/libexec I do however have one problem and it is a biggy. LoadModule along with LoadFile(testing) will not load the module into my 1.3.39 dist. The error message thrown is this: ../bin/apachectl start Syntax error on line 237 of /www/apache/conf/httpd.conf: Cannot load /www/connectors/jk/native/apache-1.3/mod_jk.so into server:ld.so.1: libhttpd.ep: fatal: relocation error: file /www/connectors/jk/native/apache-1.3/mod_jk.so: symbol ap_ctx_get: referenced symbol not found ../bin/apachectl start: httpd could not be started The symbol ap_ctx_get, which is missing here is not included in a standard httpd 1.3. It comes with the extended API (EAPI) bundled with mod_ssl. mod_ssl for Apache httpd 1.3 mainly consists of the ssl module and a set of aditional patches for httpd 1.3, which extend the module API, s.t. the more complex ssl functionality fits into the httpd module API. In the following I'll not make a distinction between EAPI and mod_ssl. Maybe the mod_jk.so you are trying to load here is the one on our project download page? Because that one explicitely states in the README, that it has been build against an EAPI enabled httpd. Or you build your mod_jk against an ssl enabled httpd and afterwards try to ue it inside one, which is a plain one. Although mod_jk soesn't really have a dependency on ssl, there is one symbol, ap_default_port, that the patches for mod_ssl redefine (you can imagine, that the default port with ssl depends on the fact, if one uses ssl (443) or not (80)) and thus when mod_jk gets build against an ssl enabled httpd, the resulting mod_jk.so has a single additional dependency, namely ap_ctx_get(). Before trying to fix this reconsider your choice of httpd first. Version 1.3 is now very outdated. The httpd project already officially announced, that they put a very high bar on patches they are going to apply to 1.3. Mainly they'll only fix critical security issues. If I would start with something new today, I would really choose httpd 2.2.x. This will provide you a much more future proof environment. It comed with builtin ssl support, ldap support, a much better reverse proxy, less 64 Bit problems (likely even no 64 Bit problems) and much more. Please could you help me, I have tried compiling the Apache Dist with: ./configure --prefix=/www/apache --enable-module=most --enable-shared=max --enable-rule=SHARED_CORE $ make $ make install Don't know about enable-rule, but it doesn't look wrong. Believing that this would resolve my symbol issue. Symbols are in the table this was shown with: nm /www/apache/bin/httpd but none for ap_ctx_get Yes, because it's a non mod_ssl httpd 1.3. But: nm on mod_jk.so should also show, that mod_jk does *not* want that symbol. Kindest Regards ps Thanks for all the help so far guys!! Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk gmake recursion error on solaris 10 x86
dont send me tomcat hereafter!! - Original Message - From: ChrisS [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, March 06, 2008 6:57 AM Subject: Re: mod_jk gmake recursion error on solaris 10 x86 Rainer Jung wrote: Unfortunately I have some difficulties to understand, what you want to tell me: Ok Rainer that solves that one, I do have a built in Apache Solaris 10 What solves what? dist this is: bash-3.00# /usr/apache2/bin/httpd -l Compiled in modules: core.c prefork.c http_core.c mod_so.c bash-3.00# /usr/apache2/bin/httpd -v Server version: Apache/2.0.63 Server built: Feb 5 2008 11:13:45 bash-3.00# Please recommend! almost forgot thanks helluvalot. Not sure, what you mean by recommend? I was suggesting 2.2.x, you have a 2.0.x. That's not exactly the same :) Quite possible, that it's more important for you to use a Solaris bundled httpd instead of a self build one. If that is a wise decision depends on the importance Apache httpd has for you. If it is really important, I would not necessarily rely on the OS delivering company to provide needed updates in time. Would this config suffice mate!!! I don't get this, it's a question with exclamation marks, hm ps I really wanted to get this sorted for a mate in work, we have a clustered setup not clustering between Tomcat nodes on a 1.3.39 setup, there are also session sharing issues with deployed apps, the idea was to lab the problem and try to find a resolve. Aha, so then it makes sense to use the same versions, you also have in production. I would need to check the SSL status exactly but this is running/serving SSL requests on a Sparc SunBlaze server. Would the binary dist of mod_jk (current) work with this environment ? this being a great deal saner than this one I am using Which binary dist? The one from the ASF download page? Yes, that one will need an EAPI httpd, i.e. one build with ssl support. Will this be saner? Not sure. Our binary dist is build with gcc and the httpd we are talking about might be build with Sun Studio (not sure, if we are talking about yet another httpd). Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The binary distribution referred to is mod_jk, I remember seeing one in the mirrors for a Sparc installation only! isn't there one for x86 or is that something going on between the Org and Sun Microsystems? Some typos in my response apologies only human still! Would or could you recommend that the version I have: apache 2.0.63 be able to work with the jk_mod current connector module? I provide the output of 2.0.63 so that you may be able to see whether or not, compiling the mod_jk source against it would work. Or do I have to do something else like for example download another huge package to compile it with. This is an Org and I recognise that so I keep in the frame of mind that if someone helps me then the favor is returned further down the line (I call this ethics and nice manners) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk gmake recursion error on solaris 10 x86
dont send me tomcat hereafter!! im not a member of t!!!. - Original Message - From: ChrisS [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, March 06, 2008 7:57 AM Subject: Re: mod_jk gmake recursion error on solaris 10 x86 ChrisS wrote: Rainer Jung wrote: Unfortunately I have some difficulties to understand, what you want to tell me: Ok Rainer that solves that one, I do have a built in Apache Solaris 10 What solves what? dist this is: bash-3.00# /usr/apache2/bin/httpd -l Compiled in modules: core.c prefork.c http_core.c mod_so.c bash-3.00# /usr/apache2/bin/httpd -v Server version: Apache/2.0.63 Server built: Feb 5 2008 11:13:45 bash-3.00# Please recommend! almost forgot thanks helluvalot. Not sure, what you mean by recommend? I was suggesting 2.2.x, you have a 2.0.x. That's not exactly the same :) Quite possible, that it's more important for you to use a Solaris bundled httpd instead of a self build one. If that is a wise decision depends on the importance Apache httpd has for you. If it is really important, I would not necessarily rely on the OS delivering company to provide needed updates in time. Would this config suffice mate!!! I don't get this, it's a question with exclamation marks, hm ps I really wanted to get this sorted for a mate in work, we have a clustered setup not clustering between Tomcat nodes on a 1.3.39 setup, there are also session sharing issues with deployed apps, the idea was to lab the problem and try to find a resolve. Aha, so then it makes sense to use the same versions, you also have in production. I would need to check the SSL status exactly but this is running/serving SSL requests on a Sparc SunBlaze server. Would the binary dist of mod_jk (current) work with this environment ? this being a great deal saner than this one I am using Which binary dist? The one from the ASF download page? Yes, that one will need an EAPI httpd, i.e. one build with ssl support. Will this be saner? Not sure. Our binary dist is build with gcc and the httpd we are talking about might be build with Sun Studio (not sure, if we are talking about yet another httpd). Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The binary distribution referred to is mod_jk, I remember seeing one in the mirrors for a Sparc installation only! isn't there one for x86 or is that something going on between the Org and Sun Microsystems? Some typos in my response apologies only human still! Would or could you recommend that the version I have: apache 2.0.63 be able to work with the jk_mod current connector module? I provide the output of 2.0.63 so that you may be able to see whether or not, compiling the mod_jk source against it would work. Or do I have to do something else like for example download another huge package to compile it with. This is an Org and I recognise that so I keep in the frame of mind that if someone helps me then the favor is returned further down the line (I call this ethics and nice manners) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Apache 2.0.63 Solaris 10 x86 works! Steps taken: 0. Got loads of help from the guys at users@tomcat.apache.org (thanks guys!) 1. Download Sun Studio 11for x86 and install as su - root. (Refer to www.sun.com for this) 2. Include /opt/SUNWspro/bin in the PATH environment variable (PATH=/opt/SUNWspro:$PATH) 3. Download Tomcat from http://tomcat.apache.org/ i am using 5.5.20.0 as of this writing. Install Tomcat (see http://tomcat.apache.org for this) 4. svn checkout tomcatconnectors JK 1.2.26 refer to (google, http://tomcat.apache.org, etc ... for this) Subversion(svn) can be downloaded from http://www.sunfreeware.com. Apparently this release of mod_jk fixes some session sharing issues amongst other important issues between TomcatNodes(well thats how I read it anyway). Apache ant is required to build this so download that also(and follow instructions for using it). In order to use buildconf.sh you will require. autoconf, automake, autoheader, aclocal, libtoolize these can all be found at www.sunfreeware.com perl is also required. Make sure the fresh installs are referenced from the PATH variable. On my system these live in /usr/local/bin. Also make sure that /usr/sfw/bin isn't referenced in the PATH along with CC= not being set, don't forget to export ;). 5. When everything is set run buildconf.sh check the top_builddir variable in common and apache-2.0 subdirectories this should be: top_builddir = .. (note the spaces I think under common this was: top_builddir=.. this threw
Re: multiple domains
dont send me tomcat hereafter!! - Original Message - From: Angelo Chen [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, March 06, 2008 8:29 AM Subject: multiple domains Hi guys, I have this server that has two domains pointing at it, the tomcat server 5 is running there, I have two wep applications for the two domains, so i like: www.domain1.com will call the app1 www.domain2.com will call the app2 how to configure tomcat to work like this? thanks Angelo -- View this message in context: http://www.nabble.com/multiple-domains-tp15865530p15865530.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]