Re: AW: {an alternative}Re: connection pooling
OK - Got It! Thank you all many times over for your time and help on this connection pool thing. It is surprisingly difficult to maintain a stable environment if you're a curious beginner. I clearly need to get a grip on Tomcat's process BUT it also seems abundantly clear that docs/how to's for simply getting started with connection pools are less than optimal. What exactly was my problem? Still not sure and trying to narrow it down. In the hopes of helping anyone on this list, here's what FINALLY worked for me? Again, I'm running TC 5.0.28 on Linux FC2 1. I went in and cleared out ALL my test web-apps, of which I wrote about 6 different toys via tutorials and on my own. While I don't nearly understand the reasons for much of the TC directory structure, I traversed the following directories and 'rm -r -f' all the webaps I created and no longer wanted with the thinking that somehow they might be in the way... the obvious... /webaps/ the less obvious to me... /work/StandAlone/localhost /work/Catalina/localhost 2. This, I'm guessing, is more likely the key but I didn't test between doing all this. I created a new file, myapp.xml, in... /conf/Catalina/localhost/ and simply copied the related (see prior emails) from the server.xml in... /conf/ to this file. What escapes me is, why is this not more obviously documented? Perhaps it's in the Tomcat docs but I mostly abandoned those some time ago as they are so amazingly detailed and lengthy that unless you want to become a TC guru, which I am inspired to try and be more like, there is simply too much info. Okay, I'm off to continue figuring why TC keeps crashing on me. Hopefully something I did here solved that problem too. thx again all, Eric On Fri, 5 Nov 2004 08:39:30 +0100, Nick Pellow <[EMAIL PROTECTED]> wrote: > HI Eric, > > I have seen the same error your are getting. I am using tomcat 5.0.28. > Make sure that you have removed the expanded war directories, from > "webapps" and ${CATALINA_HOME}/work before restarting. > > Also look inside > those other context.xmls inside ${CATALINA_HOME}/conf/Catalina/localhost > and make sure that they do not define a context with path="/wms". > > Cheers, > nick. > > >-Ursprungliche Nachricht- > >Von: Eric Wulff [mailto:[EMAIL PROTECTED] > >Gesendet: Freitag, 5. November 2004 07:35 > >An: Atishay Kumar > >Cc: Tomcat Users List > >Betreff: Re: {an alternative}Re: connection pooling > > > > > >Atishay, the DefaultContext does work once I comment out the other > >Engine element. You mentioned that means something is wrong with my > >Context? So what next? > > > >many thx > >Eric > > > > > >On Thu, 4 Nov 2004 22:21:57 -0800, Eric Wulff <[EMAIL PROTECTED]> wrote: > >> This did not work. In looking for the Engine element you speak of I > >> didn't find it exactly. I did find it with it with an extra attribute > >> . Furthermore, this > >> element was nested within the element and there is another > >> element. I tried with and without the > >> jvmRoute element. No success. Same exception. > >> > >> Eric > >> > >> On Fri, 5 Nov 2004 11:20:26 +0530, Atishay Kumar > >> > >> > >> <[EMAIL PROTECTED]> wrote: > >> > If adding did not work..then try following > >> > > >> > On Thu, 4 Nov 2004 19:46:30 -0800, Eric Wulff <[EMAIL PROTECTED]> wrote: > >> > > Hi all, I'm returning to a problem I couldn't solve the first time, > >> > > about two months ago, and still can't seem to figure out. I > >can't get > >> > > a db connection using connection pools. I get the exception listed > >> > > below, same as so many have previously, but nothing I've found seems > >> > > to works. Below are my specs. Anyone with concrete advise/direction > >> > > on how to get > >> > > this working? > >> > > > >> > > Also, I noticed in many solutions the suggestion was made to edit the > >> > > myapp.xml file located at CATALINA_HOME/conf/Catalina/localhost/. > >> > > However, there is no myapp.xml in that directory on my server. Just 2 > >> > > .xml's related to other applications and a manager.xml which I'm not > >> > > sure what it's related to. > >> > > > >> > > OS: FC2 > >> > > Tomcat 5.0.28 > >> > > > >> > > exception: org.apache.commons.dbcp.SWLNestedException: Cannot create > >> > > JDBC driver class '' for connect URL 'null' > >> > > > >> > > WEB-INF web xml: code inserted AFTER all servlet mappings... > >> > the following shld be in > >> > > >> > > > >> > My Datasource > >> > > jdbc/wms > >> > > javax.sql.DataSource > >> > > Container > >> > > > >> > > >> > > > >> > > server xml(tried this with and without a Resource name)... > >> > The following shld be under > >> > > >> > > >> > REplace > >> > > >> > with > >> > > >> > >type="javax.sql.DataSource"/> > >> > > > >> > > > >> > > username > >> > > whatever > >> > > > >> > > > >> > > password > >> > > whatever > >> > >
Re: session-timeout means tomcat restart
Well, this is amazingly frustrating. My TC 5.0.28 running on Linux FC2 is completely crashing about every half hr when I have a webapp open and don't interact with it. I no longer have a time-out element in my web.xml so that doesn't seem to matter. TC shutdown and restart does not work. Instead, I'm required to hard boot my machine. I'm hung just trying to access the static welcome page of any app, although I do know that init() of the webapp I'm working on is being called. Eric On Fri, 5 Nov 2004 15:43:28 -0800, Eric Wulff <[EMAIL PROTECTED]> wrote: > Linux FC2 > TC 5.0.28 > > I'm not storing a db object within a session although I am storing > objs within the session(of course - session.setAttribute). However, I > have references to them from the controller so that shouldn't be the > problem... eh? > > An interesting thing, I sometimes have to reboot my machine, not just > restart TC. Although other apps run fine, I have to reboot my machine > in order to get TC up again. > > I optimized my db connection, I did have it in servlet init(). > Although I knew I had to do this and I'm much better off for it, and I > appreciate you're noting it, but this didn't eliminate the crashing > problem. > > I also am now taking advantage of a connection pool. However, as you > figured, that does not solve the crash problem. > > Finally, I removed the element from > myapp web.xml to test if this is the initiator of the problem. Let > you know what I find. Still, even if this is what initiates the > sequence leading to a crash, it shouldn't so something need be > fixed/optimized. Any other ideas? > > Eric > > > > > On Fri, 5 Nov 2004 13:03:27 -, Steve Kirk > <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > -Original Message- > > > From: Eric Wulff [mailto:[EMAIL PROTECTED] > > > Sent: Friday 05 November 2004 07:01 > > > To: Tomcat Users List > > > Subject: session-timeout means tomcat restart > > > > > > > > > Hi, I'm experiencing 2 interesting problems that may be related to my > > > session timeout. > > > > > > 1. It seems that when my session times out I need to restart tomcat, > > > often just the application via reload in the manager, in order to gain > > > access to my db again. Could this be because I've been accessing the > > > db via jdbc hard coded in the servlet? Might using a datasource > > > connection pool take care of this? > > > > I would say that rather than the problem being JDBC hardcoded in the > > servlet, the problem is more likely to be _how_ that code is written. > > > > if it really is the session timeout that is causing this, it sounds to me > > like you are storing the database objects within a session object (which > > seems a bit unusual). or at least the last reference to them is stored > > there, so that when the session is destroyed, the database connection is > > lost. it might be better to store the objects in local variables within > > doPost if your servlet is simple, or if it's more complex, then perhaps > > better places to put them would be the servlet context, or a field of the > > servlet class/instance. it all depends on your particular situation. > > whichever you choose though, you must make sure that connections are closed > > (or returned to the pool) when you have finished with them. this generally > > involves careful use of try/catch/finally. > > > > if restarting the webapp fixes the problem, it could be that your database > > objects are initialised in the servlet init() method, which is then called > > again when the webapp restarts. but if this were the case then I'm not sure > > how session timeout could cause the problem that you describe. > > > > datasource connection pooling is not necessarily the answer. you can still > > use up all your database resources and/or leave them hanging whether you > > pool them or not! > > > > > 2. Often tomcat hangs without responding at all, to static or dynamic > > > requests, after it's been left for an hr or more with no interaction. > > > Might this be related to the memory leaks I hear about? > > > > you don't say which platform/ versions you are using so memory leaks are > > hard to comment on. IMHO the issues above are more likely to be the problem > > so check those first before suspecting an error in TC :) > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session-timeout means tomcat restart
Linux FC2 TC 5.0.28 I'm not storing a db object within a session although I am storing objs within the session(of course - session.setAttribute). However, I have references to them from the controller so that shouldn't be the problem... eh? An interesting thing, I sometimes have to reboot my machine, not just restart TC. Although other apps run fine, I have to reboot my machine in order to get TC up again. I optimized my db connection, I did have it in servlet init(). Although I knew I had to do this and I'm much better off for it, and I appreciate you're noting it, but this didn't eliminate the crashing problem. I also am now taking advantage of a connection pool. However, as you figured, that does not solve the crash problem. Finally, I removed the element from myapp web.xml to test if this is the initiator of the problem. Let you know what I find. Still, even if this is what initiates the sequence leading to a crash, it shouldn't so something need be fixed/optimized. Any other ideas? Eric On Fri, 5 Nov 2004 13:03:27 -, Steve Kirk <[EMAIL PROTECTED]> wrote: > > > > > > -Original Message- > > From: Eric Wulff [mailto:[EMAIL PROTECTED] > > Sent: Friday 05 November 2004 07:01 > > To: Tomcat Users List > > Subject: session-timeout means tomcat restart > > > > > > Hi, I'm experiencing 2 interesting problems that may be related to my > > session timeout. > > > > 1. It seems that when my session times out I need to restart tomcat, > > often just the application via reload in the manager, in order to gain > > access to my db again. Could this be because I've been accessing the > > db via jdbc hard coded in the servlet? Might using a datasource > > connection pool take care of this? > > I would say that rather than the problem being JDBC hardcoded in the > servlet, the problem is more likely to be _how_ that code is written. > > if it really is the session timeout that is causing this, it sounds to me > like you are storing the database objects within a session object (which > seems a bit unusual). or at least the last reference to them is stored > there, so that when the session is destroyed, the database connection is > lost. it might be better to store the objects in local variables within > doPost if your servlet is simple, or if it's more complex, then perhaps > better places to put them would be the servlet context, or a field of the > servlet class/instance. it all depends on your particular situation. > whichever you choose though, you must make sure that connections are closed > (or returned to the pool) when you have finished with them. this generally > involves careful use of try/catch/finally. > > if restarting the webapp fixes the problem, it could be that your database > objects are initialised in the servlet init() method, which is then called > again when the webapp restarts. but if this were the case then I'm not sure > how session timeout could cause the problem that you describe. > > datasource connection pooling is not necessarily the answer. you can still > use up all your database resources and/or leave them hanging whether you > pool them or not! > > > 2. Often tomcat hangs without responding at all, to static or dynamic > > requests, after it's been left for an hr or more with no interaction. > > Might this be related to the memory leaks I hear about? > > you don't say which platform/ versions you are using so memory leaks are > hard to comment on. IMHO the issues above are more likely to be the problem > so check those first before suspecting an error in TC :) > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logging problem under Tomcat 5.0
I've had a development site up for a couple of months using log4j-1.2.8 for logging. I made several changes in the last couple of days, and something decided to set the default log level to DEBUG. Now when I try to restart the site I get 10-20 Meg of log messages. They are in launcher.server.log and the problems start when the startup script (tomcat/bin/startup.sh) announces 'Redirecting application output to /use/local/tomcat/logs/launcher.server.log' the first messages into that log are at DEBUG level (they didn't used to be) - [DEBUG] Embedded - -Setting naming prefix=org.apache.naming [DEBUG] Digester - -addRuleSet() with no namespace URI ... I don't know if I care about Digester, but sax spits out a bunch and we do need it. In any event, I don't like the log level changing without knowing why & without explicitly allowing it (tho' by deploying some jar or war, I've effectively ok'd it). Any suggestions on an easy way to track down the culprit or prevent some random process of jacking up the default log level? BTW - tomcat/conf/log4j.properties is still reasonable & I've found nothing unusual in tomcat/conv/server.xml . Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: CGI ...yeah, I know (Tomcat 4.1.29)
Enable cgiservlet log (I usually set debug to 6) and see what's output in the log (very detail). -Original Message- From: Mark Claassen [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 5:07 PM To: 'Tomcat Users List' Subject: CGI ...yeah, I know (Tomcat 4.1.29) I know that Tomcat is not an ideal CGI server, but I am having real trouble getting it to work at all. Most often I get the Exception below, and it doesn't seem to be running our perl program at all. (We can run the perl program by hand though). We had a bit of trouble getting it setup in the first place, and we got errors way different from this. I figured that since we were getting this, we must have everything else setup correctly. Looking at the 4.1.27 source this is: 1686: commandsStdIn.flush(); commandsStdIn.close(); commandsStdIn is the output stream to the process. Anyone have any ideas on where to start looking? Thanks, Mark java.io.IOException: Broken pipe at java.io.FileOutputStream.writeBytes(Native Method) at java.io.FileOutputStream.write(FileOutputStream.java:257) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:128) at org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServlet.java:1686) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:418bf9fd252211451334454!
Re: Form-based login question - explicit login
>From what I gather, you are not using the built-in forms-based authentication? I'd like to stick with it for now but will consider other options as I add more functionality. --- Jonathan Wilson <[EMAIL PROTECTED]> wrote: > There's probably a much better way, but I like the > fine-grained approach > I use. Unfortunately(or > fortunately) it requires *every* page you want > access controlled to have > a tag. The > included jsp file checks a session variable to > determine if the user is > logged in, and whether or > not their 'role' is sufficient(my app-defined roles, > not to be confused > with the role mechanism > contained within Tomcat itself) to access the > resource - so the > jsp:included page either forwards them to login > page, > notifies them they don't have the necessary > priviledges, or lets them > pass through. For the proper jsp:forward after the > user successfully logs in (or if s/he already has > the proper perms) I > just check a calling parameter which I set from the > original calling > page(which is properly URL encoded) and jsp:forward > the user to that > resource. You should check for null forwarding > parameters in case > the access controlled page doesn't actually set it's > forward address > properly(well worth your time). Probably a confusing > process, but it makes sense to me! ..and it's > working on a large-scale > in-house production app - their are performance > issues I'm sure > if your considering a super-large deployment. > > If anybody has a better/quicker solution I'm > interested. > > --JW > > > footh wrote: > > >I have a quick question regarding Tomcat's > form-based > >login. I have it working fine for pages that are > >listed as protected. For ex, if a user hits a > >protected page, they are redirected to a login > page, > >we'll call it "login_required" that says the > requested > >resource requires a login. If they fail the login, > >the error page, we'll call "login_invalid", appears > >which looks just like the login_required page > except > >it says invalid login, please try again. If the > user > >logs in correctly on any of these pages, they are > >redirected to the original protected page. This > works > >great. > > > >But, the user can explicitly log in by clicking on > a > >"log in" link everywhere on the site. I have a an > >idea of how to do this, but I have a couple of > >questions regarding this idea. > > > >I was going to create a "login_dummy" page, a > >protected page that is the source of all the > "login" > >links throughout the site. When this page is hit, > the > >whole forms-based login process will occur. When > the > >user finally authenticates, the login_dummy page > will > >just redirect them to the home page. > > > >The questions I have are 1) I would really like to > >direct the user to the page they were on when they > >clicked the "login" link. I can't figure out how > to > >do that. And 2) This method requires that I use > the > >"login_required" page described above (the form > >attached to the form-based login) which will > contain > >text like "the requested resource requires a login, > >etc, etc." When they click on a login link, they > >aren't accessing a protected resource, they are > just > >logging in. So, I really need a different login > page > >(or just different introductory text). However, I > >don't know how to differentiate that I'm coming > from a > >direct login link. > > > >The latter issue isn't a big deal, I could always > just > >use a generic login page. Anyway, does anyone have > >any ideas of how I might be able to implement this? > > > >Thanks, > > > >JF > > > > > > > >__ > >Do you Yahoo!? > >Check out the new Yahoo! Front Page. > >www.yahoo.com > > > > > > > >- > >To unsubscribe, e-mail: > [EMAIL PROTECTED] > >For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CGI ...yeah, I know (Tomcat 4.1.29)
I know that Tomcat is not an ideal CGI server, but I am having real trouble getting it to work at all. Most often I get the Exception below, and it doesn't seem to be running our perl program at all. (We can run the perl program by hand though). We had a bit of trouble getting it setup in the first place, and we got errors way different from this. I figured that since we were getting this, we must have everything else setup correctly. Looking at the 4.1.27 source this is: 1686: commandsStdIn.flush(); commandsStdIn.close(); commandsStdIn is the output stream to the process. Anyone have any ideas on where to start looking? Thanks, Mark java.io.IOException: Broken pipe at java.io.FileOutputStream.writeBytes(Native Method) at java.io.FileOutputStream.write(FileOutputStream.java:257) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:128) at org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServlet.java:1686) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reinstalled SDK - NT Service doesn't start
We've done that. It seems to not work. This is a production environment so I'm not in a position to do something drastic. - Original Message - From: "Larry Meadors" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 05, 2004 4:37 PM Subject: Re: reinstalled SDK - NT Service doesn't start > Search the registry for your old sdk path. When you find it, replace it > with the new one. Repeat as necessary. > > >>> [EMAIL PROTECTED] 11/05/04 2:24 PM >>> > The Tomcat config app has been long gone. > Is there any way to do it without the interface? > > - Original Message - > From: "Ben Souther" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Friday, November 05, 2004 4:14 PM > Subject: Re: reinstalled SDK - NT Service doesn't start > > > > >From the tomcat config screen, click the Java tab and update the path > to > > your jvm. > > > > > > On Fri, 2004-11-05 at 16:01, David Aleksanyan wrote: > > > Hello guys, > > > After reinstalling the SDK. > > > Tomcat 4.1.28 works from console but the NT doesn't start > > > Do you guys know how to fix this? > > > > > > I'm suspecting that some config files are pointing to the old SDK > install. > > > Or maybe some registry value? > > > > > > Thanks, > > > > > > David > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reinstalled SDK - NT Service doesn't start
Chicken. :-D >>> [EMAIL PROTECTED] 11/05/04 2:56 PM >>> But, before you edit your registry, I would strongly recommend backing it up. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reinstalled SDK - NT Service doesn't start
On Fri, 2004-11-05 at 16:37, Larry Meadors wrote: > Search the registry for your old sdk path. When you find it, replace it > with the new one. Repeat as necessary. I second that... But, before you edit your registry, I would strongly recommend backing it up. Of course, you could also take this opportunity to upgrade Tomcat ;) > >>> [EMAIL PROTECTED] 11/05/04 2:24 PM >>> > The Tomcat config app has been long gone. > Is there any way to do it without the interface? > > - Original Message - > From: "Ben Souther" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Friday, November 05, 2004 4:14 PM > Subject: Re: reinstalled SDK - NT Service doesn't start > > > > >From the tomcat config screen, click the Java tab and update the path > to > > your jvm. > > > > > > On Fri, 2004-11-05 at 16:01, David Aleksanyan wrote: > > > Hello guys, > > > After reinstalling the SDK. > > > Tomcat 4.1.28 works from console but the NT doesn't start > > > Do you guys know how to fix this? > > > > > > I'm suspecting that some config files are pointing to the old SDK > install. > > > Or maybe some registry value? > > > > > > Thanks, > > > > > > David > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reinstalled SDK - NT Service doesn't start
Search the registry for your old sdk path. When you find it, replace it with the new one. Repeat as necessary. >>> [EMAIL PROTECTED] 11/05/04 2:24 PM >>> The Tomcat config app has been long gone. Is there any way to do it without the interface? - Original Message - From: "Ben Souther" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Friday, November 05, 2004 4:14 PM Subject: Re: reinstalled SDK - NT Service doesn't start > >From the tomcat config screen, click the Java tab and update the path to > your jvm. > > > On Fri, 2004-11-05 at 16:01, David Aleksanyan wrote: > > Hello guys, > > After reinstalling the SDK. > > Tomcat 4.1.28 works from console but the NT doesn't start > > Do you guys know how to fix this? > > > > I'm suspecting that some config files are pointing to the old SDK install. > > Or maybe some registry value? > > > > Thanks, > > > > David > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Form-based login question - explicit login
There's probably a much better way, but I like the fine-grained approach I use. Unfortunately(or fortunately) it requires *every* page you want access controlled to have a tag. The included jsp file checks a session variable to determine if the user is logged in, and whether or not their 'role' is sufficient(my app-defined roles, not to be confused with the role mechanism contained within Tomcat itself) to access the resource - so the jsp:included page either forwards them to login page, notifies them they don't have the necessary priviledges, or lets them pass through. For the proper jsp:forward after the user successfully logs in (or if s/he already has the proper perms) I just check a calling parameter which I set from the original calling page(which is properly URL encoded) and jsp:forward the user to that resource. You should check for null forwarding parameters in case the access controlled page doesn't actually set it's forward address properly(well worth your time). Probably a confusing process, but it makes sense to me! ..and it's working on a large-scale in-house production app - their are performance issues I'm sure if your considering a super-large deployment. If anybody has a better/quicker solution I'm interested. --JW footh wrote: I have a quick question regarding Tomcat's form-based login. I have it working fine for pages that are listed as protected. For ex, if a user hits a protected page, they are redirected to a login page, we'll call it "login_required" that says the requested resource requires a login. If they fail the login, the error page, we'll call "login_invalid", appears which looks just like the login_required page except it says invalid login, please try again. If the user logs in correctly on any of these pages, they are redirected to the original protected page. This works great. But, the user can explicitly log in by clicking on a "log in" link everywhere on the site. I have a an idea of how to do this, but I have a couple of questions regarding this idea. I was going to create a "login_dummy" page, a protected page that is the source of all the "login" links throughout the site. When this page is hit, the whole forms-based login process will occur. When the user finally authenticates, the login_dummy page will just redirect them to the home page. The questions I have are 1) I would really like to direct the user to the page they were on when they clicked the "login" link. I can't figure out how to do that. And 2) This method requires that I use the "login_required" page described above (the form attached to the form-based login) which will contain text like "the requested resource requires a login, etc, etc." When they click on a login link, they aren't accessing a protected resource, they are just logging in. So, I really need a different login page (or just different introductory text). However, I don't know how to differentiate that I'm coming from a direct login link. The latter issue isn't a big deal, I could always just use a generic login page. Anyway, does anyone have any ideas of how I might be able to implement this? Thanks, JF __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reinstalled SDK - NT Service doesn't start
The Tomcat config app has been long gone. Is there any way to do it without the interface? - Original Message - From: "Ben Souther" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Friday, November 05, 2004 4:14 PM Subject: Re: reinstalled SDK - NT Service doesn't start > >From the tomcat config screen, click the Java tab and update the path to > your jvm. > > > On Fri, 2004-11-05 at 16:01, David Aleksanyan wrote: > > Hello guys, > > After reinstalling the SDK. > > Tomcat 4.1.28 works from console but the NT doesn't start > > Do you guys know how to fix this? > > > > I'm suspecting that some config files are pointing to the old SDK install. > > Or maybe some registry value? > > > > Thanks, > > > > David > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reinstalled SDK - NT Service doesn't start
>From the tomcat config screen, click the Java tab and update the path to your jvm. On Fri, 2004-11-05 at 16:01, David Aleksanyan wrote: > Hello guys, > After reinstalling the SDK. > Tomcat 4.1.28 works from console but the NT doesn't start > Do you guys know how to fix this? > > I'm suspecting that some config files are pointing to the old SDK install. > Or maybe some registry value? > > Thanks, > > David > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
reinstalled SDK - NT Service doesn't start
Hello guys, After reinstalling the SDK. Tomcat 4.1.28 works from console but the NT doesn't start Do you guys know how to fix this? I'm suspecting that some config files are pointing to the old SDK install. Or maybe some registry value? Thanks, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Form-based login question - explicit login
I have a quick question regarding Tomcat's form-based login. I have it working fine for pages that are listed as protected. For ex, if a user hits a protected page, they are redirected to a login page, we'll call it "login_required" that says the requested resource requires a login. If they fail the login, the error page, we'll call "login_invalid", appears which looks just like the login_required page except it says invalid login, please try again. If the user logs in correctly on any of these pages, they are redirected to the original protected page. This works great. But, the user can explicitly log in by clicking on a "log in" link everywhere on the site. I have a an idea of how to do this, but I have a couple of questions regarding this idea. I was going to create a "login_dummy" page, a protected page that is the source of all the "login" links throughout the site. When this page is hit, the whole forms-based login process will occur. When the user finally authenticates, the login_dummy page will just redirect them to the home page. The questions I have are 1) I would really like to direct the user to the page they were on when they clicked the "login" link. I can't figure out how to do that. And 2) This method requires that I use the "login_required" page described above (the form attached to the form-based login) which will contain text like "the requested resource requires a login, etc, etc." When they click on a login link, they aren't accessing a protected resource, they are just logging in. So, I really need a different login page (or just different introductory text). However, I don't know how to differentiate that I'm coming from a direct login link. The latter issue isn't a big deal, I could always just use a generic login page. Anyway, does anyone have any ideas of how I might be able to implement this? Thanks, JF __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sessionS info persistence when restart Tomcat
On Fri, 2004-11-05 at 14:53, Mark wrote: > The object stored in the session must implement serializable > interface, right? Or any Java Class object can be stored in the > session and persistence manager will take care how to save and > restore it? It must implement Serializable and any nested objects must implement Serializable. > > --- Ben Souther <[EMAIL PROTECTED]> wrote: > > > > aha. so it looks like it's something I screwed up ;) > > > > > I don't know. I just know that, in my case, the object that I put > > into > > session survives restarts. The easiest way to test things like > > this, for > > me, is to write a small test app and run it on a fresh install of > > Tomcat. If it works there then I start comparing with my app. > > > > > > > out of interest, does contextDestroyed work on that platform? > > > > > It does, I tested on win2k as a service, from the start menu items, > > and > > with the .bat scripts. I also tested on FC2 and RH73. In all cases > > contextDestroyed was called. > > > > -Ben > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > __ > Do you Yahoo!? > Check out the new Yahoo! Front Page. > www.yahoo.com > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sessionS info persistence when restart Tomcat
The object stored in the session must implement serializable interface, right? Or any Java Class object can be stored in the session and persistence manager will take care how to save and restore it? --- Ben Souther <[EMAIL PROTECTED]> wrote: > > aha. so it looks like it's something I screwed up ;) > > > I don't know. I just know that, in my case, the object that I put > into > session survives restarts. The easiest way to test things like > this, for > me, is to write a small test app and run it on a fresh install of > Tomcat. If it works there then I start comparing with my app. > > > > out of interest, does contextDestroyed work on that platform? > > > It does, I tested on win2k as a service, from the start menu items, > and > with the .bat scripts. I also tested on FC2 and RH73. In all cases > contextDestroyed was called. > > -Ben > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why need Apache since we got Tomcat?
Hi, >Do you have something to let those perl and PHP guys >hook up to Tomcat? You can run Perl and PHP on Tomcat via various add-ons: Tomcat comes with its own CGI servlet for Perl and other CGI scripts. There are 3rd party add-ons that'll let you run Perl and PHP on Tomcat (and other Servlet Containers) using different approaches. In most cases the performance of these is not as good as Apache. But Ben's point is good: consider your requirements carefully before you blindly put Apache in front of Tomcat. Tomcat by itself is sufficient for a great many applications. If you have a ton of heavy-processing Perl or PHP, then you probably still want Apache. But it should be an informed decision, not one based on advice, books, or data from four years ago. >I do not worry about Tomcat kill Apache! And I don't worry about vast hordes of woolly mammoths stampeding on my street. Glad we can all share what we're not worried about ;) Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to set up Tomca t5.0.28 to work with Apache2 on Slackwar e Linux?
Why don't you post error message? -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 1:40 PM To: Tomcat Users List Subject: Re: How to set up Tomca t5.0.28 to work with Apache2 on Slackware Linux? Before you spend too much time and energy with the connectors... do you definitely need to connect with Apache Httpd? Depending on your needs, running Tomcat behind another webserver might not only be unnecessary but less efficient than running as a standalone. The recent performance gains in both Java and Tomcat have made a lot of the older advise about needing to run behind another webserver in production obsolete. On Fri, 2004-11-05 at 12:53, Frank Peng wrote: > If I run ant to compile the source, ant cannot find a directory called > "util". You cannot find this directory in the binary Tomcat. If I > choose source, it needs CVS and a connection to Internet, much > trouble. > > If I use binary and put it in /modules at Apache, it > is too hard to set up the workers.properties and the server.xml and > httpd.conf files. > > I cannot find a cook book all over the web. > > > Thanks! > > Frank Peng. > > > > __ > Do you Yahoo!? > Check out the new Yahoo! Front Page. > www.yahoo.com > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:418bc90e227571345318095!
Re: Why need Apache since we got Tomcat?
If you have a lot of Perl or PHP code, then you probably have a good reason to connect to Apache Httpd. Tomcat ships with a CGI servlet but I don't know how well it compares when running Perl or PHP. On Fri, 2004-11-05 at 14:16, Frank Peng wrote: > Do you have something to let those perl and PHP guys > hook up to Tomcat? > > I do not worry about Tomcat kill Apache! > > Thanks! > > > > > --- Ben Souther <[EMAIL PROTECTED]> wrote: > > > Before you spend too much time and energy with the > > connectors... do you > > definitely need to connect with Apache Httpd? > > > > Depending on your needs, running Tomcat behind > > another webserver might > > not only be unnecessary but less efficient than > > running as a standalone. > > > > The recent performance gains in both Java and Tomcat > > have made a lot of > > the older advise about needing to run behind another > > webserver in > > production obsolete. > > > > > > > > On Fri, 2004-11-05 at 12:53, Frank Peng wrote: > > > If I run ant to compile the source, ant cannot > > find a > > > directory called "util". You cannot find this > > > directory in the binary Tomcat. If I choose > > source, it > > > needs CVS and a connection to Internet, much > > trouble. > > > > > > If I use binary and put it in /modules at Apache, > > it > > > is too hard to set up the workers.properties and > > the > > > server.xml and httpd.conf files. > > > > > > I cannot find a cook book all over the web. > > > > > > > > > Thanks! > > > > > > Frank Peng. > > > > > > > > > > > > __ > > > Do you Yahoo!? > > > Check out the new Yahoo! Front Page. > > > www.yahoo.com > > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > > > - > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > __ > Do you Yahoo!? > Check out the new Yahoo! Front Page. > www.yahoo.com > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why need Apache since we got Tomcat?
After my boss decideded to run ROOT applications on Tomcat, I had to switch my perl apps to Tomcat using CGIServlet. However, this servlet is still under development and I hacked a little bit in order for my perl redirect work. -Original Message- From: Frank Peng [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 2:17 PM To: Tomcat Users List Subject: Why need Apache since we got Tomcat? Do you have something to let those perl and PHP guys hook up to Tomcat? I do not worry about Tomcat kill Apache! Thanks! --- Ben Souther <[EMAIL PROTECTED]> wrote: > Before you spend too much time and energy with the connectors... do > you definitely need to connect with Apache Httpd? > > Depending on your needs, running Tomcat behind > another webserver might > not only be unnecessary but less efficient than > running as a standalone. > > The recent performance gains in both Java and Tomcat > have made a lot of > the older advise about needing to run behind another webserver in > production obsolete. > > > > On Fri, 2004-11-05 at 12:53, Frank Peng wrote: > > If I run ant to compile the source, ant cannot > find a > > directory called "util". You cannot find this > > directory in the binary Tomcat. If I choose > source, it > > needs CVS and a connection to Internet, much > trouble. > > > > If I use binary and put it in /modules at Apache, > it > > is too hard to set up the workers.properties and > the > > server.xml and httpd.conf files. > > > > I cannot find a cook book all over the web. > > > > > > Thanks! > > > > Frank Peng. > > > > > > > > __ > > Do you Yahoo!? > > Check out the new Yahoo! Front Page. > > www.yahoo.com > > > > > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:418bd1ac232569953320904!
Why need Apache since we got Tomcat?
Do you have something to let those perl and PHP guys hook up to Tomcat? I do not worry about Tomcat kill Apache! Thanks! --- Ben Souther <[EMAIL PROTECTED]> wrote: > Before you spend too much time and energy with the > connectors... do you > definitely need to connect with Apache Httpd? > > Depending on your needs, running Tomcat behind > another webserver might > not only be unnecessary but less efficient than > running as a standalone. > > The recent performance gains in both Java and Tomcat > have made a lot of > the older advise about needing to run behind another > webserver in > production obsolete. > > > > On Fri, 2004-11-05 at 12:53, Frank Peng wrote: > > If I run ant to compile the source, ant cannot > find a > > directory called "util". You cannot find this > > directory in the binary Tomcat. If I choose > source, it > > needs CVS and a connection to Internet, much > trouble. > > > > If I use binary and put it in /modules at Apache, > it > > is too hard to set up the workers.properties and > the > > server.xml and httpd.conf files. > > > > I cannot find a cook book all over the web. > > > > > > Thanks! > > > > Frank Peng. > > > > > > > > __ > > Do you Yahoo!? > > Check out the new Yahoo! Front Page. > > www.yahoo.com > > > > > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 - coyote/jk2 connector defaults - maxthreads, timeout?
what is the default maxThreads in tomcat 5 jk2/coyote connector? What is the default serverTimeout ? #channelSocket.serverTimeout=??? #channelSocket.maxThreads=??? (fwiw I'm referring to the version included in tc 5.0.28) Thanks, Dan
Re: How to set up Tomca t5.0.28 to work with Apache2 on Slackware Linux?
Before you spend too much time and energy with the connectors... do you definitely need to connect with Apache Httpd? Depending on your needs, running Tomcat behind another webserver might not only be unnecessary but less efficient than running as a standalone. The recent performance gains in both Java and Tomcat have made a lot of the older advise about needing to run behind another webserver in production obsolete. On Fri, 2004-11-05 at 12:53, Frank Peng wrote: > If I run ant to compile the source, ant cannot find a > directory called "util". You cannot find this > directory in the binary Tomcat. If I choose source, it > needs CVS and a connection to Internet, much trouble. > > If I use binary and put it in /modules at Apache, it > is too hard to set up the workers.properties and the > server.xml and httpd.conf files. > > I cannot find a cook book all over the web. > > > Thanks! > > Frank Peng. > > > > __ > Do you Yahoo!? > Check out the new Yahoo! Front Page. > www.yahoo.com > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to fix: Tomcat responce time gets to 10-200 seconds once a day
Dear Sirs, I wonder if anyone had anything similar before. I'm running some JSP/Java Bean websites under Tomcat (on one PC as a stand-alone server, on another in connection with Apache). The website is a dynamic (3-tier architechture) connects to MySQL database to get the content to display any page (around 3-4 connections per page). Normally the performance is really good, but about once a day it gets really slow (around 1-5 minutes to display the page). It also recovers autocatically to normal response time when you simply wait 5-10 minutes. Any ideas? I'm running Tomcat 4.05 with Apache on RedHat 8.0 (one PC) as well as Tomcat 4.127 on SuSE 9.0 with MySQL 4.015. I'm closing all db-connections in JSP/JavaBeans, so I don't think it's a db-issue. I'd highly appreciate any help on the topic. Thank you very much, Roman Zhovtulya --- Roman Y. Zhovtulya Manager InternetServiceCenter Fachbereich Medien und Informationswesen FH Offenburg InternetServiceCenter bietet In-House Beratung, professionelle und preiswerte Entwicklung von individueller Software Lösungen in Bereich Internet, WWW, Datenbanken, etc Kostenlose vor-Ort Istanalyse und "Sparpotenzialanalyse" für potenzielle Kunden. Sprechen Sie uns an: InternetServiceCenter Offenburg University of Applied Sciences Room B205a Badstr. 24, Offenburg D-77652 Germany VoIP ID (Skype): romanlutsk (mehr unter www.skype.com) Tel.: +49 781 205 137 / Fax: 290 www.fh-offenburg.de/isc --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: connection pooling
Steve, I am trying to use DBCP(hence the subject of the thread) and I believe I have a driver that supports it. Especially considering that the connection works when I wrap my data resource in a DefaultContext tag inside a stand alone Engine tag(server.xml), instead of inside a Context tag(how all instructions I've followed so far suggest). This means my driver support DBCP, correct? The only source code I imagine would help is the code I use to gain connection... Context initialContext = new InitialContext(); Context context = (Context) initialContext.lookup("java:comp/env"); DataSource dataSource = (DataSource) context.lookup("jdbc/wms"); connection = dataSource.getConnection(); I have seen no mention of this factory class parameter you speak of. I'm using TC 5.0.28. I'll try it. thx much for your help Eric On Fri, 5 Nov 2004 13:30:35 -, Steve Kirk <[EMAIL PROTECTED]> wrote: > Eric - you are correct, you do not need both and > (although I've found that having both does not cause a problem). > > Back to your problem. > > The error message indicates that TC cannot find the Resource. > > I'm not sure if you are trying to use DBCP or not (in other words, does the > informix driver support pooling on its own, or do you in fact need DBCP or > some other implementation wrapped around it)? You have > javax.sql.DataSource but do not list the factory class > under your Resource, e.g. : > > factory > org.apache.commons.dbcp.BasicDataSourceFactory > > > I have not seen any Java source code on this thread, maybe you posted it > before I started reading it. > > Thinking slightly laterally I'll pass on something I learned from Yoav > recently on this list you don't need to use container-managed resources > to do connection pooling. In other words you don't need to set any Resource > or Context to get it to work. > > > > > -Original Message- > > From: Eric Wulff [mailto:[EMAIL PROTECTED] > > Sent: Friday 05 November 2004 05:57 > > To: Tomcat Users List; Atishay Kumar > > Subject: Re: connection pooling > > > > > > Thx for your input but, as mentioned in my previous message, I've > > tried this and it does not work. Also, considering my web.xml I > > shouldn't need this, correct? I have a in my web.xml. > > > > Eric > > > > > > On Fri, 5 Nov 2004 11:01:05 +0530, Atishay Kumar > > <[EMAIL PROTECTED]> wrote: > > > > > > Pls do the following change after and u are on!! > > > cheers > > > > > > > > > On Thu, 4 Nov 2004 19:46:30 -0800, Eric Wulff > > <[EMAIL PROTECTED]> wrote: > > > > Hi all, I'm returning to a problem I couldn't solve the > > first time, > > > > about two months ago, and still can't seem to figure out. > > I can't get > > > > a db connection using connection pools. I get the > > exception listed > > > > below, same as so many have previously, but nothing I've > > found seems > > > > to works. Below are my specs. Anyone with concrete > > advise/direction > > > > on how to get > > > > this working? > > > > > > > > Also, I noticed in many solutions the suggestion was made > > to edit the > > > > myapp.xml file located at CATALINA_HOME/conf/Catalina/localhost/. > > > > However, there is no myapp.xml in that directory on my > > server. Just 2 > > > > .xml's related to other applications and a manager.xml > > which I'm not > > > > sure what it's related to. > > > > > > > > OS: FC2 > > > > Tomcat 5.0.28 > > > > > > > > exception: org.apache.commons.dbcp.SWLNestedException: > > Cannot create > > > > JDBC driver class '' for connect URL 'null' > > > > > > > > WEB-INF web xml: code inserted AFTER all servlet mappings... > > > > > > > > jdbc/wms > > > > javax.sql.DataSource > > > > Container > > > > > > > > > > > > server xml(tried this with and without a Resource name)... > > > > > > > > > > > type="javax.sql.DataSource"/> > > > > > > > > > > > > > > > > > > > > > username > > > > whatever > > > > > > > > > > > > password > > > > whatever > > > > > > > > > > > > driverClassName > > > > com.informix.jdbc.IfxDriver > > > > > > > > > > > > url > > > > > > jdbc:informix-sqli://foo.bar.com:somePort/dbName:INFORM > > IXSERVER=serverName > > > > > > > > > > > > > > > > > > > > I have the following jars in my > > /common/lib and I also > > > > tried putting the db driver and commons-collections, > > dbcp, and pool in > > > > my WEB-INF/lib with no success. They are all mode 644. > > > > > > > > ant.jar > > > > ant-launcher.jar > > > > commons-collections-3.1.jar > > > > commons-dbcp-1.2.1.jar > > > > commons-el.jar > > > > commons-pool-1.2.jar > > > > ifxjdbc.jar (the necessary informix driver) > > > > jar.txt > > > > jasper-compiler.jar > > > > jasper-runtime.jar > > > > jsp-api.jar > > > > mysql-connector-java-3.0.15-ga-bin.jar > > > > naming-common.jar >
RE: How to set up Tomca t5.0.28 to work with Apache2 on Slackware Linux?
Hi, >If I run ant to compile the source, ant cannot find a >directory called "util". You cannot find this >directory in the binary Tomcat. You have the build misconfigured. >If I choose source, it >needs CVS and a connection to Internet, much trouble. The Internet connection is much trouble? >If I use binary and put it in /modules at Apache, it >is too hard to set up the workers.properties and the >server.xml and httpd.conf files. Too hard? ;) >I cannot find a cook book all over the web. Look harder. Here's a good starting point: http://wiki.apache.org/jakarta-tomcat/UsefulLinks. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to set up Tomca t5.0.28 to work with Apache2 on Slackware Linux?
If I run ant to compile the source, ant cannot find a directory called "util". You cannot find this directory in the binary Tomcat. If I choose source, it needs CVS and a connection to Internet, much trouble. If I use binary and put it in /modules at Apache, it is too hard to set up the workers.properties and the server.xml and httpd.conf files. I cannot find a cook book all over the web. Thanks! Frank Peng. __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sessionS info persistence when restart Tomcat
> aha. so it looks like it's something I screwed up ;) > I don't know. I just know that, in my case, the object that I put into session survives restarts. The easiest way to test things like this, for me, is to write a small test app and run it on a fresh install of Tomcat. If it works there then I start comparing with my app. > out of interest, does contextDestroyed work on that platform? > It does, I tested on win2k as a service, from the start menu items, and with the .bat scripts. I also tested on FC2 and RH73. In all cases contextDestroyed was called. -Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connection Timeout
Hi Phillip, S506331 ms17 KB0 KBx.x.2.24www.x.comGET /x//img/x/Image.gif HTTP/1.1 Regards Andrew On 05.11.2004, at 16:20, Phillip Qin wrote: Byte recv and byte sent? -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 10:18 AM To: Tomcat Users List Subject: Re: Connection Timeout Hi Phillip, The request is for example a 10K image. Regards Andrew On 05.11.2004, at 16:11, Phillip Qin wrote: My guess is the request was serviced by Tomcat, and took that much "time". What did your request column tell? A huge request, file upload? -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 4:24 AM To: Tomcat Users List Subject: Connection Timeout Dear List, In /manager/status, I occasionally see connections where the status is 'S' and the time column is huge! > 1 ms. Does this mean that the request is still being processed by tomcat? or is this a request waiting to be picked up - ie: chunked? If so, is there any way I can set a timeout for this, as a time > 10 seconds makes very little sense with our application? Thanks in advance, Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:418b99c3205412059510077!
RE: sessionS info persistence when restart Tomcat
> -Original Message- > From: Ben Souther [mailto:[EMAIL PROTECTED] > Have you tried any of this on a fresh install of Tomcat? No, I last installed fresh a couple of weeks back to upgrade from .27 ; I deleted the whole CATALINA_HOME dir first. I then replaced conf/server.xml and conf/web.xml, and installed my warfiles. > I think you mentioned that you have made changes to the Persistance > Manaager in server.xml. sort of. I have modified server.xml, although having said that, there is no Manager by default in server.xml, persistent or not, as far as I can tell. My server.xml is very sparse: > Try downloading and installing a fresh instance and run the > test again. > There is a similar test war file (attachment) that looks tests the > contextCreated/Destroyed methods here: > http://issues.apache.org/bugzilla/show_bug.cgi?id=29521 OK, will do next week but out of time for that today. > For what it's worth. Serialization of sessions is working for me with > 5.0.28 running as an NT Service on windows. aha. so it looks like it's something I screwed up ;) out of interest, does contextDestroyed work on that platform? > -Ben > > On Fri, 2004-11-05 at 11:20, Steve Kirk wrote: > > Thanks Ben, have looked at your war, and my test code > covers the same as > > yours plus some of the other Listener events. The > sessionCreated and > > sessionDestroyed events work fine on my code (5.0.28). The > problem is that > > the other events I mentioned are not called - e.g. contextDestroyed. > > > > > If your object (or any of the objects contained within it) are not > > > serializable) tomcat will quietly not save it. > > > > ok that's interesting and perhaps a little surprising given > that the docs > > say that they MUST be. I've also tried adding the > distributable attribute > > to the webapp as indicated here > > > http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/manager > .html#Restart% > > 20Persistence > > to see if that causes stricter behaviour (e.g. throwing an > exception when TC > > tries to serialize session objects), but this appears to > make no difference > > in my situation. > > > > > try creating a real simple object that implements > Serializable and see > > > if it survives a restart. > > > > In effect I have already done that by restarting TC, then > browsing webapp > > pages as a user that does not log in. In this case I do > not assign any > > objects to the session (I have checked this using > session.getAttributeNames > > in my SessionLogger to check that there are none). Even in > this case TC > > does not serialize to SESSIONS.ser on shutdown. So I don't > think that the > > problem is serialisability? > > > > Also, still can't work out why SESSIONS.ser is only > accessed when a new > > warfile causes a reload and not otherwise. > > > > > -Original Message- > > > From: Ben Souther [mailto:[EMAIL PROTECTED] > > > Sent: Friday 05 November 2004 15:08 > > > To: Tomcat Users List > > > Subject: RE: sessionS info persistence when restart Tomcat > > > > > > > > > On Fri, 2004-11-05 at 09:06, Steve Kirk wrote: > > > > > SessionDestroyed shouldn't be called when tomcat shuts down. > > > > > > > > good point. doh! but if I've understood correctly, > > > shouldn't other methods > > > > of my SessionLogger be called? namely sessionWillPassivate, > > > > contextDestroyed (and possibly finalize although I'm not > > > 100% confident of > > > > that). > > > contextDestroyed does get called when you shut down tomcat. I > > > don't know > > > about sessionWillPassivate. > > > > > > > > > > > > I just tested with a > > > > > clean install of 5.0.29 with a similar listener to the one > > > > > you describe. > > > > > SessionDestroyed was not called when I stopped TC but the > > > > > sessions were > > > > > still valid when I started it up. I can give you the war > > > file if you > > > > > like. > > > > > > > > yes please. email it to me off list if you prefer. > > > > > > You can grab it here: > > > http://www.souther.us/sessionTest.war > > > > > > I ran it in a clean install of TC5.0.29. > > > There are two jsps and a sessionListener. > > > test.jsp shows you the current sessionID. > > > kill.jsp invalidates the session. > > > The session listener prints to stdout (catalina.out) > > > when a session is created or destroyed. > > > > > > I was able to stop and restart TC and maintain the same session. > > > sessionDestroyed was not called. > > > > > > You could easily add to it to test for sessionWillPassivate(). > > > > > > > > > > > > > > > > > > > > > > > > Do all of the attributes that you're adding to your > > > session implement > > > > > Serializable? > > > > > > > > I did spot that issue late on just before my last post. So > > > I checked and > > > > only one obj
Re: two domains, one site
So something like this would work. domain.com domain.net www.domain.net From: Andoni <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> To: Tomcat Users List <[EMAIL PROTECTED]> Subject: Re: two domains, one site Date: Fri, 05 Nov 2004 11:53:49 + Hi, No, you only need the one host and then an tag with the other domain. HTH, Andoni. PS: Ref is here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Host%20Name%20Aliases A. - Original Message - From: "Didier McGillis" <[EMAIL PROTECTED]> Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, November 04, 2004 5:27 PM Subject: two domains, one site > If I have two domains pointing to the same webapp (long story on why two > domains). Do I need to have two Hosts defined inside the container > > > > > or > > _ > Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The new > MSN Search! Check it out! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Take advantage of powerful junk e-mail filters built on patented Microsoft® SmartScreen Technology. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sessionS info persistence when restart Tomcat
Have you tried any of this on a fresh install of Tomcat? I think you mentioned that you have made changes to the Persistance Manaager in server.xml. Try downloading and installing a fresh instance and run the test again. There is a similar test war file (attachment) that looks tests the contextCreated/Destroyed methods here: http://issues.apache.org/bugzilla/show_bug.cgi?id=29521 For what it's worth. Serialization of sessions is working for me with 5.0.28 running as an NT Service on windows. -Ben On Fri, 2004-11-05 at 11:20, Steve Kirk wrote: > Thanks Ben, have looked at your war, and my test code covers the same as > yours plus some of the other Listener events. The sessionCreated and > sessionDestroyed events work fine on my code (5.0.28). The problem is that > the other events I mentioned are not called - e.g. contextDestroyed. > > > If your object (or any of the objects contained within it) are not > > serializable) tomcat will quietly not save it. > > ok that's interesting and perhaps a little surprising given that the docs > say that they MUST be. I've also tried adding the distributable attribute > to the webapp as indicated here > http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/manager.html#Restart% > 20Persistence > to see if that causes stricter behaviour (e.g. throwing an exception when TC > tries to serialize session objects), but this appears to make no difference > in my situation. > > > try creating a real simple object that implements Serializable and see > > if it survives a restart. > > In effect I have already done that by restarting TC, then browsing webapp > pages as a user that does not log in. In this case I do not assign any > objects to the session (I have checked this using session.getAttributeNames > in my SessionLogger to check that there are none). Even in this case TC > does not serialize to SESSIONS.ser on shutdown. So I don't think that the > problem is serialisability? > > Also, still can't work out why SESSIONS.ser is only accessed when a new > warfile causes a reload and not otherwise. > > > -Original Message- > > From: Ben Souther [mailto:[EMAIL PROTECTED] > > Sent: Friday 05 November 2004 15:08 > > To: Tomcat Users List > > Subject: RE: sessionS info persistence when restart Tomcat > > > > > > On Fri, 2004-11-05 at 09:06, Steve Kirk wrote: > > > > SessionDestroyed shouldn't be called when tomcat shuts down. > > > > > > good point. doh! but if I've understood correctly, > > shouldn't other methods > > > of my SessionLogger be called? namely sessionWillPassivate, > > > contextDestroyed (and possibly finalize although I'm not > > 100% confident of > > > that). > > contextDestroyed does get called when you shut down tomcat. I > > don't know > > about sessionWillPassivate. > > > > > > > > > I just tested with a > > > > clean install of 5.0.29 with a similar listener to the one > > > > you describe. > > > > SessionDestroyed was not called when I stopped TC but the > > > > sessions were > > > > still valid when I started it up. I can give you the war > > file if you > > > > like. > > > > > > yes please. email it to me off list if you prefer. > > > > You can grab it here: > > http://www.souther.us/sessionTest.war > > > > I ran it in a clean install of TC5.0.29. > > There are two jsps and a sessionListener. > > test.jsp shows you the current sessionID. > > kill.jsp invalidates the session. > > The session listener prints to stdout (catalina.out) > > when a session is created or destroyed. > > > > I was able to stop and restart TC and maintain the same session. > > sessionDestroyed was not called. > > > > You could easily add to it to test for sessionWillPassivate(). > > > > > > > > > > > > > > > > > Do all of the attributes that you're adding to your > > session implement > > > > Serializable? > > > > > > I did spot that issue late on just before my last post. So > > I checked and > > > only one object is ever stored in the session - a "User" > > class of my own. > > > Its fields are all of type String, java.sql.Timestamp or > > int. I added > > > "implements Serializable" to it (I think this is all that > > was required?) but > > > this made no difference. Also, I have tried stopping TC > > when a session has > > > been created but *no* attributes have been added to it, and > > the problem is > > > the same. > > > > > > In any case though, if serialisation was the problem, > > shouldn't I see some > > > kind of error message from TC along the lines that it > > cannot serialise an > > > object in a session? Also I can't work out why it only > > complains that it > > > can't find SESSIONS.ser when it reloads the webapp? > > > > > If your object (or any of the objects contained within it) are not > > serializable) tomcat will quietly not save it. > > > > try creating a real simple object that implements Serializable and see > > if it survives a restart. > > > > -Ben > > > > > > > > > >
RE: META-INF/context.xml not overwriting Catalina/localhost/webapp.xml after redeploy.
Remy mentioned earlier today on another thread that the path is ignored in a context.xml file because it is redundant, but I _think_ he was talking about 5.5 rather than 5.0. I have deleted the post now but I think he said that the docBase is probably also ignored. search the archive to check me on that. In any case on v5 I think it's OK for docBase to point to either the open filesystem or the war (given that once the war is unpacked, they both exist). Mine points to the war, but that's just my choice, it's not for any special reason. > -Original Message- > From: Nick Pellow [mailto:[EMAIL PROTECTED] > Sent: Friday 05 November 2004 15:39 > To: Tomcat Users List > Subject: AW: META-INF/context.xml not overwriting > Catalina/localhost/webapp.xml after redeploy. > > > Hi Steve, > > > > >That file is only updated in certain circumstances. check that your > >circumstances fit those. here's a good place to start: > >http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html#Au > >tomatic%2 > >0Application%20Deployment > > Ok. I see... > > > > >I adopted the habit of restarting with a script, which deletes the > >$CATALINA_HOME/conf/[enginename]/[hostname]/webappname.xml files then > >restarts TC. Just to be sure. > > I figured this would be the case. > > > > >also, when you say that context.xml is within META-INF, is > this within a > >war, or an open filesystem? (It needs to be in a warfile). > > I am using a warfile, however, it does get expanded to the webapps > directory, so > there is also an open filesystem. Should my docbase be > pointing to the .war > in my > context.xml, and not the directory? > > > > > >> -Original Message- > >> From: Nick Pellow [mailto:[EMAIL PROTECTED] > >> Sent: Friday 05 November 2004 14:48 > >> To: Tomcat Users List > >> Subject: META-INF/context.xml not overwriting > >> Catalina/localhost/webapp.xml after redeploy. > >> > >> > >> Hi, > >> > >> I am using a META-INF/context.xml in each of my webapps to define > >> Resource-Links to global resources defined in my server.xml. > >> (Tomcat 5.0.28) > >> > >> Upon the initial deployment of the war, tomcate creates a > copy of this > >> context.xml > >> under $CATALINA_HOME/conf/[enginename]/[hostname]/ called > >> webappname.xml . > >> > >> When i then redeploy the same webapp ('webappname'), with a > >> META-INF/context.xml, > >> $CATALINA_HOME/conf/[enginename]/[hostname]/webappname.xml > >> does not get > >> updated. > >> Is there a means to enable this under Tomcat 5.0.28, or is > >> this a security > >> feature? > >> > >> Cheers, > >> Nick. > >> > >> > >> > >> > - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: > [EMAIL PROTECTED] > >> > >> > > > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sessionS info persistence when restart Tomcat
Thanks Ben, have looked at your war, and my test code covers the same as yours plus some of the other Listener events. The sessionCreated and sessionDestroyed events work fine on my code (5.0.28). The problem is that the other events I mentioned are not called - e.g. contextDestroyed. > If your object (or any of the objects contained within it) are not > serializable) tomcat will quietly not save it. ok that's interesting and perhaps a little surprising given that the docs say that they MUST be. I've also tried adding the distributable attribute to the webapp as indicated here http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/manager.html#Restart% 20Persistence to see if that causes stricter behaviour (e.g. throwing an exception when TC tries to serialize session objects), but this appears to make no difference in my situation. > try creating a real simple object that implements Serializable and see > if it survives a restart. In effect I have already done that by restarting TC, then browsing webapp pages as a user that does not log in. In this case I do not assign any objects to the session (I have checked this using session.getAttributeNames in my SessionLogger to check that there are none). Even in this case TC does not serialize to SESSIONS.ser on shutdown. So I don't think that the problem is serialisability? Also, still can't work out why SESSIONS.ser is only accessed when a new warfile causes a reload and not otherwise. > -Original Message- > From: Ben Souther [mailto:[EMAIL PROTECTED] > Sent: Friday 05 November 2004 15:08 > To: Tomcat Users List > Subject: RE: sessionS info persistence when restart Tomcat > > > On Fri, 2004-11-05 at 09:06, Steve Kirk wrote: > > > SessionDestroyed shouldn't be called when tomcat shuts down. > > > > good point. doh! but if I've understood correctly, > shouldn't other methods > > of my SessionLogger be called? namely sessionWillPassivate, > > contextDestroyed (and possibly finalize although I'm not > 100% confident of > > that). > contextDestroyed does get called when you shut down tomcat. I > don't know > about sessionWillPassivate. > > > > > > I just tested with a > > > clean install of 5.0.29 with a similar listener to the one > > > you describe. > > > SessionDestroyed was not called when I stopped TC but the > > > sessions were > > > still valid when I started it up. I can give you the war > file if you > > > like. > > > > yes please. email it to me off list if you prefer. > > You can grab it here: > http://www.souther.us/sessionTest.war > > I ran it in a clean install of TC5.0.29. > There are two jsps and a sessionListener. > test.jsp shows you the current sessionID. > kill.jsp invalidates the session. > The session listener prints to stdout (catalina.out) > when a session is created or destroyed. > > I was able to stop and restart TC and maintain the same session. > sessionDestroyed was not called. > > You could easily add to it to test for sessionWillPassivate(). > > > > > > > > > > Do all of the attributes that you're adding to your > session implement > > > Serializable? > > > > I did spot that issue late on just before my last post. So > I checked and > > only one object is ever stored in the session - a "User" > class of my own. > > Its fields are all of type String, java.sql.Timestamp or > int. I added > > "implements Serializable" to it (I think this is all that > was required?) but > > this made no difference. Also, I have tried stopping TC > when a session has > > been created but *no* attributes have been added to it, and > the problem is > > the same. > > > > In any case though, if serialisation was the problem, > shouldn't I see some > > kind of error message from TC along the lines that it > cannot serialise an > > object in a session? Also I can't work out why it only > complains that it > > can't find SESSIONS.ser when it reloads the webapp? > > > If your object (or any of the objects contained within it) are not > serializable) tomcat will quietly not save it. > > try creating a real simple object that implements Serializable and see > if it survives a restart. > > -Ben > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
authentication in virtual host redirecting to wrong index.jsp
I've just setup a new website as a subdomain of my primary website. My server setup contains Apache fronting Tomcat 4.x on a Unix server. I'm directing all traffic that goes to the Apache webserver to the Tomcat server and setting up my subdomains in the server.xml file. This all works fine except that the application on my subdomain uses form authentication and after a successful login, the redirect goes to the default Tomcat index.jsp file rather than the default index.jsp file for the application as its supposed to. The index.jsp page for the app is in the root dir of the app folder. If I don't configure the app as a subdomain, it works fine but as soon as I change the config to use the subdomain, it redirects to the wrong page. Some other info: Struts-based Jdk 1.4 MySQL db Below is the server.xml host config for my subdomain: And my web.xml auth config: FORM Secure Coin Invoice Application /login/login.jsp /login/error.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: META-INF/context.xml not overwriting Catalina/localhost/webapp.xml after redeploy.
Hi Steve, > >That file is only updated in certain circumstances. check that your >circumstances fit those. here's a good place to start: >http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html#Au >tomatic%2 >0Application%20Deployment Ok. I see... > >I adopted the habit of restarting with a script, which deletes the >$CATALINA_HOME/conf/[enginename]/[hostname]/webappname.xml files then >restarts TC. Just to be sure. I figured this would be the case. > >also, when you say that context.xml is within META-INF, is this within a >war, or an open filesystem? (It needs to be in a warfile). I am using a warfile, however, it does get expanded to the webapps directory, so there is also an open filesystem. Should my docbase be pointing to the .war in my context.xml, and not the directory? > >> -Original Message- >> From: Nick Pellow [mailto:[EMAIL PROTECTED] >> Sent: Friday 05 November 2004 14:48 >> To: Tomcat Users List >> Subject: META-INF/context.xml not overwriting >> Catalina/localhost/webapp.xml after redeploy. >> >> >> Hi, >> >> I am using a META-INF/context.xml in each of my webapps to define >> Resource-Links to global resources defined in my server.xml. >> (Tomcat 5.0.28) >> >> Upon the initial deployment of the war, tomcate creates a copy of this >> context.xml >> under $CATALINA_HOME/conf/[enginename]/[hostname]/ called >> webappname.xml . >> >> When i then redeploy the same webapp ('webappname'), with a >> META-INF/context.xml, >> $CATALINA_HOME/conf/[enginename]/[hostname]/webappname.xml >> does not get >> updated. >> Is there a means to enable this under Tomcat 5.0.28, or is >> this a security >> feature? >> >> Cheers, >> Nick. >> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connection Timeout
Byte recv and byte sent? -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 10:18 AM To: Tomcat Users List Subject: Re: Connection Timeout Hi Phillip, The request is for example a 10K image. Regards Andrew On 05.11.2004, at 16:11, Phillip Qin wrote: > My guess is the request was serviced by Tomcat, and took that much > "time". > What did your request column tell? A huge request, file upload? > > -Original Message- > From: Andrew Miehs [mailto:[EMAIL PROTECTED] > Sent: November 5, 2004 4:24 AM > To: Tomcat Users List > Subject: Connection Timeout > > > Dear List, > > In /manager/status, I occasionally see connections where the status is > 'S' and the time column is huge! > 1 ms. > > Does this mean that the request is still being processed by tomcat? or > is this a request waiting to be picked up - ie: chunked? > > If so, is there any way I can set a timeout for this, as a time > 10 > seconds makes very little sense with our application? > > Thanks in advance, > > Andrew > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:418b99c3205412059510077!
Re: META-INF/context.xml not overwriting Catalina/localhost/webapp.xml after redeploy.
We keep forgetting that Before the war gets unpacked, Tomcat checks if there is an existing directory with the same name as the war file or same name as the "path" attribute of the file, and if it exist the war file does not get expanded and it just attempts to work of of off the existing directory (with same name as the war file). At least this has been my experience with tomcat since 4.0.x As suggested by others, to deploy a war file, make sure there are no directory in webapps that has same name as the war file. In addition, you also want to delete the "work" area under tomcat/work/xx/xx where xx is the directory where tomcat puts the working classes, cache and resources. --- Nick Pellow <[EMAIL PROTECTED]> wrote: > Hi, > > I am using a META-INF/context.xml in each of my > webapps to define > Resource-Links to global resources defined in my > server.xml. (Tomcat 5.0.28) > > Upon the initial deployment of the war, tomcate > creates a copy of this > context.xml > under $CATALINA_HOME/conf/[enginename]/[hostname]/ > called webappname.xml . > > When i then redeploy the same webapp ('webappname'), > with a > META-INF/context.xml, > $CATALINA_HOME/conf/[enginename]/[hostname]/webappname.xml > does not get > updated. > Is there a means to enable this under Tomcat 5.0.28, > or is this a security > feature? > > Cheers, > Nick. > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connection Timeout
Hi Phillip, The request is for example a 10K image. Regards Andrew On 05.11.2004, at 16:11, Phillip Qin wrote: My guess is the request was serviced by Tomcat, and took that much "time". What did your request column tell? A huge request, file upload? -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 4:24 AM To: Tomcat Users List Subject: Connection Timeout Dear List, In /manager/status, I occasionally see connections where the status is 'S' and the time column is huge! > 1 ms. Does this mean that the request is still being processed by tomcat? or is this a request waiting to be picked up - ie: chunked? If so, is there any way I can set a timeout for this, as a time > 10 seconds makes very little sense with our application? Thanks in advance, Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:418b46a1164289526310470! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connection Timeout
My guess is the request was serviced by Tomcat, and took that much "time". What did your request column tell? A huge request, file upload? -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 4:24 AM To: Tomcat Users List Subject: Connection Timeout Dear List, In /manager/status, I occasionally see connections where the status is 'S' and the time column is huge! > 1 ms. Does this mean that the request is still being processed by tomcat? or is this a request waiting to be picked up - ie: chunked? If so, is there any way I can set a timeout for this, as a time > 10 seconds makes very little sense with our application? Thanks in advance, Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:418b46a1164289526310470!
RE: sessionS info persistence when restart Tomcat
On Fri, 2004-11-05 at 09:06, Steve Kirk wrote: > > SessionDestroyed shouldn't be called when tomcat shuts down. > > good point. doh! but if I've understood correctly, shouldn't other methods > of my SessionLogger be called? namely sessionWillPassivate, > contextDestroyed (and possibly finalize although I'm not 100% confident of > that). contextDestroyed does get called when you shut down tomcat. I don't know about sessionWillPassivate. > > > I just tested with a > > clean install of 5.0.29 with a similar listener to the one > > you describe. > > SessionDestroyed was not called when I stopped TC but the > > sessions were > > still valid when I started it up. I can give you the war file if you > > like. > > yes please. email it to me off list if you prefer. You can grab it here: http://www.souther.us/sessionTest.war I ran it in a clean install of TC5.0.29. There are two jsps and a sessionListener. test.jsp shows you the current sessionID. kill.jsp invalidates the session. The session listener prints to stdout (catalina.out) when a session is created or destroyed. I was able to stop and restart TC and maintain the same session. sessionDestroyed was not called. You could easily add to it to test for sessionWillPassivate(). > > > Do all of the attributes that you're adding to your session implement > > Serializable? > > I did spot that issue late on just before my last post. So I checked and > only one object is ever stored in the session - a "User" class of my own. > Its fields are all of type String, java.sql.Timestamp or int. I added > "implements Serializable" to it (I think this is all that was required?) but > this made no difference. Also, I have tried stopping TC when a session has > been created but *no* attributes have been added to it, and the problem is > the same. > > In any case though, if serialisation was the problem, shouldn't I see some > kind of error message from TC along the lines that it cannot serialise an > object in a session? Also I can't work out why it only complains that it > can't find SESSIONS.ser when it reloads the webapp? > If your object (or any of the objects contained within it) are not serializable) tomcat will quietly not save it. try creating a real simple object that implements Serializable and see if it survives a restart. -Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: {an alternative}Re: connection pooling
I thought I have read back in this same thread that he had two under a ? Only one Engine is allowed per to fix one problem. --- Nick Pellow <[EMAIL PROTECTED]> wrote: > HI Eric, > > > I have seen the same error your are getting. I am > using tomcat 5.0.28. > Make sure that you have removed the expanded war > directories, from > "webapps" and ${CATALINA_HOME}/work before > restarting. > > Also look inside > those other context.xmls inside > ${CATALINA_HOME}/conf/Catalina/localhost > and make sure that they do not define a context with > path="/wms". > > Cheers, > nick. > > >-Ursprungliche Nachricht- > >Von: Eric Wulff [mailto:[EMAIL PROTECTED] > >Gesendet: Freitag, 5. November 2004 07:35 > >An: Atishay Kumar > >Cc: Tomcat Users List > >Betreff: Re: {an alternative}Re: connection pooling > > > > > >Atishay, the DefaultContext does work once I > comment out the other > >Engine element. You mentioned that means something > is wrong with my > >Context? So what next? > > > >many thx > >Eric > > > > > >On Thu, 4 Nov 2004 22:21:57 -0800, Eric Wulff > <[EMAIL PROTECTED]> wrote: > >> This did not work. In looking for the Engine > element you speak of I > >> didn't find it exactly. I did find it with it > with an extra attribute > >> . > Furthermore, this > >> element was nested within the element > and there is another > >> element. I tried > with and without the > >> jvmRoute element. No success. Same exception. > >> > >> Eric > >> > >> On Fri, 5 Nov 2004 11:20:26 +0530, Atishay Kumar > >> > >> > >> <[EMAIL PROTECTED]> wrote: > >> > If adding did not > work..then try following > >> > > >> > On Thu, 4 Nov 2004 19:46:30 -0800, Eric Wulff > <[EMAIL PROTECTED]> wrote: > >> > > Hi all, I'm returning to a problem I couldn't > solve the first time, > >> > > about two months ago, and still can't seem to > figure out. I > >can't get > >> > > a db connection using connection pools. I > get the exception listed > >> > > below, same as so many have previously, but > nothing I've found seems > >> > > to works. Below are my specs. Anyone with > concrete advise/direction > >> > > on how to get > >> > > this working? > >> > > > >> > > Also, I noticed in many solutions the > suggestion was made to edit the > >> > > myapp.xml file located at > CATALINA_HOME/conf/Catalina/localhost/. > >> > > However, there is no myapp.xml in that > directory on my server. Just 2 > >> > > .xml's related to other applications and a > manager.xml which I'm not > >> > > sure what it's related to. > >> > > > >> > > OS: FC2 > >> > > Tomcat 5.0.28 > >> > > > >> > > exception: > org.apache.commons.dbcp.SWLNestedException: Cannot > create > >> > > JDBC driver class '' for connect URL 'null' > >> > > > >> > > WEB-INF web xml: code inserted AFTER all > servlet mappings... > >> > the following shld be in > >> > > >> > > > >> > My Datasource > >> > > > jdbc/wms > >> > > > javax.sql.DataSource > >> > > > Container > >> > > > >> > > >> > > > >> > > server xml(tried this with and without a > Resource name)... > >> > The following shld be under > >> > defaultHost="localhost" debug="0"> > >> > > >> > REplace > >> > reloadable="true"> > >> > with > >> > > >> > >type="javax.sql.DataSource"/> > >> > > > >> > > > >> > > username > >> > > whatever > >> > > > >> > > > >> > > password > >> > > whatever > >> > > > >> > > > >> > > driverClassName > >> > > > com.informix.jdbc.IfxDriver > >> > > > >> > > > >> > > url > >> > > > >jdbc:informix-sqli://foo.bar.com:somePort/dbName:INFORMIXSER > >VER=serverName > >> > > > >> > > > >> > replace > >> > > >> > with > >> > > >> > > >> > > > >> > > I have the following jars in my > /common/lib and I also > >> > > tried putting the db driver and > commons-collections, dbcp, > >and pool in > >> > > my WEB-INF/lib with no success. They are all > mode 644. > >> > > > >> > > ant.jar > >> > > ant-launcher.jar > >> > > commons-collections-3.1.jar > >> > > commons-dbcp-1.2.1.jar > >> > > commons-el.jar > >> > > commons-pool-1.2.jar > >> > > ifxjdbc.jar (the necessary informix driver) > >> > > jar.txt > >> > > jasper-compiler.jar > >> > > jasper-runtime.jar > >> > > jsp-api.jar > >> > > mysql-connector-java-3.0.15-ga-bin.jar > >> > > naming-common.jar > >> > > naming-factory.jar > >> > > naming-java.jar > >> > > naming-resources.jar > >> > > servlet-api.jar > >> > > > >> > > On Fri, 8 Oct 2004 11:45:59 +0530, Atishay > Kumar > >> > > <[EMAIL PROTECTED]> wrote: > >> > > > hi, > >> > > > i am not sure but you may try downloading > latest jar files for > >> > > > following froom tomcat site and try them > out. copy the old > >jar files > >> > > > somewhere else and try using the latest jar > files. > >> > > > 1) Commons Collections > >> > > > 2)Commons DBCP > >> > > > 3)Commons Pool > >> > > > > >
RE: sessionS info persistence when restart Tomcat
OK well to be clear yes I'm running 5.0.28 on JDK 1.4.2_05 on Win2k SP4 > -Original Message- > From: Ben Souther [mailto:[EMAIL PROTECTED] > Sent: Friday 05 November 2004 14:52 > To: Tomcat Users List > Subject: RE: sessionS info persistence when restart Tomcat > > > On Fri, 2004-11-05 at 08:29, Shapira, Yoav wrote: > > Hi, > > Are you running Tomcat as a windows service? If so there's an open > > issue with it not calling certain destroy methods on shutdown. > > > > Yoav Shapira http://www.yoavshapira.com > I believe that issue was with contextDestroyed not being > called and was > tested under 5.0.8 and 5.5.x and working. > > > > >-Original Message- > > >From: Ben Souther [mailto:[EMAIL PROTECTED] > > >Sent: Thursday, November 04, 2004 9:22 PM > > >To: Tomcat Users List > > >Subject: RE: sessionS info persistence when restart Tomcat > > > > > >SessionDestroyed shouldn't be called when tomcat shuts > down. Otherwise, > > >the session wouldn't be valid when it starts up. I just > tested with a > > >clean install of 5.0.29 with a similar listener to the one you > > describe. > > >SessionDestroyed was not called when I stopped TC but the > sessions were > > >still valid when I started it up. I can give you the war > file if you > > >like. > > > > > >Do all of the attributes that you're adding to your > session implement > > >Serializable? > > > > > >> > C:\jakarta-tomcat-5.0.28\work\Catalina\localhost\ao\SESSIONS.ser (The > > >>system cannot find the path specified) > > >Does tomcat have sufficient permissions to write to the > work directory? > > > > > >How are you stopping Tomcat? > > > > > > > > > > > >On Thu, 2004-11-04 at 20:15, Steve Kirk wrote: > > >> Following Yoav's earlier comments I've implemented a basic class > > >> "SessionLogger" that implements HttpSessionListener, > > >> HttpSessionActivationListener, HttpSessionAttributeListener, > > >> ServletContextListener. It just writes amessages to stdout using > > >> System.out.println() to log when each event fires, > including each of > > the > > >> interface events plus instantiation and finalization of > SessionLogger > > >> itself. I've configured it in web.xml: > > >> > > >> > > >> core.servlet.SessionLogger > > >> > > >> > > >> SessionLogger logs its own presence OK when I instantiate it, and > > happily > > >> logs events as expected on sessions, and session > attributes. It logs > > >> context creation but not destruction. Here's some sample > > catalina.log > > >lines > > >> for starting TC, logging in, logging out, logging in again: > > >> > > >> 2004-11-05 00:56:50 StandardContext[/ao]*** SERVLET CONTEXT: > > initialized > > >> 2004-11-05 00:58:08 StandardContext[/ao]*** SESSION EVENT: > > >sessionCreated, > > >> [EMAIL PROTECTED] > > >> 2004-11-05 00:58:23 StandardContext[/ao]*** SESSION > ATTRIBUTE EVENT: > > >> attributeAdded, LOGGED_IN_USER, [ID=1] > > >> 2004-11-05 00:58:30 StandardContext[/ao]*** SESSION > ATTRIBUTE EVENT: > > >> attributeRemoved, LOGGED_IN_USER, [ID=1] > > >> 2004-11-05 00:58:30 StandardContext[/ao]*** SESSION EVENT: > > >sessionDestroyed, > > >> [EMAIL PROTECTED] > > >> 2004-11-05 00:58:30 StandardContext[/ao]*** SESSION EVENT: > > >sessionCreated, > > >> [EMAIL PROTECTED] > > >> 2004-11-05 00:58:34 StandardContext[/ao]*** SESSION > ATTRIBUTE EVENT: > > >> attributeAdded, LOGGED_IN_USER, [ID=1] > > >> > > >> However if I then stop TC, I get nothing logged at all after the > > >> "attributeAdded" event. The log just shows this as the > last line: > > >> > > >> 05-Nov-2004 00:03:57 > org.apache.coyote.http11.Http11Protocol pause > > INFO: > > >> Pausing Coyote HTTP/1.1 on http-80 > > >> > > >> and there are no loglines to indicate that the > > >> SessionLogger#sessionDestroyed, SessionLogger#contextDestroyed or > > >> SessionLogger#finalize methods were called. > > >> > > >> So it looks like sessions are working, but something is > not working > > when > > >TC > > >> stops, and I suspect that this is why my sessions don't > persist over > > >> restarts. I've read the docs and how-tos that I can find, plus > > googled > > >> forum stuff on the web. Does anyone have any insights please? > > >> > > >> PS the above applies whether or not I explicitly add a > Manager to my > > >context > > >> config. Note that the standard config files for 5.0.28 do not > > explictly > > >> include a , but the docs say that "A Manager > element MAY be > > >nested > > >> inside a Context component. If it is not included, a > default Manager > > >> configuration will be created automatically". I tried adding a > > Manager > > >to > > >> my context as follows just in case following Yoav's > earlier comments: > > >> > >> distributable="false" debug="4" pathname="SESSIONS.ser" /> > > >> but this made no difference to the behaviour described above. > > >> > > >> Another weird thing: if I trigger a webapp reload by > rebuilding my > > >warfile > > >> while TC is running, TC complai
RE: META-INF/context.xml not overwriting Catalina/localhost/webapp.xml after redeploy.
That file is only updated in certain circumstances. check that your circumstances fit those. here's a good place to start: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html#Automatic%2 0Application%20Deployment I adopted the habit of restarting with a script, which deletes the $CATALINA_HOME/conf/[enginename]/[hostname]/webappname.xml files then restarts TC. Just to be sure. also, when you say that context.xml is within META-INF, is this within a war, or an open filesystem? (It needs to be in a warfile). > -Original Message- > From: Nick Pellow [mailto:[EMAIL PROTECTED] > Sent: Friday 05 November 2004 14:48 > To: Tomcat Users List > Subject: META-INF/context.xml not overwriting > Catalina/localhost/webapp.xml after redeploy. > > > Hi, > > I am using a META-INF/context.xml in each of my webapps to define > Resource-Links to global resources defined in my server.xml. > (Tomcat 5.0.28) > > Upon the initial deployment of the war, tomcate creates a copy of this > context.xml > under $CATALINA_HOME/conf/[enginename]/[hostname]/ called > webappname.xml . > > When i then redeploy the same webapp ('webappname'), with a > META-INF/context.xml, > $CATALINA_HOME/conf/[enginename]/[hostname]/webappname.xml > does not get > updated. > Is there a means to enable this under Tomcat 5.0.28, or is > this a security > feature? > > Cheers, > Nick. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: {an alternative}Re: connection pooling
Eric said: > Also, I noticed in many solutions the suggestion was made to edit the > myapp.xml file located at CATALINA_HOME/conf/Catalina/localhost/. > However, there is no myapp.xml in that directory on my server. Just 2 > .xml's related to other applications and a manager.xml which I'm not > sure what it's related to. when you deploy a "mywebapp" from a warfile that includes a META-INF/context.xml, TC copies that file to conf/Catalina/localhost/mywebapp.xml. having said that there appear to be situations where TC does and does not copy that file. all I can say is that it works for me (5.0.28). Or, you can create that file yourself. whichever way it's created, its contents are taken as though they were inserted as a context under the Catalina/localhost host in server.xml. this is the preferred way to config a context since v5.x (rather than putting it in server.xml). manager.xml is for the manager webapp. > -Original Message- > From: Nick Pellow [mailto:[EMAIL PROTECTED] > Sent: Friday 05 November 2004 07:40 > To: Tomcat Users List > Subject: AW: {an alternative}Re: connection pooling > > > HI Eric, > > > I have seen the same error your are getting. I am using tomcat 5.0.28. > Make sure that you have removed the expanded war directories, from > "webapps" and ${CATALINA_HOME}/work before restarting. > > Also look inside > those other context.xmls inside > ${CATALINA_HOME}/conf/Catalina/localhost > and make sure that they do not define a context with path="/wms". > > Cheers, > nick. > > >-Ursprungliche Nachricht- > >Von: Eric Wulff [mailto:[EMAIL PROTECTED] > >Gesendet: Freitag, 5. November 2004 07:35 > >An: Atishay Kumar > >Cc: Tomcat Users List > >Betreff: Re: {an alternative}Re: connection pooling > > > > > >Atishay, the DefaultContext does work once I comment out the other > >Engine element. You mentioned that means something is wrong with my > >Context? So what next? > > > >many thx > >Eric > > > > > >On Thu, 4 Nov 2004 22:21:57 -0800, Eric Wulff > <[EMAIL PROTECTED]> wrote: > >> This did not work. In looking for the Engine element you > speak of I > >> didn't find it exactly. I did find it with it with an > extra attribute > >> . Furthermore, this > >> element was nested within the element and there > is another > >> element. I tried with and without the > >> jvmRoute element. No success. Same exception. > >> > >> Eric > >> > >> On Fri, 5 Nov 2004 11:20:26 +0530, Atishay Kumar > >> > >> > >> <[EMAIL PROTECTED]> wrote: > >> > If adding did not work..then try > following > >> > > >> > On Thu, 4 Nov 2004 19:46:30 -0800, Eric Wulff > <[EMAIL PROTECTED]> wrote: > >> > > Hi all, I'm returning to a problem I couldn't solve > the first time, > >> > > about two months ago, and still can't seem to figure out. I > >can't get > >> > > a db connection using connection pools. I get the > exception listed > >> > > below, same as so many have previously, but nothing > I've found seems > >> > > to works. Below are my specs. Anyone with concrete > advise/direction > >> > > on how to get > >> > > this working? > >> > > > >> > > Also, I noticed in many solutions the suggestion was > made to edit the > >> > > myapp.xml file located at > CATALINA_HOME/conf/Catalina/localhost/. > >> > > However, there is no myapp.xml in that directory on my > server. Just 2 > >> > > .xml's related to other applications and a manager.xml > which I'm not > >> > > sure what it's related to. > >> > > > >> > > OS: FC2 > >> > > Tomcat 5.0.28 > >> > > > >> > > exception: org.apache.commons.dbcp.SWLNestedException: > Cannot create > >> > > JDBC driver class '' for connect URL 'null' > >> > > > >> > > WEB-INF web xml: code inserted AFTER all servlet mappings... > >> > the following shld be in > >> > > >> > > > >> > My Datasource > >> > > jdbc/wms > >> > > javax.sql.DataSource > >> > > Container > >> > > > >> > > >> > > > >> > > server xml(tried this with and without a Resource name)... > >> > The following shld be under > >> > > >> > > >> > REplace > >> > > >> > with > >> > > >> > >type="javax.sql.DataSource"/> > >> > > > >> > > > >> > > username > >> > > whatever > >> > > > >> > > > >> > > password > >> > > whatever > >> > > > >> > > > >> > > driverClassName > >> > > com.informix.jdbc.IfxDriver > >> > > > >> > > > >> > > url > >> > > > >jdbc:informix-sqli://foo.bar.com:somePort/dbName:INFORMIXSER > >VER=serverName > >> > > > >> > > > >> > replace > >> > > >> > with > >> > > >> > > >> > > > >> > > I have the following jars in my > /common/lib and I also > >> > > tried putting the db driver and commons-collections, dbcp, > >and pool in > >> > > my WEB-INF/lib with no success. They are all mode 644. > >> > > > >> > > ant.jar > >> > > ant-launcher.jar > >> > > commons-colle
RE: sessionS info persistence when restart Tomcat
On Fri, 2004-11-05 at 08:29, Shapira, Yoav wrote: > Hi, > Are you running Tomcat as a windows service? If so there's an open > issue with it not calling certain destroy methods on shutdown. > > Yoav Shapira http://www.yoavshapira.com I believe that issue was with contextDestroyed not being called and was tested under 5.0.8 and 5.5.x and working. > > > >-Original Message- > >From: Ben Souther [mailto:[EMAIL PROTECTED] > >Sent: Thursday, November 04, 2004 9:22 PM > >To: Tomcat Users List > >Subject: RE: sessionS info persistence when restart Tomcat > > > >SessionDestroyed shouldn't be called when tomcat shuts down. Otherwise, > >the session wouldn't be valid when it starts up. I just tested with a > >clean install of 5.0.29 with a similar listener to the one you > describe. > >SessionDestroyed was not called when I stopped TC but the sessions were > >still valid when I started it up. I can give you the war file if you > >like. > > > >Do all of the attributes that you're adding to your session implement > >Serializable? > > > >> C:\jakarta-tomcat-5.0.28\work\Catalina\localhost\ao\SESSIONS.ser (The > >>system cannot find the path specified) > >Does tomcat have sufficient permissions to write to the work directory? > > > >How are you stopping Tomcat? > > > > > > > >On Thu, 2004-11-04 at 20:15, Steve Kirk wrote: > >> Following Yoav's earlier comments I've implemented a basic class > >> "SessionLogger" that implements HttpSessionListener, > >> HttpSessionActivationListener, HttpSessionAttributeListener, > >> ServletContextListener. It just writes amessages to stdout using > >> System.out.println() to log when each event fires, including each of > the > >> interface events plus instantiation and finalization of SessionLogger > >> itself. I've configured it in web.xml: > >> > >> > >>core.servlet.SessionLogger > >> > >> > >> SessionLogger logs its own presence OK when I instantiate it, and > happily > >> logs events as expected on sessions, and session attributes. It logs > >> context creation but not destruction. Here's some sample > catalina.log > >lines > >> for starting TC, logging in, logging out, logging in again: > >> > >> 2004-11-05 00:56:50 StandardContext[/ao]*** SERVLET CONTEXT: > initialized > >> 2004-11-05 00:58:08 StandardContext[/ao]*** SESSION EVENT: > >sessionCreated, > >> [EMAIL PROTECTED] > >> 2004-11-05 00:58:23 StandardContext[/ao]*** SESSION ATTRIBUTE EVENT: > >> attributeAdded, LOGGED_IN_USER, [ID=1] > >> 2004-11-05 00:58:30 StandardContext[/ao]*** SESSION ATTRIBUTE EVENT: > >> attributeRemoved, LOGGED_IN_USER, [ID=1] > >> 2004-11-05 00:58:30 StandardContext[/ao]*** SESSION EVENT: > >sessionDestroyed, > >> [EMAIL PROTECTED] > >> 2004-11-05 00:58:30 StandardContext[/ao]*** SESSION EVENT: > >sessionCreated, > >> [EMAIL PROTECTED] > >> 2004-11-05 00:58:34 StandardContext[/ao]*** SESSION ATTRIBUTE EVENT: > >> attributeAdded, LOGGED_IN_USER, [ID=1] > >> > >> However if I then stop TC, I get nothing logged at all after the > >> "attributeAdded" event. The log just shows this as the last line: > >> > >> 05-Nov-2004 00:03:57 org.apache.coyote.http11.Http11Protocol pause > INFO: > >> Pausing Coyote HTTP/1.1 on http-80 > >> > >> and there are no loglines to indicate that the > >> SessionLogger#sessionDestroyed, SessionLogger#contextDestroyed or > >> SessionLogger#finalize methods were called. > >> > >> So it looks like sessions are working, but something is not working > when > >TC > >> stops, and I suspect that this is why my sessions don't persist over > >> restarts. I've read the docs and how-tos that I can find, plus > googled > >> forum stuff on the web. Does anyone have any insights please? > >> > >> PS the above applies whether or not I explicitly add a Manager to my > >context > >> config. Note that the standard config files for 5.0.28 do not > explictly > >> include a , but the docs say that "A Manager element MAY be > >nested > >> inside a Context component. If it is not included, a default Manager > >> configuration will be created automatically". I tried adding a > Manager > >to > >> my context as follows just in case following Yoav's earlier comments: > >> >> distributable="false" debug="4" pathname="SESSIONS.ser" /> > >> but this made no difference to the behaviour described above. > >> > >> Another weird thing: if I trigger a webapp reload by rebuilding my > >warfile > >> while TC is running, TC complains about the absence of SESSIONS.ser - > it > >> appears to be trying to persist sessions to the file - which it does > not > >try > >> to do when I stop TC. The log message is: > >> > >> 05-Nov-2004 00:23:26 org.apache.catalina.session.StandardManager > doUnload > >> SEVERE: IOException while saving persisted sessions: > >> java.io.FileNotFoundException: > >> C:\jakarta-tomcat-5.0.28\work\Catalina\localhost\ao\SESSIONS.ser (The > >system > >> cannot find the path specified) > >> > >> The file does not exist so the message sort of makes sense, except >
RE: which is the best version of Tomcat xx ??
> -Original Message- > From: Raasi Potluri [mailto:[EMAIL PROTECTED] > > which Tomcat version is the best and reliable version > for me to learn and best practive Servlets and Jsp. I > have tried to use Tomcat 5.0 and it has crashed. It > was working fine before. and now none of my servlets > are working. not even http://localhost:8080 I dont > know whats wrong, it gives me following error you have it - 5.0.28 what have you upgraded from? did you change your environment variables? if you've been going round in circles, try uninstalling TC and reinstalling it from scratch. you can sometimes get in a mess by changing lots of things and its sometimes easier to start again. make sure you set CATALINA_HOME in your environment variables, to point to your TC installation directory. make sure that JAVA_HOME is set to point to you JDK installation (not JRE). for me this is "C:\j2sdk1.4.2". test both the above by opening a new DOS window and typing "echo %java_home%" and "echo %catalina_home%". you should get a response like this: C:\>echo %java_home% C:\j2sdk1.4.2 C:\>echo %catalina_home% c:\jakarta-tomcat-5.0.28 It should work straight out of the box, so don't try to install your webapp or change the config files at first. Just start it up by typing "catalina run" in a dos window. (Using this rather than "catalina start" keeps the window open so you can see any errors on startup, rather than the screen disappearing straight away.) Go to http://localhost:8080/ and check that you can see the TC default page. If not, find out why before installing your own webapps. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
META-INF/context.xml not overwriting Catalina/localhost/webapp.xml after redeploy.
Hi, I am using a META-INF/context.xml in each of my webapps to define Resource-Links to global resources defined in my server.xml. (Tomcat 5.0.28) Upon the initial deployment of the war, tomcate creates a copy of this context.xml under $CATALINA_HOME/conf/[enginename]/[hostname]/ called webappname.xml . When i then redeploy the same webapp ('webappname'), with a META-INF/context.xml, $CATALINA_HOME/conf/[enginename]/[hostname]/webappname.xml does not get updated. Is there a means to enable this under Tomcat 5.0.28, or is this a security feature? Cheers, Nick. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AW: Setting Context Path of Webapp as Root on Tomcat 5.5.3
Hi, Sorry, I sent my earlier post accidentally before finishing it. Hi, > Remy, the server config reference at > http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html We're talking about Tomcat 5.5, not 5.0, and about a specific deployment scenario. But you're right that the 5.5 docs are not updated to correctly reflect this new logic. We had a debate and a couple of implementations as to when to take and when to ignore the path and docBase attributes, i.e. when they are optional and when required. We've yet to update the Context docs, so they are a bit misleading for 5.5 now. A path is of course still required, but the user doesn't have to specify it, as Tomcat will now deduce it in some cases. Yoav > > says, "Each such Context MUST have a unique context path, which is defined > by the path attribute" which implies that we must include the path > attribute > in a , wherever it is configured. Perhaps the docs do need a > slight fix to reflect what you say below? > > > Since the path attribute is redundant information, it is ignored in > > context.xml files. Same for docBase in many cases. > > Please do not open a bug report about this, or propose switching back > > to the old behavior. Yoav Shapira http://www.yoavshapira.com This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat JK2 Connector/IIS Slowdown
Bret and Robert, I would suggest that getting a packet trace is the next step in tracking down your performance problem. If you don't already have such a tool, Ethereal is a top notch open-source tool for this which is distributed with linux, but also freely available for windows and mac at www.ethereal.com. I would capture and compare two downloads, one fast and one slow, keeping as many other variables the same as possible. From the test scenarios Robert outlined, I would suggest comparing tomcat/jk2/IIS6 <--> w2k/IE6 with tomcat/jk2/IIS6 <--> wXP/IE6. When you compare them, here are the kind of things I would look for: 1. Is there some kind of lengthy exchange happening in one that is not in the other? 2. Is the connection failing repeatedly and being automatically retried by the client? 3. Are a lot of packets getting resent in one, i.e. failing to be acknowledged in a timely fashion? 4. Is the process just running slower, and if so, who is slowing it down? (all the packets are timestamped. It's pretty easy to see if the server is slow to send the response, and/or send additional packets when others in the window have been ACKed by the client, or to see if the client is slow to ACK packets, and so the server, once it's window is full, must wait for the client before it can send more.) 5. Is there anything different about the headers exchanged, other than the platform indicated in the User-Agent header.
RE: AW: Setting Context Path of Webapp as Root on Tomcat 5.5.3
Hi, >Remy, the server config reference at >http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html We're talking about Tomcat 5.5, not 5.0, and about a specific deployment scenario. Yoav > >says, "Each such Context MUST have a unique context path, which is defined >by the path attribute" which implies that we must include the path >attribute >in a , wherever it is configured. Perhaps the docs do need a >slight fix to reflect what you say below? > >> Since the path attribute is redundant information, it is ignored in >> context.xml files. Same for docBase in many cases. >> Please do not open a bug report about this, or propose switching back >> to the old behavior. >> >> -- >> x >> Rémy Maucherat >> Developer & Consultant >> JBoss Group (Europe) SàRL >> x > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AW: Setting Context Path of Webapp as Root on Tomcat 5.5.3
Remy, the server config reference at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html says, "Each such Context MUST have a unique context path, which is defined by the path attribute" which implies that we must include the path attribute in a , wherever it is configured. Perhaps the docs do need a slight fix to reflect what you say below? > Since the path attribute is redundant information, it is ignored in > context.xml files. Same for docBase in many cases. > Please do not open a bug report about this, or propose switching back > to the old behavior. > > -- > x > Rémy Maucherat > Developer & Consultant > JBoss Group (Europe) SàRL > x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: connection pooling
Ah yes I agree, but that's not quite what I was saying. Eric, sorry if that was misleading. Eric has a already. I meant that if you have you do not need as well in TC, because this is what the TC docs say, and the tag is a TC "invention" rather than something required by the servlet spec. I think Yoav is saying that in fact TC allows you to be slightly loose by omitting the as long as you have the , even though strictly speaking you are not spec-compliant if you do this. > -Original Message- > From: Shapira, Yoav [mailto:[EMAIL PROTECTED] > Sent: Friday 05 November 2004 13:32 > To: Tomcat Users List > Subject: RE: connection pooling > > > > Hi, > > >Eric - you are correct, you do not need both and > > > That's only because we try to accommodate less able > developers/administrators. You DO need if you > want your > app to be compliant with the Servlet Specification and > portable to other > containers. > > Yoav Shapira http://www.yoavshapira.com > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sessionS info persistence when restart Tomcat
> SessionDestroyed shouldn't be called when tomcat shuts down. good point. doh! but if I've understood correctly, shouldn't other methods of my SessionLogger be called? namely sessionWillPassivate, contextDestroyed (and possibly finalize although I'm not 100% confident of that). > I just tested with a > clean install of 5.0.29 with a similar listener to the one > you describe. > SessionDestroyed was not called when I stopped TC but the > sessions were > still valid when I started it up. I can give you the war file if you > like. yes please. email it to me off list if you prefer. > Do all of the attributes that you're adding to your session implement > Serializable? I did spot that issue late on just before my last post. So I checked and only one object is ever stored in the session - a "User" class of my own. Its fields are all of type String, java.sql.Timestamp or int. I added "implements Serializable" to it (I think this is all that was required?) but this made no difference. Also, I have tried stopping TC when a session has been created but *no* attributes have been added to it, and the problem is the same. In any case though, if serialisation was the problem, shouldn't I see some kind of error message from TC along the lines that it cannot serialise an object in a session? Also I can't work out why it only complains that it can't find SESSIONS.ser when it reloads the webapp? > Does tomcat have sufficient permissions to write to the work > directory? I think so, because I clear it out before starting the webapp, and it happily writes the Catalina/localhost/mywebapp hierarchy of .java and class files as well as the tldCache.ser file > How are you stopping Tomcat? It's installed as a service, using the standard script from /bin, so I start it with "net start tomcat5" and stop it with "net stop tomcat5". > On Thu, 2004-11-04 at 20:15, Steve Kirk wrote: > > Following Yoav's earlier comments I've implemented a basic class > > "SessionLogger" that implements HttpSessionListener, > > HttpSessionActivationListener, HttpSessionAttributeListener, > > ServletContextListener. It just writes amessages to stdout using > > System.out.println() to log when each event fires, > including each of the > > interface events plus instantiation and finalization of > SessionLogger > > itself. I've configured it in web.xml: > > > > > > core.servlet.SessionLogger > > > > > > SessionLogger logs its own presence OK when I instantiate > it, and happily > > logs events as expected on sessions, and session > attributes. It logs > > context creation but not destruction. Here's some sample > catalina.log lines > > for starting TC, logging in, logging out, logging in again: > > > > 2004-11-05 00:56:50 StandardContext[/ao]*** SERVLET > CONTEXT: initialized > > 2004-11-05 00:58:08 StandardContext[/ao]*** SESSION EVENT: > sessionCreated, > > [EMAIL PROTECTED] > > 2004-11-05 00:58:23 StandardContext[/ao]*** SESSION ATTRIBUTE EVENT: > > attributeAdded, LOGGED_IN_USER, [ID=1] > > 2004-11-05 00:58:30 StandardContext[/ao]*** SESSION ATTRIBUTE EVENT: > > attributeRemoved, LOGGED_IN_USER, [ID=1] > > 2004-11-05 00:58:30 StandardContext[/ao]*** SESSION EVENT: > sessionDestroyed, > > [EMAIL PROTECTED] > > 2004-11-05 00:58:30 StandardContext[/ao]*** SESSION EVENT: > sessionCreated, > > [EMAIL PROTECTED] > > 2004-11-05 00:58:34 StandardContext[/ao]*** SESSION ATTRIBUTE EVENT: > > attributeAdded, LOGGED_IN_USER, [ID=1] > > > > However if I then stop TC, I get nothing logged at all after the > > "attributeAdded" event. The log just shows this as the last line: > > > > 05-Nov-2004 00:03:57 > org.apache.coyote.http11.Http11Protocol pause INFO: > > Pausing Coyote HTTP/1.1 on http-80 > > > > and there are no loglines to indicate that the > > SessionLogger#sessionDestroyed, SessionLogger#contextDestroyed or > > SessionLogger#finalize methods were called. > > > > So it looks like sessions are working, but something is not > working when TC > > stops, and I suspect that this is why my sessions don't persist over > > restarts. I've read the docs and how-tos that I can find, > plus googled > > forum stuff on the web. Does anyone have any insights please? > > > > PS the above applies whether or not I explicitly add a > Manager to my context > > config. Note that the standard config files for 5.0.28 do > not explictly > > include a , but the docs say that "A Manager > element MAY be nested > > inside a Context component. If it is not included, a default Manager > > configuration will be created automatically". I tried > adding a Manager to > > my context as follows just in case following Yoav's earlier > comments: > > > distributable="false" debug="4" pathname="SESSIONS.ser" /> > > but this made no difference to the behaviour described above. > > > > Another weird thing: if I trigger a webapp reload by > rebuilding my warfile > > while TC is running, TC complains about the absence of > SESSIONS.
which is the best version of Tomcat xx ??
Hello Friends, which Tomcat version is the best and reliable version for me to learn and best practive Servlets and Jsp. I have tried to use Tomcat 5.0 and it has crashed. It was working fine before. and now none of my servlets are working. not even http://localhost:8080 I dont know whats wrong, it gives me following error HTTP Status 404 - / type Status report message / description The requested resource (/) is not available. Apache Tomcat/5.0.28 many thanks for your help, regards, Raasi __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploying a war in TC4
Thanks I use a File() constructor because the same class is used in a standalone situation Ive checked my server.xml and it already seems to have unpacking set. should my docbase me appname or appname.war Shapira, Yoav wrote: Hi, How can I get round this ? Two ways: either configure the Host in server.xml to unpackWARs (which is the default I think even for Tomcat 4.x). Or write your app to the Servlet Spec, which means no File constructions except in the javax.servlet.context.tempdir directory. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: connection pooling
Hi, >Eric - you are correct, you do not need both and That's only because we try to accommodate less able developers/administrators. You DO need if you want your app to be compliant with the Servlet Specification and portable to other containers. Yoav Shapira http://www.yoavshapira.com This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sessionS info persistence when restart Tomcat
Hi, Are you running Tomcat as a windows service? If so there's an open issue with it not calling certain destroy methods on shutdown. Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Ben Souther [mailto:[EMAIL PROTECTED] >Sent: Thursday, November 04, 2004 9:22 PM >To: Tomcat Users List >Subject: RE: sessionS info persistence when restart Tomcat > >SessionDestroyed shouldn't be called when tomcat shuts down. Otherwise, >the session wouldn't be valid when it starts up. I just tested with a >clean install of 5.0.29 with a similar listener to the one you describe. >SessionDestroyed was not called when I stopped TC but the sessions were >still valid when I started it up. I can give you the war file if you >like. > >Do all of the attributes that you're adding to your session implement >Serializable? > >> C:\jakarta-tomcat-5.0.28\work\Catalina\localhost\ao\SESSIONS.ser (The >>system cannot find the path specified) >Does tomcat have sufficient permissions to write to the work directory? > >How are you stopping Tomcat? > > > >On Thu, 2004-11-04 at 20:15, Steve Kirk wrote: >> Following Yoav's earlier comments I've implemented a basic class >> "SessionLogger" that implements HttpSessionListener, >> HttpSessionActivationListener, HttpSessionAttributeListener, >> ServletContextListener. It just writes amessages to stdout using >> System.out.println() to log when each event fires, including each of the >> interface events plus instantiation and finalization of SessionLogger >> itself. I've configured it in web.xml: >> >> >> core.servlet.SessionLogger >> >> >> SessionLogger logs its own presence OK when I instantiate it, and happily >> logs events as expected on sessions, and session attributes. It logs >> context creation but not destruction. Here's some sample catalina.log >lines >> for starting TC, logging in, logging out, logging in again: >> >> 2004-11-05 00:56:50 StandardContext[/ao]*** SERVLET CONTEXT: initialized >> 2004-11-05 00:58:08 StandardContext[/ao]*** SESSION EVENT: >sessionCreated, >> [EMAIL PROTECTED] >> 2004-11-05 00:58:23 StandardContext[/ao]*** SESSION ATTRIBUTE EVENT: >> attributeAdded, LOGGED_IN_USER, [ID=1] >> 2004-11-05 00:58:30 StandardContext[/ao]*** SESSION ATTRIBUTE EVENT: >> attributeRemoved, LOGGED_IN_USER, [ID=1] >> 2004-11-05 00:58:30 StandardContext[/ao]*** SESSION EVENT: >sessionDestroyed, >> [EMAIL PROTECTED] >> 2004-11-05 00:58:30 StandardContext[/ao]*** SESSION EVENT: >sessionCreated, >> [EMAIL PROTECTED] >> 2004-11-05 00:58:34 StandardContext[/ao]*** SESSION ATTRIBUTE EVENT: >> attributeAdded, LOGGED_IN_USER, [ID=1] >> >> However if I then stop TC, I get nothing logged at all after the >> "attributeAdded" event. The log just shows this as the last line: >> >> 05-Nov-2004 00:03:57 org.apache.coyote.http11.Http11Protocol pause INFO: >> Pausing Coyote HTTP/1.1 on http-80 >> >> and there are no loglines to indicate that the >> SessionLogger#sessionDestroyed, SessionLogger#contextDestroyed or >> SessionLogger#finalize methods were called. >> >> So it looks like sessions are working, but something is not working when >TC >> stops, and I suspect that this is why my sessions don't persist over >> restarts. I've read the docs and how-tos that I can find, plus googled >> forum stuff on the web. Does anyone have any insights please? >> >> PS the above applies whether or not I explicitly add a Manager to my >context >> config. Note that the standard config files for 5.0.28 do not explictly >> include a , but the docs say that "A Manager element MAY be >nested >> inside a Context component. If it is not included, a default Manager >> configuration will be created automatically". I tried adding a Manager >to >> my context as follows just in case following Yoav's earlier comments: >> > distributable="false" debug="4" pathname="SESSIONS.ser" /> >> but this made no difference to the behaviour described above. >> >> Another weird thing: if I trigger a webapp reload by rebuilding my >warfile >> while TC is running, TC complains about the absence of SESSIONS.ser - it >> appears to be trying to persist sessions to the file - which it does not >try >> to do when I stop TC. The log message is: >> >> 05-Nov-2004 00:23:26 org.apache.catalina.session.StandardManager doUnload >> SEVERE: IOException while saving persisted sessions: >> java.io.FileNotFoundException: >> C:\jakarta-tomcat-5.0.28\work\Catalina\localhost\ao\SESSIONS.ser (The >system >> cannot find the path specified) >> >> The file does not exist so the message sort of makes sense, except that >this >> does not happen if I stop and then start TC again - only if a reload is >> triggered when I rebuild my warfile. >> >> > -Original Message- >> > From: Shapira, Yoav [mailto:[EMAIL PROTECTED] >> > Sent: Thursday 04 November 2004 16:09 >> > To: Tomcat Users List >> > Subject: RE: sessionS info persistence when restart Tomcat >> > >> > >> > >> > Hi, >> > >> > >I had always thought all sessions wer
RE: Does temp clean itself up?
Hi, >This may be a stupid question, but is the %CATALINA_HOME%\temp >directory, really a "temp" directory in that it will clean itself out >after a certain amount of time. If yes, how often does it perform >clean-up and can this be configured. It's not a stupid question, and the answer is no, it does not clean itself up. I disagree with the assertion that a real temp directory must clean itself up. Temp means the server administrator is free to clean up that directory according to his or her policies. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deploying a war in TC4
Hi, >How can I get round this ? Two ways: either configure the Host in server.xml to unpackWARs (which is the default I think even for Tomcat 4.x). Or write your app to the Servlet Spec, which means no File constructions except in the javax.servlet.context.tempdir directory. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: connection pooling
Eric - you are correct, you do not need both and (although I've found that having both does not cause a problem). Back to your problem. The error message indicates that TC cannot find the Resource. I'm not sure if you are trying to use DBCP or not (in other words, does the informix driver support pooling on its own, or do you in fact need DBCP or some other implementation wrapped around it)? You have javax.sql.DataSource but do not list the factory class under your Resource, e.g. : factory org.apache.commons.dbcp.BasicDataSourceFactory I have not seen any Java source code on this thread, maybe you posted it before I started reading it. Thinking slightly laterally I'll pass on something I learned from Yoav recently on this list you don't need to use container-managed resources to do connection pooling. In other words you don't need to set any Resource or Context to get it to work. > -Original Message- > From: Eric Wulff [mailto:[EMAIL PROTECTED] > Sent: Friday 05 November 2004 05:57 > To: Tomcat Users List; Atishay Kumar > Subject: Re: connection pooling > > > Thx for your input but, as mentioned in my previous message, I've > tried this and it does not work. Also, considering my web.xml I > shouldn't need this, correct? I have a in my web.xml. > > Eric > > > On Fri, 5 Nov 2004 11:01:05 +0530, Atishay Kumar > <[EMAIL PROTECTED]> wrote: > > > > Pls do the following change after and u are on!! > > cheers > > > > > > On Thu, 4 Nov 2004 19:46:30 -0800, Eric Wulff > <[EMAIL PROTECTED]> wrote: > > > Hi all, I'm returning to a problem I couldn't solve the > first time, > > > about two months ago, and still can't seem to figure out. > I can't get > > > a db connection using connection pools. I get the > exception listed > > > below, same as so many have previously, but nothing I've > found seems > > > to works. Below are my specs. Anyone with concrete > advise/direction > > > on how to get > > > this working? > > > > > > Also, I noticed in many solutions the suggestion was made > to edit the > > > myapp.xml file located at CATALINA_HOME/conf/Catalina/localhost/. > > > However, there is no myapp.xml in that directory on my > server. Just 2 > > > .xml's related to other applications and a manager.xml > which I'm not > > > sure what it's related to. > > > > > > OS: FC2 > > > Tomcat 5.0.28 > > > > > > exception: org.apache.commons.dbcp.SWLNestedException: > Cannot create > > > JDBC driver class '' for connect URL 'null' > > > > > > WEB-INF web xml: code inserted AFTER all servlet mappings... > > > > > > jdbc/wms > > > javax.sql.DataSource > > > Container > > > > > > > > > server xml(tried this with and without a Resource name)... > > > > > > > type="javax.sql.DataSource"/> > > > > > > > > > > > > > > > username > > > whatever > > > > > > > > > password > > > whatever > > > > > > > > > driverClassName > > > com.informix.jdbc.IfxDriver > > > > > > > > > url > > > > jdbc:informix-sqli://foo.bar.com:somePort/dbName:INFORM > IXSERVER=serverName > > > > > > > > > > > > > > > I have the following jars in my > /common/lib and I also > > > tried putting the db driver and commons-collections, > dbcp, and pool in > > > my WEB-INF/lib with no success. They are all mode 644. > > > > > > ant.jar > > > ant-launcher.jar > > > commons-collections-3.1.jar > > > commons-dbcp-1.2.1.jar > > > commons-el.jar > > > commons-pool-1.2.jar > > > ifxjdbc.jar (the necessary informix driver) > > > jar.txt > > > jasper-compiler.jar > > > jasper-runtime.jar > > > jsp-api.jar > > > mysql-connector-java-3.0.15-ga-bin.jar > > > naming-common.jar > > > naming-factory.jar > > > naming-java.jar > > > naming-resources.jar > > > servlet-api.jar > > > > > > On Fri, 8 Oct 2004 11:45:59 +0530, Atishay Kumar > > > <[EMAIL PROTECTED]> wrote: > > > > hi, > > > > i am not sure but you may try downloading latest jar files for > > > > following froom tomcat site and try them out. copy the > old jar files > > > > somewhere else and try using the latest jar files. > > > > 1) Commons Collections > > > > 2)Commons DBCP > > > > 3)Commons Pool > > > > > > > > > > > > > > > > > > > > On Thu, 7 Oct 2004 15:29:40 -0700, Eric Wulff > <[EMAIL PROTECTED]> wrote: > > > > > Except that the driver works for connecting if I'm > not utilizing a > > > > > connection pool, i.e., I am able to connect to the db > and manipulate > > > > > data via DriverManager.getConnection(url, db, pwd). > > > > > > > > > > The driver is located in CATALINA_HOME/commons/lib > > > > > > > > > > Eric > > > > > > > > > > On Thu, 7 Oct 2004 18:22:45 -0400, Phillip Qin > > > > > <[EMAIL PROTECTED]> wrote: > > > > > > No, you don't need that many params. I think your > problem might be the > > > > > > > > > > > > > >
RE: dear friend i'm in a big trouble
from your original post: > org.apache.jasper.JasperException: Unable to compile > class for JSP > root cause > Unable to find a javac compiler; > com.sun.tools.javac.Main is not on the classpath. > Perhaps JAVA_HOME does not point to the JDK in other words, TC is unable to compile your JSP page class because it cannot find a compiler. to me this means that the most likely reasons are these ones that Ben listed > > Did you install a full j2sdk or just a jre? > > Tomcat 5.0 and lower needs a full j2sdk. > > > > Did you set your JAVA_HOME enviornment variable? > > Have you tested it to make sure it's right? > > or.. > > If you installed as a Windows Service, did you make sure that the > > installer found the full j2sdk on your system and not another JRE? > -Original Message- > From: Ben Souther [mailto:[EMAIL PROTECTED] > Sent: Friday 05 November 2004 02:38 > To: Tomcat Users List > Subject: Re: dear friend i'm in a big trouble > > > >http://localhost:3030/servlet/HelloClientServlet > > Looks like you are depending on the invoker servlet to > instanciate your > servlet. The invoker servlet is no longer active by default. > > You will need to map your servlet in web.xml. > Again, your servlets need to be packaged. > > > > > > > On Thu, 2004-11-04 at 21:29, Ben Souther wrote: > > First, is your servlet in a package? > > Non-packaged servlets will not work. > > > > Did you map your servlet in web.xml? > > What is the URL you are using to call the servlet? > > > > You don't need to set a classpath environment variable > > Tomcat sets it's own. > > > > Did you install a full j2sdk or just a jre? > > Tomcat 5.0 and lower needs a full j2sdk. > > > > Did you set your JAVA_HOME enviornment variable? > > Have you tested it to make sure it's right? > > or.. > > If you installed as a Windows Service, did you make sure that the > > installer found the full j2sdk on your system and not another JRE? > > > > > > > > > > On Thu, 2004-11-04 at 20:49, Raasi Potluri wrote: > > > I'm just a beginner and IhaveinstalledTomcat5.0and > > > try to run a simple servlet. I have copied the > > > compiled servlet on the webapps/root/WEB-INF/classes > > > and added the servlet name and servlet mapping in the > > > web.xml file. I'm trying to call my HelloClientServlet > > > from http://localhost:3030/servlet/HelloClientServlet > > > from the web browser, after restarting the tomcat http > > > server it says the follwing > > > > > > my tomcat server is listening at port 3030 > > > *** > > > > > > HTTP Status 404 - /servlet > > > > > > > -- > -- > > > > > > type Status report > > > > > > message /servlet > > > > > > description The requested resource (/servlet) is not > > > available. > > > > > > > > > > -- > -- > > > > > > Apache Tomcat/5.0.28 > > > > > > *** > > > > > > and I have tried to run a simple example JSP already > > > in the examples folder, it gives me the follwing error > > > > > > * > > > > > > HTTP Status 500 - > > > > > > > -- > -- > > > > > > type Exception report > > > > > > message > > > > > > description The server encountered an internal error > > > () that prevented it from fulfilling this request. > > > > > > exception > > > > > > org.apache.jasper.JasperException: Unable to compile > > > class for JSP > > > > > > > org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa > ultErrorHandler.java:97) > > > > > > > org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis > patcher.java:346) > > > > > > > org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414) > > > > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:472) > > > > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) > > > > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) > > > > > > > org.apache.jasper.JspCompilationContext.compile(JspCompilation > Context.java:511) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServlet > Wrapper.java:295) > > > > > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet > .java:292) > > > > > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) > > > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > > > > > > > root cause > > > > > > Unable to find a javac compiler; > > > com.sun.tools.javac.Main is not on the classpath. > > > Perhaps JAVA_HOME does not point to the JDK > > > > > > > org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory > .getCompiler(CompilerAdapterFactory.java:106) > > > > > > org.apache.tools.ant.tas
Deploying a war in TC4
Hi I was originally deploying an application in Tomcat 4 using the exploded directory structure. Ive now created a war and tried to deploy that instead. First attempt it didnt do anything I then changed docbase from appname to appname.war in server.xml and on starting tomcat it tried to deploy it. Unfortunately I thought the first thing it would do was unpack the WAR and then run it but it seems to use it as is and in my default servlet I have some code which opens a file (new File()...) this fails because the war hasnt been upacked yet so the file is still in the WAR rather than directly n the file system. If I unpack the war myself and change docbase back to appname things are ok. How can I get round this ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Setting Context Path of Webapp as Root on Tomcat 5.5.3
Hi Remy, Would this mean that the path and docBase attributes are of no use when configured in the META-INF/context.xml in WAR files? If that is the case, then we need to set these attributes in the $CATALINA_HOME/conf/server.xml if we want to customize the context path of our web apps. regards, jOjO On Fri, 5 Nov 2004 13:41:54 +0100, Remy Maucherat <[EMAIL PROTECTED]> wrote: > Since the path attribute is redundant information, it is ignored in > context.xml files. Same for docBase in many cases. > Please do not open a bug report about this, or propose switching back > to the old behavior. > > -- > x > Rémy Maucherat > Developer & Consultant > JBoss Group (Europe) SàRL > x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: session-timeout means tomcat restart
> -Original Message- > From: Eric Wulff [mailto:[EMAIL PROTECTED] > Sent: Friday 05 November 2004 07:01 > To: Tomcat Users List > Subject: session-timeout means tomcat restart > > > Hi, I'm experiencing 2 interesting problems that may be related to my > session timeout. > > 1. It seems that when my session times out I need to restart tomcat, > often just the application via reload in the manager, in order to gain > access to my db again. Could this be because I've been accessing the > db via jdbc hard coded in the servlet? Might using a datasource > connection pool take care of this? I would say that rather than the problem being JDBC hardcoded in the servlet, the problem is more likely to be _how_ that code is written. if it really is the session timeout that is causing this, it sounds to me like you are storing the database objects within a session object (which seems a bit unusual). or at least the last reference to them is stored there, so that when the session is destroyed, the database connection is lost. it might be better to store the objects in local variables within doPost if your servlet is simple, or if it's more complex, then perhaps better places to put them would be the servlet context, or a field of the servlet class/instance. it all depends on your particular situation. whichever you choose though, you must make sure that connections are closed (or returned to the pool) when you have finished with them. this generally involves careful use of try/catch/finally. if restarting the webapp fixes the problem, it could be that your database objects are initialised in the servlet init() method, which is then called again when the webapp restarts. but if this were the case then I'm not sure how session timeout could cause the problem that you describe. datasource connection pooling is not necessarily the answer. you can still use up all your database resources and/or leave them hanging whether you pool them or not! > 2. Often tomcat hangs without responding at all, to static or dynamic > requests, after it's been left for an hr or more with no interaction. > Might this be related to the memory leaks I hear about? you don't say which platform/ versions you are using so memory leaks are hard to comment on. IMHO the issues above are more likely to be the problem so check those first before suspecting an error in TC :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting Context Path of Webapp as Root on Tomcat 5.5.3
I got it to work by adding a entry in the $CATALINA_HOME/conf/server.xml file. I added this entry inside the default element: . . . . . . It's working with this configuration on Tomcat 5.5.3 and 5.5.4. I can now view the index page of my web app. Thanks for all those who replied! :) On Fri, 5 Nov 2004 12:48:18 -, Steve Kirk <[EMAIL PROTECTED]> wrote: > This was answered on this list last week. So it's in the archive: > http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED] > pache.org > > From memory I think you get rid of the ROOT webapp and set the context path > of mywebapp to "/" ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat as W2K3 service
Configuration: W2K3 Server IIS 6.0 JK2 Tomcat 5.0.24 SQL Server 2000 Starting tomcat (and therefore my web application) as a service produces an undesireable side effect not seen when starting from command line or when using the tomcat manager to stop/start my web application. I have a startup servlet that uses the datasource configured in my context in its init method. So, JNDI and therefore my context need to be available on startup. JNDI does not appear to be available, or at least my context isn't available because I can't get my datasource. Has anyone else seen this in Tomcat 5.0.x? Does anyone have a workaround? My workaround right now is to stop/start my web application from the tomcat manager (http://localhost:8080/manager/html). This isn't the best because when the machine reboots this step must be done. I can't rely on the service starting. Thanks for the help. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Setting Context Path of Webapp as Root on Tomcat 5.5.3
This was answered on this list last week. So it's in the archive: http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED] pache.org >From memory I think you get rid of the ROOT webapp and set the context path of mywebapp to "/" ? > -Original Message- > From: Jojo Paderes [mailto:[EMAIL PROTECTED] > Sent: Friday 05 November 2004 11:45 > To: [EMAIL PROTECTED] > Subject: Setting Context Path of Webapp as Root on Tomcat 5.5.3 > > > Hi, > > Is there a way to set a webapp to use the root context path in Tomcat > 5.5.3. For example, I want to access by webapp named "mywebapp" by > using this url: > > http://mydomain.com/ > > instead of this: > > http://mydomain.com/mywebapp/ > > In a J2EE EAR file, I can set the webapp to use the root context path > by setting the value to /. I'm looking for a similar > way on WAR file deployed on Tomcat. > > I was able to do this by just renaming my webapp to ROOT, but I prefer > something else. Any suggestions? > > > regards, > > jOjO > > -- > My Blogs http://www.jroller.com/page/jojopaderes/blog > Pinoy Tech Scene http://pinoytechscene.mparaz.com > PinoyJUG http://www.pinoyjug.ph > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: Setting Context Path of Webapp as Root on Tomcat 5.5.3
Hi Jojo, You should make sure that you delete the ROOT directory under ${CATALINE_HOME}/webapps . If you are still seeing the tomcat default page, then this means that the TOMCAT default ROOT app is still deployed somewhere... Cheers, nick. >-Ursprungliche Nachricht- >Von: Jojo Paderes [mailto:[EMAIL PROTECTED] >Gesendet: Freitag, 5. November 2004 13:24 >An: [EMAIL PROTECTED] >Betreff: Re: AW: Setting Context Path of Webapp as Root on Tomcat 5.5.3 > > >Here's my context.xml file: > > path="" > docBase="mywebapp.war" > reloadable="true" > useNaming="true" > debug="5" > unpackWAR="true"> > > >Seems to be not working either. When I access the root context >(http://localhost), I still get the Tomcat default page and not my >webapp's index page. I'm deploying my webapp on a default Tomcat 5.5.3 >setup. I will try this on 5.5.4. > >Am I missing something here like some configurations on the server.xml >or web.xml under $CATALINA_HOME/conf/? > >The simplest solution, as Nick suggested, is to rename my webapp WAR >file to ROOT.war. I'm looking at a solution similar on a typical EAR >file deployment on a J2EE app (i.e. Jboss) where I can specify my >webapp to use the root context path in the application.xml file. > >On Fri, 5 Nov 2004 13:00:15 +0100, Nick Pellow ><[EMAIL PROTECTED]> wrote: >> Hi Jojo, >> >> I wanted to do the same as you. I got it to work, >> when the context path is the empty string "". >> ie. >> > >> What however was annoying, was that tomcat then unpacks >> this war in a directory called ROOT. Hence, when you restart >> tomcat, it deploys the webapp under ROOT with context of /, >> *and*, the webapp called myrootapp.war with context of /myrootapp . >> >> Problem was, that I have my META-INF/context.xml in myrootapp. >> This seems to cause a lot of confusion for tomcat. >> >> The cleanest solution I found, was to call myrootapp.war ROOT.war... >> >> I would like to know a neater solution if there is one.. >> >> Cheers, >> nick >> >> >-Ursprungliche Nachricht- >> >Von: Jojo Paderes [mailto:[EMAIL PROTECTED] >> >Gesendet: Freitag, 5. November 2004 12:45 >> >An: [EMAIL PROTECTED] >> >Betreff: Setting Context Path of Webapp as Root on Tomcat 5.5.3 >> > >> > >> >Hi, >> > >> >Is there a way to set a webapp to use the root context path in Tomcat >> >5.5.3. For example, I want to access by webapp named "mywebapp" by >> >using this url: >> > >> >http://mydomain.com/ >> > >> >instead of this: >> > >> >http://mydomain.com/mywebapp/ >> > >> >In a J2EE EAR file, I can set the webapp to use the root context path >> >by setting the value to /. I'm looking for a similar >> >way on WAR file deployed on Tomcat. >> > >> >I was able to do this by just renaming my webapp to ROOT, but I prefer >> >something else. Any suggestions? >> > >> > >> >regards, >> > >> >jOjO > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Setting Context Path of Webapp as Root on Tomcat 5.5.3
On Fri, 5 Nov 2004 20:23:30 +0800, Jojo Paderes <[EMAIL PROTECTED]> wrote: > Here's my context.xml file: > > path="" >docBase="mywebapp.war" >reloadable="true" >useNaming="true" >debug="5" >unpackWAR="true"> > > > Seems to be not working either. When I access the root context > (http://localhost), I still get the Tomcat default page and not my > webapp's index page. I'm deploying my webapp on a default Tomcat 5.5.3 > setup. I will try this on 5.5.4. Since the path attribute is redundant information, it is ignored in context.xml files. Same for docBase in many cases. Please do not open a bug report about this, or propose switching back to the old behavior. -- x Rémy Maucherat Developer & Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AW: Setting Context Path of Webapp as Root on Tomcat 5.5.3
Here is what worked for me (Tomcat 3.3.2 ) --> in apps-198.xxx.xxx.xxx.xml in the conf directory. I guess that it can be defferent for tomcat 5.5.3. But we never know! Regards -Original Message- From: Jojo Paderes [mailto:[EMAIL PROTECTED] Sent: Friday, November 05, 2004 1:24 PM To: [EMAIL PROTECTED] Subject: Re: AW: Setting Context Path of Webapp as Root on Tomcat 5.5.3 Here's my context.xml file: Seems to be not working either. When I access the root context (http://localhost), I still get the Tomcat default page and not my webapp's index page. I'm deploying my webapp on a default Tomcat 5.5.3 setup. I will try this on 5.5.4. Am I missing something here like some configurations on the server.xml or web.xml under $CATALINA_HOME/conf/? The simplest solution, as Nick suggested, is to rename my webapp WAR file to ROOT.war. I'm looking at a solution similar on a typical EAR file deployment on a J2EE app (i.e. Jboss) where I can specify my webapp to use the root context path in the application.xml file. On Fri, 5 Nov 2004 13:00:15 +0100, Nick Pellow <[EMAIL PROTECTED]> wrote: > Hi Jojo, > > I wanted to do the same as you. I got it to work, > when the context path is the empty string "". > ie. > > What however was annoying, was that tomcat then unpacks > this war in a directory called ROOT. Hence, when you restart > tomcat, it deploys the webapp under ROOT with context of /, > *and*, the webapp called myrootapp.war with context of /myrootapp . > > Problem was, that I have my META-INF/context.xml in myrootapp. > This seems to cause a lot of confusion for tomcat. > > The cleanest solution I found, was to call myrootapp.war ROOT.war... > > I would like to know a neater solution if there is one.. > > Cheers, > nick > > >-Ursprungliche Nachricht- > >Von: Jojo Paderes [mailto:[EMAIL PROTECTED] > >Gesendet: Freitag, 5. November 2004 12:45 > >An: [EMAIL PROTECTED] > >Betreff: Setting Context Path of Webapp as Root on Tomcat 5.5.3 > > > > > >Hi, > > > >Is there a way to set a webapp to use the root context path in Tomcat > >5.5.3. For example, I want to access by webapp named "mywebapp" by > >using this url: > > > >http://mydomain.com/ > > > >instead of this: > > > >http://mydomain.com/mywebapp/ > > > >In a J2EE EAR file, I can set the webapp to use the root context path > >by setting the value to /. I'm looking for a similar > >way on WAR file deployed on Tomcat. > > > >I was able to do this by just renaming my webapp to ROOT, but I prefer > >something else. Any suggestions? > > > > > >regards, > > > >jOjO - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Setting Context Path of Webapp as Root on Tomcat 5.5.3
Here's my context.xml file: Seems to be not working either. When I access the root context (http://localhost), I still get the Tomcat default page and not my webapp's index page. I'm deploying my webapp on a default Tomcat 5.5.3 setup. I will try this on 5.5.4. Am I missing something here like some configurations on the server.xml or web.xml under $CATALINA_HOME/conf/? The simplest solution, as Nick suggested, is to rename my webapp WAR file to ROOT.war. I'm looking at a solution similar on a typical EAR file deployment on a J2EE app (i.e. Jboss) where I can specify my webapp to use the root context path in the application.xml file. On Fri, 5 Nov 2004 13:00:15 +0100, Nick Pellow <[EMAIL PROTECTED]> wrote: > Hi Jojo, > > I wanted to do the same as you. I got it to work, > when the context path is the empty string "". > ie. > > What however was annoying, was that tomcat then unpacks > this war in a directory called ROOT. Hence, when you restart > tomcat, it deploys the webapp under ROOT with context of /, > *and*, the webapp called myrootapp.war with context of /myrootapp . > > Problem was, that I have my META-INF/context.xml in myrootapp. > This seems to cause a lot of confusion for tomcat. > > The cleanest solution I found, was to call myrootapp.war ROOT.war... > > I would like to know a neater solution if there is one.. > > Cheers, > nick > > >-Ursprungliche Nachricht- > >Von: Jojo Paderes [mailto:[EMAIL PROTECTED] > >Gesendet: Freitag, 5. November 2004 12:45 > >An: [EMAIL PROTECTED] > >Betreff: Setting Context Path of Webapp as Root on Tomcat 5.5.3 > > > > > >Hi, > > > >Is there a way to set a webapp to use the root context path in Tomcat > >5.5.3. For example, I want to access by webapp named "mywebapp" by > >using this url: > > > >http://mydomain.com/ > > > >instead of this: > > > >http://mydomain.com/mywebapp/ > > > >In a J2EE EAR file, I can set the webapp to use the root context path > >by setting the value to /. I'm looking for a similar > >way on WAR file deployed on Tomcat. > > > >I was able to do this by just renaming my webapp to ROOT, but I prefer > >something else. Any suggestions? > > > > > >regards, > > > >jOjO - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: two domains, one site
Hi, No, you only need the one host and then an tag with the other domain. HTH, Andoni. PS: Ref is here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Host%20Name%20Aliases A. - Original Message - From: "Didier McGillis" <[EMAIL PROTECTED]> Newsgroups: gmane.comp.jakarta.tomcat.user Sent: Thursday, November 04, 2004 5:27 PM Subject: two domains, one site > If I have two domains pointing to the same webapp (long story on why two > domains). Do I need to have two Hosts defined inside the container > > > > > or > > _ > Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The new > MSN Search! Check it out! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Setting Context Path of Webapp as Root on Tomcat 5.5.3
Hi, Is there a way to set a webapp to use the root context path in Tomcat 5.5.3. For example, I want to access by webapp named "mywebapp" by using this url: http://mydomain.com/ instead of this: http://mydomain.com/mywebapp/ In a J2EE EAR file, I can set the webapp to use the root context path by setting the value to /. I'm looking for a similar way on WAR file deployed on Tomcat. I was able to do this by just renaming my webapp to ROOT, but I prefer something else. Any suggestions? regards, jOjO -- My Blogs http://www.jroller.com/page/jojopaderes/blog Pinoy Tech Scene http://pinoytechscene.mparaz.com PinoyJUG http://www.pinoyjug.ph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connection Timeout
Dear List, In /manager/status, I occasionally see connections where the status is 'S' and the time column is huge! > 1 ms. Does this mean that the request is still being processed by tomcat? or is this a request waiting to be picked up - ie: chunked? If so, is there any way I can set a timeout for this, as a time > 10 seconds makes very little sense with our application? Thanks in advance, Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error getting client certs
JBoss 3.2.3 + Tomcat 4.1.29 embedded + SSL At each page called, I have this exception: 2004-11-03 16:53:12,294 DEBUG [org.apache.tomcat.util.net.jsse.JSSE14Support] Error getting client certs javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(DashoA6275) at org.apache.tomcat.util.net.jsse.JSSE14Support.getX509Certificates(JSSE14Support.java:151) at org.apache.tomcat.util.net.jsse.JSSESupport.getPeerCertificateChain(JSSESupport.java:166) at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:954) at org.apache.coyote.Response.action(Response.java:226) at org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:303) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:195) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677) at java.lang.Thread.run(Thread.java:534) This is the https and http connector conf.: Any hints? TIA G - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]