Tomcat on Fedora
Hi All We am running tomcat 5.0.28 on Fedora 3, with JDK1.5.03. We are experiencing a setup problem. If we increase the memory allocated to Tomcat anything more than 384 Mb. The Java process will spin at 99% utilisation on startup, and it will then hang. Eventually, the whole box will be hung. I have tried setting ulimit to no limits, and also as suggested in Tomcat's release: ulimit -s 2048 export LD_ASSUME_KERNEL=2.2.5 Nothing seems to be effective. We always experience the same behaviour. Any suggestions? Thanks Fred Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
compile against servlet.jar but must run tomcat with servlet-ap1.jar
Hi All, We our new to Tomcat and have a bit of an odd problem. We are developing a getting started project. We have found that we must compile with servlet.jar in our CLASSPATH, but Tomcat will not run with servlet.jar in the CLASSPATH. Tomcat will run with servlet-api.jar, but the test program will not compile with servlet-api.jar in the CLASSPATH. To be more specific we get a: package javax.servlet.http does not exist error when compiling against servlet-api.jar Similar errors ocure when running Tomcat with servlet.jar Changing the CLASSPATH everytime we decide to compile or run isn't much fun. Anybody got an idea on why this is happening, and what the solution is. Tomcat vs 5.5.7 apache vs 2.0.53 RH 8.0 JDK 1.5 -Fred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat stopped
servlet-api.jar does seem to work. How we found servlet.jar... we googled javax.lang.xxx.xxx, which came from a compile error. The only references were to servlet.jar. The two versions of servlet.jar were quite old.. 1999 and 2001 if I remember correctly, which caused me concern, but it is all we found. Thanks for the help. -Fred Wendy Smoak wrote: From: Fred Cook [EMAIL PROTECTED] 2) We had the CLASSPATH set to point to servlet.jar (needed to compile the test program). This was the main problem, which might bring up a versioning question. We are running RH 8.0 on this machine with Tomcat 5.5.7 and apache 2.0.53. What is the correct version of servlet.jar that should be run with this version of Tomcat and Apache? Well... I don't think it's called servlet.jar anymore. A quick look shows no servlet.jar file in the Tomcat 5.5.9 download. I believe the file you want is servlet-api.jar . (I'm still on 4.1, so I'm guessing...) You could also download the official API from Sun, and compile against that. It's not that you need to compile against a specific version of _Tomcat_, it's that you need to compile against the right version of the Servlet Specification. In your case, Tomcat 5.5 is Servlet 2.4, so make sure that's what you're using. Where did you get the 'servlet.jar' file that you were using? Maybe it does contain the right stuff, but those strange NoClassDefFound errors you were getting made me suspicious. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat stopped
Hi Wendy, We got it working, there were 2 problems. 1) It took 10 seconds for the machine to turn off Tomcat (yes I know ..old hardware) after shutdown.sh was run. And the much more interesting. 2) We had the CLASSPATH set to point to servlet.jar (needed to compile the test program). This was the main problem, which might bring up a versioning question. We are running RH 8.0 on this machine with Tomcat 5.5.7 and apache 2.0.53. What is the correct version of servlet.jar that should be run with this version of Tomcat and Apache? -Fred Wendy Smoak wrote: From: Fred Cook [EMAIL PROTECTED] We just use cp to get foo.war into the webapps dir. But we shut down tomcat first, then restart it. The exact steps: We build our test app under a /home file system, then cp the .war file to the Tomcat webapps dir , Tomcat is under the same /home file system. Shut down Tomcat. Startup Tomcat. Go to //localhost:8080/foo/ with FireFox, we see a blank screen. This is based on my experience with Tomcat 4.1. If you're using 5, things might be different. That said, try this: 1. shut down Tomcat 2. delete the 'myapp' directory under webapps 3. copy the new myapp.war file into webapps 4. start Tomcat I assume you have Tomcat configured to explode the .war file. If you don't delete the directory, Tomcat won't ever explode your new .war file. (Alternately, configure it to run from the un-exploded .war file.) It concerns me that the Manager does not run from localhost:8080 or anything else for that matter. I think the first step maybe to get Tomcats home page links working. Did it ever work? Do you get the authentication challenge? Did you add a user to tomcat-users.xml with the correct roles? Are you certain you're compiling against the same version of servlet.jar (or the equivalent) that you're running with? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat stopped
Hi Wendy, We just use cp to get foo.war into the webapps dir. But we shut down tomcat first, then restart it. The exact steps: We build our test app under a /home file system, then cp the .war file to the Tomcat webapps dir , Tomcat is under the same /home file system. Shut down Tomcat. Startup Tomcat. Go to //localhost:8080/foo/ with FireFox, we see a blank screen. It's probably cached in the browser, did you hold down shift and click reload to force it to request the page again? We always force a reload on the browser. It concerns me that the Manager does not run from localhost:8080 or anything else for that matter. I think the first step maybe to get Tomcats home page links working. Here is the error log file for our test app //localhost:8080/MiniHR/. Things go pretty well till Tomcat tries to boot MiniHR. What happens if I just manually delete MinHR.war and it's sub dirs from webapps, does this break anything? Hope this helps. -Fred May 4, 2005 10:51:25 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 4, 2005 10:51:25 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 5405 ms May 4, 2005 10:51:26 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 4, 2005 10:51:26 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.7 May 4, 2005 10:51:26 AM org.apache.catalina.core.StandardHost start INFO: XML validation disabled May 4, 2005 10:51:28 AM org.apache.catalina.core.ApplicationContext log INFO: org.apache.catalina.servlets.DefaultServlet: init May 4, 2005 10:51:28 AM org.apache.catalina.core.ApplicationContext log INFO: org.apache.jasper.servlet.JspServlet: init May 4, 2005 10:51:29 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive MiniHR.war May 4, 2005 10:51:30 AM org.apache.catalina.core.ApplicationContext log SEVERE: StandardWrapper.Throwable java.lang.NoSuchMethodError: javax.servlet.ServletConfig.getServletName()Ljava/lang/String; at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1076) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:324) at javax.servlet.GenericServlet.init(GenericServlet.java:172) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:900) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3823) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4087) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:800) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:695) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1106) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1019) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) May 4, 2005 10:51:30 AM org.apache.catalina.core.ApplicationContext log SEVERE: Servlet /MiniHR threw load() exception javax.servlet.ServletException: Servlet.init() for servlet action threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1109) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:900) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3823) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4087) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759
tomcat stopped
Hi All, We are new to tomcat and have been having some difficulties. Things started out well, but when development work started, Tomcat stopped responding to any changes in the reinstalled .war file. IE a new //localhost:8080/foo/ was the same as the old. We get localhost:8080, but now all it's links and all our code displays a blank screen. And the oddest problem is we can go to localhost:8080/foo when foo has been removed and there is no error generated. We go through the ./startup.sh and ./shutdown.sh steps every time a server was changed. We have reinstalled Tomcat. Anybody have an ideas -Fred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Webserver - Tomcat - Tapestry / Error 405 Method Not Allowed / :jsession
Hi folks. situation: I wrote a webapplication using the Tapestry (version 3.0) Framework. As a webcontainer I am using Tomcat 5. Total of 3 pages: 1. page START: form user has to type in two values /submit 2. page INPUT: form user can type in couple of values or 'cancel' application /submit * 3. page END: Only Text: Thanks for your input *(user can repeat this page as often as requested to type in more and more) session: --- Session are using, so that I wrote my own VISIT object to hold all the needed information. property name=org.apache.tapestry.visit-classMyVisit/property in MyApp.application testing: -- = Tomcat My tests using http://myTomcatUrl/context/ worked just fine!! No Problem at all. = Webserver (Zeus) As weberver I don't use Tomcat. Therefor I needed an redirect for all unknwon Request to my Tomcat. No Problem at all, all request reach my webappl installed and running under tomcat. BUT: --- When I cklick a button of my provided form-Elements, i get from my Webserver a .. Error 405 Method Not Allowed The requested method POST is not allowed for URL /context/;jsessionid=8BFBF57F25A3D826434CEDBDB5A8842E Powered by Zeus Technology Has anybody an idea, what the reason for that could be? It works under Tomcat but not through my webserver, very strange. Thanks for every note. Bye, Fred -- Geschenkt: 3 Monate GMX ProMail + 3 Ausgaben der TV Movie mit DVD Jetzt anmelden und testen http://www.gmx.net/de/go/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: where is Catalina.out
No, I run tomcat by executing startup.bat. -Original Message- From: Dale, Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, October 14, 2004 9:52 PM To: Tomcat Users List Subject: RE: where is Catalina.out Are you running tomcat as a service? -Original Message- From: Fred Yu [mailto:[EMAIL PROTECTED] Sent: 14 October 2004 03:00 To: [EMAIL PROTECTED] Subject: where is Catalina.out Does anyone know why I can not find Catalina.out file under logs directory? I followed steps to install Tomcat 5.0.28 and there is no changes made to tomcat. Please advise Thanks Fred - 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]
Where is Catalina.out?
Hi I just downloaded and unpacked tomcat 5.0.28 to window 2000 machine. I deployed my web war file and am able to run it through window explorer. But I can not find Catalina.out file under logs directory. The tomcat is in default configuration. Can anyone tell me why? Cheers Fred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Where is Catalina.out?
Thanks Jim I have tried on linux (Redhat) and can not find Catalina.out under logs directory, that was the reason I tried that on windows 2000. Cheers Fred -Original Message- From: Sng Wee Jim [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 12, 2004 4:23 PM To: Fred Yu; [EMAIL PROTECTED] Subject: RE: Where is Catalina.out? On windows the logs will go to TOMCAT_HOME/log directory. It will appear in file localhost_log.-MM-dd.txt Correct me if I am wrong, Catalina.out is only created when tomcat is running on unix. - Jim -Original Message- From: Fred Yu [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 12, 2004 10:49 AM To: [EMAIL PROTECTED] Subject: Where is Catalina.out? Hi I just downloaded and unpacked tomcat 5.0.28 to window 2000 machine. I deployed my web war file and am able to run it through window explorer. But I can not find Catalina.out file under logs directory. The tomcat is in default configuration. Can anyone tell me why? Cheers Fred The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorized. If you are not an intended recipient, please notify the sender of this email immediately. You should not copy, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: url-pattern/*.jsp/url-pattern
Well, I am developping a site I would like to block entry to. However, my .css file is also in this directory, so having a pattern of /* also blocks access to my css, making the site very ugly to see. I have tried the following, with no result: .jsp (no result), jsp (no result), *.jsp (app fails to start) I haven't tried such thing such as regex.. I haven't seen that anywhere... Woudl something like /\.jsp$\ work? Thanks Fred Quoting Peter Johnson [EMAIL PROTECTED]: url-pattern*.jsp/url-pattern But I think that you'll find that this is defined in the core web.xml to go to the JSP servlet. What are you trying to achieve? On Thu, 2004-10-07 at 15:22, Fred Blaise wrote: any possible way i can achieve this in my web.xml ? Bc it wont the app won't start with this... (tomcat 5.0.28) url-pattern/*.jsp/url-pattern thanks fb. - 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]
web.xml - security-constraint oddity/problem
Hello I am running apache 2.0.46 with SSL with tomcat/mod_jk2, white box linux. I do not have tomcat running SSL on 8443. So I have this issue with my app... I am securing my app with the security-constraint tag in web.xml (connected to mysql backend), it works perfectly with the url-pattern/clients.jsp/url-pattern. clients.jsp is a https:// uri, therefore my apache SSL is handling it, and so is the remaining of the session (?). However, if i throw url-pattern/index.jsp/url-pattern, which is a http:// uri, then tomcat tries to connect to port 8443 (instead of 443), where of course it fails miserably since nothing is running there. I guess my question is, why is tomcat trying to get to port 8443, when none of my uri point to https://myhost:8443, but simply to https://myhost (which should be handled on port 443 by my apache ssl)? I don't know if i have been very clear... I always suck at explaining my pb :P Please ask me if I can clarify Thanks a lot Best Regards Fred ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- Beginning of web.xml deployment descriptor -- security-constraint web-resource-collection web-resource-nameClient login/web-resource-name url-pattern/clients.jsp/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-nameclients/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/login.jsp/form-login-page form-error-page/loginError.jsp/form-error-page /form-login-config /login-config security-role role-nameclients/role-name /security-role /web-app - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[SOLVED] Re: web.xml - security-constraint oddity/problem
Well, that was an easy fix... I just changed the redirect port of the Coyote/JK2 AJP 1.3 Connector on port 8009, to 443 instead of 8443... :) Fred On Wed, 2004-10-06 at 22:56 -0500, Fred Blaise wrote: Hello I am running apache 2.0.46 with SSL with tomcat/mod_jk2, white box linux. I do not have tomcat running SSL on 8443. So I have this issue with my app... I am securing my app with the security-constraint tag in web.xml (connected to mysql backend), it works perfectly with the url-pattern/clients.jsp/url-pattern. clients.jsp is a https:// uri, therefore my apache SSL is handling it, and so is the remaining of the session (?). However, if i throw url-pattern/index.jsp/url-pattern, which is a http:// uri, then tomcat tries to connect to port 8443 (instead of 443), where of course it fails miserably since nothing is running there. I guess my question is, why is tomcat trying to get to port 8443, when none of my uri point to https://myhost:8443, but simply to https://myhost (which should be handled on port 443 by my apache ssl)? I don't know if i have been very clear... I always suck at explaining my pb :P Please ask me if I can clarify Thanks a lot Best Regards Fred ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- Beginning of web.xml deployment descriptor -- security-constraint web-resource-collection web-resource-nameClient login/web-resource-name url-pattern/clients.jsp/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-nameclients/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/login.jsp/form-login-page form-error-page/loginError.jsp/form-error-page /form-login-config /login-config security-role role-nameclients/role-name /security-role /web-app - 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]
url-pattern/*.jsp/url-pattern
any possible way i can achieve this in my web.xml ? Bc it wont the app won't start with this... (tomcat 5.0.28) url-pattern/*.jsp/url-pattern thanks fb. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get tomcat 5.5.1 to re-start
Check the archives for this list. Yoav Shapira and Remy Maucherat answered this question just the other day. Remy explained a bit and pointed us to: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html which explains more. --Fred -- Fred Stluka -- mailto:[EMAIL PROTECTED] -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! -- Steve R. Burrus wrote: Can anyone/anybody please tell me just how exactly I can go about getting Tomcat version 5.5.1 to re-start it's context???!! It doesn't seem to wanna do it thru the old method of editing the server.xml file with DefaultContext reloadable=true /!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: why is tomcat-users.xml rewritten ?
I've just searched the archives and it seems that this question comes up every few months at least. The behavior of rewriting tomcat-users.xml and changing its permissions to match the Tomcat umask surprises enough people that it seems worth changing if possible. I put a lot of faith in the principal of least astonishment. My understanding is that the only reason for the rewrite is to confirm that the Tomcat admin app will have write access to the tomcat-users.xml file if the admin app is ever used. Two questions: 1. Why not use java.io.File.canWrite()? It confirms the ability to rewrite the file without actually doing so. Works fine on both Linux and Windows 2000, so I assume it is a fully portable solution. 2. Couldn't the rewrite be deferred until necessary? Perhaps when the admin app accepts a valid login? Or when a user tries to use the admin app to modify the tomcat-users.xml file? Why check so far in advance? There is always the risk that the permissions could be modified manually after the check at startup, and before the admin app actually needs to write, so the admin app must be prepared for failure anyhow. Why not just have it check when it needs to and report the error to the user then? --Fred -- Fred Stluka -- mailto:[EMAIL PROTECTED] -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! -- Steffen Heil wrote: Hi Each time tomcat is restarted the file tomcat-users.xml is rewritten. It is horrible since my umask being 0022 the file which stores passwords become world readable. Obviously this file has to be read my the server but I do not see any valuable reason to write it back opening a serious security hole. PLEASE, search the archive of this list before mailing. This question, including some ways around it have been on the list recently. See also posting of Yoav below. Regards, Steffen -Ursprüngliche Nachricht- Von: Shapira, Yoav [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 15. September 2004 20:48 An: Tomcat Users List Betreff: RE: Why does startup of Tomcat 5.0.28 server make tomcat-users.xml world-readable?... Hi, However, I still wonder: 1. Why does Tomcat re-write the tomcat-users.xml file at startup? This I already answered: Tomcat rewrites the tomcat-users.xml at startup to ensure it has permissions on it, because the admin webapp must have these permissions to allow editing of user information. 2. Why does it use the umask value instead of just leaving the protections as they were before it updated the file? This is the java.io.File default behavior: we don't modify anything and don't want to have platform-specific or native code in Tomcat. If you look at the java.io.File JavaDoc, you'll see there's no portable way to control this. 3. Isn't this a problem for most Tomcat installations, since without the umask I had applied to my tomcat user, the default umask is 002, not 022, so the tomcat-users.xml file would be changed to 664, not merely 644, at each startup? Seems like the default Tomcat behavior introduces a security risk. Judging by the fact this is raised about once a year on the mailing list, I'd say the majority of people don't care. Secure installations take care with their umasks from the beginning, so for them this is not an issue. Yoav - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why does startup of Tomcat 5.0.28 server make tomcat-users.xml world-readable?...
Anyone know why starting the Tomcat 5.0.28 server on Linux makes the configuration file tomcat-users.xml world-readable? I had it set to permissions 600, but starting the server changes it to 644. This seems like a security hole since any user of the system can read the plaintext passwords. Any thoughts? Thanks! --Fred -- Fred Stluka -- mailto:[EMAIL PROTECTED] -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why does startup of Tomcat 5.0.28 server make tomcat-users.xml world-readable?...
Yoav, I have created a Linux user specifically to run Tomcat. That user is the owner of the entire Tomcat directory tree, including the tomcat-users.xml file. The Tomcat server process is running as that user. I agree that that 600 should be sufficient for Tomcat to read and write the file. No, I have not yet configured a security manager. This is pretty much Tomcat 5.0.28 with minimal configurations. --Fred -- Fred Stluka -- mailto:[EMAIL PROTECTED] -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! -- Shapira, Yoav wrote: Hi, Tomcat needs to change the file so that it (the Tomcat process) can (over)write it (the tomcat-users.xml file). But you would think chmod u+w or g+w would be sufficient, not chmod o+w. Are you running with a security manager? Yoav Shapira Millennium Research Informatics - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why does startup of Tomcat 5.0.28 server make tomcat-users.xml world-readable?...
Yoav, Good idea. My tomcat user currently has a umask setting of 022. If I change it to 077, or even 066, the tomcat-user.xml file is still re-written at server startup, but it's protections are set to 600 as I wanted, not 644. This is an acceptable workaround for my immediate problem. Thanks! Hmmm... I wonder if other files created by Tomcat (like the server log files) will now be 600 also? I liked having them world-readable. However, I still wonder: 1. Why does Tomcat re-write the tomcat-users.xml file at startup? 2. Why does it use the umask value instead of just leaving the protections as they were before it updated the file? 3. Isn't this a problem for most Tomcat installations, since without the umask I had applied to my tomcat user, the default umask is 002, not 022, so the tomcat-users.xml file would be changed to 664, not merely 644, at each startup? Seems like the default Tomcat behavior introduces a security risk. --Fred -- Fred Stluka -- mailto:[EMAIL PROTECTED] -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! -- Shapira, Yoav wrote: Hi, What if you set the umask for that user to not have world-readable files? My guess is Tomcat simply uses the umask of the user that's running the JVM. Yoav Shapira Millennium Research Informatics -Original Message- From: Fred Stluka [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 1:51 PM To: Tomcat Users List Subject: Re: Why does startup of Tomcat 5.0.28 server make tomcat-users.xml world-readable?... Yoav, I have created a Linux user specifically to run Tomcat. That user is the owner of the entire Tomcat directory tree, including the tomcat-users.xml file. The Tomcat server process is running as that user. I agree that that 600 should be sufficient for Tomcat to read and write the file. No, I have not yet configured a security manager. This is pretty much Tomcat 5.0.28 with minimal configurations. --Fred --- --- Fred Stluka -- mailto:[EMAIL PROTECTED] -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! --- --- Shapira, Yoav wrote: Hi, Tomcat needs to change the file so that it (the Tomcat process) can (over)write it (the tomcat-users.xml file). But you would think chmod u+w or g+w would be sufficient, not chmod o+w. Are you running with a security manager? Yoav Shapira Millennium Research Informatics - 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: Why does startup of Tomcat 5.0.28 server make tomcat-users.xml world-readable?...
OK. Thanks! --Fred -- Fred Stluka -- mailto:[EMAIL PROTECTED] -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! -- Shapira, Yoav wrote: Hi, However, I still wonder: 1. Why does Tomcat re-write the tomcat-users.xml file at startup? This I already answered: Tomcat rewrites the tomcat-users.xml at startup to ensure it has permissions on it, because the admin webapp must have these permissions to allow editing of user information. 2. Why does it use the umask value instead of just leaving the protections as they were before it updated the file? This is the java.io.File default behavior: we don't modify anything and don't want to have platform-specific or native code in Tomcat. If you look at the java.io.File JavaDoc, you'll see there's no portable way to control this. 3. Isn't this a problem for most Tomcat installations, since without the umask I had applied to my tomcat user, the default umask is 002, not 022, so the tomcat-users.xml file would be changed to 664, not merely 644, at each startup? Seems like the default Tomcat behavior introduces a security risk. Judging by the fact this is raised about once a year on the mailing list, I'd say the majority of people don't care. Secure installations take care with their umasks from the beginning, so for them this is not an issue. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Home page Administration and Manager links
look under $CATALINA_HOME/server/webapps. Copy manager to the $CATALINA_HOME/webapps, and change its context path in manager.xml, and add this directory to your workers2.properties. That's how i got it to run. Hope it helps. fb. On Wed, 2004-09-15 at 12:54 -0500, Pamela Stangl wrote: I just un-tarred the binaries for Tomcat 4.1.30 and easily got it to run. So I'm able to bring up the default Tomcat home page. But when I select the link for Tomcat Administration or Tomcat Manager under Administration, I get 404 errors. The Tomcat Administrtaion link is looking for /admin and the Tomcat Manager link is looking for /manager/html .Neither the /admin or /manager directories exist. Any help would be appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
Re: Home page Administration and Manager links
ahh.. and mine was under tomcat 5.0.28... didn't read careflully enough. Don't know if it will apply to 4.x. fb. On Wed, 2004-09-15 at 12:54 -0500, Pamela Stangl wrote: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem rendering JSP 2.0 examples on Tomcat install
it seems like you're passing the wrong argument to the function... method: _jspx_meth_mytag_helloWorld_0 signature: (Ljavax/servlet/jsp/PageContext;)Z) Incompatible argument to function code? fb. On Wed, 2004-09-15 at 17:22 -0600, Luke FERNANDEZ wrote: Incompatible argument to function - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
basic FORM-based authentication failing
Hello all I have been trying to set up FORM based authentication, but it only works half-way. When I try to get to the protected resource, it sends me to the login page: good. If I authenticate incorrectly, then it sends me to the login error page: good. If I authenticate _correctly_, it also sends me to the login error page: bad. I have been reading at jakarta.apache.org, and in JSP Servlets cookbook, and I don't know what I am doing wrong. Please find the config files below. My form uses the j_user_name, j_password and so forth. I have reloaded the app and restarted tomcat. Thank you for any help/pointers... fb. --tomcat-users.xml (truncated...) user username=joedoe password=1joe2 roles=clients/ --end tomcat-users.xml --web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- Beginning of web.xml deployment descriptor -- security-constraint web-resource-collection web-resource-nameClient login/web-resource-name url-pattern/clients/index.jsp/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-nameclients/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/login.jsp/form-login-page form-error-page/loginError.jsp/form-error-page /form-login-config /login-config security-role role-nameclients/role-name /security-role /web-app --end web.xml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [SOLVED] basic FORM-based authentication failing
Awful typo... works much better when j_user_name is spelled j_username Issue resolved. Thanks. fb. Quoting Fred Blaise [EMAIL PROTECTED]: Hello all I have been trying to set up FORM based authentication, but it only works half-way. When I try to get to the protected resource, it sends me to the login page: good. If I authenticate incorrectly, then it sends me to the login error page: good. If I authenticate _correctly_, it also sends me to the login error page: bad. I have been reading at jakarta.apache.org, and in JSP Servlets cookbook, and I don't know what I am doing wrong. Please find the config files below. My form uses the j_user_name, j_password and so forth. I have reloaded the app and restarted tomcat. Thank you for any help/pointers... fb. --tomcat-users.xml (truncated...) user username=joedoe password=1joe2 roles=clients/ --end tomcat-users.xml --web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- Beginning of web.xml deployment descriptor -- security-constraint web-resource-collection web-resource-nameClient login/web-resource-name url-pattern/clients/index.jsp/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-nameclients/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/login.jsp/form-login-page form-error-page/loginError.jsp/form-error-page /form-login-config /login-config security-role role-nameclients/role-name /security-role /web-app --end web.xml - 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]
apache ssl or tomcat ssl?
Hello Tomcat newbie over here.. I was wondering.. I have my apache server set up to handle SSL (443) and my tomcat (5.0.28) as well on port 8443. Is there any reason why I should use the Tomcat SSL, whereas I already have apache SSL? Only thing I see at the moment is that some places (like my company) block outbound ports, so I am able to get to my 443 port, but not 8443. Thanks. fb. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Customizing BASIC authentication
Hi, Thanks to you both, but my question is not so much about how to get the user name in the request. Instead, it's this: I need to use basic authentication (i.e. the browser pops up the login), but then I need to run custom code to actually check the login and password with an internal system, instead of the usual options available out of the box (memory realms, jdbc realms, etc.) I thought at first I would need a custom realm, but several messages on this list gave me the impression that a realm can't really affect the request/response. I need to not only do custom authentication, but the response will also be completely customized to the user who logs in. I'm still learning here, but realms seem to be too limited, valves seem to be too complex for the job. Is there a simple middle ground? Thanks again, Fred At 02:41 PM 8/16/2004 -0400, you wrote: Someone please correct me if I'm wrong here... Also be aware that non-protected pages will not provide you with a value to request.getRemoteUser(). I had assumed I could get the remote user from any page once the user logged in, but it doesn't work as I expected. I believe there *was* a bug report over on the TC bugzilla system and the response I remember was that the system was working as designed. Bob On Saturday 14 August 2004 12:13 am, Jacob Kjome wrote: You can use request.getRemoteUser() to obtain the username. The password is not really accessible except by examining the http headers. Jake At 11:21 PM 8/13/2004 -0400, you wrote: Hi all, I've been spending the last few hours reading about realms, valves, authenticators and the like, and I'm totally confused. I'm hoping if I describe my situation, someone can help me cut through the fog. I'm working on a simple web app that will feed custom RSS XML to clients that must use basic authentication. In my application, I need to do more than just look up users somewhere. Instead, the login/password values returned via basic authentication headers will be used in some fairly complex ways to both authenticate and then construct the custom response. What is the simplest way to customize basic authentication in Tomcat 4? It seems that realms are not the way to go, since they just handle authentication and have nothing to do with the request/response. Valves/authenticators seem like overkill. Form based authentication is not an option. Can I have Tomcat manage basic authentication headers but pass the login/password values to my code? And can I then have access to that information in the servlet that creates the response? Many thanks, Fred - 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]
Customizing BASIC authentication
Hi all, I've been spending the last few hours reading about realms, valves, authenticators and the like, and I'm totally confused. I'm hoping if I describe my situation, someone can help me cut through the fog. I'm working on a simple web app that will feed custom RSS XML to clients that must use basic authentication. In my application, I need to do more than just look up users somewhere. Instead, the login/password values returned via basic authentication headers will be used in some fairly complex ways to both authenticate and then construct the custom response. What is the simplest way to customize basic authentication in Tomcat 4? It seems that realms are not the way to go, since they just handle authentication and have nothing to do with the request/response. Valves/authenticators seem like overkill. Form based authentication is not an option. Can I have Tomcat manage basic authentication headers but pass the login/password values to my code? And can I then have access to that information in the servlet that creates the response? Many thanks, Fred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Force encode URL to put session id on URL
Hi all, I have been struggling with a configuration issue. I need to force the encodeURL method and c:url tag lib to put the session id on the url even if the browser has cookies enabled. This is how I did it when I was using the Resin container: session-config enable-cookies='false' enable-url-rewriting='true'/ Would anyone know how to do this with tomcat 5.0.27? Thanks in advance, Fred. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
No hot deploy possible for ROOT context app?
Hi all, I've been working on setting up an application in the root context, meaning I configure it via this in server.xml: Context path= docBase=/path/to/my/war debug=0 / This works fine, and my application gets loaded properly at tomcat start-up. I just want to make sure I'm not missing any tricks. This approach seems to eliminate the possibility of hot deploy, right? Meaning, any time I change my war file, I need to restart tomcat? Next I will try an expanded war and reloadable classes, but any comments would be appreciated. This is 4.1.29 under jboss. Thanks, Fred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: forwarding across contexts?
Thanks once again. This is very helpful. Now here's what I really want (it never ends, does it): Is there a way, within a single context, to separate out the static content to some other file system location. I'd like to be able to deploy my war file with library jars, configuration info, classes, etc., into the safe location within the jboss deploy directory. But, I'd like to have all of my static content (again, /images/whatever.gif) elsewhere on the file system. I believe that Yoav's suggestion is that I set up the empty path () context for this purpose. However, this is where I started, and Justin argued against this cross-context approach. So is there a way to accomplish this separation within a single context? Many, many thanks. It's amazing how, even with a stack of books and google and jakarta and all, there's no substitute for talking with people. Fred At 07:37 AM 5/11/2004, you wrote: Hi, In short, how does one deploy a war file such that it looks for content (/images/whatever.gif) in a configurable location in the file system? Configure the server to serve that WAR file with a context path of (the empty string). This can be done in tomcat in three ways: - Add a Context entry in conf/server.xml whose path= and docBase is your WAR - Add an xml file with the Context tag to conf/[engine name]/[host name] (same path and docBase) - Put same XML file as above in your WAR file's META-INF directory instead of under the conf directory (tomcat 5 only). 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]
RE: forwarding across contexts?
Yoav, Let me describe a bit about our application, just in case you (or anyone else) have some specific advice. My client is a publisher, and the bulk of the site will be many thousands of published articles and associated content such as figure, tables, etc. The HTML content, however, will be served by tomcat, since it has some dynamic components. This is why it's not practical to bundle everything into a war file. Instead, I need tomcat to point to the file system where many users will be building the site. On the other hand, the war file can easily contain the java infrastructure (struts, velocity, configuration information, etc.). I'd like to be able to keep the small war file, hot deploy, etc., but have the raw content (static and otherwise) live elsewhere. Given that, would you solve it with multiple contexts? Or do you have another suggestion? Thanks again, Fred At 10:08 AM 5/11/2004, you wrote: Hi, Is there a way, within a single context, to separate out the static content to some other file system location. Of course, there are many ways, none of them advised. You want to keep your webapp as a whole, that's the whole point of a WAR file. You can symlink (at the filesystem level) or use normal HTTP linking to access your static content. But you can't symlink in a WAR, so... I believe that Yoav's suggestion is that I set up the empty path () context for this purpose. However, this is where I started, and Justin argued against this cross-context approach. And I agree with Justin, just to be clear. I wasn't advocating anything different from what he said, just showing you that it can technically be done. If crossContext forwards are the worst design choices on this list, we'll be in great shape. 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]
RE: forwarding across contexts?
Justin, Thanks again for taking the time to think about this with me. Alas, my customer's deployment platform is windows. So no symlinks. No Apache (they use IIS). Complicated security model for everything on the site except for decorative gifs. So Tomcat does it all! Thanks, Fred At 03:13 PM 5/11/2004, you wrote: Fred, Thanks for the additional info about your app ... it makes it much easier to talk about these things. :) There are many (valid) ways to proceed, many of which vary in the amount of standards they adhere to (how much you want to align yourself with Tomcat). I'll just give you my thoughts. At 09:02 AM 5/11/2004, you wrote: Let me describe a bit about our application, just in case you (or anyone else) have some specific advice. My client is a publisher, and the bulk of the site will be many thousands of published articles and associated content such as figure, tables, etc. The HTML content, however, will be served by tomcat, since it has some dynamic components. The biggest question, then, has to do with your security requirements. Specifically, does this content need to be protected or can it just sit out there for anyone to grab? If it need not be protected, this is, IMHO, a textbook example of when to use Apache. You've got a large collection of static data and a relatively small web application associated with it. You've probably got different groups working on the different parts (the publisher's content and the HTML pages), so it makes sense to separate it out and serve the static content by generating links to your static web server's content from your dynamic HTML. Additionally, you could then put the two pieces on separate machines (one or more with Apache, one or more with Tomcat) to keep them separated even more cleanly. If the content needs to be protected, I would create a separate directory and put the content there. Symlink this to the base of your Tomcat webApp and let Tomcat serve it normally, employing whatever security scheme you're using. You won't be able to deploy the entire thing as a single WAR, but it doesn't sound like you really care to do this anyways. This is why it's not practical to bundle everything into a war file. Instead, I need tomcat to point to the file system where many users will be building the site. On the other hand, the war file can easily contain the java infrastructure (struts, velocity, configuration information, etc.). I'd like to be able to keep the small war file, hot deploy, etc., but have the raw content (static and otherwise) live elsewhere. Given that, would you solve it with multiple contexts? Or do you have another suggestion? Alternately, you could extend the DefaultServlet (if you don't mind tying yourself to Tomcat and your version) with your own custom static content servlet that gets data from an arbitrary directory. If you can't be tied to Tomcat, use the source as a base to write your own default servlet. This solution is more on the slick side of things, so it wouldn't be preferable ... better to stay within the mainstream boundaries. If you can, look into symlinking or Apache. Consider the extend/impl DefaultServlet idea. If you're still not satisfied, having two separate contexts can be made to work. Perhaps others have additional ideas. Fred Good luck, justin At 10:08 AM 5/11/2004, you wrote: Hi, Is there a way, within a single context, to separate out the static content to some other file system location. Of course, there are many ways, none of them advised. You want to keep your webapp as a whole, that's the whole point of a WAR file. You can symlink (at the filesystem level) or use normal HTTP linking to access your static content. But you can't symlink in a WAR, so... I believe that Yoav's suggestion is that I set up the empty path () context for this purpose. However, this is where I started, and Justin argued against this cross-context approach. And I agree with Justin, just to be clear. I wasn't advocating anything different from what he said, just showing you that it can technically be done. If crossContext forwards are the worst design choices on this list, we'll be in great shape. 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
forwarding across contexts?
Hi, I'm trying to install a filter into the default context that forwards to my application (in another context) and it doesn't seem to want to work. (jboss 3.2.3 with embedded tomcat 4.1.29) In researching this, I've seen various hints that this may in fact be illegal. Can anyone confirm? The REASON I want to do this is that I want to be able to take advantage of simple URLS with the default context, as in /images/whatever.gif, and have them be served by DefaultServlet, which conveniently knows how to handle all that sort of stuff, set mime types, etc. I'm also hoping that DefaultServlet was written by someone more clever than me! But, I also want to capture certain simple URLs and forward these to another context. As in /protected.html needs to be forwarded to /accesscheck/protected.html or similar. Am I on the wrong track here? Is it possible to forward (via RequestDispatcher) from one context to another? If not, how can I take advantage of DefaultServlet in my application? Many thanks, Fred Toth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: forwarding across contexts?
Justin, Thanks very much for your considered reply. You both solved my problem and made me question my approach at the same time. In re-thinking this in terms of separated webapps, I've hit another issue. If I solve this problem within one particular web application, I have to be able to point this webapp to another place in the file system (other than $CATALINA_HOME/webapp). I had figured out how to do that with the ROOT application, but I'm not sure how to do this within a war file. In short, how does one deploy a war file such that it looks for content (/images/whatever.gif) in a configurable location in the file system? If I can figure that out, I think I can abandon the cross-context issue for good! Thanks, Fred At 10:23 PM 5/10/2004, you wrote: At 07:04 PM 5/10/2004, you wrote: Hi, I'm trying to install a filter into the default context that forwards to my application (in another context) and it doesn't seem to want to work. (jboss 3.2.3 with embedded tomcat 4.1.29) In researching this, I've seen various hints that this may in fact be illegal. Can anyone confirm? It is generally good design practice to limit interactions between your webapps except for strongly defined specific interfaces that promote modularity. Doing something like you're suggesting will likely lead to messy, difficult code to work with ... not because it's a necessarily bad design idea, but rather because the premise behind J2EE is that code bases are designed, coded, deployed, and maintained as independent applications. They're not meant to ineroperate in a fluid way. It's possible to do what you're suggesting, but not recommended. The REASON I want to do this is that I want to be able to take advantage of simple URLS with the default context, as in /images/whatever.gif, and have them be served by DefaultServlet, which conveniently knows how to handle all that sort of stuff, set mime types, etc. I'm also hoping that DefaultServlet was written by someone more clever than me! Resources need not be within the ROOT web application to be served by the DefaultServlet. You'll notice that the DefaultServlet is defined within the global web.xml (I haven't worked with recent versions of jBoss, so I'm not sure exactly where they put this these days), which means that all applications inherit it. This means that resources like /images/whatever.gif and /mywebapp/images/whatever.gif will both be served by the DefaultServlet unless you configure it otherwise. But, I also want to capture certain simple URLs and forward these to another context. As in /protected.html needs to be forwarded to /accesscheck/protected.html or similar. Am I on the wrong track here? Is it possible to forward (via RequestDispatcher) from one context to another? If not, how can I take advantage of DefaultServlet in my application? See ServletContext#getContext(String). Again, I predict you'll find this to be a clunky and frustrating way to do things. Unless you have an over-riding reason to do otherwise, embrace the idea of separate and distinct web applications and let the container do this URL parsing and forwarding for you. Many thanks, Fred Toth Good luck, justin - 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 Editors
What do people use to edit JSPs? I'm after an editor, free if possible, to run on windows, with syntax colouring and possibly auto complete for java. Have tried vim for windows, but it doesn't seem as nice on windows as it is on linux. You may want to look at Eclipse. http://www.eclipse.org It is a good IDE with CVS support, and debugging and a wide range of plugins. However like most IDEs, it falls drastically short in the task of text editing which is what I do most of the time, and thus I still am faster using vim. If you are used to Emacs, there is a good emacs plugin for eclipse. Good Luck. = Fred Pope Satcom Resources mailto:[EMAIL PROTECTED] http://www.satcomresources.com (970)-748-3094 (866)-SATCOM1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JBoss Mapping
You could try to run your jboss server by doing a $JBOSS_HOME/bin/run.sh and then tail -f $JBOSS_HOME/jboss.log and you should see whether or not the jboss server starts up correctly. Then you should be able to get to http://your.domain.extension:8080/jmx-console/ Good luck. I need to know how to configure a context in JBoss I try to see if the server is up but I got the following error when I try to open a file HTTP Status 500 - No Context configured to process this request Sounds like is running. Try putting a .war file in /$JBOSS_HOME/server/default/deploy/ = Fred Pope Satcom Resources mailto:[EMAIL PROTECTED] http://www.satcomresources.com (970)-748-3094 (866)-SATCOM1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HOW CAN I USE THREADS IN TOMCAT
I would also add that unless you have a particular need to embed this in a specific Servlet, it might make more sense to add this thread to a context listener handler. For example, if I wanted to send out email to 1000 people (not Spam, of course! ;-) and I initiated this from within a Servlet, in this case I'd add a thread to the Servlet and let the Servlet return while the email was still going out. This assumes I handle any errors in some other way than displaying the results on the page. On the other hand, if I wanted to, perhaps, clean-up some temporary data within a database every so often, and I wanted to include this funcitonality within a Web app rather than in a separate application that I run from the CL via Cron every now and then, I'd probably implement this within a context listener handler so that the thread starts up when the Web app starts up and continues utnil the Web app shuts down. Just a thought! -Fred Whipple iMagine Internet Services -Original Message- From: Erik Wright [mailto:[EMAIL PROTECTED] Sent: Saturday, November 01, 2003 11:03 AM To: Tomcat Users List Subject: Re: HOW CAN I USE THREADS IN TOMCAT A servlet is just a Java class. You can do anything you can do with the java language, including start threads. The following starts a thread that runs some task every 10 minutes. The thread is started in the servlet init method. I choose to set the thread to daemon mode, meaning that when the main thread of execution shuts down the mailer thread will automatically be killed. Otherwise you need to be sure to keep track of it and be sure to signal it to shutdown in your Servlet.destroy method. public class MyServlet extends HttpServlet { private static class MailerThread extends Thread { public void run () { while (true) { // do something synchronized (this) { wait (10*60*1000); } } } } // the servlet init method public void init () { MailerThread thread = new MailerThread (); thread.setDaemon (true); thread.start (); } // ... doGet, etc. ... } -Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat servlet-mapping
Hello guys! Is there anybody who could give me an advice in servlet-mapping? I got a web application which consists of a ControllerServlet which should handles all incoming request´s except 2 static html files (index.html which is an welcome file and abc.html)! First I mapped it like this: servlet-mapping servlet-nameController/servlet-name url-pattern//url-pattern /servlet-mapping but then the static html files are not reachable How could i configure my web.xml , that all requests besides index.html and abc.html are mapped to the ControllerServlet? Greets Fred _ Frustrated with dial-up? Get high-speed for as low as $29.95/month (depending on the local service providers in your area). https://broadband.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 4.03 wont start
I'm running tomcat 4.03 under windows 2000. Yesterday it worked just fine; today it won't start. just flashes the dos window for a second and dies. No log generated. I even reinstalled. I made no changes to tomcat, was working on jboss stuff the last few days. do not have jboss running now since I use it for a different project. checked JAVA_HOME, TOMCAT_HOME, CATALINA_HOME and they are fine. Any ideas. please replay all since I am not subscribed to this list.
Re: Tomcat and multiple processors
Just one TC is enough, just run it with different CATALINA_BASES. each base needs the following directories: $CATALINA_BASE/conf - configuration files $CATALINA_BASE/work $CATALINA_BASE/temp $CATALINA_BASE/logs i've made a little script like this: (bash script) for DIR in * ; do SITE=`expr $SITES : $dirname'/\(.*\)-server.xml$'` $TOMCAT_SCRIPT -thread $SITE $@ done At 08:40 05/09/03, you wrote: It would be nice :) - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, September 05, 2003 12:07 AM Subject: Re: Tomcat and multiple processors (1) Install TC as many times as you need JVM instances; (2) for each instance, rename home before proceeding with another installation eg. CATALINA_HOME_tc1=/path/to/tc1 CATALINA_HOME_tc2=/path/to/tc2 etc (3) for each inctance rename respective startup scripts eg startup_tc1.sh or catalina_tc1.sh startup_tc2.sh etc (4) modify workers.properties to include the loadbalancer worker eg worker.loadbalancer.type=lb worker.loadbalancer.balanced_worker=myTC1, myTC2, myTC3,... etc (5) go through your configuratioo fles to ensure consisency in re-naming worker to loadbalancer (6) should you need to tie a vhost to a specific JVM or box then instead of loadbalancer, use a worker eg myTC1 eg. (httpd.conf) VirtualHost 192.16.100.10:80 ServerName dodgy.programmer.com.hk ... JkMount /goodClass loadbalancer JkMount /goodClass/* loadbalancer JkMount /dodgyClass myTC1 JkMount /DodgyClass/* myTC1 /VirtualHost (7) In server.xml, ensure you have the corresponding virtual host and docbase (8) In web.xml, likewise ensure you have the corresponding mappings. Yoav, John, tomcat-people, if this is correct, do you need someone to write a howto ? Pitre, Russell wrote: Hey people.. Where can i find more information on the web about this subject, specifically setting up multiple jvm's tied to it's respective tomcat installation? Doesn't have to include multiple processors I'm very interested in this subject, basically, just curious as to how it all works :) Thanx in advance! Russ -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 4:16 PM To: Tomcat Users List Subject: Re: Tomcat and multiple processors Matt Raible wrote: 1. Does it support multiple processors? We have a Tomcat instance in production on a NT box with 4 processors, but Tomcat only seems to use one. Does the 1.4.2 JVM support MP? Yes, at least on Sun hardware with Solaris 8, and Intel hardware with RH Linux 7.x (duals only...we don't have quads). Don't know about Windows. 2. We have IIS on the front end, and we are currently not able to migrate to Apache. We'd like to use the connectors (jk or jk2) to do load-balancing and failover. Do these connectors provide the support we need? Should be use a clustering architecture like JavaSpaces (http://www.onjava.com/lpt/a/2422) instead? The connectors can load balance, but unfortunately the IIS versions are sort of a crapshoot in my mind. 3. We plan on deploying 42+ applications to a number of Tomcat servers. Since each application will support 1 customer - I think it's a good idea to have 1 app - 1 tomcat - so if Tomcat crashes, it only affects that customer - rather than all customers. I've heard of setting up a CATALINA_BASE to share Tomcat's core files, and then setup webapps directories for each customer. Does this sound reasonable? Have have others done something like this? I agree with Yoav. All the way back with Tomcat 3.1 we had ours setup this way: 1 virtual host = 1 Tomcat instance = 1 VM = 1 application We've had a couple dozen set up like this for a long time, works like a charm. I prefer this over using CATALINA_BASE, as I can treat each virtual host separately from any other, including giving each different JVM memory settings, etc. Admittedly, we're an ASP, so we can dictate how many web apps go with each virtual host, but I would think having completely separate Tomcat instances would make sense in most real production environments. The only thing you lose with multiple Tomcat instances is disk space, and disk is cheap. John -There are 10 types of people when it comes to binary, those that understand it.. and those who don't. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and multiple processors
Sorry for that last mail, accidently sent the file. Here is the normal one Just one TC is enough, just run it with different CATALINA_BASES. each base needs the following directories: $CATALINA_BASE/conf - configuration files $CATALINA_BASE/work $CATALINA_BASE/temp $CATALINA_BASE/logs i've made a little script something like this: (bash script) for DIR in * ; do if [ -d $DIR ] ; then CATALINA_BASE=$DIR CATALINA_PRG start fi done (not exactly, because i have different versions running with different.) fred At 08:40 05/09/03, you wrote: It would be nice :) - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, September 05, 2003 12:07 AM Subject: Re: Tomcat and multiple processors (1) Install TC as many times as you need JVM instances; (2) for each instance, rename home before proceeding with another installation eg. CATALINA_HOME_tc1=/path/to/tc1 CATALINA_HOME_tc2=/path/to/tc2 etc (3) for each inctance rename respective startup scripts eg startup_tc1.sh or catalina_tc1.sh startup_tc2.sh etc (4) modify workers.properties to include the loadbalancer worker eg worker.loadbalancer.type=lb worker.loadbalancer.balanced_worker=myTC1, myTC2, myTC3,... etc (5) go through your configuratioo fles to ensure consisency in re-naming worker to loadbalancer (6) should you need to tie a vhost to a specific JVM or box then instead of loadbalancer, use a worker eg myTC1 eg. (httpd.conf) VirtualHost 192.16.100.10:80 ServerName dodgy.programmer.com.hk ... JkMount /goodClass loadbalancer JkMount /goodClass/* loadbalancer JkMount /dodgyClass myTC1 JkMount /DodgyClass/* myTC1 /VirtualHost (7) In server.xml, ensure you have the corresponding virtual host and docbase (8) In web.xml, likewise ensure you have the corresponding mappings. Yoav, John, tomcat-people, if this is correct, do you need someone to write a howto ? Pitre, Russell wrote: Hey people.. Where can i find more information on the web about this subject, specifically setting up multiple jvm's tied to it's respective tomcat installation? Doesn't have to include multiple processors I'm very interested in this subject, basically, just curious as to how it all works :) Thanx in advance! Russ -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 4:16 PM To: Tomcat Users List Subject: Re: Tomcat and multiple processors Matt Raible wrote: 1. Does it support multiple processors? We have a Tomcat instance in production on a NT box with 4 processors, but Tomcat only seems to use one. Does the 1.4.2 JVM support MP? Yes, at least on Sun hardware with Solaris 8, and Intel hardware with RH Linux 7.x (duals only...we don't have quads). Don't know about Windows. 2. We have IIS on the front end, and we are currently not able to migrate to Apache. We'd like to use the connectors (jk or jk2) to do load-balancing and failover. Do these connectors provide the support we need? Should be use a clustering architecture like JavaSpaces (http://www.onjava.com/lpt/a/2422) instead? The connectors can load balance, but unfortunately the IIS versions are sort of a crapshoot in my mind. 3. We plan on deploying 42+ applications to a number of Tomcat servers. Since each application will support 1 customer - I think it's a good idea to have 1 app - 1 tomcat - so if Tomcat crashes, it only affects that customer - rather than all customers. I've heard of setting up a CATALINA_BASE to share Tomcat's core files, and then setup webapps directories for each customer. Does this sound reasonable? Have have others done something like this? I agree with Yoav. All the way back with Tomcat 3.1 we had ours setup this way: 1 virtual host = 1 Tomcat instance = 1 VM = 1 application We've had a couple dozen set up like this for a long time, works like a charm. I prefer this over using CATALINA_BASE, as I can treat each virtual host separately from any other, including giving each different JVM memory settings, etc. Admittedly, we're an ASP, so we can dictate how many web apps go with each virtual host, but I would think having completely separate Tomcat instances would make sense in most real production environments. The only thing you lose with multiple Tomcat instances is disk space, and disk is cheap. John There are 10 types of people when it comes to binary, those that understand it.. and those who don't. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: $CATALINA_BASE/temp
At 10:46 03/09/03, you wrote: Hi everybody, I'm using tomcat 4.1.27 on a Linux system. It works very well ! But I had a little problem of disk space because of the $CATALINA_BASE/temp that grows up very fast in size. In that folder I found some file s like jar_cahe*tmp. Does someone know how to limit the size of this directory ? Is there a special tomcat configuration for that Thanks, SaM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] try quota? -- F. Kreek Kamer J2-278 e-mail: [EMAIL PROTECTED] Klinische InformatieKunde tel: +31-20-566 6687 AMC - Amsterdamfax: +31-20-691 9840 Meibergdreef 15 1105 AZ Amsterdam There are 10 types of people when it comes to binary, those that understand it.. and those who don't. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk and Tomcat Lose Touch
This is what I thought, too, originally. However it wouldn't make sense since very few times do resources become *fewer* by default as software versions increase. With that in mind, and a hunch up my sleeve, I actually did some interesting testing. My test platform is my notebook, running RHL 9, 512MB RAM, Apache 1.3.27, JDK 1.4.1_03, and Tomcat 4.1.24. It's the exact same version of all software, including the kernel, that we're running on the server that's experiencing the problem. What I did was create 200 virtual hosts, 200 Tomcat instances running on 200 different ports, and tied them all together with mod_jk. I then created a test script which used 'lynx' to test a simple JSP on each virtual host and display the which JVM it was testing and what its results were. My results were *very* interesting. They are *reproducable* and *predictable*, which is at least better news than completely random! On the same software platform, where all defaults and limitations were exactly the same, the major affecting factors seem to be memory and swap, *not* any given resource within the OS itself. On the production system, this problem will not appear until it's running, say, 100 JVM's or so. The server has 2GB of RAM, 4GB of swap. On my notebook, however, it will appear with only 40 JVM's, which has 512MB of RAM and 1GB swap. Of course, when it's starting JVM's 30-40, it's doing a lot of swapping as resources are allocated. So how it turns out is as follows: If I start 1 JVM per minute, up to 40, it does just a little swapping per instance as it starts up. All JVM's up to #25 or so will work perfectly. Once you startup #26 and up, you start to lose a JVM here and there -- mod_jk will report its error and you'll never get a response. Essentially, mod_jk and the JVM lose touch. This will continue up to JVM #40 or so. Starting 1 per minute, I lost maybe 3-4 JVM's along the way. If I then start them back up, all the JVM's will work for a while, but eventually one or two will drop out again. Any more than 40 JVM's, and they all start dropping like flys. If I start all 40 JVM's 10 seconds apart, the swapping is tremendous by JVM #25, and *no* JVM will work at all after #25. Also, all the first 25 drop out as well. All of this behavior seems consistent with the behavior on the server, as well, only scaled-down. The server has 4x the RAM, so it doesn't exhibit this behavior until its memory gets full and it starts swapping processes out. I.e., if I start 100 JVM's on the server, it doesn't use any (or hardly any) swap space, and everything works perfectly. As the Web applications initiliaze, sessions are built, etc. eventually the server levels out at ~2GB of swap space being used, and this is when the problems start. This leads me to believe that the problem is with either memory not being properly allocated to mod_jk, even though there's plenty of swap available, *or* a timing issue where it tries to send a request to a JVM but for a split-second it doesn't get a response (due to paging, or whatever) and then perminently loses touch. This exact situation occurred a long time ago back in the days of JServ and mod_jserv. This is probably an issue for the developers to look at -- are there any mod_jk developers on this list? :-) I'm sure their knee-jerk reaction would be upgrade to mod_jk2 and Apache2, but this is not a practical solution for me. Thanks for any help, and for reading so far! -Fred Sounds to me like an OS resource issue. Total number of allowed open connections, etc. Since it worked on 7.x and not on 9, I would consider that a default changed somewhere, somehow. John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk and Tomcat Lose Touch
Looks like there is a mismatch between the workers.properties and the server.xml (Tomcat's config file). The server.xml sets up Tomcat. More importantly, it sets up a Connector which opens a socket connection on a defined port (Look for the Connector' section in the Service section of the server.xml). This port is what mod_jk needs to know about in the workers.properties. Some snippets from my config: ... Check out both of these files and make sure the config is setup cporrectly. It looks like either the Connector is not configured or the workers.properties does not have the right info for the workers spawned by Apache. Unfortunately it's not nearly this simple :-( Per my original post, we have ~150 Tomcat instances running, all properly configured, and 1 instance of Apache on the server. If I say, 'killall' the JVM's, and then start them back up again, everything will work perfectly. After a day or two, some of the sites will then lose their connectivity to Apache/JK. Simply restarting the JVM will fix things for a further day or two (for the sites configured to work with the JVM that I restart), thereby ruling-out a misconfiguration (though not ruling-out a possible non-optimal-configuration). Also, the same Apache 1.3.X and Tomcat 3.X and 4.X configurations worked perfectly on Red Hat 7.3, it was not until RH 9 that this began occuring. The behavior is consistent with Apache 1.3 and Apache 2 on RH 9. I've tried re-compiling and all the usual tricks. ... Do you use multiple Apaches on the server? Just one. Since I would be speculating wildly, why not post the workers.properties file as well as the Connector tags in the server.xml on the Tomcats. Well, 150 workers in the workers.properties file would be a bit large for starters ;-) So would 150 server.xml's... But regardless, I'm certain they're all configured properly, it's just a matter of Tomcat's AJP 1.3 service and mod_jk losing touch after some period of time. -Fred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamically update server.xml httpd.conf
At 21:22 26/08/03, you wrote: Tomcat 4 = no Tomcat 5 = I believe so Apache = yes ($APACHE_HOME/bin/apachectl graceful OR $APACHE_HOME/bin/apachectl restart) John Lars Nielsen Lind wrote: Hi. Is it possible to update and implement changes in server.xml and httpd.conf while Apache/Tomcat is running? I want to be able to add 'sites' to my server without restarting Apache/Tomcat. Are there other solutions? Lars Nielsen Lind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] In tomcat4 (i dunno other versions) you can dynamicly add and remove war files, with webapps etc. If you set the options unpackWars=false autoDeploy=true liveDeploy=true these war files are automagicly updated when you replace them. Also consider using the manager. Fred -- F. Kreek Kamer J2-278 e-mail: [EMAIL PROTECTED] Klinische InformatieKunde tel: +31-20-566 6687 AMC - Amsterdamfax: +31-20-691 9840 Meibergdreef 15 1105 AZ Amsterdam There are 10 types of people when it comes to binary, those that understand it.. and those who don't. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javac problems with Tomcat as NT Service
At 22:56 26/08/03, you wrote: I have installed the J2SE and J2EE SDKs to c:\java. I installed Tomcat to c:\Tomcat. I have X_HOME variables for both installations in my computers Environment Variables. The problem is that the SDKs also install a JRE to c:\program files\java\. When I run Tomcat in a console window, everything runs fine. Tomcat uses JAVA_HOME which has javac. When Tomcat runs as a service, I assume it is using the JRE in Program Files because JSPs that have not been compiled cannot be! I receive an error and the logs point to the fact that Tomcat cannot create the javac process. Is there a way to set the Tomcat service to use my JAVA_HOME installation instead of the Program Files JRE? Are there any other solutions to this problem? I don't want to have to precompile every JSP page before I put code onto my production box, nor do I want to run my production server in a console window started by hand. Thanks in advance, Mark Turansky - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I've never experienced the problem (i'm not running NT) but it seems to me that you need to unset your path and set your JAVA_HOME to your java SDK dir. This could be done in tomcat.conf (maybe its .bat on an NT) or otherwise in catalina.bat There are 10 types of people when it comes to binary, those that understand it.. and those who don't. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: vhosts and workers
At 07:03 27/08/03, you wrote: I'm in the process of configuration Tomcat 4.1.27 to communicate with Apache 1.3.28 through mod_jk on a single machine. I have several virtual hosts set up on my server in the following way: /home/vhost1, /home/vhost2, etc.. I would like to configure Apache/Tomcat to allow users of these vhosts to serve JSPs/Servlets from beneath their home directories, e.g.: /home/vhost1/public_html/webapps/ and /home/vhost2/public_html/webapps/. From my reading, I understand that this can be accomplished by: - setting the appBase attribute of the Home tag in the server.xml to those absolute directories: Home appBase=/home/vhost1/public_html/webapps/... ... Home appBase=/home/vhost2/public_html/webapps/... - setting the docBase/path attributes in the child Context tag to some directory within the appBase path: Home appBase=/home/vhost1/public_html/webapps/... Context docBase=app1 path=/app1... ... Home appBase=/home/vhost2/public_html/webapps/... Context docBase=app1 path=/app1... sorry, should be app2 :~ This would cause the primarly application app1 to be served out of vhost1's home from /home/vhost1/public_html/webapps/app1, and another applicationed app1 belonging to vhost2 to be served out of /home/vhost2/public_html/webapps/app1. This is my understanding of these attributes, though I don't quite get what the distinction between docBase and path is, as I've not found a decent enough description nor a solid example to set these in stone for me. My questions: 1: Would the aforementioned configuration properly serve JSPs/Servlets from locations beneath vhost1 and vhost2's home directories? you can also use something linke appBase=webapps/app1/ then your base will be at $CATALINA_BASE/webapps/app1/ 2: What exactly do the docBase and path attributes define within the Context tag? What is the distinction? path= the virtual path in the URI. so path=/app1 (for your my.first.virtualhost) makes you app available at my.first.virtualhost/app1/. docBase tells tomcat where to find the application locally (when not starting with a slash, it is relative to you appBase) you do not need to define your contexts within the server.xml, it is also possible to do that in web.xml files 3: It is possible to have a single worker handle requests for more than one web application belonging to more than one virtual host/user. How beneficial would it be to have a single worker handle requests sent to it from Apache for more than one virtual host? Would it be more efficient to have one worker for each virtual host and have a load balancing worker to manage those subordinate workers? yes, put the second engine in the first service element. (and remove the second service element:) 4: What sort of mechanisms to workers use to handle requests? Does a worker receive a request, fork(), child process handles the request, communicates with the Tomcat JVM, and returns the result to the requesting client, while the parent simply sits and listens for more connections? If this is the case, would a load balancer really serve to benefit anything if all this is taking place on a single machine, given that all the workers would be of type ajp13? dunno exactly really. that loadbalancing was from a example workers.properties I'm trying to achieve and optimal, secure configuration. One that would allow the users to manage their own web applications within their home directories so I don't have to open up rwx access to the world beneath the $TOMCAT_HOME directory. Granted, I'll still have to amend server.xml to insert new contexts for users adding new WARs, but this is trivial. I've read a number of articles and even the manual describing configuration options, etc., but it seems that there are just a few points missing that would really put things into perspective for me, so I'm sending these, probably simple, questions to the list, as my last resort. Any information or links would be greatly appreciated, and hopefully I'll be able to get everything organized efficiently and securely. Christopher Garrett III Inixoma, Incorporated - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Sorry 'bout the strange setup i gave you. But i am running mulptiple versions of tomcat on one machine. So it is easier to have absolute path names in my server.xml. Fred There are 10 types of people when it comes to binary, those that understand it.. and those who don't. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2 VirtualHosts now work, mod_jk not
I did not get the mail, but i've got it working with more than 1: (part of) httpd.conf -- VirtualHost my.real.host ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/webmaster/www/v1/webapps ServerName my.first.virtualhost Port 80 LocationMatch /WEB-INF/ AllowOverride None deny from all /LocationMatch LocationMatch /META_INF/ AllowOverride None deny from all /LocationMatch ErrorLog logs/my.first.virtualhost_error TransferLog logs/my.first.virtualhost_log JkMount /*/servlet/ v1 JkMount /servlet/* v1 JkMount /*.jsp v1 /VirtualHost VirtualHost my.real.host ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/webmaster/www/v1/webapps ServerName my.second.virtualhost Port 80 LocationMatch /WEB-INF/ AllowOverride None deny from all /LocationMatch LocationMatch /META_INF/ AllowOverride None deny from all /LocationMatch ErrorLog logs/my.second.virtualhost_error TransferLog logs/my.second.virtualhost_log JkMount /*/servlet/ v2 JkMount /servlet/* v2 JkMount /*.jsp v2 /VirtualHost -- server.xml - Server port=8010 shutdown=SHUTDOWN debug=999 Service name=Tomcat-Apache-my.first.virtualhost debug=999 Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8011 minProcessors=2 maxProcessors=75 acceptCount=10 debug=0/ Engine name=v1 debug=999 defaultHost=my.first.virtualhost Logger className=org.apache.catalina.logger.FileLogger prefix=my.first.virtualhost_log_ suffix=.txt timestamp=true debug=999/ Realm className=org.apache.catalina.realm.MemoryRealm debug=999/ Host name=my.first.virtualhost debug=999 appBase=webapps/v1 unpackWARs=false autoDeploy=true liveDeploy=true reloadable=true Context path= docBase=ROOT debug=999 reloadable=true/ /Host /Engine /Service Service name=Tomcat-Apache-my.second.virtualhost debug=999 Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8011 minProcessors=2 maxProcessors=75 acceptCount=10 debug=0/ Engine name=v1 debug=999 defaultHost=my.second.virtualhost Logger className=org.apache.catalina.logger.FileLogger prefix=my.second.virtualhost_log_ suffix=.txt timestamp=true debug=999/ Realm className=org.apache.catalina.realm.MemoryRealm debug=999/ Host name=my.second.virtualhost debug=999 appBase=webapps/v1 unpackWARs=false autoDeploy=true liveDeploy=true reloadable=true Context path= docBase=ROOT debug=999 reloadable=true/ /Host /Engine /Service /Server workers.properties --- worker.list=v1,v2 worker.v1.port=8011 worker.v2.port=8012 worker.v1.host=localhost worker.v1.host=localhost worker.v1.type=ajp13 worker.v1.type=ajp13 #standard load balancing worker.v1.lbfactor=1 worker.v1.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=v1 hope that this is useful, Fred There are 10 types of people when it comes to binary, those that understand it.. and those who don't. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk and Tomcat Lose Touch
In the settings you put in httpd.conf, you should have added a 'LogLevel' directive. If you did not, then you can! The line I have is: JkLogLevel error Change the 'error' to debug and restart Apache. This worked well, and yielded some errors: ** [Tue Aug 26 16:25:19 2003] [jk_connect.c (203)]: jk_open_socket, connect() failed errno = 111 [Tue Aug 26 16:25:19 2003] [jk_ajp_common.c (626)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 111 [Tue Aug 26 16:25:19 2003] [jk_ajp_common.c (874)]: Error connecting to the Tomcat process. [Tue Aug 26 16:25:19 2003] [jk_ajp_common.c (1190)]: sending request to tomcat failed in send loop. err=0 [Tue Aug 26 16:25:19 2003] [jk_connect.c (203)]: jk_open_socket, connect() failed errno = 111 [Tue Aug 26 16:25:19 2003] [jk_ajp_common.c (626)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 111 [Tue Aug 26 16:25:19 2003] [jk_ajp_common.c (874)]: Error connecting to the Tomcat process. [Tue Aug 26 16:25:19 2003] [jk_ajp_common.c (1190)]: sending request to tomcat failed in send loop. err=1 [Tue Aug 26 16:25:19 2003] [jk_connect.c (203)]: jk_open_socket, connect() failed errno = 111 [Tue Aug 26 16:25:19 2003] [jk_ajp_common.c (626)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 111 [Tue Aug 26 16:25:19 2003] [jk_ajp_common.c (874)]: Error connecting to the Tomcat process. [Tue Aug 26 16:25:19 2003] [jk_ajp_common.c (1190)]: sending request to tomcat failed in send loop. err=2 [Tue Aug 26 16:25:19 2003] [jk_ajp_common.c (1198)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 111 [Tue Aug 26 16:25:19 2003] [jk_ajp_common.c (970)]: ERROR sending data to client. Connection aborted or network problems [Tue Aug 26 16:25:50 2003] [jk_ajp_common.c (970)]: ERROR sending data to client. Connection aborted or network problems [Tue Aug 26 16:26:04 2003] [jk_ajp_common.c (970)]: ERROR sending data to client. Connection aborted or network problems [Tue Aug 26 16:26:15 2003] [jk_ajp_common.c (970)]: ERROR sending data to client. Connection aborted or network problems [Tue Aug 26 16:26:22 2003] [jk_ajp_common.c (970)]: ERROR sending data to client. Connection aborted or network problems ** All of these errors appeared at the same time I was trying to view a JSP on a site that had lost touch. I was doing a tail -f and the log file had been quiet until I tried to view this JSP -- then all these popped-up at about the same time. Immidiately I opened a telnet session to this particular Tomcat instance's AJP 1.3 port, and verified it was responding. Also, *all* of the Tomcat instances are on the same host as the Web server, so all the workers are traveling over 127.0.0.1. Any ideas? Thanks! -Fred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk and Tomcat Lose Touch
Hi all, On one of our servers, we were running Red Hat Linux 7.3 with Apache 1.3.X, mod_jk, Sun JDK 1.4.1, and many (~150) instances Tomcat of various flavors. Everything worked perfectly until we upgraded to Red Hat 9. Now, it seems like mod_jk and Tomcat are losing touch until the Tomcat JVM is restarted. This happens after maybe a day or so using both Apache 1.3.X and Apache 2.0.X. From what we've observed, it seems to a problem specific to mod_jk. This is because running Apache 1.3.X or 2.0.X under Red Hat 9 with the old-skool mod_jserv and ~100 Tomcat instances does not cause a problem at all. Also, running either Apache 2 or 1.3 on RH 9 with just a couple JVM's does not cause a problem either. I've already tried re-compiling mod_jk on RH9, the same server that's having the trouble to account for any library change issues. No dice I'm afraid. Any ideas? Thanks! -Fred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk and Tomcat Lose Touch
Ah, the symptoms, of course ;-) There actually aren't any errors AFAIK. Perhaps there's a more verbose logging level? I couldn't find any obvious info on this in the manual. What actually happens is if I make a request to a JSP, for example, that should normally be forwarded onto Tomcat, the request simply hangs forever. Apache logs the request nothing in the Tomcat logs suggest to me it's receiving the request. Thanks, -Fred -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 1:09 PM To: [EMAIL PROTECTED] Subject: Re: mod_jk and Tomcat Lose Touch What kind of error are you getting that makes you thing they are losing touch. Check the mod_jk log and see what kind of errors it is throwing and post an example. Ben Ricker Wellinx, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Japanese Characters in JSP's
Hi All, I'm having a bit of trouble with getting JSP's with Japanese characters within them. I'm working with a Windows XP system with JDK 1.4.2 and Tomcat 4.1.24. The problem seems persistent, though, on RH Linux with JDK 1.4.1_03 as well. I have no problem with Russian, Arabic, Hebrew, and other non-Latin-1 character sets, just Japanese (so far). More confusing, my test file is a very simple HTML document that Tomcat services properly when I'm simply calling it as an HTML file, such as: http://localhost:8080/testfile.html All I do is rename it to testfile.jsp, and it comes out all garbled. I've done the same test with a myriad of HTML files with various character sets including cp1251, iso8859-5, etc. Everything works fine except for Japanese -- I believe my file uses Shift_JIS. I don't have test files for other multi-byte character sets so I've no idea if it's exclusive to Japanese or if, for example, Chinese would not work either. I've also tried adding response.setLocale (new java.util.Locale (ja)) to the top of the page; it made no difference. I've also tried reading everything I could find, and I'm empty handed. This seems like it shouldn't be quite as difficult as it is. TIA! -Fred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Japanese Characters in JSP's
Thank you, Punam, for the suggestion -- However this is already specified both in the HTML file, and my browser is setup and capable of viewing x-sjis. This is illustrated by the fact that the exact same file works perfectly under Tomcat so long as its file extension is .html and not .jsp. Only when Tomcat tries to compile the file into a Servlet does it give me any trouble. -Fred Hi Fred, In the html header u will have to set the char set as SHIFT JIS. And in the browser SHIFT JIS should be set. Regards, Punam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
servlet-Mapping using Tomcat 4
Hi, I am a newby to JSP's, but I already love it. The Situation: -- 1. ServletServer = Tomcat 4 (Standalone) 2. Name of JSP = whoKnows.war 3. Using to deploy = Tomcats-Manager-Interface (FileUpload) 4. Servlet-Mapping (in whoKnows's web.xml) to = /foo/bar 5. Host of VirtuellServer = localhost (default) 6. Port of Host = 8080 (default) 7. OperatingSystem = Linux 8. DeployDir = $TOMCAT_HOME$/webapps My application (whoKnows.war): - 1. My index.jsp takes some information from the user 2. Using form action= method=POST.../form to pipe this forward 3. Using http://localhost:8080/whoKnows/index.jsp works just fine! The problem/question: - 1. The main problem ist, that 'normal call' (/whoKnows/) works fine. That means that I get my index.jsp, and all works the way I wanted to. BUT, if I use /whoKnows/foo/bar my java-class of my jsp-Servlet (defined in whoKnows web.xml) is directly called (skipping my index.jsp). But I still want that my index.jsp is called first. May JSP-Page knows what to do with the java-class. Any Idea how I can configure this? 2. The default context ist the Name of the JSP in the webapps-dir. In this case it is '/whoKnows'. Is there any trick, that I cann change this? I know that it is possible to configure an context for every application in tomcats own xml-configuration files. But who is this done, and is there any better possibility (doing this in whoKnows web.xml for example)? Best regards, Fred -- COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test -- 1. GMX TopMail - Platz 1 und Testsieger! 2. GMX ProMail - Platz 2 und Preis-Qualitätssieger! 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: iPlanet and Tomcat 4.1.24
Wow, thanks for your comments. I too have very little static content; so we are in the same boat on that part. I'd be curious to know about your Siteminder ASA solution. Our SiteMinder people here say that ASA is too hard or tricky to get working and stuff like that. I am not sure I buy this... Any comments on ASA and tomcat would be great too...Also, I would mind knowing the details of your environment (os, Siteminder rev, is the ASA a servlet filter or something else, stuff like that). Oh and if anybody else out there can help with iPlanet to Tomcat...that would be great too... -Fred -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Mon 3/31/2003 9:36 AM To: Tomcat Users List Cc: Subject:RE: iPlanet and Tomcat 4.1.24 Howdy, OK I will come clean: I have to use Netegrity's Siteminder (4.56) for SSO services. My organization is gun shy about useing Netegrity's J2EE AppServer agents (I don't know why, I think the reason is ignorance of ASA). So I am stuck with frontending all my J2EE work with iWS (even when I have on static content for iWS to serve).Oh and Apache is not an option either. So if you have another angle on cracking this nut, I am all ears? I read your whole message thinking why doesn't he just use the J2EE AppServer agents, that's what they're for until I got to the bottom ;) We have SiteMinder as well, and didn't want any front-end to tomcat as we have very little static content. So we ended up writing a single sign on service (in Java, running standalone on tomcat) that talks to SiteMinder, and all our applications talk to this SSO service instead of SiteMinder directly. Can't help you much with JK/JK2/other connectors ;( Yoav hapira Millennium ChemInformatics 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]
iPlanet and Tomcat 4.1.24
I have dredge thru the archives and done a bunch of googling and can't quite seem to get all the needed pieces. I want to: have iPlanet iWS 4.1 sp 9 on Solaris 8 forward JSP/Servlet requests to Tomcat 4.1.24. I have seen the neshow page related to jk2, however it is very slanted to Win32. Further more I can't find anysort of binaries (of SOs) for solaris anywhere. I have tried building jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz to; however, I run into tons of compilation errors ane build snafus. There is no reall good documentation for the build process. Can I do this? Am I missing something? Is there another connector I should be using instead of JK2? Why? For various *organizational* reasons I need to front-end my J2EE work with an iPlanet WS, I have some latitued on the iWS rev (could go to 6 if needed), but it would be difficult/impossible (organizationally not technically) to use Tomcat alone. -Fred OK I will come clean: I have to use Netegrity's Siteminder (4.56) for SSO services. My organization is gun shy about useing Netegrity's J2EE AppServer agents (I don't know why, I think the reason is ignorance of ASA). So I am stuck with frontending all my J2EE work with iWS (even when I have on static content for iWS to serve).Oh and Apache is not an option either. So if you have another angle on cracking this nut, I am all ears? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat4.1.18 can not restart after Mysql DataSource configuration.
environment: win200 server(sp3)+jdk1.4.1_02+mysql4.0.12+Connector/J4.0 It's running well after JNDI DataSource configuration, but crashs when restarting. can anybody help? thanks in advance.
Re: Compile my .java directly in the Webapps directory....
OK Thank you for your response... Fred. - Original Message - From: Sean Dockery [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, February 09, 2003 10:26 PM Subject: Re: Compile my .java directly in the Webapps directory No. Tomcat will automatically compile JSP files to servlets for you, but not .java source files. Sean Dockery [EMAIL PROTECTED] Certified Java Web Component Developer Certified Delphi Programmer SBD Consultants http://www.sbdconsultants.com - Original Message - From: fred [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, February 09, 2003 08:02 Subject: Compile my .java directly in the Webapps directory Hello, can somebody tell me if i can compile the .java drectly in the directory of my webapps. Is it an option in the sever.xml ? It's Apache 2.0.43 with Tomcat 4.1.18 with the JK2 but i think that is the same with Tomcat standalone... Thank you. Fred - 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: Problem making Tomcat 4.1 invoke servlet from Apache 2.0.44
Hello, you must have in the 'web-inf' directoty of your servlet a mapping like this one: web-app servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping /web-app and you can invoke all servlets in the directory: WEB-INF/classes by the request: http://localhost/YourDirectory/servlet/TheServlet Fred - Original Message - From: jcubic [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, February 08, 2003 7:03 AM Subject: RE: Problem making Tomcat 4.1 invoke servlet from Apache 2.0.44 No, I did not. The strange thing is that if I run Tomcat manually along with Apache and let jni startup in Apache fail by not giving correct classpath, I actually can run servlet as well as jsp. I can't see servlet invoker is obviously disabled in web.xml in Tomcat conf directory. But I think I am going to look into web.xml a little more to see if that is the culprit. Jimmy -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 9:20 PM To: 'Tomcat Users List' Subject: RE: Problem making Tomcat 4.1 invoke servlet from Apache 2.0.44 Did you change anything in Tomcat's web.xml? Sounds like the Invoker servlet is disabled, but it is enabled by default for the examples, but disabled for everything else. John -Original Message- From: jcubic [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 10:45 PM To: Tomcat Users List Subject: RE: Problem making Tomcat 4.1 invoke servlet from Apache 2.0.44 I did. I am getting the HTTP error I described : 'HTTP Status 503 - Servlet invoker is currently unavailable'. - jimmy -Original Message- From: Mark Eggers [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 7:38 PM To: Tomcat Users List Subject: Re: Problem making Tomcat 4.1 invoke servlet from Apache 2.0.44 Jimmy, Try the following: [uri:/examples/servlet/*] HTH /mde/ just my two cents . . . . __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003 --- Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003 - 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: Problems with mod_jk
Hello, you must download the mod_jk2.0.43.dll. Install your Apache 2.0.43 not in program Files !! For me, i have an ApacheGroup with Apache2 and Tomcat4. Without spaces !! Install Tomcat4 not in service NT !! Load this module in your httpd.conf... You must create in your Apache/logs 3 files: stdout.log, stderr.log and jk2.shm. Create in your Apache/conf a file: workers2.properties with this text: [logger] level=DEBUG [config:] #file=${serverRoot}/conf/workers2.properties file=c:/Apache2/conf/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 # Alternate file logger #[logger.file:0] #level=DEBUG #file=${serverRoot}/logs/jk2.log [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=${serverRoot}/logs/jk2.shm size=100 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 # Default Native Logger (apache2 or win32 ) # can be overriden to a file logger, useful # when tracing win32 related issues #logger=logger.file:0 [lb:lb] info=Default load balancer. debug=0 #[lb:lb_1] #info=A second load balancer. #debug=0 [channel.socket:localhost:8009] info=Ajp13 forwarding over socket debug=0 tomcatId=localhost:8009 #[channel.socket:localhost:8019] #info=A second tomcat instance. #debug=0 #tomcatId=localhost:8019 #lb_factor=1 #group=lb #group=lb_1 #disabled=0 #[channel.un:/opt/33/work/jk2.socket] #info=A second channel connecting to localhost:8019 via unix socket #tomcatId=localhost:8019 #lb_factor=1 #debug=0 [channel.jni:jni] info=The jni channel, used if tomcat is started inprocess [status:] info=Status worker, displays runtime informations [vm:] info=Parameters used to load a JVM in the server process #JVM=C:\jdk\jre\bin\hotspot\jvm.dll OPT=-Djava.class.path=c:/Tomcat/bin/tomcat-jni.jar;c:/Tomcat/server/lib/comm ons-logging.jar OPT=-Dtomcat.home=${TOMCAT_HOME} OPT=-Dcatalina.home=${TOMCAT_HOME} OPT=-Xmx128M #OPT=-Djava.compiler=NONE disabled=0 [worker.jni:onStartup] info=Command to be executed by the VM on startup. This one will start tomcat. class=org/apache/jk/apr/TomcatStarter ARG=start disabled=0 stdout=c:/Apache2/logs/stdout.log stderr=c:/Apache2/logs/stderr.log [worker.jni:onShutdown] info=Command to be executed by the VM on shutdown. This one will stop tomcat. class=org/apache/jk/apr/TomcatStarter ARG=stop disabled=0 [uri:/jkstatus/*] info=Display status information and checks the config file for changes. group=status: #[uri:127.0.0.1:8003] #info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test it #alias=myVirtualHost:8003 #[uri:127.0.0.1:8003/ex] #info=Example webapp in the virtual host. It'll go to lb_1 ( i.e. localhost:8019 ) #context=/ex #group=lb_1 [uri:/examples] info=Example webapp in the default context. context=/examples debug=0 #[uri:/examples1/*] #info=A second webapp, this time going to the second tomcat only. #group=lb_1 #debug=0 [uri:/examples/servlets/*] info=Prefix mapping [uri:/examples/*.jsp] info=Extension mapping [uri:/examples/*] info=Map the whole webapp [uri:/examples/servlets/HelloW] info=Exampel with debug enabled. debug=10 After create in your Tomcat/conf a file: jk2.properties with this text: ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED ## WHEN YOU EDIT THE FILE. ## COMMENTS WILL BE _LOST_ ## DOCUMENTATION OF THE FORMAT IN JkMain javadoc. # Override the default port for the socketChannel # channelSocket.port=8019 # Default: # channelUnix.file=${jkHome}/work/jk2.socket # Just to check if the the config is working shm.file=c:/Apache2/logs/jk2.shm # In order to enable jni use any channelJni directive channelJni.disabled = 0 # And one of the following directives: # apr.jniModeSo=/opt/apache2/modules/mod_jk2.so # If set to inprocess the mod_jk2 will Register natives itself # This will enable the starting of the Tomcat from mod_jk2 apr.jniModeSo=inprocess Finally, add to your PATH variable the path for JAVA_HOME and JAVA_HOME/bin. Set 2 news environnement variables like this: TOMCAT_HOME=C:\the directory of Tomcat and CATALINA_HOME=C:\the directory of Tomcat. Reestart and go to http://localhost/examples. Normally it's OK for all the examples servlets and jsp. Fred - Original Message - From: Mark Baumann [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, February 07, 2003 1:20 PM Subject: Problems with mod_jk Hello! I have a problem getting Tomcat+Apache connected with mod_jk I installed Apache 2.0.43 and Tomcat 4.1.18 each works fine, alone. When I try to use the specific mod_jk-2.0.43 or mod_jk2, or mod_webapp for windows NT4, each time I get the same error. -snip- Cannot load c:\Programme\Apache_Group\Apache\modules\mod_jk-2.0.42.dll into server /*translated from German:)*/ the requested procedure could
Compile my .java directly in the Webapps directory....
Hello, can somebody tell me if i can compile the .java drectly in the directory of my webapps. Is it an option in the sever.xml ? It's Apache 2.0.43 with Tomcat 4.1.18 with the JK2 but i think that is the same with Tomcat standalone... Thank you. Fred
Re: kept getting HTTP Status 404 - please help. thanx.
Normally, Admin and no password Fred - Original Message - From: John Qin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, February 02, 2003 7:10 AM Subject: Re: kept getting HTTP Status 404 - please help. thanx. hi Jacob Kjome .thanx for ur help. I got it work, thanx for ur help. by the way, do u kno how to get into tomcat administration section. Whats the default ID and password for that. Thank you. John Qin. --- Jacob Kjome [EMAIL PROTECTED] wrote: Are you accessing it like this? http://localhost:8080/servlet/MyServlet If so, note that the /servlet/* mapping is for the invoker servlet which is commented out (by default) in Tomcat conf/web.xml. Uncomment the mapping for the invoker servlet and you will be able to access your servlet. BTW, you should always put your servlet in an actual package if you haven't already. Something like com.mycompany.MyServlet instead of placing your classes in the root of WEB-INF/classes which is the default package. You can't import the default package. Jake At 09:07 PM 2/1/2003 -0800, you wrote: Ijust installed tomcat 4.1.18 today. everything seems fine. i can see this page http://localhost:8080/index.jsp. and i run those Servlet Examples, it showed up, everyting is good. then i wrote a servlet page myself, and try to run it. it told me cannot find it, I got http status 404 error. I am sure my coding is rite. cuz I download htem directly from web site. after i compile the .java file, I put it .class file into WEB-INF/classes folder. I followed hte instruction step by step. I check thousands time, still have no clue whts wrong. if u have any ideas please help me out. thanx. john. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Default root for servlets with JK2
Hello, can you tell me where can i put my servlet with the JK2 connector. Is it an URI in the 'workers2.properties' ? Is it an alias in the httpD .conf ? Thank you for your help. Fred
Re: mod_jk2 connector module not working (?)
Hello, [error] shm.init(): No file Have you an jk2.shm file in your Apache/Logs ?? And in the jk2.properties the line shm.file with Achache_Root/logs ?? Fred - Original Message - From: Hannes Schmidt [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, February 01, 2003 1:18 AM Subject: Re: mod_jk2 connector module not working (?) Looks like your /usr/local/apache2/conf/workers2.properties is missing. Even if Apache is not installed in one directory (as is the case in my Linux distribution), JK2 insists on it to be in ServerRoot\conf. Your ServerRoot seems to be set to /usr/local/apache2. Check out this link: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/confighowto.html Trevor Hurst wrote: Okay, now that I successfully built the connectors and have installed them. The JSP and servlets are not working so, I'm almost there but not quite yet.. Are these errors in the error_log file of any significance? [Fri Jan 31 14:47:04 2003] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Fri Jan 31 14:47:04 2003] [error] config.update(): Can't find config file /usr/local/apache2/conf/workers2.properties [Fri Jan 31 14:47:04 2003] [error] shm.init(): No file [Fri Jan 31 14:47:05 2003] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Fri Jan 31 14:47:05 2003] [error] jk2_init() Can't find child 630400 in scoreboard [Fri Jan 31 14:47:05 2003] [error] shm.init(): No file [Fri Jan 31 14:47:05 2003] [error] mod_jk child init 1 -2 [Fri Jan 31 14:47:05 2003] [error] shm.init(): No file [Fri Jan 31 14:47:05 2003] [error] mod_jk child init 1 0 [Fri Jan 31 14:47:05 2003] [error] shm.init(): No file [Fri Jan 31 14:47:05 2003] [error] shm.init(): No file [Fri Jan 31 14:47:05 2003] [notice] Apache/2.0.44 (Unix) mod_jk2/2.0.3-dev mod_ssl/2.0.44 OpenSSL/0.9.6g configured -- resuming normal operations ..looks like shared memory init function call is not working properly? And are the mod_jk and jk2_init init messages bad? Thanks for all the help! Cheers, -- Trev - 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: Can the JNDI Connection Pool re-connect after failure?
Ok Thank you very much... I'm going to test that... - Original Message - From: Ryan Cornia [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 29, 2003 3:48 PM Subject: RE: Can the JNDI Connection Pool re-connect after failure? This solution seems to work great for me. After adding this and re-booting the database server, it re-connected and worked great automatically Thanks a ton Nix. Ryan [EMAIL PROTECTED] 01/29/03 07:11AM I've tried adding the following and I still have the same problem as Ryan. parameter namevalidationQuery/name valueSELECT 1 FROM DUAL/value /parameter - 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]
Where Set Tomcat_home and Catalina_home ??
Helo, canyou tell me where set the system environnment variables for: TOMCAT_HOME= C:\Tomcat CATALINA_HOME=C:\Tomcat Thank you. Fred
Re: Where Set Tomcat_home and Catalina_home ??
Ok thak you, and sorry for the system... I'm on Xp, it is at the same that for the java: Path: C:\j2sdk1.4.1_01\bin; ? I put C:\Program FilesApache Group.\Tomcat 4.1\bin; ? Thank you... - Original Message - From: Galbayar Dorjgotov [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, January 30, 2003 5:16 AM Subject: RE: Where Set Tomcat_home and Catalina_home ?? in autoexec.bat on win98 on win nt or win2k control Panle-System-Advanced-Environment variables -Original Message- From: fred [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 12:08 PM To: Tomcat Users List Subject: Where Set Tomcat_home and Catalina_home ?? Helo, canyou tell me where set the system environnment variables for: TOMCAT_HOME= C:\Tomcat CATALINA_HOME=C:\Tomcat Thank you. Fred - 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]
JNI Configuration
Hello, excuse me for my english... I see the JNI Configuration and in the file workers2.properties, I see: OPT=-Djava.class.path=${TOMCAT_HOME}/lib/tomcat-jni.jar;${TOMCAT_HOME}/lib/tomcat.jar But can you tell where find the tomcat-jni.jar and the tomcat.jar because they are not on my computer... Thank you...
Re: Tomcat optimization
In fact this is a large article about Linux, Apache, Tomcat, Zope, PHP, MySQL, etc. The only one i do not know enough to write the article is Tomcat. - Original Message - From: Bill Barker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 03, 2002 9:02 AM Subject: Re: Tomcat optimization Urm, Err, If you don't have any answer to either of these questions, what makes you think that you are qualified to write this article at all? If you answer my question, I'll answer yours :). Fred Bordage [EMAIL PROTECTED] wrote in message 071e01c29a47$a9677380$35854251@leto">news:071e01c29a47$a9677380$35854251@leto... Hello, I'm writing an article about how to optimize Tomcat performances. I'm totaly new to Tomcat and you may really help me answering those two little questions. 1) Do you know Tomcat limits (page / second, etc.) ? 2) What are the 3 main things (conf parameter value, etc.) to do to optimize Tomcat 4.x performances ? Regards, Fred Bordage -- 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]
Help!?! Tomcat Xindice
Hi, Could someone recommended any sources which give a description on how to connect to Xindice (Apaches native XML database) through Tomcat. What modifications do you have to make to the environment settings in Tomcat (web.xml, server.xml etc)? I want to make use of the servlet programming capabilities of Tomcat and manipulate the XML documents i have stored in Xindice. I'd appreciate any advice you might be able to give me. Many thanks, David _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat optimization
Hello, I'm writing an article about how to optimize Tomcat performances. I'm totaly new to Tomcat and you may really help me answering those two little questions. 1) Do you know Tomcat limits (page / second, etc.) ? 2) What are the 3 main things (conf parameter value, etc.) to do to optimize Tomcat 4.x performances ? Regards, Fred Bordage -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Connecting to Xindice through Tomcat
Hi, Could you recommended any sources which give a detailed description on how to Connect to Xindice(Apaches native XML database) through Tomcat. I want to make use of the servlet programming capabilities of Tomcat and manipulate the XML documents i have stored in Xindice. Many thanks, David _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
LDAP Authentication
Hi All Has anyone successfully implemented BASIC/Form-based authentication against an LDAP data source? Are there any external libraries available and what are the configuration settings? Thanks in advance F __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
What Happen HERE?
When startup tomcat this message appears Starting service Tomcat-Standalone Apache Tomcat/4.0.3 ERROR reading java.io.ByteArrayInputStream@5bdc50 At Line 21 /web-app/security-constraint/ Starting service Tomcat-Apache Apache Tomcat/4.0.3 I've been trying to protect a directory with memory realms, here is mi web.xml, thanks for any help` web.xml web-app display-nameLibreria PDF/display-name descriptionDeveloped by Fred Lankovich /description session-config session-timeout30/session-timeout /session-config security-constraint web-resource-collection web-resource-nameLibreria PDF/web-resource-name url-patternadmin/*/url-pattern /web-resource-collection auth-constraint role-namepdfuser/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method real-nameLibreria PDF/realm-name /login-config /web-app _ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Onjava Example JDBC Realms with MySQL problem?
i'm trying to run the example about JDBC realms with tomcat and mysql, but when i start tomcat i get this message: java.sql.SQLException: Cannot disable AUTO_COMMIT anyone knows what could be happening? Thanks _ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
functions???
can i make functions into mi jsp code? sample % public String reserve() { } % i really don't know 'cause i get errors with that _ Do You Yahoo!? ¿Quieres armar tu própia página Web pero no sabes HTML? Usa los asistentes de edición de Yahoo! Geocities y tendrás un sitio en sólo unos minutos. Visítanos en http://espanol.geocities.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Re: HTTP error 503. Please please help !
Excuse my naiv question, but if I understand this correctly then the 503 error is returned to the browser (client) by the Webserver due to some kind of problem between the Webserver and the Appserver, in this case TomCat. If I had a servlet that sent of a request to some kind of other server and receive in return the 503 Status Code then that would mean that the webserver that I sent the request to is having problems talking to the Appserver behind it. Did I understand this correctly? The reason I'm asking is because I had a similar problem in one of my apps not to long ago. Thanks in Advance, Fred [EMAIL PROTECTED] wrote: 5xx errors are generated by the server when it realises that it cannot process a request or something prevented it from handling the request correctly. Try deleting the work directory and restarting the tomcat. Also check your JSP pages. Thanks. RS Caroline Clewlow [EMAIL PROTECTED] on 12/21/2001 03:42:24 AM Please respond to Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: HTTP error 503. Please please help ! Hi I have installed Tomcat 4.01 but cannot access any JSP pages. When I try I receive HTTP error 503 saying the jsp service is not available. I've read one or two queries like this on the mailing list but haven't seen any replies that solve the problem. Can anyone help me please ? Thanks Caroline -- 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] -- __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Newbie: TOMCAT-LINUX
Anybody works with tomcat on a linux system, i would like to know if there a module like the apache mod_dir.c. I wanna run servlets like a user not like a root, thanks for help!! Fred _ Do You Yahoo!? ¿Quieres armar tu própia página Web pero no sabes HTML? Usa los asistentes de edición de Yahoo! Geocities y tendrás un sitio en sólo unos minutos. Visítanos en http://espanol.geocities.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Servlet, policy and RMI
Hey All, my servlet calls a class witch makes a rmi connection to another Server. I Think there are some problems with the policy settings. Can anybody help me ? How can i add permissions to my applikation ? I think the catalina.policy is the place where i should do that ?! How can i set rmi permissions for my applikation ? Here you see a part of the tomcat log: scl: policy: evaluate((jar:file:/C:/WebApplikations/Tomcat4.0/webapps/gkr/WEB-INF/lib/jbf.jar!/de/foo/bar/fwk/util/Pulser.class no certificates)) policy: granting (java.lang.RuntimePermission stopThread) policy: granting (java.net.SocketPermission localhost:1024- listen,resolve) policy: granting (java.util.PropertyPermission java.version read) policy: granting (java.util.PropertyPermission java.vendor read) policy: granting (java.util.PropertyPermission java.vendor.url read) policy: granting (java.util.PropertyPermission java.class.version read) policy: granting (java.util.PropertyPermission os.name read) policy: granting (java.util.PropertyPermission os.version read) policy: granting (java.util.PropertyPermission os.arch read) policy: granting (java.util.PropertyPermission file.separator read) policy: granting (java.util.PropertyPermission path.separator read) policy: granting (java.util.PropertyPermission line.separator read) policy: granting (java.util.PropertyPermission java.specification.version read) policy: granting (java.util.PropertyPermission java.specification.vendor read) policy: granting (java.util.PropertyPermission java.specification.name read) policy: granting (java.util.PropertyPermission java.vm.specification.version read) policy: granting (java.util.PropertyPermission java.vm.specification.vendor read) policy: granting (java.util.PropertyPermission java.vm.specification.name read) policy: granting (java.util.PropertyPermission java.vm.version read) policy: granting (java.util.PropertyPermission java.vm.vendor read) policy: granting (java.util.PropertyPermission java.vm.name read) scl: getPermissions (jar:file:/C:/WebApplikations/Tomcat4.0/webapps/gkr/WEB-INF/lib/jbf.jar!/de/foo/bar/fwk/util/Pulser.class no certificates) scl: java.security.Permissions@730494 ( (java.io.FilePermission \C:\WebApplikations\Tomcat4.0\webapps\gkr\WEB-INF\lib\jbf.jar read) (java.util.PropertyPermission java.vendor read) (java.util.PropertyPermission java.specification.version read) (java.util.PropertyPermission line.separator read) (java.util.PropertyPermission java.class.version read) (java.util.PropertyPermission java.specification.name read) (java.util.PropertyPermission java.vendor.url read) (java.util.PropertyPermission java.vm.version read) (java.util.PropertyPermission os.name read) (java.util.PropertyPermission os.arch read) (java.util.PropertyPermission os.version read) (java.util.PropertyPermission java.version read) (java.util.PropertyPermission java.vm.specification.version read) (java.util.PropertyPermission java.vm.specification.name read) (java.util.PropertyPermission java.specification.vendor read) (java.util.PropertyPermission java.vm.vendor read) (java.util.PropertyPermission file.separator read) (java.util.PropertyPermission path.separator read) (java.util.PropertyPermission java.vm.name read) (java.util.PropertyPermission java.vm.specification.vendor read) (java.lang.RuntimePermission stopThread) (java.net.SocketPermission localhost:1024- listen,resolve) ) scl: java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:993) at java.security.AccessController.checkPermission(AccessController.java:389) at java.lang.SecurityManager.checkPermission(SecurityManager.java:545) at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1278) at java.lang.System.getProperty(System.java:560) at java.lang.Integer.getInteger(Integer.java:751) at java.lang.Integer.getInteger(Integer.java:670) at sun.security.action.GetIntegerAction.run(GetIntegerAction.java:93) at java.security.AccessController.doPrivileged(Native Method) at sun.net.InetAddressCachePolicy.clinit(InetAddressCachePolicy.java:40) at java.lang.System.setSecurityManager0(System.java:244) at java.lang.System.setSecurityManager(System.java:213) at de.foo.bar.app.server.Dispatcher.RemoteDispatcherServerClient.initialize(RemoteDispatcherServerClient.java:154) at de.foo.bar.app.server.Dispatcher.RemoteDispatcherServerClient.init(RemoteDispatcherServerClient.java:70) at de.foo.bar.app.server.CommonClasses.ServerURLRetriever.getDispatcher(ServerURLRetriever.java:210) at de.foo.bar.app.server.CommonClasses.ServerURLRetriever.getServerURL(ServerURLRetriever.java:139) at de.foo.bar.app.server.Host.RemoteHostObjectClient.init(RemoteHostObjectClient.java:263) at
Setting up a DB
Hi All, I'm pretty new at using Tomcat and related Technologies, I have one hope fully small question. Where do I set up my Datasource in Tomcat so that I can retrieve it from my JSP using a jndi lookup? I'm assuming that this is done somewhere in the server.xml file, but what are the Tags I need to use? Is there a DTD available anywhere? Thanks in advance and sorry if this is 'Basic' question, Fred -- __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Re: Setting up a DB
Thanks, this is what I was looking for. Fred David Smith [EMAIL PROTECTED] wrote: Take a look at this how-to at the jakarta web site: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html --David On Friday 07 December 2001 07:50 am, you wrote: Hi All, I'm pretty new at using Tomcat and related Technologies, I have one hope fully small question. Where do I set up my Datasource in Tomcat so that I can retrieve it from my JSP using a jndi lookup? I'm assuming that this is done somewhere in the server.xml file, but what are the Tags I need to use? Is there a DTD available anywhere? Thanks in advance and sorry if this is 'Basic' question, Fred -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Problems with using connector under ajp13
I have been trying to use the Domino to connect to Tomcat 4 via ajp13. Most things seem to work, execept authentication (basic / form). In catalina.log, I noticed the following errors: 2001-10-15 17:53:33 Ajp13Request[5] Requested URL session id is 78E039801561C0B591F0219488A562F7 2001-10-15 17:53:33 Ajp13Request[5] Requested cookie session id is 78E039801561C0B591F0219488A562F7 2001-10-15 17:53:33 Ajp13Request[5] Adding cookie JSESSIONID=78E039801561C0B591F0219488A562F7 2001-10-15 17:53:33 Ajp13Processor[8009][4] invoking... 2001-10-15 17:53:33 Ajp13Processor[8009][4] process: invoke java.lang.NullPointerException at org.apache.ajp.tomcat4.Ajp13Request.setRequestURI(Ajp13Request. java:157) at org.apache.ajp.tomcat4.Ajp13Request.setAjpRequest(Ajp13Request. java:109) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:360) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:424) at java.lang.Thread.run(Thread.java:484) 2001-10-15 17:57:51 Ajp13Processor[8009][4] process: done __ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com
Tomcat 4 with IIS
Hi All I have not been able to locate documentation on setting Tomcat 4 on IIS. Can someone pls point me to the right direction. Thanks Fred __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/
RE: Domino Tomcat
There is a wonderful connector available for Domino R5: http://free.tagish.net/domino-tomcat/index.jsp I have been using it and it works great! Fred So -- Anyone who have experience in setting up the Tomcat engine with Lotus = Domino? Comments and links to web-pages wanted. Thanks. __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/
Servlet Reloading
To all, Under Tomcat 3.2.2 are there any 'standard' circumstances that a servlet will NOT be reloaded once it has been re-compiled? We already have added the following to our server.xml file: Context path=/foo docBase=webapps/foo reloadable=true /Context But, every time we re-compile the servlet, we are forced to re-start Tomcat. By 'standard' I mean: are there any circumstances, like whether or not the class file is in the classpath, vice being discovered by Tomcat on startup that would cause this to occur. Thanks, Fred
Re: jspc and deployment
Hi Randy, Thank you for your reaction. I got it working. This will save me a lot of time and will make my application more scalable. Sophie Randy Layman schreef: The answer is you can't. Even if you could get it to generate the file names correctly, Tomcat still wouldn't use them. What you need to do is to use jspc with the option that produces a web.xml file. You then need to incorporate that with your web.xml file, compile the .java files, and you will have a webapp made up of exclusively servlets (and static content) - no more JSP to compile. Randy -Original Message- From: Joost en Sooophie [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 09, 2001 1:59 PM To: [EMAIL PROTECTED] Subject: jspc and deployment Hi, My problem is the following: I am working on an EJB application. I want to pre-compile all the jsp-pages before making the application available on the internet (and someone clicking on the page, experiencing quite some delay). When the jsp MyJSP.jsp is compiled with jspc in Tomcat, files MyJSP.java and MyJSP.class are placed in the /TOMCAT_HOME/work directory. But when I start the application on the internet, it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory. How can I configure jspc, so that it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory? Any answer or information or documentation is much appreciated. Sophie
RE: Apache w/ HTTPS - connection problems
Title: RE: Apache w/ HTTPS - connection problems Well, now you need to open the SSL port, 443. If your goal is to allow only SSL access inside the firewall you will need to close port 80 from S1 to S2. -Original Message- From: Shiv Kumar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 22, 2001 11:25 AM To: [EMAIL PROTECTED] Subject: Re: Apache w/ HTTPS - connection problems Hi all again, While this problem was solved (the Apache on S2 was not listening to port 80!), I have another problem :( The Servlet on S1 is invoked as https://S1/MyServlet/MyAction?myParam=1. The doGet() method of the servlet opens an URLConnection to http://S2/cgi-bin/mycgi.exe?myParam=1. The CGI may return a HTML page or PDF document based on myParam. The following observations are made : When the servlet on S2 tries to get a HTML page returned by the CGI program on S2, it works fine. When it tries to get a PDF document from S2, the following happens :- 1. On IE, with Acrobat Web Integration On, it says Internet Explorer cannot download https://S1/MyServlet/MyAction?myParam=1 from myserver.domain.com. Internet Explorer was not able to open this internet site. The requested site is either unavailable or can not be found. Please try again later. 2. On IE, with Acrobat Web Integration Off, it behaves the same was as in #1. 3. On Netscape, with Acrobat Web Integration On, it displays a blank page. On the servlet side I could notice that the doGet() method is called twice !! 4. On Netscape, with Acrobat Web Integration off, it successfully opens the PDF file :) Netscape - verson 4.74 IE - version 5.50.4522.1800 As I noted in my earlier mail, everything works fine if connection to S1 is HTTP instead of HTTPS. Thanks for any help. -- shiv [EMAIL PROTECTED] Shiv Kumar wrote: Hi all This is a problem Im facing with Apache + Mod_SSL (for HTTPS). Consider this scenario : |-| |-| +-+ |-| +-+ | A | T | |-| | A | | | p | o | |-| | p | C | HTTPS | a | m | |-| HTTP | a | G | ---| c | c |--|-|--| c | I | | h | a | |-| | h | | | e | t | |-| | e | | +-+ |-| +-+ |-| S1 |-| S2 |-| Firewall When the servlet on S1 tries the following : URL url = new URL(http://S2/cgi-bin/mycgi.exe); URLConnection conn = url.openConnection(); InputStream in = conn.getInputStream(); FAILS HERE The exception is : java.net.ConnectException: Connection refused: no further information at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112) at java.net.Socket.init(Socket.java:273) at java.net.Socket.init(Socket.java:100) at sun.net.NetworkClient.doConnect(NetworkClient.java:50) at sun.net.www.http.HttpClient.openServer(HttpClient.java:331) at sun.net.www.http.HttpClient.openServer(HttpClient.java:517) at sun.net.www.http.HttpClient.init(HttpClient.java:267) at sun.net.www.http.HttpClient.init(HttpClient.java:277) at sun.net.www.http.HttpClient.New(HttpClient.java:289) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection .java:379) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon nection.java:472) This used to work before introducing SSL module on Apache running on S1 (i.e. when it was HTTP everywhere). Any idea of whats going wrong? Thanks. -- shiv [EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
I am looking for a comprehensive set of documentation.
Title: I am looking for a comprehensive set of documentation. Is there anything available in print? Is there more than what is included, the overview stuff? Thanks in advance, Fred
RE: ***** URGENT: UNSUBSCRIBING FROM THE TOMCAT-USER LIST *****
Title: RE: * URGENT: UNSUBSCRIBING FROM THE TOMCAT-USER LIST * THIS DOES NOT WORK!!! I have even gotten the confirmation message back stating I had been removed, that was a week ago. So far I have deleted over 1000 e-mail message since then. Good luck!! -Original Message- From: Mike Braden [mailto:[EMAIL PROTECTED]] Sent: Monday, May 21, 2001 7:36 AM To: [EMAIL PROTECTED] Subject: RE: * URGENT: UNSUBSCRIBING FROM THE TOMCAT-USER LIST * This is a copy of the welcome message you get when subscribing to this group. You can use one of two methods. Send a message to the address listed below, which includes the command for the mail system. If you are still at the same address use: [EMAIL PROTECTED] or if your mail address has changed, use [EMAIL PROTECTED] Inserting your old email address in place of xxx=xxx.com You can also unsubscribe via the mail list web page on the Jakarta site. Mike. -- Mike Braden [EMAIL PROTECTED] [EMAIL PROTECTED] Hi! This is the ezmlm program. I'm managing the [EMAIL PROTECTED] mailing list. I'm working for my owner, who can be reached at [EMAIL PROTECTED] Acknowledgment: I have added the address [EMAIL PROTECTED] to the tomcat-user mailing list. Welcome to [EMAIL PROTECTED]! Please save this message so that you know the address you are subscribed under, in case you later want to unsubscribe or change your subscription address. To unsubscribe, send a message to: [EMAIL PROTECTED] --- Administrative commands for the tomcat-user list --- I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address: For help and a description of available commands, send a message to: [EMAIL PROTECTED] To subscribe to the list, send a message to: [EMAIL PROTECTED] To remove your address from the list, just send a message to the address in the ``List-Unsubscribe'' header of any list message. If you haven't changed addresses since subscribing, you can also send a message to: [EMAIL PROTECTED] or for the digest to: [EMAIL PROTECTED] For addition or removal of addresses, I'll send a confirmation message to that address. When you receive it, simply reply to it to complete the transaction. If you need to get in touch with the human owner of this list, please send a message to: [EMAIL PROTECTED] Please include a FORWARDED list message with ALL HEADERS intact to make it easier to help you. -Original Message- From: Laurence Mayer [mailto:[EMAIL PROTECTED]] Sent: Monday, May 21, 2001 9:55 AM To: '[EMAIL PROTECTED]' Subject: RE: * URGENT: UNSUBSCRIBING FROM THE TOMCAT-USER LIST * I have been trying for days, still cannot unsubscribe, if you do find the way, please let me know how. Thanks -Original Message- From: Sharad Mohan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 21, 2001 2:45 PM To: [EMAIL PROTECTED] Subject: * URGENT: UNSUBSCRIBING FROM THE TOMCAT-USER LIST * * URGENT: UNSUBSCRIBING FROM THE TOMCAT-USER LIST * _ Chat with your friends as soon as they come online. Get Rediff Bol at http://bol.rediff.com
How to run through a DMZ firewall.
Title: How to run through a DMZ firewall. I have been unable to track down any documentation on this configuration. Is there any out there? Where can I get thorough documentation for Tomcat? Thanks in advance, Fred Huelsbeck
RE: please unsubscribe me
Title: RE: please unsubscribe me To remove your address from the list, send a message to: [EMAIL PROTECTED] -Original Message- From: Tien Duc Nguyen [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 10:33 AM To: [EMAIL PROTECTED] Subject: Re: please unsubscribe me praveen wrote: please unsubscribe me yeah me too !!1
RE: Possible Jasper/introspecthelper bug...
Robert, It looks like the INPUT ... should have an equal sign INPUT type="hidden" name="actionType" value"%=dbBean.ACTION_INTERFACE_ADD_USER%" here ^ making it: INPUT type="hidden" name="actionType" value="%=dbBean.ACTION_INTERFACE_ADD_USER%" Fred [EMAIL PROTECTED] -Original Message- From: Robert Wohleb [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 8:30 PM To: tomcat-user listserv Subject: Possible Jasper/introspecthelper bug... PLEASE HELP ME, TOMCAT DEVELOPERS If one of the developers is around please email me. I need help tracking this down. Here is the general situation. I am running tomcat 3.2 with jdk 1.3 on redhat 6.2... I have all JSP pages define a bean with scope=session as jsp:useBean id="dbBean" scope="session" class="parafoil.web.custdb.CustDBBean" / I have a file called main.jsp in /protected/process/ in the root of my web app. All this JSP does is define the bean like above, set all params with jsp:setProperty name="dbBean" property="*" / and then forward to a page that the bean defines based upon the params passed to it with jsp:forward page="%=dbBean.getActionURL()%" / I have a JSP file called main.jsp in /protected/interface/ in the root of my web app. All this JSP does is define the bean as above and show a form by FORM method="post" action="/custdb/protected/process/main.jsp" INPUT type="hidden" name="actionType" value"%=dbBean.ACTION_INTERFACE_ADD_USER%" INPUT type="submit" name="add_user" value="Add User" /FORM The ACTION_INTERFACE_ADD_USER public variable of the bean is defined as a public final int. I'm using this scheme for enumeration. The root of my web app is /custdb/ by the way. All forwards work when hardocded using URLs like /protected/interface/main.jsp When I hit the button to submit the form I get the 500 error listed below. The Jasper Exception does not include a message as with other JasperExceptions I have seen. On stderr I get 2001-01-11 06:46:43 - Ctx( /custdb ): JasperException: R( /custdb + /protected/process/main.jsp + null) Using the 500 error listed below, I followed the line numbers into the src to the convert function that the instrospectionhelper uses. I now print the values for the class type and value to stderr and determined the value being passed contains a single space. To double check, I had the catch of convert() print a stack trace before throwing the JasperException. As I suspected, it was caused by Integer trying to convert a " ". I checked the HTML from within the browser and it shows !-- Add user -- FORM method="post" action="/custdb/protected/process/main.jsp" INPUT type="hidden" name="actionType" value"3" INPUT type="submit" name="add_user" value="Add User" /FORM It's not that the HTML form is passing the space. I'm trying to follow the code back to see where the " " in value is coming from. If one of the developers has an idea I am open to hear it. I am currently using a "build" of the tomcat source so that I can trace this problem, so if you need me to test some code on my sys then please tell me. Error: 500 Location: /custdb/protected/process/main.jsp Internal Servlet Error: org.apache.jasper.JasperException: at org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibra ry.java:215) at org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.jav a:157) at p_00025otected.process._0002fprotected_0002fprocess_0002fmain_0002ejspmain_j sp_0._jspService(_0002fprotected_0002fprocess_0002fmain_0002ejspmain_jsp_0.j ava:84) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.s
zip and tar.gz files bad?
I've just re-subscribed to this list again, so excuse if I missed answers to the following: I've downloaded jakarta-tomcat-3.2.1.zip and tried to unzip it. Unzip tells me its an incomplete file. I then downloaded jakarta-tomcat-3.2.1.tar.gz and gunzip/tar tell me: gunzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Error exit delayed from previous errors Looks like incomplete files out there. Any info on this, anyone? Thanks in advance Fred [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
PoolMan
Hi, Can anyone direct me to some kind of list for PoolMan database pooling. I am currently instantiating a JDBCPool through the SQLManager and storing a reference to the SQLManager in the ServletContext. This is all being done in the init method of a "Load-on-startup" servlet. I am wondering if I can make use of some of the higher level functionality of the SQLUtil class. It doesn't seem to keep a reference to the SQLManager or the JDBCPool directly. It uses getInstance of the SQLManager to return a reference to SQLManager, but unless it uses the getClass().getResourceAsStream() methods in its constructor, I don't know how SQLUtil would obtain a reference to the instance of the SQLManager in the ServletContext. Do I need to subclass the SQLUtil class to use its functionality? If anyone can point me in the right direction, I would appreciate it. I am using Tomcat 3.2.1, incidentally. Fred __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/
multipart/form-data problem
I'm trying to send Tomcat a "POST" with an enctype="multipart/form-data". This is for uploading a combination of form data and binary files. Tomcat doesn't appear to take this type. Netscape reports "A network error occurred while sending data. (Network Error: Connection aborted)". I can talk to the servlet if I'm not doing an enctype of multipart/form-data. I've written the Java servlet to handle this and it has been functioning perfectly using Sun's Java Web Server 2.0. The only possible difference with the code should be where Tomcat will attempt to put the uploaded file, but I'm not even getting that far. Anybody do this before with Tomcat? Thanks, Fred Muehlmann [EMAIL PROTECTED]