Re: Allow Apache to Serve Static Content
Point the DocumentRoot directory to your webapps directory. Then, in your jk mapping, map only *.jsp and *.servlet to Tomcat. ## WEBSITE ## VirtualHost * ServerAdmin [EMAIL PROTECTED] DocumentRoot /code/www/webapps/website/ROOT ServerName www.website.com CustomLog |/code/utils/cronolog/cronolog /logs/apache/website_access_log_%Y_%m_%d.txt combined ErrorLog |/code/utils/cronolog/cronolog /logs/apache/website_error_log_%Y_%m_%d.txt JkMount /*.jsp tomcat JkMount /*.do tomcat /VirtualHost Charlie Dave Morrow said the following on 2/15/2005 3:25 PM: Hi all, I have Apache integrated with Tomcat using mod_jk2 and all is working well with the exception of performance. I would like to direct Apache to serve the static content components of my Java application. How is this done? I presume there must be some type of httpd.conf setting to do this? David A. Morrow Technical Systems Lead Autodata Solutions Company [EMAIL PROTECTED] http://www.autodata.net Tel: (519) 951-6079 Fax: (519) 451-6615 Poor planning on your part does not necessarily constitute an emergency on my part. This message has originated from Autodata Solutions. The attached material is the Confidential and Proprietary Information of Autodata Solutions. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please delete this message and notify the Autodata system administrator at [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.awt.headless=true in tomcat startup
You set this somewhere in either the tomcat-home/bin/catalina.sh or tomcat-home/bin/startup.sh. If you don't want to do any of that, have an InitServlet that does System.setProperty( java.awt.headless, true ); That will do the same thing. Charlie Rodrigo Avila said the following on 2/4/2005 11:57 AM: Hi! I try to use some awt\swing classes to convert rtf strings to html in an jsp page. But I receive the following Exception: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. But, to resolve this problem, I find the following tip: assuming you're using a 1.4 JVM, add the following line to your startup command: $JAVA_COMMAND -Djava.awt.headless=true ... But, how I put this option in the Tomcat startup? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sharing session across Hosts
Hello. I have two Hosts setup in the same Engine, and I would like to be able to share session variables across them. Is this possible? And, if so, what do I have to configure? Realm? Listener? Thanks a lot. Charlie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sharing session across Hosts
So... If I create some class, SessionHolder.java, compile it (SessionHolder.class) and put it in shared/lib, I could then set variables and then retrieve them from this class? Charlie Caldarale, Charles R said the following on 2/2/2005 5:00 PM: From: Mark Winslow [mailto:[EMAIL PROTECTED] Subject: Re: sharing session across Hosts I imagine creating a static variable would be global to the JVM. Not quite. It's global to the classloader, not the JVM. Since each web app has its own classloader, you would have to put such a class in a location serviced by a more global loader, such as shared/lib. Now, of course, you've introduced dependency issues... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
passing logged in user/status from one website to another
Hello. I'm sure this has been asked before and I promise I am looking through the archives as I write this. A user logs into websiteA.com and then has to click over to websiteB.com. They are both apps running in the same instance of Tomcat, on the same server, just as different Hosts. Is there some slick way to do this where I can share session information between them? Thanks a lot. Charlie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JDBC
Someone just last week recommended this one: http://jtds.sourceforge.net/ But you can use the one from Microsoft as well: http://www.microsoft.com/downloads/details.aspx?FamilyID=ee91ad1a-1ee4-49e1-95ea-e3f0e39114a9DisplayLang=en That's a crappy URL, but it links to the JDBC driver. Charlie Charles P. Killmer said the following on 11/23/2004 5:13 PM: Looking for concensus on how people, with much more experience than I have, use to connect to SQL Server 7. I have been planning on using Datadirect's JDBC Connect until I saw the price tag for a server. So with that does any body have a preferred JDBC connector to SQL Server 7? Any help is greatly appreciated. Thanks Charles - 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: getting the error type/code
Thanks Tim. This was exactly it. request.getAttribute( javax.servlet.error.status_code ); Charlie Tim Funk said the following on 8/7/2004 7:54 PM: Its in 'Table SRV.9-1 Request Attributes and their types' of the servlet spec: Request Attributes Type javax.servlet.error.status_code java.lang.Integer javax.servlet.error.exception_type java.lang.Class javax.servlet.error.message java.lang.String javax.servlet.error.exception java.lang.Throwable javax.servlet.error.request_uri java.lang.String javax.servlet.error.servlet_name java.lang.String So look in the ServletRequest() an attribute called javax.servlet.error.status_code of type Integer. -Tim Charles N. Harvey III wrote: Hello. If I create one error page and point all of the error codes (400, 401, 403, 404, 408, 500) to the same page, how do I figure out which error code was sent so I can display a different message to the user? Can this be done or do I have to create a separate page for each error code? Is the error in the HttpServletRequest somewhere? - 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]
getting the error type/code
Hello. If I create one error page and point all of the error codes (400, 401, 403, 404, 408, 500) to the same page, how do I figure out which error code was sent so I can display a different message to the user? Can this be done or do I have to create a separate page for each error code? Is the error in the HttpServletRequest somewhere? Thanks a lot. Charlie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Context Descriptors: which directory
Hello. I was using Tomcat 4 and I had my foo.xml file in $catalina_home/webapps/foo.xml. This pointed Tomcat to a different directory where the application resided. Now, in Tomcat 5 I see in the docs that I am supposed to be placing these files in $catalina_home/conf/Catalina/localhost/foo.xml. Do I HAVE to? Can I configure Tomcat 5 to see them in the /webapps/ dir? Or, is that a bad practice? Just wondering. Thanks a lot. Charlie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
image redirect
Hello. I am used to using Apache Httpd in front of Tomcat to create Redirects for images. This way, I can re-route all calls to *.jpg to my image server. But now I don't have Apache Httpd installed. Can I do the same with Tomcat? This is the setup in Httpd: VirtualHost www.mysite.com ServerAdmin [EMAIL PROTECTED] DocumentRoot /code/www/webapps/ ServerName production RedirectMatch /images/(.*)$ http://images.mysite.com/images/$1 JkMount /*.do tomcat JkMount /*.vm tomcat JkMount /*.jsp tomcat /VirtualHost So, with the RedirectMatch I can route all of my image calls to another server. Is there somewhere in the conf/server.xml where I can setup the same feature? Right now I have a servlet filter setup in my web.xml file for the application. But I was wondering if it could be done in Tomcat instead of in my application. If not, I guess I'll keep using my filter. Thanks a lot. Charlie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
re-deploy a webapp with new .properties files
Hello again. I push myapp.war file to my staging server. Then I use the deploy function in the manager app. http://server/manager/deploy?war=jar:file:/wars/myapp/1.3/myapp.war!/update=true Most of the app gets reloaded, which is great. But some things do not. Like anything in the /WEB-INF/classes/ directory. Not sure yet about the /WEB-INF/lib/ directory. Am I doing something wrong? Is there a different command? After I deploy I tried reloading. Same result. Seems like the only way to get Tomcat to reload things like .properties files is to restart it. I know this can't be the case, so I'm hoping someone could point out to where I missed that in the documentation. Thanks again. Charlie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java variables in mywebapp.xml
Thanks Yaov, the Ant filter tokens was exactly what I needed. Charlie Shapira, Yoav said the following on 6/15/2004 9:10 AM: Hi, Nope, no variable parsing in web.xml. You can use ant filter tokens to set the appropriate value when copying web.xml to its destination diretory. Yoav Shapira Millennium Research Informatics -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 6:19 PM To: Tomcat Users List Subject: java variables in mywebapp.xml Hello. I put a file: mywebapp.xml into tomcat/webapps/. This file makes Tomcat reference my webapp in a different directory. I tried to use a variable in the path but Tomcat hated that. ?xml version=1.0 encoding=UTF-8? Context path=/mywebapp docBase=${user.home}/projects/mywebapp debug=0 privileged=false Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_mywebapp_log. suffix=.txt timestamp=true/ /Context But ${user.home} renders exactly as written. It doesn't change to /home/charvey/. Is there any way to make something like this happen? This is a team project so when someone else checks it out of CVS I would like it to work on the user directory instead of having someone to change it. If its not possible, well, then I'll figure something else out. Thanks a lot. Charlie - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JAAS setup
I'm not sure if this is the right place to ask this, so if someone can point me to a JAAS mailing list that would be great. If I put a jaas.config in my WEB-INF/classes/ directory, I have to have something that does System.setProperty( java.security.auth.login.config, jaasFile ); That's just fine, except that each webapp has their own jaas.config file. So the last webapp that loads wins and its jaas.config file is the one that the whole system uses. What we have now is one instance of the jaas.config file in jre/lib/ext/. It is not the easiest thing in the world to get our production servers to change things like the jass.config file, so it would be nicer if each webapp could carry their own. But alas, it seems like the only way to tell java where to find the jaas.config file is with a system property. So, does anyone know another way to let java know where it is besides the system property? Does anyone know where would be a good place to look? Thanks a lot. Charlie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java variables in mywebapp.xml
Hello. I put a file: mywebapp.xml into tomcat/webapps/. This file makes Tomcat reference my webapp in a different directory. I tried to use a variable in the path but Tomcat hated that. ?xml version=1.0 encoding=UTF-8? Context path=/mywebapp docBase=${user.home}/projects/mywebapp debug=0 privileged=false Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_mywebapp_log. suffix=.txt timestamp=true/ /Context But ${user.home} renders exactly as written. It doesn't change to /home/charvey/. Is there any way to make something like this happen? This is a team project so when someone else checks it out of CVS I would like it to work on the user directory instead of having someone to change it. If its not possible, well, then I'll figure something else out. Thanks a lot. Charlie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Common/lib works shared/lib doesn't
I have seen this happen as well. I'm fine with putting jars in either the common/lib or the WEB-INF/lib, but how come shared/lib doesn't work at all? Nothing that gets placed in that directory shows up in the classloader. Is there something I need to configure to get those jars to load? Thanks for the help. Charlie Shapira, Yoav said the following on 6/11/2004 9:55 AM: Hi, It's OK to leave it in common/lib. (IMHO it's also fine to have a copy for each webapp in WEB-INF/lib, but you stated you don't want that). Yoav Shapira Millennium Research Informatics -Original Message- From: Wangenheim, Marc [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 9:54 AM To: [EMAIL PROTECTED] Subject: Common/lib works shared/lib doesn't I need some help trying to get a shared jar to work in shared/lib. I've searched the archives and found many posts with this issue but no fix. Win2k Tomcat 4.1.30 JDK 1.42_03 My webapps are based on a framework I developed that is contained within one jar. Up until now I have included this jar with every webapp where it resides in WEB-INF/lib. This works fine but is a pain to support because every change to the framework needs to be pushed to all apps. I would like to share this jar so only one update for all apps is necessary. When moving the jar to shared/lib I get a runtime CNFE on the Login.jsp. The class that can't be found is part of the jar that now resides in shared/lib. Initially I did not have CATALINA_BASE set. I played around with setting CATALINA_BASE and adding the jar to the classpath but nothing seems to work. I then moved the jar to common/lib and the app worked. Tomcat documentation clearly states that shared application code should reside in shared/lib not in common/lib. Should I try to resolve the shared/lib issue or is it OK to leave the jar in common/lib ? Thanks, Marc Wangenheim ** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. ** 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Common/lib works shared/lib doesn't
Works for me. I was just looking for the explanation. I'll give it a go with 5.0.25 but I trust you on this one. :) Charlie Shapira, Yoav said the following on 6/11/2004 10:21 AM: Hi, shared/lib works on tomcat 5.0.25. It's trivial to test and verify for yourself. The user reported this on 4.1.30, which is in maintenance mode where only showstopper and security bugs would be fixed, and further an OK workaround (using common/lib) exists. I didn't even try to confirm or reject his claim on 4.1.30, because of the above reasons, just answered his question of whether it's OK to use common/lib or not. Yoav Shapira Millennium Research Informatics -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 10:14 AM To: Tomcat Users List Subject: Re: Common/lib works shared/lib doesn't I have seen this happen as well. I'm fine with putting jars in either the common/lib or the WEB-INF/lib, but how come shared/lib doesn't work at all? Nothing that gets placed in that directory shows up in the classloader. Is there something I need to configure to get those jars to load? Thanks for the help. Charlie Shapira, Yoav said the following on 6/11/2004 9:55 AM: Hi, It's OK to leave it in common/lib. (IMHO it's also fine to have a copy for each webapp in WEB-INF/lib, but you stated you don't want that). Yoav Shapira Millennium Research Informatics -Original Message- From: Wangenheim, Marc [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 9:54 AM To: [EMAIL PROTECTED] Subject: Common/lib works shared/lib doesn't I need some help trying to get a shared jar to work in shared/lib. I've searched the archives and found many posts with this issue but no fix. Win2k Tomcat 4.1.30 JDK 1.42_03 My webapps are based on a framework I developed that is contained within one jar. Up until now I have included this jar with every webapp where it resides in WEB-INF/lib. This works fine but is a pain to support because every change to the framework needs to be pushed to all apps. I would like to share this jar so only one update for all apps is necessary. When moving the jar to shared/lib I get a runtime CNFE on the Login.jsp. The class that can't be found is part of the jar that now resides in shared/lib. Initially I did not have CATALINA_BASE set. I played around with setting CATALINA_BASE and adding the jar to the classpath but nothing seems to work. I then moved the jar to common/lib and the app worked. Tomcat documentation clearly states that shared application code should reside in shared/lib not in common/lib. Should I try to resolve the shared/lib issue or is it OK to leave the jar in common/lib ? Thanks, Marc Wangenheim * * The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. * * 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] - 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: Tomcat configuration tuning
I do just what you described below. If the loginContext isn't in the session, I show do a global-forward to the login form. And, because I didn't want to have to put a session check into every Struts action I used AspectJ to weave in a pointcut into every action. Works great. I was considering going with a filter servlet instead but if you say its slow then maybe I did the right thing. Charlie Allistair Crossley wrote: Slightly off-forum but related to my performance tuning of my tomcat webapp, I am using the JCIFS NTLM authentication servlet as a filter. The filter is mapped to all requests /*. I just thought to myself on the train home whether because NTLM is a 3-way handshake, that this may be causing some kind of performance hit. The filter authenticates the desktop user and then populates the request.getRemoteUser. I suppose I could do this once with a login servlet and then populate a session user object and if that ever expires redirect back to the login servlet. Does anyone have an opinion on whether it would be worth my time removing the filter per request in favour of a once-only login action. I appreciate this is off-tomcat, so no hard feelings if noone replies ;) ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: Tomcat configuration tuning
I've never actually used a profiler before. I keep meaning to I swear. Its my next big venture. I just figured out unit testing about 2 weeks ago. We just never have time for that silly testing and profiling stuff at my company. I never actually wrote the filter either. But I have one around that I could use to at least do some testing. I'll try this profiling and try to get the results back to the list. Charlie Shapira, Yoav wrote: Hi, Did you profile the filter versus aspects? Now that's a benchmark I'd be really interested in. To the original poster: assuming your filter is smart enough to check the session for a user is authenticated already token, the /* mapping is not that big a deal. If you're re-authenticating every time, that's terrible, and you should make your filter smarter. Yoav Shapira Millennium Research Informatics -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:38 PM To: Tomcat Users List Subject: Re: Tomcat configuration tuning I do just what you described below. If the loginContext isn't in the session, I show do a global-forward to the login form. And, because I didn't want to have to put a session check into every Struts action I used AspectJ to weave in a pointcut into every action. Works great. I was considering going with a filter servlet instead but if you say its slow then maybe I did the right thing. Charlie Allistair Crossley wrote: Slightly off-forum but related to my performance tuning of my tomcat webapp, I am using the JCIFS NTLM authentication servlet as a filter. The filter is mapped to all requests /*. I just thought to myself on the train home whether because NTLM is a 3-way handshake, that this may be causing some kind of performance hit. The filter authenticates the desktop user and then populates the request.getRemoteUser. I suppose I could do this once with a login servlet and then populate a session user object and if that ever expires redirect back to the login servlet. Does anyone have an opinion on whether it would be worth my time removing the filter per request in favour of a once-only login action. I appreciate this is off-tomcat, so no hard feelings if noone replies ;) ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT -- -- - 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] 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat configuration tuning
LoginContext is part of the jdk1.4. javax.security.auth.login.LoginContext. It is usually extended by others. I found the very popular example on javaworld.com where the author created an RDBMDLoginContext. I changed that to my own OJBLoginContext because I use Apache OJB. Its pretty easy to write one, just override each of the methods. Charlie Allistair Crossley wrote: All our actions extend an abstract base action that handles auth if the session user is null and then delegates to a subclass to do the actial work which is another way of what you describe there. Hm...are you saying you use JCIFS also? Is the loginContext your own or part of the JCIFS API. ADC -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Sent: Thu 08/04/2004 20:38 To: Tomcat Users List Cc: Subject: Re: Tomcat configuration tuning I do just what you described below. If the loginContext isn't in the session, I show do a global-forward to the login form. And, because I didn't want to have to put a session check into every Struts action I used AspectJ to weave in a pointcut into every action. Works great. I was considering going with a filter servlet instead but if you say its slow then maybe I did the right thing. Charlie Allistair Crossley wrote: Slightly off-forum but related to my performance tuning of my tomcat webapp, I am using the JCIFS NTLM authentication servlet as a filter. The filter is mapped to all requests /*. I just thought to myself on the train home whether because NTLM is a 3-way handshake, that this may be causing some kind of performance hit. The filter authenticates the desktop user and then populates the request.getRemoteUser. I suppose I could do this once with a login servlet and then populate a session user object and if that ever expires redirect back to the login servlet. Does anyone have an opinion on whether it would be worth my time removing the filter per request in favour of a once-only login action. I appreciate this is off-tomcat, so no hard feelings if noone replies ;) ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: Tomcat configuration tuning
Sorry, I was a little off in that last e-mail. The example on javaworld.com has you extending LoginContext to SessionLoginContext. It extends LoginContext and implements HttpSessionBindingListner. This is done so that when the session is over, the logout method is called from valueUnbound(). RDBMSLoginModule is the other class from the example and it implements LoginModule. This is the jaas class that you configure in your jaas.config file. None of this really has anything to do with Tomcat configuration tuning, sorry for going off on a tangent. Charlie Charles N. Harvey III wrote: LoginContext is part of the jdk1.4. javax.security.auth.login.LoginContext. It is usually extended by others. I found the very popular example on javaworld.com where the author created an RDBMDLoginContext. I changed that to my own OJBLoginContext because I use Apache OJB. Its pretty easy to write one, just override each of the methods. Charlie Allistair Crossley wrote: All our actions extend an abstract base action that handles auth if the session user is null and then delegates to a subclass to do the actial work which is another way of what you describe there. Hm...are you saying you use JCIFS also? Is the loginContext your own or part of the JCIFS API. ADC -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Sent: Thu 08/04/2004 20:38 To: Tomcat Users List Cc: Subject: Re: Tomcat configuration tuning I do just what you described below. If the loginContext isn't in the session, I show do a global-forward to the login form. And, because I didn't want to have to put a session check into every Struts action I used AspectJ to weave in a pointcut into every action. Works great. I was considering going with a filter servlet instead but if you say its slow then maybe I did the right thing. Charlie Allistair Crossley wrote: Slightly off-forum but related to my performance tuning of my tomcat webapp, I am using the JCIFS NTLM authentication servlet as a filter. The filter is mapped to all requests /*. I just thought to myself on the train home whether because NTLM is a 3-way handshake, that this may be causing some kind of performance hit. The filter authenticates the desktop user and then populates the request.getRemoteUser. I suppose I could do this once with a login servlet and then populate a session user object and if that ever expires redirect back to the login servlet. Does anyone have an opinion on whether it would be worth my time removing the filter per request in favour of a once-only login action. I appreciate this is off-tomcat, so no hard feelings if noone replies ;) ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: Jsp outside webapp
A template language like Velocity can do that for you since they are not compiled servlets. You can load templates from a Webapp, filesystem, URL or database. Its worth looking at. Charlie Shapira, Yoav wrote: Hi, I want all my jsps, images and any static include files to be under the apache document root /webpages instead of /opt/tomcat/webapps/myapp but I want my servlets and classes to reside in /opt/tomcat/webapps/myapp/WEB-INF/classes. JSPs are servlets. Good luck ;) Yoav Shapira 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
access to apache httpd process from tomcat or jk
Hello. A website that we are converting from embedded perl to java writes specific data to the Apache::Notes table. I just found out what Notes is yesterday, so it is all pretty new for me. Since embedded perl runs inside the httpd process it has access to this little bit of memory that gets read with each request. Tomcat does not run inside the httpd process. That much is obvious. But I would still like to write to this Notes table. Is there some way to gain access to the httpd process from Tomcat? Could I do it through mod_jk somehow? Does anyone even know what I'm talking about? This is quite confusing to me so I'm taking a shot in the dark here to see if anyone else has tried something similar. Any tips or pointers to some books or websites is greatly appreciated. Thanks a lot. Charlie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: access to apache httpd process from tomcat or jk
Darn. Thanks for the link, but using a database so far isn't an option. When you write to the Apache::Notes table you can then specify additional logging parameters for the access.log that will be read out of the little bit of memory that Notes actually is. The company we are doing the work for has a very complex reporting tool that is based solely on the access.log files on all their machines. No databases at all. Pretty aggravating. I am tasked with researching this, so my research answer might have to be no. Thanks again. Charlie Tim Funk wrote: No that won't work. How about JDBC instead? http://www.lotus.com/jdbc -Tim Charles N. Harvey III wrote: Hello. A website that we are converting from embedded perl to java writes specific data to the Apache::Notes table. I just found out what Notes is yesterday, so it is all pretty new for me. Since embedded perl runs inside the httpd process it has access to this little bit of memory that gets read with each request. Tomcat does not run inside the httpd process. That much is obvious. But I would still like to write to this Notes table. Is there some way to gain access to the httpd process from Tomcat? Could I do it through mod_jk somehow? Does anyone even know what I'm talking about? This is quite confusing to me so I'm taking a shot in the dark here to see if anyone else has tried something similar. Any tips or pointers to some books or websites is greatly appreciated. - 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: Tomcat 4.1.30 and Apache 2.0.48
apache-home/conf/httpd.conf LoadModule jk_module modules/mod_jk.so JkWorkersFile /usr/tomcat/conf/jk/workers.properties JkLogFile /usr/apache/log/mod_jk.log JkLogLevel Warn VirtualHost * ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/tomcat/webapps ServerName server.you.com CustomLog |/code/utils/cronolog/cronolog /home/apache/log/%Y_%m_%d_default_access_log combined JkMount /*.do tomcat JkMount /*.jsp tomcat JkMount /servlet/* tomcat /VirtualHost tomcat-home/conf/jk/workers.properties workers.tomcat_home=/code/jboss/tomcat-4.1.x workers.java_home=/code/java/j2sdkse ps=/ worker.list=tomcat # Definition for Ajp13 worker worker.tomcat.port=12541 worker.tomcat.host=localhost worker.tomcat.type=ajp13 tomcat-home/conf/server.xml Service name=Tomcat-Apache Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=12541 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ Engine className=org.apache.catalina.connector.warp.WarpEngine name=Apache debug=0 defaultHost=localhost Logger className=org.apache.catalina.logger.FileLogger prefix=apache_log. suffix=.txt timestamp=true verbosity=1/ Realm className=org.apache.catalina.realm.MemoryRealm / Host name=localhost appBase=webapps autoDeploy=true unpackWARs=true deployXML=true liveDeploy=true DefaultContext path= docBase=ROOT debug=0 reloadable=true swallowOutput=true /DefaultContext /Host /Engine /Service Can't get much easier to follow than that I think. Place the mod_jk lines anywhere in the httpd.conf file. Add the workers.properties file to the jk directory under tomcat-home/conf/. And use this connector in Tomcat Connector className=org.apache.ajp.tomcat4.Ajp13Connector. The httpd.conf properties sends requests for .jsp, .do, and /servlet/ to tomcat but everything else is run by Apache. And, since you point the DocumentRoot to /usr/tomcat/webapps, Apache uses the Tomcat webapps directory as its home. So any .html, .gif, etc. get served right out of Tomcat. Hope this all makes sense. Charlie Swen Schillig wrote: Hi * I'm new to tomcat but I'm still trying to get this running under Apache. Ok, tomcat standalone is running perfect with http://localhost:8080 without having me changing any file anywhere. After that I tried to get it running from within Apache. For that I learned, I need mod_jk2.so which I compiled and installed successfully (I used --with-apxs2 / --with-tomcat41 / --with-jni to configure) - the modules (mod_jk2, jkjni.so) are copied into /usr/local/apache2/modules. - the httpd.conf is modified accordingly LoadModule jk2_module modules/mod_jk2.so JkSet config.file /usr/local/apache2/conf/workers2.properties So far so good, I can see from the web-server logs and the web-server environment that everything was successful. But for some reason I can't get anything running from here (jsp, servlet). Of course I read almost everything from the jakarta.apache.org page but unfortunately each description is missing something. I couldn't find any straight forward HOWTO which works for the standard installation ! All the examples will lead to an error !!! Does someone have a set of the following files jk2.properties workers2.properties server.xml web.xml which I can just copy to my system to get at least some output !! Anything but an error would be highly appreciated !! If there's any change needed to httpd.conf please post this as well !! Thanks in advance ! Mit freundlichen Grüßen / Best Regards Swen Schillig IBM Germany, Mainz - AIS Storage Subsystems - 0A156 Phone Internal : *122-2805 External : +49(0)6131-84-2805 Mobile : +49(0)172-7344938 Fax Internal : 921-6708 External : +49(0)6131-84-6708 e-mail : [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
classloader order
Hello. I have questions about the order in which jars are loaded into the classloader. I have read http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html many times over and I am still confused. The Overview relates parent and children classloaders to each other. It then says that the Java 2 way is to put the Bootstrap classloader first. It then states that Tomcat does it a little bit differently, the details of which are stated below. In the Class Loader Definitions section it says that the /WEB-INF/classes/ comes first, with /WEB-INF/lib/ second. This is all exactly as I would like to see it. But... I don't seem to have classes loaded in that order. The Bootstrap classloader takes precedence over all the others. The systems group here added some of the jakarta commons jars to the Bootstrap classloader, and now I cannot override them with newer versions. As in, commons-beanutils-1.3.jar is in the Bootstrap loader and I want to use commons-beanutils-1.6.1.jar. So I place beanutils-1.6.1 in my /WEB-INF/lib/... and nothing. The Bootstrap classloader wins every time. Is there something I am doing wrong? (Besides having jars in my Bootstrap loader?) What can I do to make sure that whatever I have in my /WEB-INF/lib/ directory takes precedence? Thanks for the help. Charlie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: classloader order
Yoav, Thank you so much for confirming what I had basically already figured out. I think, originally, we had other things running on our Tomcat machines (web-service processes) and it made it easier to develop apps with those jars included. I am currently asking them to move all of these jars to /tomcat/common/lib/ or /tomcat/shared/lib/. That way, if I want to use those jars, I can. But if I want to override them, I can. :) It's either that or remove them altogether from the machine and make each webapp carry around all jars - which really isn't so terrible. Thanks again. Charlie Shapira, Yoav wrote: Howdy, I have read http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html many times over and I am still confused. The Overview relates parent and children classloaders to each other. It then says that the Java 2 way is to put the Bootstrap classloader first. It then states that Tomcat does it a little bit differently, the details of which are stated below. In the Class Loader Definitions section it says that the /WEB-INF/classes/ comes first, with /WEB-INF/lib/ second. This is all exactly as I would like to see it. Bootstrap is still first, as is required in Java 2. Specifically, note the following summary on the page you quoted above: Therefore, from the perspective of a web application, class or resource loading looks in the following repositories, in this order: Bootstrap classes of your JVM System class loader classses (described above) /WEB-INF/classes of your web application /WEB-INF/lib/*.jar of your web application $CATALINA_HOME/common/classes $CATALINA_HOME/common/endorsed/*.jar $CATALINA_HOME/common/lib/*.jar $CATALINA_BASE/shared/classes $CATALINA_BASE/shared/lib/*.jar takes precedence over all the others. The systems group here added some of the jakarta commons jars to the Bootstrap classloader, and now I cannot Basically, your systems group should be shot ;) I'm just kidding of course, I don't want to advocate violence, but they're in the wrong, not you. Don't pollute the JDK installation by putting stuff in the lib/ext (the bootstrap classloader) unless ABSOLUTELY necessary, and it's very rare that you ABSOLUTELY need the jakarta commons jars there. Is there something I am doing wrong? (Besides having jars in my Bootstrap loader?) What can I do to make sure that whatever I have in my /WEB-INF/lib/ directory takes precedence? You're not doing anything wrong, your systems group is. You can't override the bootstrap classloader. Yoav Shapira 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jar versions
I have one little thing that sometimes drives me crazy about most products that I download off of the internet - jar versions. There aren't any. Its not just Tomcat, its Sun. How come the j2ee.jar never has a version? Does that bother anyone else? This never really bothered me that much before, because I was still a beginner and which version I was using never really came into play. But now that I try to keep up on the latest versions of freely available classes the version numbers matter. And, with the advent of Maven, it becomes slightly annoying to change my project.xml file because the jar does not have a version, or to rename my jars and add in a number. Recently I had issues with my classloader because there were jars in there that I could not override. What made it really difficult was finding out which version was used. But the /tomcat/common/lib/ directory does the same thing. Not one of the jars has a version number. Can this be changed? Can a 1.3 or 0.4 be added to the end of each of the jars so that everyone can know which version their system is loading? Just my $0.02. I am trying to get everyone at my company to make sure everything is numbered, so I thought I'd throw my opinion around at everyone else. :) Big fan of the product, thanks for all the years of great work. Charlie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jar versions
Didn't realize it was such a heated subject. Thanks for the reference, it made some good sense. I'm definately not the type to want to start an argument, so I can live with it as is. Thanks again. Charlie Shapira, Yoav wrote: Howdy, Please let's not start another flamewar on this topic of eternal debate, this mailing list is voluminous enough as it is. There are pros and cons to each side, and many debates have taken place on this and other list on this topic. Suffice it to say it's a choice the developers make. For example see http://marc.theaimsgroup.com/?t=10243459103r=1w=2. Yoav Shapira Millennium ChemInformatics -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 11:27 AM To: Tomcat Users List Subject: jar versions I have one little thing that sometimes drives me crazy about most products that I download off of the internet - jar versions. There aren't any. Its not just Tomcat, its Sun. How come the j2ee.jar never has a version? Does that bother anyone else? This never really bothered me that much before, because I was still a beginner and which version I was using never really came into play. But now that I try to keep up on the latest versions of freely available classes the version numbers matter. And, with the advent of Maven, it becomes slightly annoying to change my project.xml file because the jar does not have a version, or to rename my jars and add in a number. Recently I had issues with my classloader because there were jars in there that I could not override. What made it really difficult was finding out which version was used. But the /tomcat/common/lib/ directory does the same thing. Not one of the jars has a version number. Can this be changed? Can a 1.3 or 0.4 be added to the end of each of the jars so that everyone can know which version their system is loading? Just my $0.02. I am trying to get everyone at my company to make sure everything is numbered, so I thought I'd throw my opinion around at everyone else. :) Big fan of the product, thanks for all the years of great work. Charlie - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do you debug Apache--to--Tomcat?
Depends upon which connector you are using. But there are still the apache logs - which are different than the tomcat logs. 1) The Apache httpd server logs /apache/logs/access.log /apache/logs/error.log 2) The connector logs (mod_jk or mod_webapp), wherever you put them. /apache/logs/mod_jk.log /apache/logs/mod_webapp.log If the request isn't getting to Tomcat at all then the Tomcat logs will not help in the least. But these other logs will. Enjoy. Charlie -Original Message- From: Peter Alvin [mailto:[EMAIL PROTECTED]] Sent: Friday, August 16, 2002 4:21 PM To: Tomcat Users List Subject: How do you debug Apache--to--Tomcat? How do you turn on trace on either the Apache or Tomcat side? I believe I have everything installed and configured correctly. This works great: http://www.physiquetransformation.com:8080/examples/servlet/HelloWorld Example But going through Apache gives a 404: http://www.physiquetransformation.com/examples/servlet/HelloWorldExamp le Setting verbosityLevel in Tomcat doesn't seem to help: server.xml: ... Logger name=servlet_log path=logs/servlet.log verbosityLevel = DEBUG / ... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: log4j in tomcat
I think I know what the problem is. To add log4j to Tomcat you added an extra parameter to either startup.bat or catalina.bat right? (I can't remember which one.) So when you start Tomcat from the start menu it reads the change you made in the file. Thing is, when Tomcat starts as a service it DOES NOT read that change that you made. Doh! Here's why. The installer creates the service like any other service gets made - with the command prompt. That's what the tomcat.exe file is for in your /bin directory. It does not run Tomcat, it installs it as a service. But, it installs with the same set of parameters as in the original (catalina|startup).bat file. So what has to be done is that you must remove the Tomcat service and re-install it all from the command prompt. And here is a link to a web page made by some really nice people that know more about it than me. http://www.alexandriasc.com/software/JavaService/index.html They have made a seperate file called JavaService.exe to run the command against instead of Tomcat.exe. The documentation page on that site explains how to install everything and all the parameters you can set. The only thing not explained is how to remove the Tomcat Service. Tomcat.exe -uninstall Service Name (Enter the exact name, with spaces, that you see in the services menu. The command you enter will look something like this - take note of the log4j part: %CATALINA_HOME%\bin\tomcat.exe -install Apache Tomcat %JAVA_HOME%\jre\bin\hotspot\jvm.dll -Dlog4j.configuration=/WEB-INF/conf/log4j.properties -Djava.class.path=%CATALINA_START% -Dcatalina.home=%CATALINA_HOME% -Xrs -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out %CATALINA_HOME%\logs\stderr.log Yeah, long. But if you look at your (startup|catalina).bat file it will look similar. Hope this answers your questions - I know my answers are long winded. Charlie -Original Message- From: Koes, Derrick [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 8:40 AM To: 'Tomcat Users List' Subject: log4j in tomcat If I start Tomcat as an NT service I get the WARNings that no log4j appenders could be found. If I start Tomcat from the start menu everything works as expected and I get my logs. Has anyone seen this behavior? Is there an explanation? I'm guessing some kind of timing issue. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: virtual directory
I am pretty sure that would be what the Tomcat world calls a mapping. In IIS you would setup say, /images to actually be a virtual directory that points to some image server. In tomcat you do mappings in the web.xml file. Say you have a servlet at: tomcat_path/webapps/app/WEB-INF/classes/com/mycompany/myservlet.class In WEB-INF/web.xml you do mappings to that servlet because the defined way of accessing that servlet looks lousy. http://mycompany.com/app/servlet/com/mycompany/myservlet So, in your web.xml you will have: servlet servlet-namemyservlet/servlet-name servlet-classcom.mycompany.myservlet/servlet-class /servlet servlet-mapping servlet-namemyservlet/servlet-name url-pattern/specialfiles/*/url-pattern /servlet-mapping OR: servlet-mapping servlet-namemyservlet/servlet-name url-pattern/*.txt/url-pattern /servlet-mapping OR: servlet-mapping servlet-namemyservlet/servlet-name url-pattern/specificfolder/specificfile.html/url-pattern /servlet-mapping In this way you can map any url path to a particular class. But to do something like an images directory, I would suggest leaving that to Apache or IIS. Charlie -Original Message- From: James Lavoie [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 12:36 PM To: [EMAIL PROTECTED] Subject: virtual directory Can anyone tell me how to create a virtual directory in Tomcat? Not sure what the term is, but it is called a virtual directory in Microsoft IIS. Its basically a handle within the url to a folder within the file system that may or may not have the same name as the handle. Any help is appreciated Thanks, Jay -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Servlets using old classes
To really make sure it gets deployed you have to delete the webapp from the ~/tomcat/work/servername directory. So, if you want, add something to your startup.sh script (or startup.bat) like rm -rf /tomcathome/work/servername/webappname That will clear it completely and force Tomcat to redeploy it. I have Ant doing that job with something like this: target name=redeploy description=Removes the webapp from the classloader delete dir=/tomcathome/work/servername/webappname/ /target And I call that target from the target name=compile target to make sure my App is cleared from Tomcat. I think the new Tomcat 4.1 has an integrated Ant task to do this, and maybe a better way in the manager app. But until then I think you have to use one of these two options. Charlie -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 26, 2002 3:16 PM To: [EMAIL PROTECTED] Subject: Automatically Redeploy WAR's Hello, I've been experimenting with WAR's on my dev server and have found that after a WAR is deployed for the first time, it is not redeployed on subsequent server bounces. I've looked through the functionality in /manager and can find nothing that allows you to have a web app redeploy the WAR on server startup. Does anyone know how to do this? Mike -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -Original Message- From: Kevin Andryc [mailto:[EMAIL PROTECTED]] Sent: Friday, July 26, 2002 4:57 PM To: Tomcat Users List Subject: Servlets using old classes I updated a class file in my web application. The problem is that my servlet that uses that class file isn't picking up the changes. It seems to be still using the old class file. I restarted Tomcat, but when I access my servlet, it still has signs that it is using the old class file. How is this so? Anyone have any ideas? Thanks, Kevin Kevin Andryc Web Systems Engineer MISER http://www.umass.edu/miser/ Phone: (413)-545-3460 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Automatically Redeploy WAR's
To really make sure it gets deployed you have to delete the webapp from the ~/tomcat/work/servername directory. So, if you want, add something to your startup.sh script (or startup.bat) like rm -rf /tomcathome/work/servername/webappname That will clear it completely and force Tomcat to redeploy it. I have Ant doing that job with something like this: target name=redeploy description=Removes the webapp from the classloader delete dir=/tomcathome/work/servername/webappname/ /target And I call that target from the target name=compile target to make sure my App is cleared from Tomcat. I think the new Tomcat 4.1 has an integrated Ant task to do this, and maybe a better way in the manager app. But until then I think you have to use one of these two options. Charlie -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 26, 2002 3:16 PM To: [EMAIL PROTECTED] Subject: Automatically Redeploy WAR's Hello, I've been experimenting with WAR's on my dev server and have found that after a WAR is deployed for the first time, it is not redeployed on subsequent server bounces. I've looked through the functionality in /manager and can find nothing that allows you to have a web app redeploy the WAR on server startup. Does anyone know how to do this? Mike -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: mod_jk target problem.
If you are mapping: JkMount /myapp/* ajp13 Then it will forward all requests for http://mysite.com/myapp/... to Tomcat. To avoid this map: JkMount /myapp/*.jsp ajp13 Or: JkMount /*.jsp ajp13 This way only requests for jsp files will be forwarded to Tomcat and everything not specified will be picked up by Apache. Charlie -Original Message- From: Austin Gonyou [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 5:19 PM To: Tomcat Users List Subject: mod_jk target problem. In our mod_jk.conf we've only got a couple of paths used for JkMount, but mod_jk still seems to be handing off everything from / to tomcat. We're using Tomcat 3.2.3 and mod_jk 3.2.3. We'll be upgrading, but that's not for a little bit yet, unless this can be fixed by upgrading. We use Apache 1.3.24 on Linux. Any help on this problem is appreciated. TIA. -- Austin Gonyou [EMAIL PROTECTED] Coremetrics, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat 4.0.4 on RAQ - mod_webapp
Another good way to map servlets is to copy struts. They end all their servlet mappings with an extension: .do. You can call it anything you like. But now your mod_jk mount looks like this JkMount /*.jsp ajp13 JkMount /*.do ajp13 Just my opinion. Charlie -Original Message- From: Michele Neylon -Blacknight Solutions [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 9:07 AM To: Tomcat Users List Subject: RE: Tomcat 4.0.4 on RAQ - mod_webapp At 07.49 23/07/2002 -0500, you wrote: what do your JkMount statements look like? JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 Also, how did you configure the default context in tomcat? I don't understand that question - sorry! -Original Message- From: Michele Neylon -Blacknight Solutions [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 7:56 AM To: Tomcat Users List Subject: RE: Tomcat 4.0.4 on RAQ - mod_webapp I already tried that, but it didn't work :-( I would be just as happy to use mod_jk instead of mod_webapp.so , but that isn't working properly either! eg. http://www.blacknightsolutions.com/test.jsp Although Tomcat is running it reports 404s on any jsp or servlets passed to it. I tried to follow the instructions on integration at: http://www.galatea.com/flashguides/apache-tomcat-4-unix.xml but seem to be missing something... it's all very frustrating At 07.38 23/07/2002 -0500, you wrote: ww.purpleturtle.com%3E Mr. Michele Neylon Blacknight Solutions - affordable linux hosting http://www.blacknightsolutions.com/ -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. Mr. Michele Neylon Blacknight Solutions - affordable linux hosting http://www.blacknightsolutions.com/ -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat mod_webapp: somtimes browser doesn't receibe images from apache
mod_webapp forwards *ALL* requests to Tomcat. Leaving nothing for Apache to handle. If you want images and stylesheets to be kept in apache then you have to use mod_jk instead. Charlie -Original Message- From: Nicolás Marjovsky [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 1:46 PM To: 'Tomcat Users List' Subject: Tomcat mod_webapp: somtimes browser doesn't receibe images from apache Hello. I'm using mod_webapp connector version 1.0.1, with tomcat, 4.0.1 and apache 1.3.12. The problem I'm having is that sometimes the images and stylesheets hosted by apache, referenced by the HTML pages generated by the JSPs don't get loaded. The point is that when these images are hosted within tomcat they work perfectly well, and all other websites that are being served by Apache also work fine Any idea of what might be happening? Thanks a lot Nicolás -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat mod_webapp: somtimes browser doesn't receibe images from apache
So far it seems to be a good connector. Just as good as mod_webapp. No real difference in speed. I just like using apache as much as possible. You just have to configure your mappings differently. Instead of: warp conn /myapp/ You have: JkMount /*.jsp ajp13 So you only map jsp files to be forwarded to Tomcat instead of everything. It is a different way of doing things. But they have the same effect and probably the same performance (although I have not tested). So its up to you. Charlie -Original Message- From: Nicolás Marjovsky [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:00 PM To: 'Tomcat Users List' Subject: RE: Tomcat mod_webapp: somtimes browser doesn't receibe images from apache Is mod_jk a good connector? -Mensaje original- De: Charles N. Harvey III [mailto:[EMAIL PROTECTED]] Enviado el: Martes, 23 de Julio de 2002 03:56 p.m. Para: Tomcat Users List Asunto: RE: Tomcat mod_webapp: somtimes browser doesn't receibe images from apache mod_webapp forwards *ALL* requests to Tomcat. Leaving nothing for Apache to handle. If you want images and stylesheets to be kept in apache then you have to use mod_jk instead. Charlie -Original Message- From: Nicolás Marjovsky [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 1:46 PM To: 'Tomcat Users List' Subject: Tomcat mod_webapp: somtimes browser doesn't receibe images from apache Hello. I'm using mod_webapp connector version 1.0.1, with tomcat, 4.0.1 and apache 1.3.12. The problem I'm having is that sometimes the images and stylesheets hosted by apache, referenced by the HTML pages generated by the JSPs don't get loaded. The point is that when these images are hosted within tomcat they work perfectly well, and all other websites that are being served by Apache also work fine Any idea of what might be happening? Thanks a lot Nicolás -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Directory Index
This is actually a bit tricky and took some research into Apache. Since the jsp files must be within Tomcat and cannot be under an apache directory, you have to find another way of mapping / to a file. So, this is the way: ## MOD_JK LoadModule jk_module modules/mod_jk.so JkWorkersFile /apache/conf/workers.properties JkLogFile /apache/logs/mod_jk.log JkLogLevel debug AddModule mod_jk.c VirtualHost *:80 ServerName myserver.com DocumentRoot /apache/html/myserver ErrorLog /apache/logs/myserver_error CustomLog /apache/logs/myserver_custom myserver IfModule mod_dir.c DirectoryIndex index.jsp index.html /IfModule IfModule mod_alias.c RedirectMatch ((/.*|)/)$ $1index.jsp /IfModule Directory / Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all /Directory # Include File for Tomcat mod_jk JkMount /*.jsp ajp13 JkMount /*.do ajp13 /VirtualHost The mod_dir.c is what you normally have. Map index.jsp as the index. I don't even think this section is necessary because of what mod_alias.c does. The mod_alias.c tells apache to change any request that ends in / into a requst for /index.jsp. Then mod_jk sees the request for *.jsp and points it to Tomcat. Yes. Weird. I just figured this out about two weeks ago. And it works really well. When you click on http://myserver.com/ you will see the url change into http://myserver.com/index.jsp and then find Tomcat. Give it a try and see if it works. Charlie -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 4:19 PM To: Tomcat Users List Subject: Re: Directory Index Jack, I'm not sure I understand what you're asking but, in case I did understand your question correctly, try putting this into your web.xml welcome-file-list welcome-file MyJspIndexPage.jsp /welcome-file /welcome-file-list Darya On Fri, 12 Jul 2002 [EMAIL PROTECTED] wrote: I know that in Tomcat I can map servlets to the path / and that in Apache I can set certain files to be directory indexes; however, I do not know how to map a JSP to the path /. Can anyone help? How do I map JSPs to the path / or set them as directory indexes? Thanks, Jack -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Two questions !
System variables should be available to all of your servlets and other class files. {java.home} {catalina.home} catalina.home is where tomcat is installed. Charlie -Original Message- From: Jakarta Tomcat Newsgroup [mailto:@[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 12:55 PM To: [EMAIL PROTECTED] Subject: Two questions ! Subject: Two questions ! From: Dan Paraschiv [EMAIL PROTECTED] === 1. How do I get from a servlet the path where is installed Tomcat (not the path of my web application) ? The solution could be specific to Tomcat, because I am sure that my application it will always run on Tomcat. 2. It is possible to find out (in Java) the value of a system variable like %CLASSPATH% or %CATALINA_HOME% ? Thanks and Best regards, Dan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [offtopic] IDE for Tomcat?
IBM has a new editor called Eclipse. I haven't used it yet but a coworker has. It has a stop and start button for tomcat in it. And when you start a new project it asks you if you want to start a new Project or Tomcat Project. And when you choose the tomcat option it makes an entry in the server.xml for your webapp. Pretty nifty stuff actually. I am a big netbeans fan but this may be a bit better. Gotta hand it to IBM sometimes. And they give it away for free too. Charlie -Original Message- From: Timothy Fisher [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 4:00 PM To: Tomcat Users List Subject: RE: [offtopic] IDE for Tomcat? I like the combination of ANT with JEdit (www.jedit.org). JEdit is an open source code editor written in Java with an extensible framework. There are many great plugins which can be used to make use of it as a Java IDE environment. Timothy Fisher __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat Icons?
In the tomcat_home directory. There is a tomcat.ico. I don't know about jboss though. -Original Message- From: Andrzej Jan Taramina [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 24, 2002 11:47 AM To: tomcat Users List Subject: Tomcat Icons? Anyone know of a place I can find 32x32 icons for Tomcat (and JBoss, Apache, etc.) so I can set up convenient shortcuts to start/stop/manage the servers? Thanks! Andrzej Jan Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Multiple Tomcat-servers on a single machine
Thank you Kevin and Jean-Luc. These tips were very helpful and I am now quite confidant about my future setup. Thanks. Charlie -Original Message- From: Kevin Wang [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 7:50 PM To: 'Tomcat Users List' Subject: RE: Multiple Tomcat-servers on a single machine It may not be big on disk, but it is on memory usage! One issue to be aware of: when you restart tomcat, but not the web server, the persistent ajp13 connections that are initiated are not reset, and the next N users (where N is the number of pre-setup connections, as per the worker.NAME.cachesize= mod_jk property. The number may be higher due to system activity.) will get 500 errors. A second issue is that even though you have virtual hosts, there is still one central mod_jk properties file where you define the workers. This prevents easy automation of adding and deleting virtual servers via scripts, compared to the old mod_jserv which allowed you to define everything inside the virtual server. But one apache server with multiple virtual servers connecting to multiple tomcats is no problem, as long as you have enough memory. - Kevin -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 9:30 AM To: Tomcat Users List Subject: RE: Multiple Tomcat-servers on a single machine I have a question relating to this... We run around 6 sites each of which has a www and a java directory. We will be moving everything to tomcat very soon. The web servers I will have seperately from the tomcat servers with the ajp (mod_jk) connector connecting the machines. Apache has virtual hosts. And within each virtual host I will have a connection to the apropriate directory on the tomcat server where that site's classes/applications are located. What I want to be able to do though is restart one instance without dropping the classloader of another. Can I do that with one tomcat install and simply having multiple connectors in the server.xml? Or do I have to install tomcat multiple times? It is not a big deal if I have to install many times, it is not very large. Thanks for the help. Charlie -Original Message- From: Ion Larranaga [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 12:24 PM To: Tomcat Users List Subject: RE: Multiple Tomcat-servers on a single machine I think that you have two possibilities to do what you want: - You could set up one instance of Tomcat with X different contexts, so that each user has his own. Servlets from different users would have different physical directories, so each user would have a different working directory. This way, users would access their specific servlets with URLs: http://server/user1/servlet/yourServlet http://server/user2/servlet/yourServlet ... - But if you want the course to be more complete, including configuration of Tomcat, of course you should set up different Tomcat instances for one. These instances should listen on a different port, so they will need different configuration files (server.xml), updating the port each HttpConnector listens to. This way, the URLs to access the servlets would be: http://server:8081/user1/servlet/yourServlet http://server:8082/user2/servlet/yourServlet ... Just as long as different instances do not try to listen to the same port there should be no problem. If you will connect to Tomcat through Apache, it is basically the same, but changing the port of ajp or warp connectors (depending on the Apache module you use) Hope it helps, Ion -Mensaje original- De: Anders Gunnare [mailto:[EMAIL PROTECTED]] Enviado el: miercoles, 20 de febrero de 2002 17:49 Para: [EMAIL PROTECTED] Asunto: Multiple Tomcat-servers on a single machine Hello World, How shall I do if I would like to have multiple Tomcat-servers on a single machine? I have tried to read the doc, but I can't understand how I practically shall do the work... For example, 5 different UNIX-users shall have 5 different Tomcat-servers, one user=one Tomcat-server. The reasons is that I shall have a Servlet-course and I have one UNIX-server where we shall do our work. Best regards Anders Gunnare Frontec Sweden -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED
RE: Multiple Tomcat-servers on a single machine
I have a question relating to this... We run around 6 sites each of which has a www and a java directory. We will be moving everything to tomcat very soon. The web servers I will have seperately from the tomcat servers with the ajp (mod_jk) connector connecting the machines. Apache has virtual hosts. And within each virtual host I will have a connection to the apropriate directory on the tomcat server where that site's classes/applications are located. What I want to be able to do though is restart one instance without dropping the classloader of another. Can I do that with one tomcat install and simply having multiple connectors in the server.xml? Or do I have to install tomcat multiple times? It is not a big deal if I have to install many times, it is not very large. Thanks for the help. Charlie -Original Message- From: Ion Larranaga [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 12:24 PM To: Tomcat Users List Subject: RE: Multiple Tomcat-servers on a single machine I think that you have two possibilities to do what you want: - You could set up one instance of Tomcat with X different contexts, so that each user has his own. Servlets from different users would have different physical directories, so each user would have a different working directory. This way, users would access their specific servlets with URLs: http://server/user1/servlet/yourServlet http://server/user2/servlet/yourServlet ... - But if you want the course to be more complete, including configuration of Tomcat, of course you should set up different Tomcat instances for one. These instances should listen on a different port, so they will need different configuration files (server.xml), updating the port each HttpConnector listens to. This way, the URLs to access the servlets would be: http://server:8081/user1/servlet/yourServlet http://server:8082/user2/servlet/yourServlet ... Just as long as different instances do not try to listen to the same port there should be no problem. If you will connect to Tomcat through Apache, it is basically the same, but changing the port of ajp or warp connectors (depending on the Apache module you use) Hope it helps, Ion -Mensaje original- De: Anders Gunnare [mailto:[EMAIL PROTECTED]] Enviado el: miercoles, 20 de febrero de 2002 17:49 Para: [EMAIL PROTECTED] Asunto: Multiple Tomcat-servers on a single machine Hello World, How shall I do if I would like to have multiple Tomcat-servers on a single machine? I have tried to read the doc, but I can't understand how I practically shall do the work... For example, 5 different UNIX-users shall have 5 different Tomcat-servers, one user=one Tomcat-server. The reasons is that I shall have a Servlet-course and I have one UNIX-server where we shall do our work. Best regards Anders Gunnare Frontec Sweden -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: how to run multiple instances of a single application on a single tomcat.
I think you can do this with different properties files. One instance of the application has a .properties file that contains the ip address and database name of dbX. And in the second instance of your application the .properties file contains the ip address and database name of dbY. I have a slightly similar situation where the same application goes through staging to production. In staging the properties file connects to staging-db. When I push that file live I have a script that changes the ip address called to that of live-db. So I think the same principal should work for two instances of the same application. Give it a shot. Charlie -Original Message- From: Deep Singh Bhau [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 3:42 AM To: Tomcat Users List Subject: RE: how to run multiple instances of a single application on a single tomcat. Im stuck here.. someone please help me out.. -Original Message- From: Deep Singh Bhau Sent: Tuesday, February 12, 2002 12:21 PM To: [EMAIL PROTECTED] Subject: how to run multiple instances of a single application on a single tomcat. Hi I'm new to this mailing list. Could anyone please tell me how to run multiple instances of application on a single tomcat. For example I have a application A which connects to a Database X. All I want is that the second instance of Application A should connect to a Database B. Regards, Deep -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: hi
Robert, I have no suggestions for you at all. I don't even know where to start. I don't use IIS and I am trying not to use jsp's in favor of Velocity. So you might have better luck just posting to the list because I am quite lost on this one. Sorry. Charlie -Original Message- From: Robert Keddie [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 4:56 PM To: [EMAIL PROTECTED] Cc: Subject: hi Caught your name in an article...if you have time... i was wondering if you know of any complications of using javabeans with a Tomcat 3.3/II 5 w/ isapi_redirect filter? I mean , is there any specific setting i have to implement in the server xml or other files? The jsps/beans are outside of tomcat directory in the Inetpub directory. I get the 405--Resource Not Allowed with the reason at top saying i have incorrect url. I know Tomcat is case sensitive and I made sure all links correspond...even the envirment variable references. I have one jsp posting to another with a bean between them. Please help. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: apache + mod_SSL + tomcat
Dom, Do you think you could give some of us a few pointers on how you got mod_SSL and tomcat to work? That would be awesome. Thanks. Charlie -Original Message- From: Cressatti, Dominique [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 12:38 PM To: Tomcat Users List Subject: apache + mod_SSL + tomcat Hi, I've got apache + mod_SSL + tomcat working (I don't deserve that much credit as mod_ssl worked right out the box) but I wonder couldn't the security bypassed, like for example accessing the page on port 8080 instead of port 443 ? Dom -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: getting init params without restarting tomcat 4.0.1
If you check out the Manager App you will see that you can reload particular apps by name. http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html It works. I've used it. On windows it is just a blank screen that you send url commands to. But under a unix environ you get a nice looking screen with the list of names of apps and commands to perform. And I am quite certain that a really nice shell is being worked on for a future release. Charlie -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:34 PM To: [EMAIL PROTECTED] Subject: getting init params without restarting tomcat 4.0.1 Here is my situation. I've inherited a bunch of servlets that used to be deployed under JWS. We are transitioning to Tomcat 4.0.1 on a Linux platform. Tomcat is run at the root level, where I do not have (and should not have) access. Many of my servlets, make use of initial parameters, which to my understanding are placed in the local web.xml. Unfortunately when changes are made to web.xml files, they are not recognized until Tomcat is restarted. This means, I must bug the system administrator to restart Tomcat, and for that matter Apache, which Tomcat runs under. Besides, restarting web servers is not an ideal sort of situation anyway. Is there another way around this? I've been researching, because it seems like this would be a fairly common issue, but to date have found nothing to help me. Have I completely missed some important documentation or some basic servlet concept? Thank you in advance for any help you can give. [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
directory browsing
I now that Ishould be able to find this out for myself but... I can't figure out how to turn off directory browsing. I a single app or in tomcat in general. I will keep searching the docs but if someone could help me out I would be greatful. Charlie -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Load balancer - no session affinity
Pascal, umm... just about everybody wants to know!! That's really great that you got it working. If you have a place to post such configurations or want to post them to the list then let it fly. Thanks. Charlie -Original Message- From: Pascal Forget [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 5:35 PM To: Tomcat Users List Subject: Re: Load balancer - no session affinity Remy Maucherat wrote: The jvmRoute was added to the Catalina core. You use it through a 'jvmRoute' attribute on the engine (give it a unique name). After that, I think it should be ok, since the native connector should recognize the jvmRoute tag and always route the session to the same VM. It works! I now have a working apache 1.3.22 handling static content and dispatching *.jsp and servlet requests to two tomcat 4.0.2 Beta2 servers using the load balancing worker. Session affinity works, and if one tomcat server dies, the other one ends up processing all requests. If someone's interested in getting step by step instuctions on how to do it, just let me know. Best Regards, Pascal -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Session Tracking throughout apps
Hello list. I'm not sure if this is a tomcat question or a java (servlet) question so try not to get too angry if this is on the wrong board. I am setting up my environment to use a controller servlet that brokers all the requests that come in for the site. About 80% of my site are pages that will be served up this way, through the controller. But the other 20% are seperate applications - message boards, photo uploads, contests with registration. What I am slightly confused about is, should the requests for these apps also go through the controller servlet? And if so I don't know how yet - but I will find out. If not (which is my current level of knowledge) then each one gets its own mapping in server.xml and its own directory structure. If this is the case, how do I maintain session across the rest of the site and these side apps? I am pretty new to java hence my confusion. Can I just pass the session object from one to the other? Is there something special I have to implement? Any help would be greatly appreciated. And if this post is in the wrong place just say so and I will find the appropriate java list to post to. Thanks. Charlie Harvey -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: apache mod_auth and tomcat
You could completely disable the Standalone container in the server.xml. Leave the warp-connected apache container and remove everything in the standalone one. Then there will be no port :8080. That's just one idea though. Charlie -Original Message- From: W. Wood Harter [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 5:43 PM To: [EMAIL PROTECTED] Subject: apache mod_auth and tomcat I've searched the archives and didn't find how to use apache mod_auth for basic authorization to protect tomcat pages. My problem is that apache is on port 80 and tomcat is on 8080. If I protect a link at http://myhost:80/myapp/ with Apache's mod_auth, a smart user could just use http://myhost:8080/myapp. Anyone know how to configure Tomcat to only speak with my Apache server? If this is impossible, I guess I could use Tomcat, but I have a database already populated with unix crypt passwords which work fine with mod_auth_mysql. I don't want to have to change my password storage system. Thanks, Wood -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
manager app??
Using the manager app to install an application seems to be Not working for me. Now, I am certain that I am typing in an incorrect url, but I don't know what the correct url is. Every other argument works great. Such as: localhost:8080/manager/reload?path=/myapp localhost:8080/manager/list No problems there. But it get a problem with: localhost:8080/manager/install?path=/myappwar=file:/myapp I get this error: FAIL - Encountered exception java.lang.IllegalArgumentException: Cannot access document base directory /myapp If I try to install an app that already exists I get: FAIL - Application already exists at path /velexample Which is fine. That's what it is supposed to say. So what am I doing wrong? What is the document base supposed to be? I have read the manager how to a bunch of times and can't figure out what the correct syntax is. Thanks. Charlie Harvey Alloy Inc. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: manager app??
No problems there. But it get a problem with: localhost:8080/manager/install?path=/myappwar=file:/myapp I get this error: FAIL - Encountered exception java.lang.IllegalArgumentException: Cannot access document base directory /myapp Is there a directory /path on your computer? This must be the absolute pathname (from the root directory of your filesystem) -- it's not relative to anything. Exactly!! I had to do localhost:8080/manager/install?path=/myappwar=file:/var/web/webapps/myapp THANKS!! Charlie -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Apache 2.0
There is the warp connector for Apache 1.3.x but what about for the upcoming release of Apache 2.0.x? I have downloaded a beta and the .so file really did nothing. Could not connect to tomcat at all. Now, this could be because I did not configure Apache for DSO properly and I will double check my work. But it could also be because Apache 2.0 has a different structure and there needs to be other work done. Does anybody know which case it is? Charlie Harvey -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tomcat with Apache
I am going to run an entire site in java (jsp or velocity) and I currently have apache 1.3.* connected to tomcat 4.0.1 with the warp connector. Works great. Great concept. But... Do I really need Apache? I am not going to have any html. All the pages on the site will be java. Is tomcat a good enough server to take a heavily traficked site? I would say that Apache would handle the images, but we use a 3rd party (mirror image) for that. So should I use Apache or not? Thanks in advance. Charlie Harvey -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Alternate webapps dir not seen by apache
Hello. I have tomcat at C:\tomcat and apache at C:\apache. I have the warp module in place and everything is working just peachy for me in my little test environment (my desktop). I realized that I do not want all my webapps in the C:\tomcat\webapps directory because if I install a new version of tomcat it will be easier to have all my apps in one central place (not ususual thoughts). I moved my webapps to C:\website. So I have the example and manager and even the forumdemo app from Velocity. I changed server.xml to see the new directory as the base for both Standalone and Apache. I go to http://localhost:8080/examples/jsp/index.html and its all good. The little text change that I made at the top of the page is present. But when I go to http://localhost/examples/jsp/index.html it is still seeing the original one in the C:\tomcat\webapps directory. Do I just need to restart a few times? Is there a different way to configure the httpd.conf? WebAppConnectionwarpConnection warplocalhost:8008 WebAppDeployexampleswarpConnection /examples/ and server.xml has: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=C:\website unpackWARs=true How come Tomcat can see it and not Apache? I will keep hacking away at it. I was just wondering if anyone else had run into this problem. Thanks. Charlie Harvey -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Alternate webapps dir not seen by apache
answer inline: -Original Message- From: Brian Adams [mailto:[EMAIL PROTECTED]] Sent: Friday, December 21, 2001 4:53 PM To: Tomcat Users List Subject: RE: Alternate webapps dir not seen by apache have you erased the compiled apps in the work directory? --- I thought for sure that would have been it. But it definately put me on the right path. Here is how it went down... I have just figured it out. Very odd. I had to keep my work directory open whilst I was stopping and starting services. When tomcat starts up it creats a localhost directory inside the work directory. This is because of the first engine which has: name=localhost Bear with me, this took me quite a few tries to figure out. A few seconds later a second directory was created, called apache because the engine under the warp connector has: name=apache But... when I would access my computer, I was not using http://localhost. I was using http://charlieh, the way other users in the office would do it. And I noticed that once I accessed the site, a charlieh directory was created in the work directory. So I changed the second engine name to be charlieh and then everything worked the way it was supposed to. Now I just need to be mindful of that once I start moving this environment into production (which will be linux so a whole new set of challenges). Especially if I create a few virtual hosts in Apache. Thanks so much for the help. And people say they don't like open source because there is no support. :) Charlie -Original Message- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED]] Sent: Friday, December 21, 2001 3:20 PM To: Tomcat Users List Subject: Alternate webapps dir not seen by apache Hello. I have tomcat at C:\tomcat and apache at C:\apache. I have the warp module in place and everything is working just peachy for me in my little test environment (my desktop). I realized that I do not want all my webapps in the C:\tomcat\webapps directory because if I install a new version of tomcat it will be easier to have all my apps in one central place (not ususual thoughts). I moved my webapps to C:\website. So I have the example and manager and even the forumdemo app from Velocity. I changed server.xml to see the new directory as the base for both Standalone and Apache. I go to http://localhost:8080/examples/jsp/index.html and its all good. The little text change that I made at the top of the page is present. But when I go to http://localhost/examples/jsp/index.html it is still seeing the original one in the C:\tomcat\webapps directory. Do I just need to restart a few times? Is there a different way to configure the httpd.conf? WebAppConnection warpConnection warplocalhost:8008 WebAppDeploy exampleswarpConnection /examples/ and server.xml has: !-- Define the default virtual host -- Host name=localhost debug=0 appBase=C:\website unpackWARs=true How come Tomcat can see it and not Apache? I will keep hacking away at it. I was just wondering if anyone else had run into this problem. Thanks. Charlie Harvey -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]