tomcat-users.xml MD5 sum
hello There, I implemented aide monitoring on tomcat (and the webapps) yesterday and today faced a very strange problem. tomcat-users.xml seems the same file (it contents) but aide reports MD5 and SHA different checksums. is it possible that on restart apache tomcat to change (or recreate) tomcat-users.xml. It was restarted automatically in the morning. If YES ... some ideas how to prevent this behavior (I think about to make tomcat-users.xml to be owned by root). -- Best regards, Nikolay Diulgerov Network Administrator E-mail: [EMAIL PROTECTED] Telephone : +33 4 89 87 77 77 Fax : +33 4 89 87 77 00 Web: http://www.codix-france.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Regarding Error 404-please help!
laura fu wrote: Hi Tomcat, How are you? I am new to using Apache Tomcat and am in the process of learning it. I came across this problem while i was setting it up, please kindly take a look, i just need a little push in the right direction. I saved my work HelloWorld.java in the folder in C:\Program Files\Apache Group\Tomcat 5.5\webapps\jjolt\WEB-INF\classes. When i type in the address: http://localhost:8080/jjolt/servlet/HelloWorld; , i am supposed to see Hello World displayed on my browser, but instead i saw this: HTTP Status 404 - /jjolt/servlet/HelloWorld type Status reportmessage /jjolt/servlet/HelloWorlddescription The requested resource (/jjolt/servlet/HelloWorld) is not available. Can you post web.xml file from jjolt application? It seems like you didn't configure servlet mapping. -Ognjen - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Content disposition header not reaching client
Hey folks, we're using apache httpd serverion (2.2.8) on a Ubuntu Server. We're normally using a LAMP-config for our webapps, but some of them are also written in java / jsp. Therefore we're using mod_jk (1.2.26) to pass-through the corresponding requests. Unfortunately the following code modifying the headers never reaches the client when using the connector - when calling tomcat directly over port 8080 it works like a charme: arg1.setContentType(application/vnd.ms-excel); arg1.setHeader(Content-Disposition, attachment; filename=\Bookings.xls\); arg1.setHeader(Pragma, public ); arg1.setHeader(Expires, 0 ); arg1.setHeader(Cache-Control, public, must-revalidate, post-check=0, pre-check=0); Any ideas on how to resolve this issue? Kind regards from Germany, Jan _ MSN Video: Coole Beats und krasse Actionen! Kostenlos anschauen! http://video.msn.com/?mkt=de-de
Re: tomcat-users.xml MD5 sum
2008/9/10 Niki Diulgerov [EMAIL PROTECTED]: I implemented aide monitoring on tomcat (and the webapps) yesterday and today faced a very strange problem. tomcat-users.xml seems the same file (it contents) but aide reports MD5 and SHA different checksums. is it possible that on restart apache tomcat to change (or recreate) tomcat-users.xml. It was restarted automatically in the morning. If YES ... some ideas how to prevent this behavior (I think about to make tomcat-users.xml to be owned by root). Add readonly=true to the Resource element that defines UserDatabase in server.xml. Best regards, Konstantin Kolinko - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[SECURITY] CVE-2008-2938 - Apache Tomcat information disclosure vulnerability - Updated
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 CVE-2008-2938: Apache Tomcat information disclosure vulnerability - Updated Severity: Important (was moderate) Vendor: The Apache Software Foundation Versions Affected: Tomcat 4.1.0 to 4.1.37 Tomcat 5.5.0 to 5.5.26 Tomcat 6.0.0 to 6.0.16 The unsupported Tomcat 3.x, 4.0.x and 5.0.x versions may be also affected Description (new information): Further investigation of CVE-2008-2938 has shown that the vulnerability also exists only with URIEncoding=UTF-8 set on the connector. In these configurations arbitrary files in the docBase for an application, including files such as web.xml, may be disclosed. Users should also be aware that this vulnerability will apply when processing requests with UTF-8 body encoding and useBodyEncodingForURI=true Mitigation: 6.0.x users should upgrade to 6.0.18 5.5.x users should upgrade to 5.5.27 4.1.x users should obtain the latest source from svn or apply this patch: http://svn.apache.org/viewvc?view=revrevision=681065 Example: http://www.target.com/contextpath/%c0%ae%c0%ae/WEB-INF/web.xml Credit: This additional information was discovered by the Apache Tomcat security team. References: http://tomcat.apache.org/security.html Mark Thomas -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkjHnCMACgkQb7IeiTPGAkMoLQCg2PxS09CpZGI9t+QcdifSfMh8 CHcAoOSRAPOzAFH5hx1w8jxOBthrAKEJ =Fi0E -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CGIServlet in Tomcat 6
See Thread at: http://www.techienuggets.com/Detail?tx=4877 Posted on behalf of a User In order to add privileged=true property simply edit $CATALINA_HOME/conf/context.xml replace tag Context by Context privileged=true In Response To: Hi all, I'm using CGI servlet in Tomcat 5 without any problem, but with Tomcat 6 I get this error when deploying my web application: java.lang.SecurityException: Servlet of class org.apache.catalina.servlets.CGIServlet is privileged and cannot be loaded by this web application In Tomcat 6, I noticed that the servlet-cgi.jar is now part of catalina.jar, but that's it. thanks a lot for any advice. Yannick compete error message: java.lang.SecurityException: Servlet of class org.apache.catalina.servlets.CGIServlet is privileged and cannot be loaded by thisweb application at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1134) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4044) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:451) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) 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:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) - To start a new topic, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reading Tomcat source code
Hello all, As an exercise, I would like to start reading Tomcat 6 source code. Lots of things to learn there, I guess ! But I don't know where to start. An idea, anyone ? Yours, Pierre
Re: Reading Tomcat source code
I would suggest to start from the Default servlet (that would be org.apache.catalina.servlets.DefaultSerlet) On Wed, Sep 10, 2008 at 5:07 PM, Pierre Goupil [EMAIL PROTECTED]wrote: Hello all, As an exercise, I would like to start reading Tomcat 6 source code. Lots of things to learn there, I guess ! But I don't know where to start. An idea, anyone ? Yours, Pierre
Migrating to tomcat 6 gives formatted currency amounts problem
I'm transferring my application from a tomcat 5.5.26 server to tomcat 6.0.18, and notice that my formatted currency amounts are not being properly displayed. Instead of a Pound (GBP) sign I get a question mark within a black diamond (the app works fine in 5.5.26). This can easily be emulated. Add the following lines to the HelloWorldExample.java of the servlet examples in Tomcat 5.5.26 and those of 6.0.18: java.text.NumberFormat currencyFormat= java.text.NumberFormat.getCurrencyInstance(Locale.UK); out.print(Formatted currency (GBP) : + currencyFormat.format( 1623540.00 ) ); This will display the following : In Tomcat 6.0.18: Formatted currency (GBP) : ?1,623,540.00 (I've emulated the question-mark within diamond here, I'll send you a screenshot if you want) Tomcat 5.5.26: Formatted currency (GBP) : £1,623,540.00 (depending on your client you may or not may see the pound sign in front of the above amount) What can be the problem, is there some extra locale configuration that needs to be done ? Thanks for your answer, Regards, Willem
Unable to import certificate into keystore
This is probably more of a Java issue than a Tomcat issue, but it's directly impacting our use of Tomcat, so I'm sending it here first... Configuration: Tomcat version: Tomcat 5.5.20 JDK: 1.5.0_06 OS: Windows Server 2003, Standard Edition Problem: We use Tomcat for B2B communication with one of our partners over HTTP / HTTPS, implementing some of the RosettaNet interfaces. Tomcat sometimes functions as a client, sometimes as a server for this purpose. For the SSL / HTTPS communications, we and our partners need to recognize each other's certificates. So the person who set this up originally for my company (I inherited this thing from a guy who's no longer here) imported our partner's certificates into our keystore, and things are working fine. Our partner now sends us a new certificate and tells us we need to import this new one. So I execute the following... keytool -import -alias keystore alias -keystore path to keystore\.keystore -file path to certificate\CompanynameProdCert.der Keytool asks me for our keystore password, which I supply, and then I get the following error: keytool error: java.lang.Exception: Public keys in reply and keystore don't match I am a complete and total novice regarding SSL and cryptography in general, so please don't lambaste me for not knowing the basics, but after having consulted Google, I'm pretty much at a loss regarding how to proceed. Any help will be very much appreciated. TIA, David
Re: Migrating to tomcat 6 gives formatted currency amounts problem
Send reply to: Tomcat Users List users@tomcat.apache.org Date sent: Wed, 10 Sep 2008 17:27:51 +0200 From: Willem Moors [EMAIL PROTECTED] To: users@tomcat.apache.org Subject:Migrating to tomcat 6 gives formatted currency amounts problem I'm transferring my application from a tomcat 5.5.26 server to tomcat 6.0.18, and notice that my formatted currency amounts are not being properly displayed. Instead of a Pound (GBP) sign I get a question mark within a black diamond (the app works fine in 5.5.26). This can easily be emulated. Add the following lines to the HelloWorldExample.java of the servlet examples in Tomcat 5.5.26 and those of 6.0.18: java.text.NumberFormat currencyFormat= java.text.NumberFormat.getCurrencyInstance(Locale.UK); out.print(Formatted currency (GBP) : + currencyFormat.format( 1623540.00 ) ); This will display the following : In Tomcat 6.0.18: Formatted currency (GBP) : ?1,623,540.00 (I've emulated the question-mark within diamond here, I'll send you a screenshot if you want) Tomcat 5.5.26: Formatted currency (GBP) : £1,623,540.00 (depending on your client you may or not may see the pound sign in front of the above amount) Works fine for me, fresh install of 6.0.18, changed the HelloWorldExample.java and recompiled. Tried with both IE7 and FF 3. Are you sure you don't have a httpd in front of tomcat? I've seen simillar problem when using apache httpd. I had to turn off the option AddDefaultCharset -Steve O. What can be the problem, is there some extra locale configuration that needs to be done ? Thanks for your answer, Regards, Willem - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JVM per Context
I have multiple contexts that are defined for a given host in my server.xml each context I would like to start up in its own jvm, for dll and enviornment variable reasons. Here's an example of my server.xml: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=/eclipse/A docBase=/eclipsev1 !--I want to load dllv1.dll-- !--I want to set the env var 'slot' to ''A'-- Parameter name=com.dev.myParm value=eclipse/A override=false/ /Context Context path=/eclipse/B docBase=/eclipsev2 !--I want to load dllv2.dll-- !--I want to set the env var 'slot' to 'B'-- Parameter name=com.dev.myParm value=eclipse/B override=false/ /Context /host I've read documentation for tomcat 3.4 that details the use of ajp for communication to achieve this but can't find anything about jvms docs. Thanks for any help, Mike -- View this message in context: http://www.nabble.com/JVM-per-Context-tp19414891p19414891.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM per Context
From: Michael Dehmlow [mailto:[EMAIL PROTECTED] I have multiple contexts that are defined for a given host in my server.xml each context I would like to start up in its own jvm, for dll and enviornment variable reasons. As a solution sketch (I've never done it), you'll need to deploy eclipsev1 and eclipsev2 in two different Tomcat instances. See the file RUNNING.txt that comes with your version of Tomcat (which you didn't tell us!) for details on setting up multiple instances. You'll then need something that talks AJP or can reverse proxy to sit at the front of the two Tomcats and divide incoming requests to the multiple Tomcats. Apache httpd (what most people call Apache) can do this. Again, check the docs at http://tomcat.apache.org for integration of httpd as a front-end, Tomcat as a back-end. I suspect you'll get more detailed responses; this is rapid rather than complete! - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Regarding Error 404-please help!
Hi Ognjen, Thanks for your reply! Here is my web.xml from jjolt application: ?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-appdisplay-nameJJOLT servlets/display-name description JJOLT servlets Examples. /descriptionservlet servlet-nameHelloWorld/servlet-name servlet-class/servlet/HelloWorld/servlet-class /servlet servlet servlet-nameHello/servlet-name servlet-class/servlet/Hello/servlet-class /servlet servlet servlet-nameAttributes/servlet-name servlet-classAttributes/servlet-class /servlet servlet servlet-namePostAttributes/servlet-name servlet-classPostAttributes/servlet-class /servlet servlet servlet-nameAddToShoppingCart/servlet-name servlet-classAddToShoppingCart/servlet-class /servlet servlet servlet-nameShoppingCartURLRewrite/servlet-name servlet-classShoppingCartURLRewrite/servlet-class /servlet servlet servlet-nameReviewShoppingCart/servlet-name servlet-classReviewShoppingCart/servlet-class /servlet servlet servlet-nameShoppingCartCookies/servlet-name servlet-classShoppingCartCookies/servlet-class /servlet servlet servlet-namePageCountUsingSessionAPI/servlet-name servlet-classPageCountUsingSessionAPI/servlet-class /servlet servlet servlet-nameSaveSessionData/servlet-name servlet-classSaveSessionData/servlet-class /servlet servlet servlet-nameShoppingCartSessionTracking/servlet-name servlet-classShoppingCartSessionTracking/servlet-class /servlet servlet servlet-namegetExample/servlet-name servlet-classAttributes/servlet-class /servlet servlet servlet-namegetInitializationParameters/servlet-name servlet-classInit_param/servlet-class init-param param-nameversion /param-name param-valuebest/param-value /init-param /servletservlet-mapping servlet-nameHelloWorld/servlet-name url-pattern HelloWorld/url-pattern /servlet-mapping servlet-mapping servlet-nameHello/servlet-name url-pattern/servlet/Hello/url-pattern /servlet-mapping servlet-mapping servlet-nameAttributes/servlet-name url-pattern/servlet/Attributes/url-pattern /servlet-mapping servlet-mapping servlet-namePostAttributes/servlet-name url-pattern/servlet/PostAttributes/url-pattern /servlet-mapping servlet-mapping servlet-nameAddToShoppingCart/servlet-name url-pattern/servlet/AddToShoppingCart/url-pattern /servlet-mapping servlet-mapping servlet-nameReviewShoppingCart/servlet-name url-pattern/servlet/ReviewShoppingCart/url-pattern /servlet-mapping servlet-mapping servlet-nameShoppingCartURLRewrite/servlet-name url-pattern/servlet/ShoppingCartURLRewrite/*/url-pattern /servlet-mapping servlet-mapping servlet-nameShoppingCartCookies/servlet-name url-pattern/servlet/ShoppingCartCookies/url-pattern /servlet-mapping servlet-mapping servlet-namePageCountUsingSessionAPI/servlet-name url-pattern/servlet/PageCountUsingSessionAPI/url-pattern /servlet-mapping servlet-mapping servlet-nameSaveSessionData/servlet-name url-pattern/servlet/SaveSessionData/url-pattern /servlet-mapping servlet-mapping servlet-nameShoppingCartSessionTracking/servlet-name url-pattern/servlet/ShoppingCartSessionTracking/url-pattern /servlet-mapping servlet-mapping servlet-namegetExample/servlet-name url-pattern/send/url-pattern /servlet-mapping servlet-mapping servlet-namegetInitializationParameters/servlet-name url-pattern/init/url-pattern /servlet-mapping/web-app Let me know if the email screwed up the formatting, then i will send in another format. I have also uncommented the invoker servlet in the main web.xml file. Thanks so much! Regards, Laura Date: Wed, 10 Sep 2008 09:51:13 +0200 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: Regarding Error 404-please help! laura fu wrote: Hi Tomcat, How are you? I am new to using Apache Tomcat and am in the process of learning it. I came across this problem while i was setting it up, please kindly take a look, i just need a little push in the right direction. I saved my work HelloWorld.java in the folder in C:\Program Files\Apache Group\Tomcat 5.5\webapps\jjolt\WEB-INF\classes. When i type in the address: http://localhost:8080/jjolt/servlet/HelloWorld; , i am supposed to see Hello World displayed on my browser, but instead i saw this: HTTP Status 404 - /jjolt/servlet/HelloWorldtype Status reportmessage
RE: JVM per Context
From: Michael Dehmlow [mailto:[EMAIL PROTECTED] Subject: JVM per Context I have multiple contexts that are defined for a given host in my server.xml Placing Context elements in server.xml is strongly discouraged for any current version of Tomcat; however, you didn't bother to tell us what version of Tomcat you're using, so that may or may not be applicable. each context I would like to start up in its own jvm, for dll and enviornment variable reasons. Each Tomcat runs in its own JVM, so you'll need separate installations for each webapp. Look in the RUNNING.txt file for instructions. I've read documentation for tomcat 3.4 that details the use of ajp for communication to achieve this but can't find anything about jvms docs. Since there never has been nor ever will be a Tomcat 3.4, what you were looking at is rather suspect. You will need some sort of front end to route the requests to the different Tomcat instances, which could be httpd or some other forwarding mechanism. Consult the Tomcat connector documentation for whatever level you're using to figure out how to use mod_jk or mod_proxy. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Preventing File Access
Send reply to: Tomcat Users List users@tomcat.apache.org From: Stephen Caine [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Subject:Preventing File Access Date sent: Tue, 09 Sep 2008 19:35:31 -0400 All, Can someone point me to where I can read how to prevent/redirect access to a particular file in the Tomcat/webapp context. Specifically, all of my directories have the OS X DS_Store file. I would like to redirect users to an error page when this file is directly accessed. Thank you, In the future it would help if you mention what version of Tomcat you are using. You will have to use a security constraint, read these two threads for examples. http://marc.info/?l=tomcat-userm=110311676821916w=2 http://marc.info/?l=tomcat-userm=98100806313397w=2 -Steve O. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Migrating to tomcat 6 gives formatted currency amounts problem
Works fine for me, fresh install of 6.0.18, changed the HelloWorldExample.java and recompiled. Tried with both IE7 and FF 3. Are you sure you don't have a httpd in front of tomcat? I've seen simillar problem when using apache httpd. I had to turn off the option AddDefaultCharset -Steve O. Thanks for your quick response. No there is no Apache Httpd in front of it (yet). It's strange that you don't have the problem. The environment in which I'm running both tomcat 6.0.18 and tomcat 5.5.26 is on Ubuntu 64-bit linux with this java version: java version 1.6.0_07 Java(TM) SE Runtime Environment (build 1.6.0_07-b06) Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode) Regards, Willem
Problem with Apache, Tomcat, mod_jk
I have a problem using Tomcat 6.0.18, latest Apache, latest mod_jk and Java SE 6. I have it set up so I can access the main Tomcat page..but when I go to the manager from there, it shows a (apache) 404 error. Can someone help me with this problem? I have the configuration files ready for those who wants to have a look at them (mod_jk.conf (auto generated), httpd.conf (where I include mod_jk.conf), server.xml and workers.properties). You can find the config files here: http//excessivedarkness.org/conf/ Thanks Lars
Disable java code execution %blabla% in jsp, but permits tags
Plz Help !! Is it possible to disable all java code execution within jsp page (by security manager or something) but allow custom tags to be executed? The problem is that the users can change jsp files, and due to security reasons we can allow them to use only tags -- View this message in context: http://www.nabble.com/Disable-java-code-execution-%3C-blabla-%3E-in-jsp%2C-but-permits-tags-tp19415053p19415053.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [newbie] connectionTimeout value for AJP Connector
Bill Barker schrieb: Stacey Jones [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I am a new member on tomcat mailing list. For tomcat 5.5 - Is there a recommended value for connectionTimeout attribute? How to decide this value? The documentation says : The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. The default value is infinite (i.e. no timeout). Thanks for your help! Like most configuration options, the recommended value depends on your setup :). For small to medium sized applications on systems like Windows or Solaris the default value is reasonable (which is why it is the default). For Linux systems with newer kernals, this should be alright as well. On these systems the cost is fairly low to have lots of threads blocking on i/o. It is Linux systems with older kernals that cause problems. Also if you are using the APR or (experimental) NIO AJP connector it should be fine on most o/s, since there is no relation between the number of connections and the number of threads. If there isn't a firewall between Apache/IIS and Tomcat I would set it to be pretty high on well-behaved systems (at least 5min for a medium sized app). If there is a firewall, then it should be probably slightly less than the firewall setting to close idle connections. I don't know if the following already was obvious. The phrase after accepting a connection, for the request URI line to be presented in the AJP should be extended by It also limits the amount of time a persistent AJP connection is kept open waiting for the next request to arrive. AJP13 uses persistent connections, much like HTTP Keep-Alive. The more common use case for this timeout is not limiting waiting for the initial request directly after connections establishment, but mlimiting the maximum idle time of the connection between consecutive requests. There is a similar timeout on the mod_jk side. Please have a look at http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Migrating to tomcat 6 gives formatted currency amounts problem
Send reply to: Tomcat Users List users@tomcat.apache.org Date sent: Wed, 10 Sep 2008 18:58:48 +0200 From: Willem Moors [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Subject:Re: Migrating to tomcat 6 gives formatted currency amounts problem Works fine for me, fresh install of 6.0.18, changed the HelloWorldExample.java and recompiled. Tried with both IE7 and FF 3. Are you sure you don't have a httpd in front of tomcat? I've seen simillar problem when using apache httpd. I had to turn off the option AddDefaultCharset -Steve O. Thanks for your quick response. No there is no Apache Httpd in front of it (yet). It's strange that you don't have the problem. The environment in which I'm running both tomcat 6.0.18 and tomcat 5.5.26 is on Ubuntu 64-bit linux with this java version: java version 1.6.0_07 Java(TM) SE Runtime Environment (build 1.6.0_07-b06) Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode) Hmm odd. I tried it on my Redhat test server and worked fine also. Is your tomcat 6 install a default/fresh install? What browser are you using? What character encoding does it think the HelloWorldExample output is coming in as? -Steve O. Regards, Willem - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: relative paths in web.xml [solved]
Just so folks are aware, this has been solved. Apparently is was the servlet that was resolving the location of the XML file based off the Context Docbase, and there was a trick to getting it to realize that the file path you were passing to it was a full file path and not a relative file path. In this case, it was simply putting a $ at the beginning of the value that did the trick. IE: param-value$${catalina.home}/conf/myservlet/myxmlfile.xml/param-value Worked like a charm! Just note that this fix was specific to the servlet that I was using, and not all servlets work the same, so this fix may not work for you. Thanks again to all that helped me with this issue. It was most appreciated! Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Adobe Solution Provider Jordan Michaels wrote: Hmm... I tried this, and it looks as though Tomcat still pre-pends the /home/myuser/public_html/ to my XML file. My servlet throws the error: java.io.FileNotFoundException: /home/myuser/public_html/path/to/tomcat/conf/myservlet/myxmlfile.xml and my file is really located at: /path/to/tomcat/conf/myservlet/myxmlfile.xml I have multiple sites that need to have access to this same servlet with the same XML file passed to it, and it would be great if I didn't have to copy this file to each site for each HOST entry... IE: Host name=mydomain1.net appBase=webapps Context path= docBase=/home/myuser1/public_html/ / /Host Host name=mydomain2.net appBase=webapps Context path= docBase=/home/myuser2/public_html/ / /Host Host name=mydomain3.net appBase=webapps Context path= docBase=/home/myuser3/public_html/ / /Host The way Tomcat is working now, I would have to copy that XML file that I need to pass to the servlet to each user's public_html directory in order for the servlet to use it (which would also make the file web-accessible - not at all what I want). Is there a way to tell Tomcat to not use the docbase when passing this file to the servlet? Thanks to all of you who responded both on-list and off. =) I really appreciate your help! Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Adobe Solution Provider Bill Barker wrote: Jordan Michaels [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm trying to set up a init-param in Tomcat's main web.xml file (the one in $CATALINA_HOME/conf/web.xml) that looks similar to the following: servlet servlet-namemyServlet/servlet-name servlet-classpath.to.my.Servlet/servlet-class init-param param-nameSOME_XML_FILE/param-name param-value./conf/myservlet/myxmlfile.xml/param-value /init-param load-on-startup0/load-on-startup /servlet and in my $CATALINA_HOME/conf/server.xml file, I have the following: Host name=mydomain.net appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=/home/myuser/public_html/ / /Host My XML file is in $CATALINA_HOME/conf/myservlet/myxmlfile.xml, but whenever I load this up, Tomcat looks for the file under the /home/myuser/public_html/ folder. Is there a way that I can tell tomcat to look for a file that's relative to the $CATALINA_HOME folder instead of my Context Docbase value? It would be ideal if the Param-Value had no relation to the Context Docbase value at all. Is this even possible with Tomcat? This feature is specific to Tomcat, but yes you can do it. You would use: param-value${catalina.home}/conf/myservlet/myxmlfile.xml/param-value When Tomcat parses your web.xml file, it will substitute the value for the System property catalina.home. Of course, this works for any System property. Thanks in advance for any help anyone can offer. -- Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Adobe Solution Provider - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Apache, Tomcat, mod_jk
Send reply to: Tomcat Users List users@tomcat.apache.org Date sent: Wed, 10 Sep 2008 19:17:24 +0200 From: Lars 'Levia' Wesselius [EMAIL PROTECTED] To: users@tomcat.apache.org Subject:Problem with Apache, Tomcat, mod_jk I have a problem using Tomcat 6.0.18, latest Apache, latest mod_jk and Java SE 6. Latest is a relative term. At the moment latest apache webserver version is 2.2.9. I have it set up so I can access the main Tomcat page..but when I go to the manager from there, it shows a (apache) 404 error. Can someone help me with this problem? I have the configuration files ready for those who wants to have a look at them (mod_jk.conf (auto generated), httpd.conf (where I include mod_jk.conf), server.xml and workers.properties). You can find the config files here: http//excessivedarkness.org/conf/ You forgot the : in the url. That has to be the biggest mod_jk.conf I've ever seen. You may want to start with something simple. What did the logs show after you tried to access the manager app via httpd? Did you try the url as http://hostname/manager/html/ ? -Steve O. Thanks Lars - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Apache, Tomcat, mod_jk
2008/9/10 Steve Ochani [EMAIL PROTECTED] Send reply to: Tomcat Users List users@tomcat.apache.org Date sent: Wed, 10 Sep 2008 19:17:24 +0200 From: Lars 'Levia' Wesselius [EMAIL PROTECTED] To: users@tomcat.apache.org Subject:Problem with Apache, Tomcat, mod_jk I have a problem using Tomcat 6.0.18, latest Apache, latest mod_jk and Java SE 6. Latest is a relative term. At the moment latest apache webserver version is 2.2.9. I have it set up so I can access the main Tomcat page..but when I go to the manager from there, it shows a (apache) 404 error. Can someone help me with this problem? I have the configuration files ready for those who wants to have a look at them (mod_jk.conf (auto generated), httpd.conf (where I include mod_jk.conf), server.xml and workers.properties). You can find the config files here: http//excessivedarkness.org/conf/ You forgot the : in the url. Sorry That has to be the biggest mod_jk.conf I've ever seen. You may want to start with something simple. Most probably. It's automatically configured. What did the logs show after you tried to access the manager app via httpd? Did you try the url as http://hostname/manager/html/ ? Yes, that's where it goes to when you click Tomcat Manager, that's where the 404 error pops up. -Steve O. Thanks Lars - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Single Sign On valve issue
I'm having an issue with the single sign on valve under tomcat 6. I have 2 webapps and if a user logs in under app A but then only uses app B, they get logged out after 30 minutes. The session timing out in app A removes the login information across all webapps. Does anyone have any idea why this might be happening? I've been looking all over but I can't find a solution. The documentation also says that invalidating the session in one webapp will invalidate them in all applications, but I'm not seeing this either. -- ~Ben Newman - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM per Context
Thanks, my version of tomcat 5.5.26. My mistake I was looking at tomcat 3.3 documentation: http://tomcat.apache.org/tomcat-3.3-doc/tomcat-apache-howto.html http://tomcat.apache.org/tomcat-3.3-doc/tomcat-apache-howto.html . Yes defining contexts in the Server.xml is discouraged but I'm doing it anyway. ;) For those in a similar situation I'm going down the path of defining an engine per context: Engine name=engA defaultHost=localhost jvmRoute=jvmA Host name=localhost appBase=webapps unpackWARs=true xmlValidation=false xmlNamespaceAware=false Context path=/eclipse/A docBase=/slot_A cookies='false' Parameter name=com.dev.myParm value=/eclipse/A override=true/ /Context /Host /Engine Using jvmRoute the idea is to use the clustering mechanism of tomcat to give me multiple jvms This being only my theory I can only hope someone can either call me an idiot or give me a few pointers in short order. I will post my findings as I find them. Thanks, Mike -- View this message in context: http://www.nabble.com/JVM-per-Context-tp19414891p19420413.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Apache, Tomcat, mod_jk
Lars 'Levia' Wesselius schrieb: 2008/9/10 Steve Ochani [EMAIL PROTECTED] Send reply to: Tomcat Users List users@tomcat.apache.org Date sent: Wed, 10 Sep 2008 19:17:24 +0200 From: Lars 'Levia' Wesselius [EMAIL PROTECTED] To: users@tomcat.apache.org Subject:Problem with Apache, Tomcat, mod_jk I have a problem using Tomcat 6.0.18, latest Apache, latest mod_jk and Java SE 6. Latest is a relative term. At the moment latest apache webserver version is 2.2.9. I have it set up so I can access the main Tomcat page..but when I go to the manager from there, it shows a (apache) 404 error. Can someone help me with this problem? I have the configuration files ready for those who wants to have a look at them (mod_jk.conf (auto generated), httpd.conf (where I include mod_jk.conf), server.xml and workers.properties). You can find the config files here: http//excessivedarkness.org/conf/ You forgot the : in the url. Sorry That has to be the biggest mod_jk.conf I've ever seen. You may want to start with something simple. Most probably. It's automatically configured. What did the logs show after you tried to access the manager app via httpd? Did you try the url as http://hostname/manager/html/ ? Yes, that's where it goes to when you click Tomcat Manager, that's where the 404 error pops up. You need to show us the config and the relevant log part. Can you use the manager when directly talking to Tomcat (using its HTTP conector)? Can you use any other context when connecting via the web server, so is the problem manager specific, or does your whole Apache/mod_jk/Tomcat setup not work? Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Replaceing RequestFacade
Argh, I feel so stupid. Thank you for bonking me on the head. Feel free to bonk harder next time. Thanks! George On 9/9/08 5:53 PM, Bill Barker [EMAIL PROTECTED] wrote: Your facade has to extend (Http)ServletRequestWrapper from the standard servlet-api. According to the spec, that is the only valid way to wrap a request. As you've seen, Tomcat enforces this restriction :). George Baxter [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, For various and sundry reasons, I need to wrap the original HttpServletRequest with a facade of my own. I know that the HttpServletRequest exposed by Catalina is a RequestFacade object. I simply wrap my facade around this puppy. And... when my jsp attempts to render... boom: java.lang.ClassCastException: com.xxx.request.MyTestRequestFacade at org.apache.catalina.core.ApplicationDispatcher.unwrapRequest(ApplicationDispatcher.java:814) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:401) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) I tried to extend the RequestFacade, but cannot because the constructor requires a org.apache.catalina.connector.Request, and I cannot get a hold of that. Is there anything I can do to encourage tomcat to instantiate my request facade instead its own? Using Tomcat 5.5 at present. Thanks, - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Preventing File Access
Steve, Can someone point me to where I can read how to prevent/redirect access to a particular file in the Tomcat/webapp context. Specifically, all of my directories have the OS X DS_Store file. I would like to redirect users to an error page when this file is directly accessed. In the future it would help if you mention what version of Tomcat you are using. version 5.5.7 You will have to use a security constraint, read these two threads for examples. http://marc.info/?l=tomcat-userm=110311676821916w=2 http://marc.info/?l=tomcat-userm=98100806313397w=2 Thank you for the reference. Stephen Caine CommonGround Softworks, Inc. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Apache, Tomcat, mod_jk
2008/9/10 Rainer Jung [EMAIL PROTECTED] Lars 'Levia' Wesselius schrieb: 2008/9/10 Steve Ochani [EMAIL PROTECTED] Send reply to: Tomcat Users List users@tomcat.apache.org Date sent: Wed, 10 Sep 2008 19:17:24 +0200 From: Lars 'Levia' Wesselius [EMAIL PROTECTED] To: users@tomcat.apache.org Subject:Problem with Apache, Tomcat, mod_jk I have a problem using Tomcat 6.0.18, latest Apache, latest mod_jk and Java SE 6. Latest is a relative term. At the moment latest apache webserver version is 2.2.9. I have it set up so I can access the main Tomcat page..but when I go to the manager from there, it shows a (apache) 404 error. Can someone help me with this problem? I have the configuration files ready for those who wants to have a look at them (mod_jk.conf (auto generated), httpd.conf (where I include mod_jk.conf), server.xml and workers.properties). You can find the config files here: http//excessivedarkness.org/conf/ You forgot the : in the url. Sorry That has to be the biggest mod_jk.conf I've ever seen. You may want to start with something simple. Most probably. It's automatically configured. What did the logs show after you tried to access the manager app via httpd? Did you try the url as http://hostname/manager/html/ ? Yes, that's where it goes to when you click Tomcat Manager, that's where the 404 error pops up. You need to show us the config and the relevant log part. I posted the configs..right? The log shows, when trying to access /manager/html (mod_jk.log) [Wed Sep 10 16:40:35 2008] [4199:1081847968] [debug] map_uri_to_worker::jk_uri_worker_map.c (597): Attempting to map URI '/manager/html' from 0 maps And that's all it logs. Can you use the manager when directly talking to Tomcat (using its HTTP conector)? Yes, it works perfectly when using the Tomcat server itself, on port 8080. Can you use any other context when connecting via the web server, so is the problem manager specific, or does your whole Apache/mod_jk/Tomcat setup not work? Regards, Rainer Erm..I have another servlet deployed, it works when using Tomcat server itself, but it doesn't work through Apache. Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems Configuring APR Based Native Libraries for Tomcat
I am trying to compile APR native library for Tomcat. When I run the configure I get messages like this: # ./configure --prefix=/opt/tomcat/apr-connector --with-apr=/usr/bin/apr-1-config --with-ssl=/usr checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking for working mkdir -p... yes Tomcat Native Version: 1.1.12 checking for chosen layout... tcnative checking for APR... yes setting CC to gcc setting CPP to gcc -E checking for a BSD-compatible install... /usr/bin/install -c checking for JDK location (please wait)... /usr/java/latest from environment checking Java platform... checking Java platform... checking for sablevm... NONE adding -I/usr/java/latest/include to TCNATIVE_PRIV_INCLUDES checking os_type directory... linux adding -I/usr/java/latest/include/linux to TCNATIVE_PRIV_INCLUDES checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for OpenSSL library... using openssl from /usr/lib and /usr/include checking OpenSSL library version... ok checking for OpenSSL DSA support... yes setting TCNATIVE_LDFLAGS to -lssl -lcrypto adding -DHAVE_OPENSSL to CFLAGS setting TCNATIVE_LIBS to setting TCNATIVE_LIBS to /usr/lib/libapr-1.la -lpthread -ldl ./configure: line 4315: APR_INCLUDES: command not found ./configure: line 4316: APR_LIBS: command not found ./configure: line 4317: APR_LIB_TARGET: command not found ./configure: line 4318: APR_SO_EXT: command not found ./configure: line 4319: BASH: command not found ./configure: line 4320: BASH_ARGC: command not found ./configure: line 4321: BASH_ARGV: command not found ./configure: line 4322: BASH_LINENO: command not found --- SNIP --- In http://tomcat.apache.org/tomcat-6.0-doc/apr.html I see the following requirement: * JNI headers from Java compatible JDK 1.4+ Where do I get those JNI headers? I'm using Sun JDK 1.6.0_06 and I don't see them in the include/linux dir. Is anyone out there using the APR based Native library for Tomcat? Will it change my life? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
specifying a custom access log pattern
Hi, I was wondering what the exact syntax for specifying a custom access log pattern in the server.xml is. Here is a snippet from which contains my custom format: Valve className=org.apache.catalina.valves.AccessLogValue prefix=foo. suffix=.accesslog directory=/usr/local/tomcat/logs/context_logs/ pattern=%h %t %m %U %H %s %b %{User-Agent}i %{Referer}i %D %I / my question is: how should a I handle the nested double quotes in the pattern attribute? How should i escape them? I presume as-is, this will cause Tomcat quite some trouble. thanks, Tomcat 5.5
Re: Disable java code execution %blabla% in jsp, but permits tags
kazukin6 wrote: Is it possible to disable all java code execution within jsp page (by security manager or something) but allow custom tags to be executed? The problem is that the users can change jsp files, and due to security reasons we can allow them to use only tags Unfortunately I don't have an idea on how to prevent Java snippets in JSPs, but have you considered whether using Java security manager would be enough to defend you against the estimated threats? -- ..Juha - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Apache, Tomcat, mod_jk
Lars 'Levia' Wesselius schrieb: 2008/9/10 Rainer Jung [EMAIL PROTECTED] Lars 'Levia' Wesselius schrieb: 2008/9/10 Steve Ochani [EMAIL PROTECTED] Send reply to: Tomcat Users List users@tomcat.apache.org Date sent: Wed, 10 Sep 2008 19:17:24 +0200 From: Lars 'Levia' Wesselius [EMAIL PROTECTED] To: users@tomcat.apache.org Subject:Problem with Apache, Tomcat, mod_jk I have a problem using Tomcat 6.0.18, latest Apache, latest mod_jk and Java SE 6. Latest is a relative term. At the moment latest apache webserver version is 2.2.9. I have it set up so I can access the main Tomcat page..but when I go to the manager from there, it shows a (apache) 404 error. Can someone help me with this problem? I have the configuration files ready for those who wants to have a look at them (mod_jk.conf (auto generated), httpd.conf (where I include mod_jk.conf), server.xml and workers.properties). You can find the config files here: http//excessivedarkness.org/conf/ You forgot the : in the url. Sorry That has to be the biggest mod_jk.conf I've ever seen. You may want to start with something simple. Most probably. It's automatically configured. What did the logs show after you tried to access the manager app via httpd? Did you try the url as http://hostname/manager/html/ ? Yes, that's where it goes to when you click Tomcat Manager, that's where the 404 error pops up. You need to show us the config and the relevant log part. I posted the configs..right? The log shows, when trying to access /manager/html (mod_jk.log) [Wed Sep 10 16:40:35 2008] [4199:1081847968] [debug] map_uri_to_worker::jk_uri_worker_map.c (597): Attempting to map URI '/manager/html' from 0 maps And that's all it logs. Sorry, didn't see the config link. workers.properties: delete workers.tomcat_home=/usr/share/apache-tomcat-6.0.18/ workers.java_home=/usr/lib/jvm/java-6-sun ps=/ they are useless. server.xml: not readable (Forbidden) mod_jk.conf: JkLogLevel emerg: better use info, and when debugging debug but not for high load production. JkLogFile: once your setup works, consider including rotatelogs. manager-JkMounts: Those are in a virtual host named localhost: I would guess your requests to the manager webapp are served by another virtual server or the global server. Those won't see the JkMounts defined in localhost. The above cited log message from 0 maps also tells us, that the virtual server handling the requests din't find any JkMounts. I would replace the whole localhost:/manager block by JkMount /manager|/* ajp13 httpd.conf: JkLogStampFormat [%a %b %d %H:%M:%S %Y] : Remove it or have a look at the docomentation to include milliseconds. JkAutoAlias /usr/share/apache-tomcat-6.0.18/webapps: do you really want that? Regards, Rainer Can you use the manager when directly talking to Tomcat (using its HTTP conector)? Yes, it works perfectly when using the Tomcat server itself, on port 8080. Can you use any other context when connecting via the web server, so is the problem manager specific, or does your whole Apache/mod_jk/Tomcat setup not work? Erm..I have another servlet deployed, it works when using Tomcat server itself, but it doesn't work through Apache. Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems Configuring APR Based Native Libraries for Tomcat
Nicholas Schuetz schrieb: I am trying to compile APR native library for Tomcat. When I run the configure I get messages like this: # ./configure --prefix=/opt/tomcat/apr-connector --with-apr=/usr/bin/apr-1-config --with-ssl=/usr checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking for working mkdir -p... yes Tomcat Native Version: 1.1.12 checking for chosen layout... tcnative checking for APR... yes setting CC to gcc setting CPP to gcc -E checking for a BSD-compatible install... /usr/bin/install -c checking for JDK location (please wait)... /usr/java/latest from environment checking Java platform... checking Java platform... checking for sablevm... NONE adding -I/usr/java/latest/include to TCNATIVE_PRIV_INCLUDES checking os_type directory... linux adding -I/usr/java/latest/include/linux to TCNATIVE_PRIV_INCLUDES checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for OpenSSL library... using openssl from /usr/lib and /usr/include checking OpenSSL library version... ok checking for OpenSSL DSA support... yes setting TCNATIVE_LDFLAGS to -lssl -lcrypto adding -DHAVE_OPENSSL to CFLAGS setting TCNATIVE_LIBS to setting TCNATIVE_LIBS to /usr/lib/libapr-1.la -lpthread -ldl ./configure: line 4315: APR_INCLUDES: command not found ./configure: line 4316: APR_LIBS: command not found ./configure: line 4317: APR_LIB_TARGET: command not found ./configure: line 4318: APR_SO_EXT: command not found ./configure: line 4319: BASH: command not found ./configure: line 4320: BASH_ARGC: command not found ./configure: line 4321: BASH_ARGV: command not found ./configure: line 4322: BASH_LINENO: command not found --- SNIP --- In http://tomcat.apache.org/tomcat-6.0-doc/apr.html I see the following requirement: * JNI headers from Java compatible JDK 1.4+ Where do I get those JNI headers? I'm using Sun JDK 1.6.0_06 and I don't see them in the include/linux dir. Is anyone out there using the APR based Native library for Tomcat? Will it change my life? See: http://marc.info/?t=120171192500012r=1w=2 Should be fixed in 1.1.13+. 1.1.14 is available for download, 1.1.15 will be there very soon. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html entities and urls with spaces
Hello, I am having some issues with tomcat not displaying pages or files with spaces in them, it simply 404s. Something like this: pdf file on filesystem.pdf being accessed at: http://server/pdf%20file%20on%20filesystem.pdf fails to display. I am migrating this site from an older RHEL server where it works fine. I am migrating to a Debian server with up to date Debian packages of apache2, tomcat5, and java6. I am using tomcat5 because the webapp had some odd html entity issues with tomcat5.5 and tomcat6 that I was not able to resolve, moving to tomcat5 fixed the issues with entities in the page content itself. I am not certain that the page content html entity issues and the urls with spaces issues are related, but it seems like they may be? To check that this was a tomcat (and not an apache issue, as I am JkMounting the site to tomcat ) issue I tested accessing items with spaces with apache and that worked fine. Any one have any thoughts on this? Brendan Martens - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems Configuring APR Based Native Libraries for Tomcat
Thanks for the info, Rainer. So will it change my life? :) On Wed, Sep 10, 2008 at 4:31 PM, Rainer Jung [EMAIL PROTECTED] wrote: Nicholas Schuetz schrieb: I am trying to compile APR native library for Tomcat. When I run the configure I get messages like this: # ./configure --prefix=/opt/tomcat/apr-connector --with-apr=/usr/bin/apr-1-config --with-ssl=/usr checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking for working mkdir -p... yes Tomcat Native Version: 1.1.12 checking for chosen layout... tcnative checking for APR... yes setting CC to gcc setting CPP to gcc -E checking for a BSD-compatible install... /usr/bin/install -c checking for JDK location (please wait)... /usr/java/latest from environment checking Java platform... checking Java platform... checking for sablevm... NONE adding -I/usr/java/latest/include to TCNATIVE_PRIV_INCLUDES checking os_type directory... linux adding -I/usr/java/latest/include/linux to TCNATIVE_PRIV_INCLUDES checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for OpenSSL library... using openssl from /usr/lib and /usr/include checking OpenSSL library version... ok checking for OpenSSL DSA support... yes setting TCNATIVE_LDFLAGS to -lssl -lcrypto adding -DHAVE_OPENSSL to CFLAGS setting TCNATIVE_LIBS to setting TCNATIVE_LIBS to /usr/lib/libapr-1.la -lpthread -ldl ./configure: line 4315: APR_INCLUDES: command not found ./configure: line 4316: APR_LIBS: command not found ./configure: line 4317: APR_LIB_TARGET: command not found ./configure: line 4318: APR_SO_EXT: command not found ./configure: line 4319: BASH: command not found ./configure: line 4320: BASH_ARGC: command not found ./configure: line 4321: BASH_ARGV: command not found ./configure: line 4322: BASH_LINENO: command not found --- SNIP --- In http://tomcat.apache.org/tomcat-6.0-doc/apr.html I see the following requirement: * JNI headers from Java compatible JDK 1.4+ Where do I get those JNI headers? I'm using Sun JDK 1.6.0_06 and I don't see them in the include/linux dir. Is anyone out there using the APR based Native library for Tomcat? Will it change my life? See: http://marc.info/?t=120171192500012r=1w=2 Should be fixed in 1.1.13+. 1.1.14 is available for download, 1.1.15 will be there very soon. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Apache, Tomcat, mod_jk
2008/9/10 Rainer Jung [EMAIL PROTECTED] Lars 'Levia' Wesselius schrieb: 2008/9/10 Rainer Jung [EMAIL PROTECTED] Lars 'Levia' Wesselius schrieb: 2008/9/10 Steve Ochani [EMAIL PROTECTED] Send reply to: Tomcat Users List users@tomcat.apache.org Date sent: Wed, 10 Sep 2008 19:17:24 +0200 From: Lars 'Levia' Wesselius [EMAIL PROTECTED] To: users@tomcat.apache.org Subject:Problem with Apache, Tomcat, mod_jk I have a problem using Tomcat 6.0.18, latest Apache, latest mod_jk and Java SE 6. Latest is a relative term. At the moment latest apache webserver version is 2.2.9. I have it set up so I can access the main Tomcat page..but when I go to the manager from there, it shows a (apache) 404 error. Can someone help me with this problem? I have the configuration files ready for those who wants to have a look at them (mod_jk.conf (auto generated), httpd.conf (where I include mod_jk.conf), server.xml and workers.properties). You can find the config files here: http//excessivedarkness.org/conf/ You forgot the : in the url. Sorry That has to be the biggest mod_jk.conf I've ever seen. You may want to start with something simple. Most probably. It's automatically configured. What did the logs show after you tried to access the manager app via httpd? Did you try the url as http://hostname/manager/html/ ? Yes, that's where it goes to when you click Tomcat Manager, that's where the 404 error pops up. You need to show us the config and the relevant log part. I posted the configs..right? The log shows, when trying to access /manager/html (mod_jk.log) [Wed Sep 10 16:40:35 2008] [4199:1081847968] [debug] map_uri_to_worker::jk_uri_worker_map.c (597): Attempting to map URI '/manager/html' from 0 maps And that's all it logs. Sorry, didn't see the config link. workers.properties: delete workers.tomcat_home=/usr/share/apache-tomcat-6.0.18/ workers.java_home=/usr/lib/jvm/java-6-sun ps=/ they are useless. server.xml: not readable (Forbidden) Oh, I am sorry, corrected this. mod_jk.conf: JkLogLevel emerg: better use info, and when debugging debug but not for high load production. Yeah, this has to do with the mod_jk.conf being automatically generated on Tomcat startup. I had it on info before. JkLogFile: once your setup works, consider including rotatelogs. manager-JkMounts: Those are in a virtual host named localhost: I would guess your requests to the manager webapp are served by another virtual server or the global server. Those won't see the JkMounts defined in localhost. The above cited log message from 0 maps also tells us, that the virtual server handling the requests din't find any JkMounts. I would replace the whole localhost:/manager block by JkMount /manager|/* ajp13 Okay.. I created my own mod_jk.conf file. httpd.conf: JkLogStampFormat [%a %b %d %H:%M:%S %Y] : Remove it or have a look at the docomentation to include milliseconds. JkAutoAlias /usr/share/apache-tomcat-6.0.18/webapps: do you really want that? Well, it's what I used to get the current stuff mapped - without using this command, not much worked, but sure :) I removed the line. Okay, updated the config files. http://mirroredescape.net/manager/ Tomcat 404 error. http://excessivedarkness.org/conf/ Updated config files: workers.properties mod_jk.conf httpd.conf server.xml (fixed) Added: mirroredescape.net.conf (from apache2/sites-enabled/. I had to put the JkMount in there, because otherwise Apache would complain about that * ports an non-* ports cannot be mixed or something, I figured it was because of using the same virtualhost twice.. Maybe I know what's wrong, should I set the servers.xml Host entry to mirroredescape.net? Regards, Rainer Can you use the manager when directly talking to Tomcat (using its HTTP conector)? Yes, it works perfectly when using the Tomcat server itself, on port 8080. Can you use any other context when connecting via the web server, so is the problem manager specific, or does your whole Apache/mod_jk/Tomcat setup not work? Erm..I have another servlet deployed, it works when using Tomcat server itself, but it doesn't work through Apache. Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with Apache, Tomcat, mod_jk
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lars 'Levia' Wesselius Subject: Re: Problem with Apache, Tomcat, mod_jk http://mirroredescape.net/manager/ Tomcat 404 error. You appear to have ignored what you were previously told: that's an invalid URL and it should return a 404. Again, a proper URL is: http://mirroredescape.net/manager/html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: specifying a custom access log pattern
my question is: how should a I handle the nested double quotes in the pattern attribute? How should i escape them? quot; or #34; See 4.6 Predefined Entities in XML Spec for details, http://www.w3.org/TR/2006/REC-xml-20060816/#sec-predefined-ent 2008/9/11 Jonathan Mast [EMAIL PROTECTED]: Hi, I was wondering what the exact syntax for specifying a custom access log pattern in the server.xml is. Here is a snippet from which contains my custom format: Valve className=org.apache.catalina.valves.AccessLogValue prefix=foo. suffix=.accesslog directory=/usr/local/tomcat/logs/context_logs/ pattern=%h %t %m %U %H %s %b %{User-Agent}i %{Referer}i %D %I / my question is: how should a I handle the nested double quotes in the pattern attribute? How should i escape them? I presume as-is, this will cause Tomcat quite some trouble. thanks, Tomcat 5.5 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JVM per Context
Michael Dehmlow wrote: Thanks, my version of tomcat 5.5.26. My mistake I was looking at tomcat 3.3 documentation: http://tomcat.apache.org/tomcat-3.3-doc/tomcat-apache-howto.html http://tomcat.apache.org/tomcat-3.3-doc/tomcat-apache-howto.html . Yes defining contexts in the Server.xml is discouraged but I'm doing it anyway. ;) Strongly suggested. For those in a similar situation I'm going down the path of defining an engine per context: Still won't give you separate JVMs. As Peter and Chuck indicated, you'll need to create separate Tomcat instances if you want to have separate JVMs. When you start Tomcat you are calling Java's JVM first, then Tomcat runs inside of it. If you want another JVM instance you have to start another completely external process. The JVMs don't run inside Tomcat, it's the other way round. Engine name=engA defaultHost=localhost jvmRoute=jvmA Host name=localhost appBase=webapps unpackWARs=true xmlValidation=false xmlNamespaceAware=false Context path=/eclipse/A docBase=/slot_A cookies='false' Parameter name=com.dev.myParm value=/eclipse/A override=true/ /Context /Host /Engine Using jvmRoute the idea is to use the clustering mechanism of tomcat to give me multiple jvms I think you're mistaking jvmRoute for something it isn't. This attribute is used to add a marker to the jsessionid so that routing devices in front of a cluster of Tomcat servers can determine which server to send a sticky session to. http://tomcat.apache.org/tomcat-5.5-doc/config/engine.html This being only my theory I can only hope someone can either call me an idiot or give me a few pointers in short order. http://tomcat.apache.org/tomcat-5.5-doc/ p I will post my findings as I find them. Thanks, Mike - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat logging properties
At the bottom of my Tomcat 6.0.16 logging.properties file, I have the following entries: #org.apache.catalina.startup.ContextConfig.level = FINE #org.apache.catalina.startup.HostConfig.level = FINE #org.apache.catalina.session.ManagerBase.level = FINE #org.apache.catalina.core.AprLifecycleListener.level=FINE Aside from being commented out at the moment, I don't really know what these do. I couldn't find any documentation on them. Can someone point me to something that explains what these things might log? I'm struggling with an application issue, and my current logs and logging levels aren't showing me much. Thanks, Brian
RE: JVM per Context
MikeBR If your goal is to run TC with different JVMs have you looked at using each JBM to run embedded TomcatBR http://www.onjava.com/pub/a/onjava/2002/04/03/tomcat.html?page=1BR ?BR MartinBR __ BR Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Thu, 11 Sep 2008 00:56:42 +0100 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: JVM per Context Michael Dehmlow wrote: Thanks, my version of tomcat 5.5.26. My mistake I was looking at tomcat 3.3 documentation: http://tomcat.apache.org/tomcat-3.3-doc/tomcat-apache-howto.html http://tomcat.apache.org/tomcat-3.3-doc/tomcat-apache-howto.html . Yes defining contexts in the Server.xml is discouraged but I'm doing it anyway. ;) Strongly suggested. For those in a similar situation I'm going down the path of defining an engine per context: Still won't give you separate JVMs. As Peter and Chuck indicated, you'll need to create separate Tomcat instances if you want to have separate JVMs. When you start Tomcat you are calling Java's JVM first, then Tomcat runs inside of it. If you want another JVM instance you have to start another completely external process. The JVMs don't run inside Tomcat, it's the other way round. Engine name=engA defaultHost=localhost jvmRoute=jvmA Host name=localhost appBase=webapps unpackWARs=true xmlValidation=false xmlNamespaceAware=false Context path=/eclipse/A docBase=/slot_A cookies='false' Parameter name=com.dev.myParm value=/eclipse/A override=true/ /Context /Host /Engine Using jvmRoute the idea is to use the clustering mechanism of tomcat to give me multiple jvms I think you're mistaking jvmRoute for something it isn't. This attribute is used to add a marker to the jsessionid so that routing devices in front of a cluster of Tomcat servers can determine which server to send a sticky session to. http://tomcat.apache.org/tomcat-5.5-doc/config/engine.html This being only my theory I can only hope someone can either call me an idiot or give me a few pointers in short order. http://tomcat.apache.org/tomcat-5.5-doc/ p I will post my findings as I find them. Thanks, Mike - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Stay up to date on your PC, the Web, and your mobile phone with Windows Live. http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
RE: Preventing File Access
agreed spring folks also suggest placing your jsps under web-inf Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: Preventing File Access Date: Wed, 10 Sep 2008 16:39:29 -0400 Steve, Can someone point me to where I can read how to prevent/redirect access to a particular file in the Tomcat/webapp context. Specifically, all of my directories have the OS X DS_Store file. I would like to redirect users to an error page when this file is directly accessed. In the future it would help if you mention what version of Tomcat you are using. version 5.5.7 You will have to use a security constraint, read these two threads for examples. http://marc.info/?l=tomcat-userm=110311676821916w=2 http://marc.info/?l=tomcat-userm=98100806313397w=2 Thank you for the reference. Stephen Caine CommonGround Softworks, Inc. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Get more out of the Web. Learn 10 hidden secrets of Windows Live. http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008
Re: Tomcat logging properties
have a look here if you still need more info http://tomcat.apache.org/tomcat-6.0-doc/logging.html On Thu, Sep 11, 2008 at 2:10 AM, Brian Clark [EMAIL PROTECTED] wrote: At the bottom of my Tomcat 6.0.16 logging.properties file, I have the following entries: #org.apache.catalina.startup.ContextConfig.level = FINE #org.apache.catalina.startup.HostConfig.level = FINE #org.apache.catalina.session.ManagerBase.level = FINE #org.apache.catalina.core.AprLifecycleListener.level=FINE Aside from being commented out at the moment, I don't really know what these do. I couldn't find any documentation on them. Can someone point me to something that explains what these things might log? I'm struggling with an application issue, and my current logs and logging levels aren't showing me much. Thanks, Brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html entities and urls with spaces
Hi does fails to display. mean 404 or do you get a file to download and fail to render it on the client side(browser)? for the 404 make sure the files are located there where tomcat/your app looks for them for the second case check the http header sent with the pdf file. Cheers Yassine On Wed, Sep 10, 2008 at 11:41 PM, Brendan Martens [EMAIL PROTECTED] wrote: Hello, I am having some issues with tomcat not displaying pages or files with spaces in them, it simply 404s. Something like this: pdf file on filesystem.pdf being accessed at: http://server/pdf%20file%20on%20filesystem.pdf fails to display. I am migrating this site from an older RHEL server where it works fine. I am migrating to a Debian server with up to date Debian packages of apache2, tomcat5, and java6. I am using tomcat5 because the webapp had some odd html entity issues with tomcat5.5 and tomcat6 that I was not able to resolve, moving to tomcat5 fixed the issues with entities in the page content itself. I am not certain that the page content html entity issues and the urls with spaces issues are related, but it seems like they may be? To check that this was a tomcat (and not an apache issue, as I am JkMounting the site to tomcat ) issue I tested accessing items with spaces with apache and that worked fine. Any one have any thoughts on this? Brendan Martens - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat logging properties
Yep, read through that, but it didn't tell me what those directives actually mean. Anyone have anything else? - Original Message From: Yassine [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 10, 2008 8:17:01 PM Subject: Re: Tomcat logging properties have a look here if you still need more info http://tomcat.apache.org/tomcat-6.0-doc/logging.html On Thu, Sep 11, 2008 at 2:10 AM, Brian Clark [EMAIL PROTECTED] wrote: At the bottom of my Tomcat 6.0.16 logging.properties file, I have the following entries: #org.apache.catalina.startup.ContextConfig.level = FINE #org.apache.catalina.startup.HostConfig.level = FINE #org.apache.catalina.session.ManagerBase.level = FINE #org.apache.catalina.core.AprLifecycleListener.level=FINE Aside from being commented out at the moment, I don't really know what these do. I couldn't find any documentation on them. Can someone point me to something that explains what these things might log? I'm struggling with an application issue, and my current logs and logging levels aren't showing me much. Thanks, Brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JVM per Context
From: Martin Gainty [mailto:[EMAIL PROTECTED] Subject: RE: JVM per Context If your goal is to run TC with different JVMs have you looked at using each JBM to run embedded TomcatBR This has nothing to do with running an embedded Tomcat. Please don't add confusion to this issue. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Disable java code execution %blabla% in jsp, but permits tags
kazukin6 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Plz Help !! Is it possible to disable all java code execution within jsp page (by security manager or something) but allow custom tags to be executed? There isn't anything that can't be worked around. But putting: jsp-config jsp-property-group url-pattern*.jsp/url-pattern scripting-invalidtrue/scripting-invalid /jsp-property-group /jsp-config in $CATALINA_HOME/conf/web.xml means that you can prove that they went out of their way to break the rules. This is section 3.3.3 of the JSP-2.1 spec. If they put the corresponding fragment in their webapp's web.xml but with scripting-invalidfalse/scripting-invalid then Tomcat will allow scripting (user web.xml overrides global web.xml). Also, since it is a translation-time error, it won't work if they deploy pre-compiled JSP pages. Using a SecurityManager just limits what they can do (e.g. % System.exit(0); % throws an exception). The problem is that the users can change jsp files, and due to security reasons we can allow them to use only tags -- View this message in context: http://www.nabble.com/Disable-java-code-execution-%3C-blabla-%3E-in-jsp%2C-but-permits-tags-tp19415053p19415053.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html entities and urls with spaces
does fails to display. mean 404 or do you get a file to download and fail to render it on the client side(browser)? Means it 404s. for the 404 make sure the files are located there where tomcat/your app looks for them They are indeed where it's looking for them. When I change the name of the file from file with spaces.html to file%20with%20spaces.html the browser is able to find it just fine. Brendan Martens Server Administrator CrossComm, Inc. 919.667.9432 ofc 919.688.7686 fax www.crosscomm.net On Sep 10, 2008, at 9:21 PM, Yassine wrote: Hi does fails to display. mean 404 or do you get a file to download and fail to render it on the client side(browser)? for the 404 make sure the files are located there where tomcat/your app looks for them for the second case check the http header sent with the pdf file. Cheers Yassine On Wed, Sep 10, 2008 at 11:41 PM, Brendan Martens [EMAIL PROTECTED] wrote: Hello, I am having some issues with tomcat not displaying pages or files with spaces in them, it simply 404s. Something like this: pdf file on filesystem.pdf being accessed at: http://server/pdf%20file%20on%20filesystem.pdf fails to display. I am migrating this site from an older RHEL server where it works fine. I am migrating to a Debian server with up to date Debian packages of apache2, tomcat5, and java6. I am using tomcat5 because the webapp had some odd html entity issues with tomcat5.5 and tomcat6 that I was not able to resolve, moving to tomcat5 fixed the issues with entities in the page content itself. I am not certain that the page content html entity issues and the urls with spaces issues are related, but it seems like they may be? To check that this was a tomcat (and not an apache issue, as I am JkMounting the site to tomcat ) issue I tested accessing items with spaces with apache and that worked fine. Any one have any thoughts on this? Brendan Martens - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat logging properties
These are examples for changing the logging level on a sample of Tomcat internal components (which generally use the class name as the category). Not really useful unless you're trying to track down a bug in Tomcat itself. Brian Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Yep, read through that, but it didn't tell me what those directives actually mean. Anyone have anything else? - Original Message From: Yassine [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 10, 2008 8:17:01 PM Subject: Re: Tomcat logging properties have a look here if you still need more info http://tomcat.apache.org/tomcat-6.0-doc/logging.html On Thu, Sep 11, 2008 at 2:10 AM, Brian Clark [EMAIL PROTECTED] wrote: At the bottom of my Tomcat 6.0.16 logging.properties file, I have the following entries: #org.apache.catalina.startup.ContextConfig.level = FINE #org.apache.catalina.startup.HostConfig.level = FINE #org.apache.catalina.session.ManagerBase.level = FINE #org.apache.catalina.core.AprLifecycleListener.level=FINE Aside from being commented out at the moment, I don't really know what these do. I couldn't find any documentation on them. Can someone point me to something that explains what these things might log? I'm struggling with an application issue, and my current logs and logging levels aren't showing me much. Thanks, Brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat logging properties
From: Brian Clark [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat logging properties Yep, read through that, but it didn't tell me what those directives actually mean. Anyone have anything else? They specify logging levels for those specific classes, overriding any more generic settings. The FAQ has some good information with links to more detailed docs: http://wiki.apache.org/tomcat/FAQ/Logging - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html entities and urls with spaces
most file systems cant read spaces in a filename so you should put in _ where you see spaces Hmmm, not sure this is the issue, both filesystems can read and write files with spaces. should be renamed to $CATALINA_HOME/webapps/pdfApp/pdf_file_on_filesystem.pdf I really need to figure out a way to not rename all the files... If I could I would not allow the spaces of course, but it's already done. : ( So now I need to figure out how to make this work on the new server as well. Brendan Martens On Sep 10, 2008, at 8:32 PM, Martin Gainty wrote: Brendan most file systems cant read spaces in a filename so you should put in _ where you see spaces e.g. http://localhost:8080/pdfApp/pdf%20file%20on%20filesystem.pdf should be renamed to $CATALINA_HOME/webapps/pdfApp/pdf_file_on_filesystem.pdf HTH Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: html entities and urls with spaces Date: Wed, 10 Sep 2008 17:41:56 -0400 Hello, I am having some issues with tomcat not displaying pages or files with spaces in them, it simply 404s. Something like this: pdf file on filesystem.pdf being accessed at: http://server/pdf%20file%20on%20filesystem.pdf fails to display. I am migrating this site from an older RHEL server where it works fine. I am migrating to a Debian server with up to date Debian packages of apache2, tomcat5, and java6. I am using tomcat5 because the webapp had some odd html entity issues with tomcat5.5 and tomcat6 that I was not able to resolve, moving to tomcat5 fixed the issues with entities in the page content itself. I am not certain that the page content html entity issues and the urls with spaces issues are related, but it seems like they may be? To check that this was a tomcat (and not an apache issue, as I am JkMounting the site to tomcat ) issue I tested accessing items with spaces with apache and that worked fine. Any one have any thoughts on this? Brendan Martens - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie. Learn Now
Re: Reading Tomcat source code
Pierre Goupil [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello all, As an exercise, I would like to start reading Tomcat 6 source code. Lots of things to learn there, I guess ! But I don't know where to start. An idea, anyone ? Really depends on what interests you :). If you want to learn end-to-end processing, then you would start with Coyote (org.apache.coyote) and move on to the various Connectors, and then Catalina. If you want to learn JSP handling, then it would be Jasper (org.apache.jasper). If you want to know servlet handling, then the StandardContext and StandardContextValve classes. It took a long time for me to master Tomcat (and I'm still not very good with Jasper ;). Yours, Pierre - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html entities and urls with spaces
From: Brendan Martens [mailto:[EMAIL PROTECTED] Subject: Re: html entities and urls with spaces Hmmm, not sure this is the issue, both filesystems can read and write files with spaces. It's certainly not the issue - spaces in file names work fine on my Windows box with Tomcat. I really need to figure out a way to not rename all the files... Your original message indicated you might be front-ending Tomcat with httpd; what happens if you send the URL with the %20 encoding direct to Tomcat? I have no trouble doing so on my systems (but I don't have a Linux box available at the moment). Try turning on Tomcat's RequestDumperValve in server.xml; perhaps your front end is decoding the URL, so all Tomcat sees is the part up to the first space. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reading Tomcat source code
- Original Message - From: Pierre Goupil [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 10, 2008 4:07 PM Subject: Reading Tomcat source code Hello all, As an exercise, I would like to start reading Tomcat 6 source code. Lots of things to learn there, I guess ! But I don't know where to start. An idea, anyone ? Yours, Pierre When you get it all figured out... I'll buy your book ;) Its near impossible just reading it... depending on the IDE you use try figure out how to setup a dev environment. Google like crazy... stepping thru code in a debugger is a lot easier than reading it ;) ... and even then its not easy ;) --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reading Tomcat source code
Hello all, I am very new to this TOMCAT... Can anyone please guide from where i can download the Source code and in which IDE i can configure to see the code.. Thanks Gorav On Thu, Sep 11, 2008 at 9:37 AM, Johnny Kewl [EMAIL PROTECTED] wrote: - Original Message - From: Pierre Goupil [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 10, 2008 4:07 PM Subject: Reading Tomcat source code Hello all, As an exercise, I would like to start reading Tomcat 6 source code. Lots of things to learn there, I guess ! But I don't know where to start. An idea, anyone ? Yours, Pierre When you get it all figured out... I'll buy your book ;) Its near impossible just reading it... depending on the IDE you use try figure out how to setup a dev environment. Google like crazy... stepping thru code in a debugger is a lot easier than reading it ;) ... and even then its not easy ;) --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reading Tomcat source code
Hi Gorav Tomcat's homepage you can find the source download link. for example:http://tomcat.apache.org/download-60.cgi you can read the source code on the any IDE, for example Eclipse, .. good luck. On Thu, Sep 11, 2008 at 1:25 PM, Gorav Chhabra [EMAIL PROTECTED] wrote: Hello all, I am very new to this TOMCAT... Can anyone please guide from where i can download the Source code and in which IDE i can configure to see the code.. Thanks Gorav On Thu, Sep 11, 2008 at 9:37 AM, Johnny Kewl [EMAIL PROTECTED] wrote: - Original Message - From: Pierre Goupil [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 10, 2008 4:07 PM Subject: Reading Tomcat source code Hello all, As an exercise, I would like to start reading Tomcat 6 source code. Lots of things to learn there, I guess ! But I don't know where to start. An idea, anyone ? Yours, Pierre When you get it all figured out... I'll buy your book ;) Its near impossible just reading it... depending on the IDE you use try figure out how to setup a dev environment. Google like crazy... stepping thru code in a debugger is a lot easier than reading it ;) ... and even then its not easy ;) --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Reading Tomcat source code
From: Gorav Chhabra [mailto:[EMAIL PROTECTED] Subject: Re: Reading Tomcat source code Can anyone please guide from where i can download the Source code The link to the downloads for each supported Tomcat version are on the left side of the Tomcat home page: http://tomcat.apache.org This will get you to both binary and source downloads. and in which IDE i can configure to see the code.. Personally, I think IDEs can get in the way of understanding existing code. However, if you want to use one, both NetBeans and Eclipse do a good job of handling Java code. Just set up the project as one with an existing build script, rather than having the IDE create one for you (in NetBeans, that's a Java Free-Form Project; I don't remember what it is in Eclipse). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]