Re: Restart one webapp
2010/2/21 Jonathan Soons : > The documentation gives no way to append a username and password so this is > where I am stuck. > > www:~# wget localhost:8080/manager/list > --2010-02-21 02:31:52-- http://localhost:8080/manager/list > Resolving localhost... 127.0.0.1 > Connecting to localhost|127.0.0.1|:8080... connected. > HTTP request sent, awaiting response... 401 Unauthorized > Authorization failed. > www:~# Citing from `wget --help`: HTTP options: --http-user=USERset http user to USER. --http-password=PASSset http password to PASS. Try those. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Restart one webapp
The documentation gives no way to append a username and password so this is where I am stuck. www:~# wget localhost:8080/manager/list --2010-02-21 02:31:52-- http://localhost:8080/manager/list Resolving localhost... 127.0.0.1 Connecting to localhost|127.0.0.1|:8080... connected. HTTP request sent, awaiting response... 401 Unauthorized Authorization failed. www:~# From: Caldarale, Charles R [chuck.caldar...@unisys.com] Sent: Saturday, February 20, 2010 10:15 AM To: Tomcat Users List Subject: RE: Restart one webapp > From: Jonathan Soons [mailto:jso...@juilliard.edu] > Subject: Restart one webapp > I have one webapp that randomly freezes. I detect this with a script > and restart tomcat. I would prefer to restart just the one webapp the > way the manager does. Is there a command line way to do this? Use curl or wget to send the manager the plain-text commands, not the HTML ones. - 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: where can I download tomcat version 6.0.14 ?
> From: Adam Posner [mailto:cuco2...@gmail.com] > Subject: where can I download tomcat version 6.0.14 ? > > The problem is, the directory structure of the most recent tomcat > release, version 6.0.24 is a little different from version 6.0.14 Not true, all Tomcat 6.0.x versions have had the same directory structure. I suspect you have some other problem. > PLEASE, PLEASE just tell me where I can download tomcat version > 6.0.14. Did you not notice the Archives link in the Download section on the left side of the Tomcat home page? - 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
Serving static files in a cluster
Hey, I am using tomcat 5.5.26 on Ubuntu, currently having a clustered configuration, but having the entire cluster on a single box. I have the tomcat instances sitting behind apache. Eventually I'd like to move to cluster on different physical boxes. Part of our application involves serving files that are saved on the local file system. These files are uploaded by users. My question is, what is the best way to save these files so that they can be served across the different physical boxes? Should I be mirroring the files across each physical box or is there a particular distributed file system I should be using for storing the files? I dont know if there is any other technique. Thanks, Imran
where can I download tomcat version 6.0.14 ?
Hi, I recently downloaded eclipse galileo, version 3.5 and installed the latest version of tomcat, version 6.0.24. The problem is, the directory structure of the most recent tomcat release, version 6.0.24 is a little different from version 6.0.14, the one I had working previously. (with eclipse 3.4, I think). When I try to configure the server from within eclipse, it still expects that older directory layout from earlier versions of tomcat6, unfortunately. I am using ubuntu 9.10, and am trying to get my system set up to do j2ee webapps, so I manually downloaded eclipse, the latest stable version, 3.5 SL1. I'm sure there's a way to get eclipse 3.5 working with the latest version of tomcat, but frankly I don't have a lot of time right now to spend trying different things, I just need to get a JSP environment up and running quickly. It doesnt matter to me if its the latest version of tomcat6, so PLEASE, PLEASE just tell me where I can download tomcat version 6.0.14. There's only a link to the latest version on the ApacheTomcat.org main website. Thanks, Adam
RE: Virtual host set-up woes
> From: Eric P [mailto:eric.maill...@gmail.com] > Subject: Re: Virtual host set-up woes > > But I only get an blank page for a simple index.jsp file Indicative of a messed up configuration that doesn't have a default webapp. > $CATALINA_HOME/conf/server.xml > directory="logs" prefix="dummy_access_log" > suffix=".log" timestamp="true"/> There hasn't been a element in Tomcat in many years; where did you get that from? Be wary of any "documentation" that doesn't come from the Tomcat web site - it's often out of date, and much of it is bogus. > /etc/hosts > 127.0.0.1 localhost dummy. com Good (except for the space, of course). > $CATALINA_HOME/conf/Catalina/dummyapps/ROOT.xml Where did you get that location for a element? It certainly didn't come from the docs, nor from Peter's or my messages. Go back and reread them all. To quote from Peter's message: > > create a file in $tomcathome/conf/Catalina/yourhost called ROOT.xml The name of your is? (It's certainly not dummyapps.) Tomcat would have completely ignored a file in the above location. > > WEB-INF/web.xml > Does that look at all like the element Peter provided? To refresh your memory, here it is again (with the invalid path attribute removed): > > > reloadable="true"> Note the presence of the docBase attribute and the comment therein. Also, it's pointless to have a of WEB-INF/web.xml in your element, since that value is already in the global one. If you have nothing to put in a element, you don't need one. > And the directory structure for the new context home (the content a > built/deployed app I copied over from its old location in /webapps). > $CATALINA_HOME/dummyapps > $CATALINA_HOME/dummyapps/WEB-INF > $CATALINA_HOME/dummyapps/index.jsp > $CATALINA_HOME/dummyapps/(other static files) Which is still very wrong. The appBase directory is the default location for all of a 's webapps - there can be many. The default webapp for a must be named ROOT (case sensitive), and is located either under the appBase directory, or where the docBase attribute points in the conf/Catalina/[host]/ROOT.xml file. Peter's message shows one way to achieve what you want, and facilitates the use of the same .war file or directory as the default one for each (the docBase attribute of all the ROOT.xml files would point to the same place). If in fact you want to use a different default webapp for each , you can separate them by the appBase setting of each , and not place the ROOT.xml file in conf/Catalina/[host]. In this scenario, your structure would be: host1apps/ROOT/ host1apps/ROOT/WEB-INF/ host1apps/ROOT/WEB-INF/lib/ host1apps/ROOT/WEB-INF/classes/ host1apps/ROOT/WEB-INF/web.xml host1apps/ROOT/META-INF/ host1apps/ROOT/META-INF/context.xml host1apps/ROOT/index.jsp host1apps/ROOT/ host2apps/ROOT/ host2apps/ROOT/WEB-INF/ host2apps/ROOT/WEB-INF/lib/ host2apps/ROOT/WEB-INF/classes/ host2apps/ROOT/WEB-INF/web.xml host2apps/ROOT/META-INF/ host2apps/ROOT/META-INF/context.xml host2apps/ROOT/index.jsp host2apps/ROOT/ ... The element for each webapp should be in the webapp's META-INF/context.xml file. Additional webapps (if any) for each would be placed in directories named for the webapp under host1apps, host2apps, etc. - 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: Virtual host set-up woes
Caldarale, Charles R wrote: From: Peter McNeil [mailto:pe...@mcneils.net] Subject: Re: Virtual host set-up woes 1. edit conf/server.xml and add a section inside the tag that looks like this:- 2. create a directory inside your tomcat home directory called "yourhostapps" as defined above e.g. mkdir $tomcathome/yourhostapps Note that the above needs to be repeated for each desired host. 4. create a file in $tomcathome/conf/Catalina/yourhost called ROOT.xml, making sure ROOT is all upper case, that contains the context for your app e.g. You were good up to that point. The path attribute is not allowed here; remove it. The other point is that each name must have a DNS entry or else your clients will never be able to reach it. (Alternatively, you could require your clients to make entries in their hosts files - assuming your clients can find it.) - Chuck (Keep getting a high spam score; added some spaces in between URLs; resending to list) Ok... I think I'm getting closer. Now when I go to http:// dummy. com:8180 (8180 is the port I'm running the connector on), I get a completely blank page. However, I am able to access/display certain static content for example: http:// dummy. com:8180/css/main.css local file: $CATALINA_HOME/dummyapps/css/main.css But I only get an blank page for a simple index.jsp file (file is simple HTML markup w/some text). View source from the browser shows absolutely nothing. http:// dummy. com:8180/index.jsp local file: $CATALINA_HOME/dummyapps/index.jsp And a blank page is all I get for a simple static HTML file that lives in the same place. http:// dummy. com:8180/index.html local file: $CATALINA_HOME/dummyapps/index.html In fact even any non-existing file produces a blank page (i.e., no error; just blank; nothing in the logs). E.g., http:// dummy. com:8180/non-existent-file.dummy Here are the changes I'm employed based on Peter and Charles' comments and another read of the official docs. $CATALINA_HOME/conf/server.xml ... ... suffix=".log" timestamp="true"/> ... ... /etc/hosts 127.0.0.1 localhost dummy. com ... $CATALINA_HOME/conf/Catalina/dummyapps/ROOT.xml WEB-INF/web.xml And the directory structure for the new context home (the content a built/deployed app I copied over from its old location in /webapps). $CATALINA_HOME/dummyapps $CATALINA_HOME/dummyapps/WEB-INF $CATALINA_HOME/dummyapps/index.jsp $CATALINA_HOME/dummyapps/(other static files) ... Nothing of interest in any of the logs. Thanks for reading all of this. Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Restart one webapp
> From: Jonathan Soons [mailto:jso...@juilliard.edu] > Subject: Restart one webapp > I have one webapp that randomly freezes. I detect this with a script > and restart tomcat. I would prefer to restart just the one webapp the > way the manager does. Is there a command line way to do this? Use curl or wget to send the manager the plain-text commands, not the HTML ones. - 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: Virtual host set-up woes
> From: Peter McNeil [mailto:pe...@mcneils.net] > Subject: Re: Virtual host set-up woes > 1. edit conf/server.xml and add a section inside the tag > that looks like this:- > unpackWARs="true" autoDeploy="true" > xmlValidation="false" xmlNamespaceAware="false"> > > > 2. create a directory inside your tomcat home directory called > "yourhostapps" as defined above e.g. mkdir $tomcathome/yourhostapps Note that the above needs to be repeated for each desired host. > 4. create a file in $tomcathome/conf/Catalina/yourhost called ROOT.xml, > making sure ROOT is all upper case, that contains the context for your > app e.g. > > name must have a DNS entry or else your clients will never be able to reach it. (Alternatively, you could require your clients to make entries in their hosts files - assuming your clients can find it.) - 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: Virtual host set-up woes
On Fri, Feb 19, 2010 at 11:28 PM, Eric P wrote: > I've read the official 6.0 docs here over and over. > http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html > > But it seems like these docs are trying to give me a whole new context where > I can put more webapps (maybe I'm missing the point) You are -- each virtual host needs its own appBase, even if it's going to hold only one default (ROOT) context. The howto you're reading *is* the definitive way to accomplish what you want. Really. -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: DB connection error -Tomcat 6 config
> From: Martin Gainty [mailto:mgai...@hotmail.com] > Subject: RE: DB connection error -Tomcat 6 config > > BTW: i put my Oracle driver classes (classes12.jar or classes12.zip) in > WEB-INF/lib That works if your webapp is managing the connection pool (or you're not using one). If Tomcat manages the connection pool, the JDBC classes must be placed where Tomcat's own code can access them. - 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 shutdown issue
As I believe someone already told you, there is no need to repeat every message twice. dBenjamin wrote: Tomcat not getting shutdown.. it shows the WARNING: StandardServer.await: Invalid command '' received can you pls find server.xml when I click shutdwon.bat server not listning it shows WARNING: StandardServer.await: Invalid command '' received can you please help me to solve this issues.. Also, you were already given the answer before : Probably (but we cannot tell that for sure just by your server.xml file), it looks like /something/ is sending a normal HTTP request (*) /to the shutdown port of the server/, instead of the normal HTTP port. Find which client is sending a HTTP request to his port : instead of this port : and you will find the reason. (*) as a matter of fact, as per the logfile, it looks like this client is making a connection to port 3006 and then just sending an empty request. If you have software doing some kind of port scanning, that may be the culprit. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 6.0.24 SSL Session always New
iainmac wrote: 3. This page is made up of a parent frame and 2 sub-frames. 4. The parent frame (the named page that the redirect is to) does that check above i.e. tries to get the Username from the session object- This works successfully. This page begins to load. 5. The first sub-frame begins to lad, tries the same check - in MSIE (and in Tomcat 5.0.28 other browers too) we are given the same validated session, so all works fine. In other browsers with 6.0.24 a new session is given, and so I am again redirected to the logon page! In a loop! Same this happens with second sub frame. As a work around I have simply rewritten my pages not to use frames, all works fine. I believe that what you indicate above is the core of the issue. It has nothing to do with Tomcat, it has to do with the logic of what you are doing, and the way different browsers handle separate windows (or frames, which are separate windows). I'll try to give an example : Suppose that the first document you request from the server is a frame document, with 2 frames. The frame document itself is not submitted to authentication by the server. So it loads in the browser without problems. While loading this frame document, the browser notices that it is a frame document, and that there are 2 links in it to load the individual frames. So the browser creates 2 new windows (the frames) and issues 2 new requests (one per frame), to fill these windows. Any or all of these individual frame URLs is set up on the server as requiring authentication. So now look at it from the server side. It receives 2 separate (and almost simultaneous) requests for different URLs, each one submitted to authentication. The server has no idea that these requests come from the same browser, and each one is handled separately, as if they came from 2 different workstations even. (So basically, each request may be handled by a different thread or child of the webserver). At this point, none of these requests contains any authentication headers, because the browser has not done any authentication yet. So basically, the server is going to answer each one of them, individually, by sending the login page. And so on. The above may not be exactly what happens in your case. But I hope it is sufficient to give you an idea of what to look for. The symptoms are going to vary depending on how each browser exactly issues the different requests to the webserver (in the same connection or not e.g.), how it handles windows, frames, tabs, iframes etc.., the load on your server, how users get to this first page and so on. In other words, practical recommendation : do not have the first page of your website be a frame document requiring authentication. This would create problems with any webserver, not just with Tomcat. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual host set-up woes
Step by step: 1. edit conf/server.xml and add a section inside the tag that looks like this:- 2. create a directory inside your tomcat home directory called "yourhostapps" as defined above e.g. mkdir $tomcathome/yourhostapps 3. create a directory $tomcathome/conf/Catalina/yourhost 4. create a file in $tomcathome/conf/Catalina/yourhost called ROOT.xml, making sure ROOT is all upper case, that contains the context for your app e.g. docBase="$tomcathome/somewhereNotInTheAppbase/myapp.war" reloadable="true"> (note the jdbc Resource is optional but I thought it might be useful :-) make sure you put the db driver jar in the lib directory) 5. start tomcat e.g. $tomcathome/bin/startup.sh I like to tail -f $tomcathome/logs/catalina.out too :-) On 20/02/10 18:28, Eric P wrote: I'm struggling big time trying to set up a virtual host in Tomcat. I'm running Tomcat version 6.0.18 under Linux and nothing else (i.e., no Apache web server, etc.). I've read the official 6.0 docs here over and over. http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html But it seems like these docs are trying to give me a whole new context where I can put more webapps (maybe I'm missing the point), but I merely want to be able to point my browser at something arbitrary like www.dummy.com (or www.dummy.com:8080) and have an app deployed under /webapps/dummy be served w/o the need to add /dummy to the end of the URL. Can anyone give point me to simple instructions for setting this up? Thanks and sorry for being so pathetic. I've read probably a dozen forum posts and articles (and tried about ~30 different configurations in server.xml) but nothing has worked for me. Also, it seems like the way to set this up under 6.* has changed a bit. After going back and forth between including a and omitting it (the 6.* way?) I'm absolutely confused. Thanks for reading! Eric - 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