Re: Multilevel context path problem
Ok... I'm not sure, it isnt intuitive, almost like context paths are a useless extra, I cant say I understand it either. If I want a servlet to say work on /test/secondlevel/ I change the name of the webapp to test and I also change the context path in conf /engine/location/ to test **even though it seems to do nothing** Then I map the secondary stuff in web.xml ie servlet-mapping servlet-nameservlet name/servlet-name url-pattern/secondlevel/*/url-pattern /servlet-mapping Oh and if you want to address a JSP page as /test/secondlevel/ then you need to move the JSP page to a folder called secondlevel under the Application called test. Thing is, if you ignore context paths and compare the urls to the physical files and servlet mapping... its actually very intuitive WITHOUT context paths, starts looking like a normal web site mapping. Maybe that helps... its a good question, maybe a guru can tell us why it behaves like this... it almost like context paths are a legacy thing that is being phased out It seems to all depend on the name of the WAR file, and the folders under webapps... for example look for the ROOT context path... its not in the default tomcat setup... I think its all in the name of the file, and we must just look at the folder and servlet mapping to see whats going to happen to a URI. Think they should just take it out what do they actually do? BUT just to confuse the hell out of us... If for example in netbeans... you make the context /IgnoreAppname/ShowJspsHere/ and Run it IN the IDE it WILL use that context path AND it will package it with that context, and it will reflect in Tomcat conf/engine/location once deployed BUT then tomcat ignores it and just uses the file name In netbeans I never touch the context path except in the case of making a ROOT webapp. And then its just the same as a web server... and that seems to work. Dont know why but if I had to guess I think the context paths are proving to be one mapping too many. If you think about servlet mapping, virtual hosts, mod_jk mapping and all the rest of it... programming for context paths must be a pain in the butt. I think I can live without them... but I think they should either make them work or take them out completely. - Original Message - From: mrpapini [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Tuesday, April 10, 2007 7:32 PM Subject: Multilevel context path problem I have a problem deploying war file and specifying multilevel context path. Similar question was asked in this forum before but without definitive answer. My scenario is as follow, I have a war file, say webtest.war and I'd like to access it by: /test/webtest. I found the only way to do so is to actually create context entry for this in server.xml inside host element. Trying to create test#webtest.xml in conf/engine/host directory would not work, tomcat would throw exception trying to access docBase test/webtest (tomcat expands war file into webtest directory only). I've tried many combinations and scenarios, nothing would work except having context inside server.xml. However, that is bad because, 1. it seems to be deprecated, 2. does not allow for dynamic reload. Anybody can share light on this? Is there any combinations of settings/naming that would allow me to access webtest app via /test/webtest context? Regards, -pp - 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 5.5.23 Windows Service vs. User Application
Hi, I am running Tomcat 5.5.23 + SSL as a standalone server under Win XP SP2 = and Java 1.5.0.08. Started as a user application (startup.bat) there are no problems, I can = see all pages from the web. However, when I start Tomcat as Win Service (service.bat), I can see all = pages locally on the same machine, but not from the web. The browser is bringing timeout on requests via web. I have changed the starting account of the service to be the same as for = the user application, but it didn't help. How to make the Win Service to serve the pages over web? What am I doing wrong? Thank you, Igor - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
proxy_balancer_module modules/mod_proxy_balancer.so in httpd-2.0.52-28.ent.i386 ??
The feature I am looking for proxy_balancer_module modules/mod_proxy_balancer.so. Can some one tell me if this is available on RHEL4 ie in httpd-2.0.52-28.ent.i386https://rhn.redhat.com/network/software/packages/details.pxt?pid=356268Apache HTTP Server ? Thanks, Paresh
Re: virtual directory
Hi sylvian When developing I do this request.getContextPath() + uri; but I wrap the request.getContextPath() in a little routine like say imageMap(String uri) and use that in my JSP's Thats cool because if I change the context path the app doesnt break... BUT... I do it for a much better reason. When I'm done making a Tomcat app I move all the images to the Apache server... And then just change imageMap(String uri) to point to the Apache Web server url... Apache Web Srvr is damn good at delivering images and Tomcat speeds up nicely when you do this. I actually cant believe that people use cross context stuff for images if you dont want to use apache, the you could make a single webapp, dump all your images in there, and just address that in your other apps, http://myImageTomcatServer/image/xxx.jpg Let the browser join the images for you... if you have a look at web pages you will often see the images come from a different server... like look at web counters for example. Heres another example if I make a captcha generator (you know those little images that have numbers in them) then I make a seperate servlet called CapchaGen.jpg and in my other apps I call that URL image appears in the browser. What document is this that you talking about... sucking images from other webApps through context sharing... sounds crazy? Good luck [EMAIL PROTECTED] - Original Message - From: Sylvain Roche [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, April 10, 2007 7:23 PM Subject: virtual directory Hi this seems a very classical problem for tomcat users, but I couldn't find on the web a solution which satisfies me. We plan to host multiple applications, on a tomcat box. These applications may all need an images directory. But of course each of them has a different images directory. What we want to do is to deploy different versions of each application, without the need to move the images. The crosscontext context solution, which is the one given everywhere, does not correspond to our need, because, as far as I tried it - I may need an unknow depth for the point I will make the link, for example, it could be /images/layout/DE_de - I need to have a mapping inside my web-app, ie inside the context rather than at the same level - when I read the doc, it seems to me that this is a workaround, a misuse of something that was made for being able to dispatch requests to another application - what I want is only to link something out of my application deployment path as if it was inside. I don't know if it is wise to rely on this workaround for long term - the same mapping (/images) has to be different for each application basically this is what is performed on Oracle's OC4J with the virtual-directory directive, on weblogic with virtual-directory-mapping. Actually I found some kind of virtual directory on every j2ee server but tomcat. I can't imagine that this problem has no solution other than the cross context. I may have missed something, but where ? Best regards Sylvain - 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: confirm unsubscribe from users@tomcat.apache.org
Quoting [EMAIL PROTECTED]: Hi! This is the ezmlm program. I'm managing the users@tomcat.apache.org mailing list. I'm working for my owner, who can be reached at [EMAIL PROTECTED] To confirm that you would like [EMAIL PROTECTED] removed from the users mailing list, please send a short reply to this address: [EMAIL PROTECTED] Usually, this happens when you just hit the reply button. If this does not work, simply copy the address and paste it into the To: field of a new message. or click here: mailto:[EMAIL PROTECTED] I haven't checked whether your address is currently on the mailing list. To see what address you used to subscribe, look at the messages you are receiving from the mailing list. Each message has your address hidden inside its return path; for example, [EMAIL PROTECTED] receives messages with return path: users-return-number[EMAIL PROTECTED] Some mail programs are broken and cannot handle long addresses. If you cannot reply to this request, instead send a message to [EMAIL PROTECTED] and put the entire address listed above into the Subject: line. --- Administrative commands for the users 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: To subscribe to the list, send a message to: [EMAIL PROTECTED] To remove your address from the list, send a message to: [EMAIL PROTECTED] Send mail to the following for info and FAQ for this list: [EMAIL PROTECTED] [EMAIL PROTECTED] To get messages 123 through 145 (a maximum of 100 per request), mail: [EMAIL PROTECTED] To get an index with subject and author for messages 123-456 , mail: [EMAIL PROTECTED] They are always returned as sets of 100, max 2000 per request, so you'll actually get 100-499. To receive all messages with the same subject as message 12345, send a short message to: [EMAIL PROTECTED] The messages do not really need to be empty, but I will ignore their content. Only the ADDRESS you send to is important. You can start a subscription for an alternate address, for example [EMAIL PROTECTED], just add a hyphen and your address (with '=' instead of '@') after the command word: [EMAIL PROTECTED] To stop subscription for this address, mail: [EMAIL PROTECTED] In both cases, I'll send a confirmation message to that address. When you receive it, simply reply to it to complete your subscription. If despite following these instructions, you do not get the desired results, please contact my owner at [EMAIL PROTECTED] Please be patient, my owner is a lot slower than I am ;-) --- Enclosed is a copy of the request I received. Return-Path: [EMAIL PROTECTED] Received: (qmail 51415 invoked by uid 99); 11 Apr 2007 08:44:20 - Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2007 01:44:20 -0700 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=ASF_LIST_SUB_UNSUB X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [62.221.254.24] (HELO pluto.isd-holland.nl) (62.221.254.24) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2007 01:44:12 -0700 Received: from parker.dds.nl (parker.dds.nl [213.196.11.12]) by pluto.isd-holland.nl (Postfix) with ESMTP id EF771114518 for [EMAIL PROTECTED]; Wed, 11 Apr 2007 10:43:51 +0200 (CEST) Received: from www-data by parker.dds.nl with local (Exim 3.36 #1 (Debian)) id 1HbYQh-0004rS-00 for [EMAIL PROTECTED]; Wed, 11 Apr 2007 10:43:51 +0200 Received: from 145.222.138.53 ([145.222.138.53]) by webmail.dds.nl (Horde MIME library) with HTTP; Wed, 11 Apr 2007 10:43:50 +0200 Message-ID: [EMAIL PROTECTED] X-Priority: 3 (Normal) Date: Wed, 11 Apr 2007 10:43:50 +0200 From: L.W. van Braam van Vloten [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: unsubscribe MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp=Yes; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: DDS webmail X-Virus-Checked: Checked by ClamAV on apache.org unsubscribe - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jsvc with security manager
Hello list A couple of weeks ago I asked for advice regarding a problem with jsvc and security manager. Unfortunately, I still couldn't figure out how to solve the problem. Could anyone point me in the right direction? Thank you. I run tomcat 5.5.x with jsvc (on Linux) to be able to make it listen on port 80. This works fine. However, if I try to run it with the security manager, I get an error and the daemon doesn't start (see log below). I'm using the script jsvc-src/native/Tomcat5.sh which ships with the tomcat distribution and with the environment variable CATALINA_OPTS=-Djava.security.manager -Djava.security.policy==$CATALINA_HOME/conf/catalina.policy to be able to run the security manager. Best wishes Thomas Zumbrunn java.lang.reflect.InvocationTargetException 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.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160) Caused by: java.security.AccessControlException: access denied (java.security.SecurityPermission getProperty.package.definition) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264) at java.security.AccessController.checkPermission(AccessController.java:427) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at java.security.Security.getProperty(Security.java:724) at org.apache.catalina.security.SecurityConfig.setSecurityProperty(SecurityConfig.java:116) at org.apache.catalina.security.SecurityConfig.setPackageDefinition(SecurityConfig.java:105) at org.apache.catalina.startup.Embedded.setSecurityProtection(Embedded.java:989) at org.apache.catalina.startup.Embedded.init(Embedded.java:129) at org.apache.catalina.startup.Embedded.init(Embedded.java:114) at org.apache.catalina.startup.Catalina.init(Catalina.java:57) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:224) at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:280) ... 5 more 23/03/2007 16:54:09 30023 jsvc.exec error: Cannot load daemon 23/03/2007 16:54:09 30022 jsvc.exec error: Service exit with a return value of - 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 6.0.x OpenEJB
Hi, has anyone been able to integrate OpenEJB with Apache-Tomcat 6.0.x? Or is it just impossible to do it? -- José Miguel Perdigão zeperdi.pt.vu - 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: proxy_balancer_module modules/mod_proxy_balancer.so in httpd-2.0.52-28.ent.i386 ??
Paresh Mutha wrote: The feature I am looking for proxy_balancer_module modules/mod_proxy_balancer.so. Can some one tell me if this is available on RHEL4 ie in httpd-2.0.52-28.ent.i386https://rhn.redhat.com/network/software/packages/details.pxt?pid=356268Apache Nope. Those are part of Httpd 2.2 branch. Regards, Mladen. - 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: nsapi_redirector.so
hi Rainer, Thank you for the libraries!! I picked nsapi_redirector.so_sjsws61_sp7_64 for tests on my Solaris 10 setup. Upgraded the Sun Web server to 6.1 SP7. Made the necessary configuration for Tomcat connector and started Tomcat. On launching Sun Web Server, now, I receive: [https-sun210dev2.in.ibm.com]: start failed. (0: Error 0) [https-sun210dev2.in.ibm.com]: Sun ONE Web Server 6.1SP7 (64-Bit) B01/12/2007 06:13 [https-sun210dev2.in.ibm.com]: fine: Emulating writev for filter http-compression [https-sun210dev2.in.ibm.com]: fine: Emulating sendfile for filter http-compression [https-sun210dev2.in.ibm.com]: fine: HTTP3063: KeepAliveTimeout is 30 seconds (default value) [https-sun210dev2.in.ibm.com]: fine: HTTP3067: PostThreadsEarly set to off [https-sun210dev2.in.ibm.com]: warning: CORE3283: stderr: In jk_init. [https-sun210dev2.in.ibm.com]: warning: CORE3283: stderr: Worker file = /usr/jakarta-tomcat-5.5.0/conf/workers.properties. [https-sun210dev2.in.ibm.com]: warning: CORE3283: stderr: Log level = debug. [https-sun210dev2.in.ibm.com]: warning: CORE3283: stderr: Log File = /usr/jakarta-tomcat-5.5.0/conf/nsapi.log [https-sun210dev2.in.ibm.com]: failure: CORE3170: Configuration initialization failed: Error running init function jk_init: unknown error [https-sun210dev2.in.ibm.com]: failure: server initialization failed Error An error occurred during startup. The server https-sun210dev2.in.ibm.com was not started. magnus.conf has: Init fn=load-modules funcs=jk_init,jk_service shlib=/usr/jakarta-tomcat-5.5.0/conf/nsapi_redirector.so_sjsws61_sp7_64 shlib_flags=(global|now) Init fn=jk_init worker_file=/usr/jakarta-tomcat-5.5.0/conf/workers.properties log_level=debug log_file=/usr/jakarta-tomcat-5.5.0/conf/nsapi.log The nsapi.log was created and it shows a single line: [Thu Apr 12 01:18:00 2007] [1471:0001] [debug] do_shm_open::jk_shm.c (343): Using process memory as shared memory Any hints/tips are welcome Thanks Rajiv - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Servlet init method invocation
Hi All, I am trying to understand, when is the Servlet init() method invoked in tomcat. I expected it to be executed after succesfull deployment but it seems that it is executed the first time(only) when request arives. So, i need to receive a request in order this method to be executed? Is that configurable?Thanks. Nencho
Re: How to hide Tomcat serverversion information?
IIRC, this will handle the error page body but not the server header. The Connectors are pretty stringent on not being change in 5.0.x. You'll need to change org.apache.coyote.http11.Constants Here is the code which you'll change: /** * Server string. */ public static final byte[] SERVER_BYTES = ByteChunk.convertToBytes(Server: Apache-Coyote/1.1 + CRLF); === If one is using the Http11Processor.java (in org.apache.coyote.http11) then the following patch would also work (and be easier than a compile time setting - since you can config server on the fly): outputBuffer.sendStatus(); /*CHANGED CODE AROUND LINE 1618 */ if (headers.findHeader(Server, 0)==-1) { outputBuffer.write(Constants.SERVER_BYTES); } /*END CHANGED CODE AROUND LINE 1618 */ int size = headers.size(); for (int i = 0; i size; i++) { outputBuffer.sendHeader(headers.getName(i), headers.getValue(i)); } outputBuffer.endHeaders(); -Tim Mark Thomas wrote: Nishant Kavi wrote: Hello all, Is there any way one can turn off header information (tomcat/5.0.25, coyote/1.1)? There is no way to do this in 5.0.25 via configuration but what you can do in this version is: - find $CATALINA_HOME/server/lib/catalina.jar - extract the contents of the jar to a temporary directory - find org/apache/catalina/util/ServerInfo.properties - open this file - edit the server.info property - save the file - rebuild the jar - replace the original catalina.jar with your modified version In the latest 5.5.x and 6.0.x there is a connector property (server) you can set. However you approach this, you will need to restart Tomcat before the change takes effect. - 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: nsapi_redirector.so
Please try again by adding shm_file=/usr/jakarta-tomcat-5.5.0/conf/jk-runtime-status to the block Init fn=jk_init worker_file=/usr/jakarta-tomcat-5.5.0/conf/workers.properties log_level=debug log_file=/usr/jakarta-tomcat-5.5.0/conf/nsapi.log in magnus.conf. If this doesn't work, I'll investigate myself. Thanks and regards, Rainer Rajiv M wrote: hi Rainer, Thank you for the libraries!! I picked nsapi_redirector.so_sjsws61_sp7_64 for tests on my Solaris 10 setup. Upgraded the Sun Web server to 6.1 SP7. Made the necessary configuration for Tomcat connector and started Tomcat. On launching Sun Web Server, now, I receive: [https-sun210dev2.in.ibm.com]: start failed. (0: Error 0) [https-sun210dev2.in.ibm.com]: Sun ONE Web Server 6.1SP7 (64-Bit) B01/12/2007 06:13 [https-sun210dev2.in.ibm.com]: fine: Emulating writev for filter http-compression [https-sun210dev2.in.ibm.com]: fine: Emulating sendfile for filter http-compression [https-sun210dev2.in.ibm.com]: fine: HTTP3063: KeepAliveTimeout is 30 seconds (default value) [https-sun210dev2.in.ibm.com]: fine: HTTP3067: PostThreadsEarly set to off [https-sun210dev2.in.ibm.com]: warning: CORE3283: stderr: In jk_init. [https-sun210dev2.in.ibm.com]: warning: CORE3283: stderr: Worker file = /usr/jakarta-tomcat-5.5.0/conf/workers.properties. [https-sun210dev2.in.ibm.com]: warning: CORE3283: stderr: Log level = debug. [https-sun210dev2.in.ibm.com]: warning: CORE3283: stderr: Log File = /usr/jakarta-tomcat-5.5.0/conf/nsapi.log [https-sun210dev2.in.ibm.com]: failure: CORE3170: Configuration initialization failed: Error running init function jk_init: unknown error [https-sun210dev2.in.ibm.com]: failure: server initialization failed Error An error occurred during startup. The server https-sun210dev2.in.ibm.com was not started. magnus.conf has: Init fn=load-modules funcs=jk_init,jk_service shlib=/usr/jakarta-tomcat-5.5.0/conf/nsapi_redirector.so_sjsws61_sp7_64 shlib_flags=(global|now) Init fn=jk_init worker_file=/usr/jakarta-tomcat-5.5.0/conf/workers.properties log_level=debug log_file=/usr/jakarta-tomcat-5.5.0/conf/nsapi.log The nsapi.log was created and it shows a single line: [Thu Apr 12 01:18:00 2007] [1471:0001] [debug] do_shm_open::jk_shm.c (343): Using process memory as shared memory Any hints/tips are welcome Thanks Rajiv - 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: Servlet init method invocation
Nencho Lupanov wrote: Hi All, I am trying to understand, when is the Servlet init() method invoked in tomcat. I expected it to be executed after succesfull deployment but it seems that it is executed the first time(only) when request arives. So, i need to receive a request in order this method to be executed? Is that configurable?Thanks. Nencho By default, probably. There is also a load-on-startup element in web.xml defined on a per servlet basis to force load the servlet when tomcat starts. --David - 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: Servlet init method invocation
init() is called when servlet is initialized. The servlet is, by default (see j2EE specs) initialized when it is first accessed. The 'load-on-startup' element of web.xml can be used to force servlet to be initialized upon webapp startup. The value of this element is a number that specify order, compared to other servlet, in which it is initialized. En l'instant précis du 11/04/07 12:47, Nencho Lupanov s'exprimait en ces termes: Hi All, I am trying to understand, when is the Servlet init() method invoked in tomcat. I expected it to be executed after succesfull deployment but it seems that it is executed the first time(only) when request arives. So, i need to receive a request in order this method to be executed? Is that configurable?Thanks. Nencho - 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: nsapi_redirector.so
Did the changes. Server still shows error on startup: [https-sun210dev2.in.ibm.com]: failure: CORE3170: Configuration initialization failed: Error running init function jk_init: unknown error nsapi.log indicates: [Thu Apr 12 03:16:31 2007] [1639:0001] [debug] do_shm_open::jk_shm.c (374): Truncated shared memory to 28800 [Thu Apr 12 03:16:31 2007] [1639:0001] [debug] do_shm_open::jk_shm.c (405): Initialized shared memory size=28800 free=28672 addr=0x7590 [Thu Apr 12 03:16:31 2007] [1639:0001] [debug] do_shm_open_lock::jk_shm.c (310): Opened shared memory lock /usr/jakarta-tomcat-5.5.0/conf/jk-runtime-status.1639.lock Thanks, Rajiv - 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: Servlet init method invocation
I used load-on-startup and it works fine. Thanks, Nencho 2007/4/11, David Delbecq [EMAIL PROTECTED]: init() is called when servlet is initialized. The servlet is, by default (see j2EE specs) initialized when it is first accessed. The 'load-on-startup' element of web.xml can be used to force servlet to be initialized upon webapp startup. The value of this element is a number that specify order, compared to other servlet, in which it is initialized. En l'instant précis du 11/04/07 12:47, Nencho Lupanov s'exprimait en ces termes: Hi All, I am trying to understand, when is the Servlet init() method invoked in tomcat. I expected it to be executed after succesfull deployment but it seems that it is executed the first time(only) when request arives. So, i need to receive a request in order this method to be executed? Is that configurable?Thanks. Nencho - 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: nsapi_redirector.so
OK, I'll check, but give me one or two days ... Maybe someone else has an idea in the meantime. Rajiv M wrote: Did the changes. Server still shows error on startup: [https-sun210dev2.in.ibm.com]: failure: CORE3170: Configuration initialization failed: Error running init function jk_init: unknown error nsapi.log indicates: [Thu Apr 12 03:16:31 2007] [1639:0001] [debug] do_shm_open::jk_shm.c (374): Truncated shared memory to 28800 [Thu Apr 12 03:16:31 2007] [1639:0001] [debug] do_shm_open::jk_shm.c (405): Initialized shared memory size=28800 free=28672 addr=0x7590 [Thu Apr 12 03:16:31 2007] [1639:0001] [debug] do_shm_open_lock::jk_shm.c (310): Opened shared memory lock /usr/jakarta-tomcat-5.5.0/conf/jk-runtime-status.1639.lock Thanks, Rajiv - 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 Deploy Task Error
I am using ANT 1.6.5 Luntbuild 1.3.6. Tomcat 6.0 The task below is for deploying the application to Tomcat target name=deploy description=Deploys the Web Application deploy url=${manager.url} username=${username} password=${password} path=/${app.name} war=file:${basedir}/${app.name}.war/ /target All the variables are fetched from a properties file and the values fetched are correct. Contents of the properties file tomcat.home=C:/Java/Tomcat6.0 manager.url=http://localhost:8080/manager/html username=tomcat password=tomcat app.name=ajaxapp Below is the error message I get when the Deploy task is executed The name of my applcation is 'ajaxapp' java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/html/deploy?path=%2Fajaxapp Somehow %2F is inserted between the '=' and the 'application name' and this makes the build fail. I have also tried removing '/' from in front of the application name. It gives me this error Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/html/deploy?path=ajaxapp Any body, any idea where am I making the mistake? Thanks in advance. Shardul. -- View this message in context: http://www.nabble.com/Tomcat-Deploy-Task-Error-tf3559037.html#a9938454 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: nsapi_redirector.so
Guten Tag Rainier and Rajiv Looks like this comes from the jk_shm_attach routine by Mladen jk_shm_attach(const char *fname, size_t sz, jk_logger_t *l) personally I would attenuate the attached size (2nd param) http://src.opensolaris.org/source/xref/sfw/usr/src/cmd/tomcat/apache-tomcat-5.5.17-src/connectors/jk/native/common/jk_shm.c Anyone? Martin-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Rainer Jung [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, April 11, 2007 8:18 AM Subject: Re: nsapi_redirector.so OK, I'll check, but give me one or two days ... Maybe someone else has an idea in the meantime. Rajiv M wrote: Did the changes. Server still shows error on startup: [https-sun210dev2.in.ibm.com]: failure: CORE3170: Configuration initialization failed: Error running init function jk_init: unknown error nsapi.log indicates: [Thu Apr 12 03:16:31 2007] [1639:0001] [debug] do_shm_open::jk_shm.c (374): Truncated shared memory to 28800 [Thu Apr 12 03:16:31 2007] [1639:0001] [debug] do_shm_open::jk_shm.c (405): Initialized shared memory size=28800 free=28672 addr=0x7590 [Thu Apr 12 03:16:31 2007] [1639:0001] [debug] do_shm_open_lock::jk_shm.c (310): Opened shared memory lock /usr/jakarta-tomcat-5.5.0/conf/jk-runtime-status.1639.lock Thanks, Rajiv - 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]
unable to install tomcat 5.0
Hi, I'm trying to install tomcat 5.0 by downloading it directly from the apache official website. after unziping the same...im getting the error the specified service doesnot exist as an instaled service...unable to open the service tomcat can u suggest me whats to be done for this?The reason for this error n how i can rectify the same. thanks n regards tulasivani
Re: Servlet init method invocation
Nencho Lupanov wrote: I am trying to understand, when is the Servlet init() method invoked in tomcat. I expected it to be executed after succesfull deployment but it seems that it is executed the first time(only) when request arives. So, i need to receive a request in order this method to be executed? Is that configurable?Thanks. I prefer to use ServletContextListener. -- Mikolaj Rydzewski [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Question on setting up LDAP...
Hello and how is it? I was wondering if anyone has had success in setting up LDAP to work with their Tomcat Web applications? Thanks :) C CONFIDENTIALITY NOTICE: If you have received this e-mail in error, please immediately notify the sender by e-mail at the address shown. This e-mail transmission may contain confidential information. This information is only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance.
Re: unable to install tomcat 5.0
http://www.google.com/search?q=install+tomcat+5 Hi, I'm trying to install tomcat 5.0 by downloading it directly from the apache official website. after unziping the same...im getting the error the specified service doesnot exist as an instaled service...unable to open the service tomcat can u suggest me whats to be done for this?The reason for this error n how i can rectify the same. thanks n regards tulasivani
Upgrading Tomcat
Are there any instructions available on how to upgrade a Tomcat version? I have Tomcat 5.0.28 installed and I want to upgrade to Tomcat 5.5.23 but I can only find installation instructions and no upgrade instructions. -Laura - 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: Upgrading Tomcat
On 4/11/07, Laura McCord [EMAIL PROTECTED] wrote: Are there any instructions available on how to upgrade a Tomcat version? If by upgrade you mean overwrite an existing installation -- I'd suggest you don't really want to do that :-) I have Tomcat 5.0.28 installed and I want to upgrade to Tomcat 5.5.23 Untar to a new directory, configure and test running with a different Connector port setting(s). Then going live is a matter of flipping the settings and restarting. FWIW, -- Hassan Schroeder [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: virtual directory
Hi Johnny, hi everybody I took the images example to explain and simplify the problem, but actually I may need to include different contents, which may be static - like images, flash animations, html pages - but may also be jsp pages for exemple, and some of these contents are likely to be generated by another web application. This works fine for years with oc4j / orion, so we would rather have the lesser to change before we can switch oc4j for tomcat. In fact if we can't manage to do that, it may be a reason to discard tomcat from our choice list, because some part of our application relies on virtual directories. Best regards Sylvain At 10:14 11/04/2007, Johnny Kewl wrote: Hi sylvian When developing I do this request.getContextPath() + uri; but I wrap the request.getContextPath() in a little routine like say imageMap(String uri) and use that in my JSP's Thats cool because if I change the context path the app doesnt break... BUT... I do it for a much better reason. When I'm done making a Tomcat app I move all the images to the Apache server... And then just change imageMap(String uri) to point to the Apache Web server url... Apache Web Srvr is damn good at delivering images and Tomcat speeds up nicely when you do this. I actually cant believe that people use cross context stuff for images if you dont want to use apache, the you could make a single webapp, dump all your images in there, and just address that in your other apps, http://myImageTomcatServer/image/xxx.jpg Let the browser join the images for you... if you have a look at web pages you will often see the images come from a different server... like look at web counters for example. Heres another example if I make a captcha generator (you know those little images that have numbers in them) then I make a seperate servlet called CapchaGen.jpg and in my other apps I call that URL image appears in the browser. What document is this that you talking about... sucking images from other webApps through context sharing... sounds crazy? Good luck [EMAIL PROTECTED] - Original Message - From: Sylvain Roche [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, April 10, 2007 7:23 PM Subject: virtual directory Hi this seems a very classical problem for tomcat users, but I couldn't find on the web a solution which satisfies me. We plan to host multiple applications, on a tomcat box. These applications may all need an images directory. But of course each of them has a different images directory. What we want to do is to deploy different versions of each application, without the need to move the images. The crosscontext context solution, which is the one given everywhere, does not correspond to our need, because, as far as I tried it - I may need an unknow depth for the point I will make the link, for example, it could be /images/layout/DE_de - I need to have a mapping inside my web-app, ie inside the context rather than at the same level - when I read the doc, it seems to me that this is a workaround, a misuse of something that was made for being able to dispatch requests to another application - what I want is only to link something out of my application deployment path as if it was inside. I don't know if it is wise to rely on this workaround for long term - the same mapping (/images) has to be different for each application basically this is what is performed on Oracle's OC4J with the virtual-directory directive, on weblogic with virtual-directory-mapping. Actually I found some kind of virtual directory on every j2ee server but tomcat. I can't imagine that this problem has no solution other than the cross context. I may have missed something, but where ? Best regards Sylvain - 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: Upgrading Tomcat
So, basically I have to setup a new tomcat instance and move all the webapps over to the new install? Hassan Schroeder wrote: On 4/11/07, Laura McCord [EMAIL PROTECTED] wrote: Are there any instructions available on how to upgrade a Tomcat version? If by upgrade you mean overwrite an existing installation -- I'd suggest you don't really want to do that :-) I have Tomcat 5.0.28 installed and I want to upgrade to Tomcat 5.5.23 Untar to a new directory, configure and test running with a different Connector port setting(s). Then going live is a matter of flipping the settings and restarting. FWIW, - 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: nsapi_redirector.so
I was following the steps in the below URL: http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html Now, when I see the jk binaries for Solaris: http://apache.siamwebhosting.com/tomcat/tomcat-connectors/jk/binaries/solaris/jk-1.2.21/ there are mod_jk-1.2.21-apache-2.2.x-solaris10-intel-gcc.so and mod_jk-1.2.21-apache-2.2.x-solaris9-sparc-gcc.so. I am not sure whether these need to be present in the Solaris machine or not. Should we configure these Tomcat connector binaries also in any way.. if yes, what way. Thanks Rajiv - 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 question - starting tomcat as non-root user
Hi, I'm running Tomcat 5.5.20 with an application built under Netbeans 5.5. The application works fine. I've found a number of things on the web regarding the issue of running as a non-root user, but none match my needs exactly. If someone could point me at the right documentation, or answer directly, I'd be most grateful. Situation - I am installing tomcat and running it on port 8080. However, it is currently being started by the root user and I need to change that. If I just run the startup script as user 'foo', I get errors because it can't read various config files in the conf directory, can't write to the logs directory etc. As a hack, I changed the permissions on the config files from 600 to 644, and the permissions on the logs directory to 777. I also had to change the permission on the conf/Catalina/localhost directory to 777 and the server and manager.xml files therein to 644. After I did all that, I could start tomcat, deploy my .war file and run it, and in fact it all seems to work. However, during startup I get error messages like this (from the catalina.out file): = Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions init SEVERE: The scratchDir you specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost/jsp-examples is unusable. Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions init SEVERE: The scratchDir you specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost/balancer is unusable. Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions init SEVERE: The scratchDir you specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost/_ is unusable. Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions init SEVERE: The scratchDir you specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost/tomcat-docs is unusable. Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions init SEVERE: The scratchDir you specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost/servlets-examples is unusable. Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions init SEVERE: The scratchDir you specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost/webdav is unusable. = Note that the permissions on /usr/local/Apache/Tomcat/apache-tomcat-5.5 .20/work/Catalina/localhost are 777, but the directories it is complaining about (servlets-examples, webdav etc. don't exist... So my questions are: 1) Is there a simple way for me to configure the system so I can run the startup script as user 'foo' instead of 'root'? 2) If not, what is the hard way of doing it? :) Does changing the permissions where I did constitute a major security faux pas? I'm guessing it might, but I'm not 100% sure... 3) Do I need to worry about these error messages? My application seems to run in spite of them... Thanks in advance, nbc NAME: Neil B. Cohen (Verisign Inc.) PHONE: 703-948-4471 DOMAIN: [EMAIL PROTECTED] * * Murphy's Philosophy: Smile - tomorrow will be worse...* * * * O'Tooles Commentary: Murphy was an optimist! * * - 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: Upgrading Tomcat
On 4/11/07, Laura McCord [EMAIL PROTECTED] wrote: So, basically I have to setup a new tomcat instance and move all the webapps over to the new install? Well, I upgrade regularly, so I keep my appBase(s) set to directories outside of the Tomcat installations. That way I can toggle test installs on and off easily, and no apps need to be moved or copied. With all individual apps configured via META-INF/context.xml, only the relevant parts of server.xml need to be copied. Once you get set up properly, moving to a new version becomes a trivial exercise. :-) HTH, -- Hassan Schroeder [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: Security question - starting tomcat as non-root user
On 4/11/07, Neil B. Cohen [EMAIL PROTECTED] wrote: Situation - I am installing tomcat and running it on port 8080. However, it is currently being started by the root user and I need to change that. If I just run the startup script as user 'foo', I get errors because it can't read various config files in the conf directory, can't write to the logs directory etc. Because having once run as root, all directories and files /created by/ Tomcat are owned by root. If you reinstalled and initially started it as user 'foo', everything would be owned by foo. So either reinstall, or change ownership of everything to 'foo'. HTH, -- Hassan Schroeder [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: Security question - starting tomcat as non-root user
I didn't realize it could be that simple :) Thanks very much - I will give that a try... Much obliged, nbc On Wed, 2007-04-11 at 07:59 -0700, Hassan Schroeder wrote: On 4/11/07, Neil B. Cohen [EMAIL PROTECTED] wrote: Situation - I am installing tomcat and running it on port 8080. However, it is currently being started by the root user and I need to change that. If I just run the startup script as user 'foo', I get errors because it can't read various config files in the conf directory, can't write to the logs directory etc. Because having once run as root, all directories and files /created by/ Tomcat are owned by root. If you reinstalled and initially started it as user 'foo', everything would be owned by foo. So either reinstall, or change ownership of everything to 'foo'. HTH, - 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: virtual directory
On 4/11/07, Sylvain Roche [EMAIL PROTECTED] wrote: I took the images example to explain and simplify the problem, but Regardless, I don't understand what you're trying to do -- do you want to have e.g. example.com/foo/images example.com/bar/images where 'images' points to the same content? If so, you could handle that via symlinks. If it's something else, maybe you can provide a different example... -- Hassan Schroeder [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]
Deploy Running the Struts application in Tomcat 5.0.28 Tomcat 4.1.31
Dear All, I am getting the following error after deploying and accessing the first page of my application. Please help me in solving the problem. I am getting the problem in both versions of Tomcat Thanks In Advance javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:498) at org.apache.jsp.gadget_jsp._jspService(gadget_jsp.java:317) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1 62) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:144) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:118) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) root cause java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at org.apache.jsp.gadget_jsp.class$(gadget_jsp.java:271) at org.apache.jsp.gadget_jsp._jspx_meth_html_base_0(gadget_jsp.java:327) at org.apache.jsp.gadget_jsp._jspService(gadget_jsp.java:128) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1 62) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:596) at
Re: virtual directory
The symlink solution could work, except that it is not what I want to do. The production application is hosted on linux servers, but we also have to deal with the developpers' computers, which runs windows What I need basically il to have a subdirectory of my webapp located somewhere else on my disk ie app = /srv/webapp/myapp META-INF WEB-INF classes lib publication = /srv/webapp/publication images resources = /srv/webapp/resources index.jsp ... where /srv/webapp/publication and /srv/webapp/resources are not really subdirectories of /srv/webapp/myapp, but are seen like they were by the application Actually on oc4j, I can get the real path with ServletContext.getRealPath(String path); where path is for example /WEB-INF/publication At 17:09 11/04/2007, Hassan Schroeder wrote: On 4/11/07, Sylvain Roche [EMAIL PROTECTED] wrote: I took the images example to explain and simplify the problem, but Regardless, I don't understand what you're trying to do -- do you want to have e.g. example.com/foo/images example.com/bar/images where 'images' points to the same content? If so, you could handle that via symlinks. If it's something else, maybe you can provide a different example... -- Hassan Schroeder [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: NullPointerException with Parameters.getParameterValues(String)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, Robert Harper wrote: Try username. I'm surprised the compiler doesn't complain that username is being used without being initialized. If it didn't, the compiler probably set username to be null. I don't know of a single compiler that will initialize a local variable to NULL for you. You need to pass a valid string to the method getParameter(); Try something more like: String username = null; Username = pageContext().getRequest().getParameter( username ); Oh, hey. I didn't notice that the OP didn't have username in quotes. He's probably passing NULL to getParameter(). Yeah, that'll do it. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGHQsU9CaO5/Lv0PARAlkqAJwJbr312EAGnsGqZH4S/bPv7vh51QCggTti UmY0MCSQ+KPvokEMOOpVeBM= =+F/r -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: NullPointerException with Parameters.getParameterValues(String)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rahul, Rahul Thakur wrote: Looks like it was the 'username'. The username is being initialised in the taglib handler implementation but the behaviour differs between JRun and Tomcat. That should not be the case. The servlet spec is quite clear about the order of execution of the various init/begin/body/end taglib calls. Are you sure you haven't changed anything? Now this can also accept other attributes (if the expected request param names were different). I updated it for Tomcat like this: users:login loginpage=login.jsp logout=logout username=username password=password / Why would it have to change for Tomcat? While 'username', 'password' and 'logout' are initialised to the default values in the taglib handler implementation, the setter method for these attributes still gets called when they are not specified in the JSP, and NULL values are assumed for them. That's the only explanation I can think of :-) Sounds like it might happen that way. If you have a default value for username (and friends), why not set those defaults in the setUsername(String) method and use the default when NULL is passed? Also, why is a setter being called on the tag handler when there is no attribute value specified? Something sounds fishy. Does adding 'username=username' fix the problem when running under Tomcat? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGHQvw9CaO5/Lv0PARAr/ZAJ9q1tAU9JihfSpO1vkvpIpZzqRxHACdGu6V qYgJxerB+azi5kQfeGNKPqM= =WUa5 -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: Deploy Running the Struts application in Tomcat 5.0.28 Tomcat 4.1.31
Difficult to diagnose w/o seeing the code Please post gadget.jsp M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Pasupuleti, Durga (Export) [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, April 11, 2007 12:05 PM Subject: Deploy Running the Struts application in Tomcat 5.0.28 Tomcat 4.1.31 Dear All, I am getting the following error after deploying and accessing the first page of my application. Please help me in solving the problem. I am getting the problem in both versions of Tomcat Thanks In Advance javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:498) at org.apache.jsp.gadget_jsp._jspService(gadget_jsp.java:317) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1 62) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:144) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:118) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) root cause java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at org.apache.jsp.gadget_jsp.class$(gadget_jsp.java:271) at org.apache.jsp.gadget_jsp._jspx_meth_html_base_0(gadget_jsp.java:327) at org.apache.jsp.gadget_jsp._jspService(gadget_jsp.java:128) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1 62) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:146) at
Re: Security question - starting tomcat as non-root user
Did you try running tomcat with JSVC. It'll run it as a deamon with the user privileges of your choicde On 4/11/07, Neil B. Cohen [EMAIL PROTECTED] wrote: I didn't realize it could be that simple :) Thanks very much - I will give that a try... Much obliged, nbc On Wed, 2007-04-11 at 07:59 -0700, Hassan Schroeder wrote: On 4/11/07, Neil B. Cohen [EMAIL PROTECTED] wrote: Situation - I am installing tomcat and running it on port 8080. However, it is currently being started by the root user and I need to change that. If I just run the startup script as user 'foo', I get errors because it can't read various config files in the conf directory, can't write to the logs directory etc. Because having once run as root, all directories and files /created by/ Tomcat are owned by root. If you reinstalled and initially started it as user 'foo', everything would be owned by foo. So either reinstall, or change ownership of everything to 'foo'. HTH, - 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: jsvc with security manager
On 4/11/07, Thomas Zumbrunn [EMAIL PROTECTED] wrote: Hello list A couple of weeks ago I asked for advice regarding a problem with jsvc and security manager. Unfortunately, I still couldn't figure out how to solve the problem. Could anyone point me in the right direction? Thank you. I don't know if the JSVC mailing list could be appropriate here, however you're getting... you may also want to check with the JavaSE Security related forums: http://forum.java.sun.com/category.jspa?categoryID=15 Caused by: java.security.AccessControlException: access denied (java.security.SecurityPermission getProperty.package.definition) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264) From reading a few other related threads: http://forum.java.sun.com/thread.jspa?threadID=625770messageID=3590744 it appears that you need to grant security permissions to all the JAR files used by the JSVC. -Rashmi - 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: Question on setting up LDAP...
Yeah we use it successfully. We've got the following in our server.xml in the Engine tag: Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionName=uid=xxx,ou=xxx,dc=bc,dc=com connectionPassword=xxx connectionURL=ldap://ldapname.bc.com; roleBase=ou=xxx,dc=bc,dc=com roleName=cn roleSearch=(uniqueMember={0}) roleSubtree=true userBase=ou=xxx,dc=bc,dc=com userSearch=(uid={0}) / -Original Message- From: Smith, Corey [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 7:48 AM To: users@tomcat.apache.org Subject: Question on setting up LDAP... Hello and how is it? I was wondering if anyone has had success in setting up LDAP to work with their Tomcat Web applications? Thanks :) C CONFIDENTIALITY NOTICE: If you have received this e-mail in error, please immediately notify the sender by e-mail at the address shown. This e-mail transmission may contain confidential information. This information is only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. - 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: jsvc with security manager
On 4/11/07, Thomas Zumbrunn [EMAIL PROTECTED] wrote: Sorry I missed this part: I'm using the script jsvc-src/native/Tomcat5.sh which ships with the tomcat distribution and with the environment variable CATALINA_OPTS=-Djava.security.manager -Djava.security.policy==$CATALINA_HOME/conf/catalina.policy to be able to run the security manager. I don't know if you've also check the rwx permissions on the relevant files. -Rashmi - 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: Servlet init method invocation
I think ServletContextListener is useful for initializing non-Servlet classes too, the non-Servlet class only needs to implement the listener. -Rashmi On 4/11/07, Mikolaj Rydzewski [EMAIL PROTECTED] wrote: I prefer to use ServletContextListener. - 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: virtual directory
On 4/11/07, Sylvain Roche [EMAIL PROTECTED] wrote: The symlink solution could work, except that it is not what I want to do. The production application is hosted on linux servers, but we also have to deal with the developpers' computers, which runs windows That's fixable :-) What I need basically il to have a subdirectory of my webapp located somewhere else on my disk Given that webapps are supposed to be self-contained, I'm not surprised Tomcat doesn't provide such a facility... Actually on oc4j ..nor am I surprised that oc4j does, but let's not go there :-) If it were me, I'd consider just using your build system to make copies of those directories, in the short term at least. Good luck, -- Hassan Schroeder [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: proxy_balancer_module modules/mod_proxy_balancer.so in httpd-2.0.52-28.ent.i386 ??
The balancer code is only part of httpd 2.2.x On Apr 11, 2007, at 4:01 AM, Paresh Mutha wrote: The feature I am looking for proxy_balancer_module modules/mod_proxy_balancer.so. Can some one tell me if this is available on RHEL4 ie in httpd-2.0.52-28.ent.i386https://rhn.redhat.com/network/software/ packages/details.pxt?pid=356268Apache HTTP Server ? Thanks, Paresh - 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 migration to Tomcat from JRun
There are some useful suggestions on a question that was answered previously: http://mail-archives.apache.org/mod_mbox/tomcat-users/200212.mbox/[EMAIL PROTECTED] The web.xml snippet you've shown looks standard. I don't think you need to change anything there. I think Tomcat version 5.0 follows the Servlet Specification 2.4 , which is standard. JRun also follows the spec but my have its own proprietary additions. So check the standards for web.xml (for whatever version of Tomcat you choose) and compare it with the web.xml for JRun. For the data source jrun-resources.xml , I don't think there's an external data source file in Tomcat, here's details on configuring JDBC Datasource: http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html You may need the corresponding JAR files etc. Additional Tomcat 5.0 configuration are covered here: http://tomcat.apache.org/tomcat-5.0-doc/config/index.html If you have specific issues/questions while migrating, just ask. -Rashmi - 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: virtual directory
I dont know... I think you have be spoilt by linux windows shortcuts just dont equal linux soft links... hey! :) I see what you saying even if say you made a little servlet that could suck files from anywhere, how does the calling program see shell folders, I suppose you could make the URL mimic files like http://myMagicFileSucker/filesystem/subfolder but its never going to be enough to make a normal java program think its a folder. I think if you had linux links on windows, it would make you happy... and guess what, its possible but MS doesnt advertise it because there are a few things a normal user can do that can really screw things up. Have a look at a free solution and have a look at microsofts solution... they call linux links... junction points. Free solution http://www.rekenwonder.com/linkmagic.htm Microsoft http://support.microsoft.com/kb/205524 You will be able to map external folders to a tomcat webapp folder... I think this is a kludge of last resort and I wouldnt recommend it to any1 unless there is absolutely no other way. Make sure your programmers really understand things like if they delete a junction point in explorer... weird stuff can happen because the ms file explorer doesnt know what these things are. Whew!... just be careful... I'm thinking about stuff like tomcats auto deployment... I mean if that whacks the folders before it makes new ones, and it probably does... some programmers files somewhere else will get whacked if you drop another WAR file in... ha ha, but then hey I suppose that should also happen on linux links... anyway test it carefully. have fun I'm putting on my bullet proof vest, and changing my name... so you will never find me again ha ha. - Original Message - From: Sylvain Roche [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, April 11, 2007 4:16 PM Subject: Re: virtual directory Hi Johnny, hi everybody I took the images example to explain and simplify the problem, but actually I may need to include different contents, which may be static - like images, flash animations, html pages - but may also be jsp pages for exemple, and some of these contents are likely to be generated by another web application. This works fine for years with oc4j / orion, so we would rather have the lesser to change before we can switch oc4j for tomcat. In fact if we can't manage to do that, it may be a reason to discard tomcat from our choice list, because some part of our application relies on virtual directories. Best regards Sylvain At 10:14 11/04/2007, Johnny Kewl wrote: Hi sylvian When developing I do this request.getContextPath() + uri; but I wrap the request.getContextPath() in a little routine like say imageMap(String uri) and use that in my JSP's Thats cool because if I change the context path the app doesnt break... BUT... I do it for a much better reason. When I'm done making a Tomcat app I move all the images to the Apache server... And then just change imageMap(String uri) to point to the Apache Web server url... Apache Web Srvr is damn good at delivering images and Tomcat speeds up nicely when you do this. I actually cant believe that people use cross context stuff for images if you dont want to use apache, the you could make a single webapp, dump all your images in there, and just address that in your other apps, http://myImageTomcatServer/image/xxx.jpg Let the browser join the images for you... if you have a look at web pages you will often see the images come from a different server... like look at web counters for example. Heres another example if I make a captcha generator (you know those little images that have numbers in them) then I make a seperate servlet called CapchaGen.jpg and in my other apps I call that URL image appears in the browser. What document is this that you talking about... sucking images from other webApps through context sharing... sounds crazy? Good luck [EMAIL PROTECTED] - Original Message - From: Sylvain Roche [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, April 10, 2007 7:23 PM Subject: virtual directory Hi this seems a very classical problem for tomcat users, but I couldn't find on the web a solution which satisfies me. We plan to host multiple applications, on a tomcat box. These applications may all need an images directory. But of course each of them has a different images directory. What we want to do is to deploy different versions of each application, without the need to move the images. The crosscontext context solution, which is the one given everywhere, does not correspond to our need, because, as far as I tried it - I may need an unknow depth for the point I will make the link, for example, it could be /images/layout/DE_de - I need to have a mapping inside my web-app, ie inside the context rather than at the
Re: nsapi_redirector.so
Hi Rajiv, the other downloads you found are for the apache web server. They will not work with the sun web server. I was able to use Sun Web Server 6.1 SP7 64 Bit Sparc on Solaris 10, with the binary library nsapi_redirector.so_sjsws61_sp7_64 I provided. There is (at least) one bug in the nsapi plugin, which should only show up, in case you use the mount attribute somewhere i your workers.properties. Since your error happens during parsing of workers.properties, I would suggest you do the following things: 1) Increase the log level of the nsapi plugin to trace in magnus.conf: Init fn=jk_init worker_file=... log_level=trace log_file=... shm_file=... 2) Please post your complete obj.conf, magnus.conf *and* workers.properties 3) I build a debug version of the plugin, which will log additional trace log statements, to identify, where the problem actually happens. I put it into the directory on people.apache.org, I already posted. It's name is nsapi_redirector.so_sjsws61_sp7_64_debug 4) Double check, that the configured name and path of your workers.properties file are correct and the file is readable by the user who runs the web server. 5) After your next test, post error log and nsapi log. Thanks and 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: Tomcat 5.5.23 Question
Did you mean JRE not JDK? It was my understanding that Tomcat 5.5 could be configured to use JRE 1.4 and that it had no need for an external JDK compiler. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 10, 2007 8:01 PM To: Tomcat Users List Subject: Re: Tomcat 5.5.23 Question Laura McCord wrote: I currently have Tomcat 5.0.28 installed and we received a security vulnerability notice pertaining to a Apache Tomcat Directory Traversal. http://archives.neohapsis.com/archives/fulldisclosure/2007-03/0167.html We were thinking about upgrading to version 5.5.23 but is it true that we would have to upgrade our java installation from 1.4 to java 5? No this is not true. TC5.5.x runs on a 1.4 JDK as long as long also download the JDK 1.4 compatibility package. Also, if anyone is familiar with this security vulnerability can you please explain what this means? http://tomcat.apache.org/security-5.html - CVE-2007-0450 Short version: - Tomcat has two contexts, A B - Tomcat is not accessible from the Internet - httpd is configured to proxy requests only to context A - httpd is accessible from the Internet In this configuration a user may expect that context B is not accessible from the Internet. This is not the case. HTH. Mark - 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: OutOfMemory problem on Tomcat 5.5.20 and Java 1.5
Hi Mark, Thanks for your input. Tomcat is started up via cargo with all its default options. This is how we've always run our functional tests. It appears that by adding new functionality (read: more JSPs, etc) we've simply reached a threshold now where we need to run the functional tests with more memory. I'm also a little baffled why this doesn't occur on JVM 1.6 however. I verified that we also use -Xmx256m on the 1.6 JVM. (all the settings are exactly the same and the server is also started up by Cargo. The only difference is the version of the JVM) I suppose the good thing about this is that, while analyzing these heapdumps we did find some memory inefficiencies in JIRA however. Especially to do with small leaks of the VelocityEngine (about 90Mb are taken up by the velocity engine) by JIRA code. Initially we thought this was normal, as velocity also caches the rendered velocity templates, however it looks like in very rare circumstance we're leaking the entire VelocityEngine object. We're not 100% sure yet how this happens, but we're investigating it at the moment. We had a look at http://issues.apache.org/bugzilla/show_bug.cgi?id=37793 with Jeff Turner, but it doesn't seem that this is the major cause of the problem. Thanks again for your help. Cheers, Andreas Mark Thomas wrote: Andreas Knecht wrote: Just a quick addition. The memory dump is now available here: http://repository.atlassian.com/temp/java_pid27558.hprof.gz Cheers, Andreas You appear to be running Tomcat in development mode. (http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html) This means that source of every JSP is held in memory to provide detailed messages in the event of an error. If you have large JSPs this will hurt. It looks like this accounts for 50MB+ The compiled JSPs account for 80MB+. I am guess there is a lot of text in some of these JSPs. This doesn't explain why you don't see the error on a 1.6 jvm. Are you sure you are still using 256MB of RAM with the 1.6 jvm? 27% of your memory is used by char[]. Have you read http://issues.apache.org/bugzilla/show_bug.cgi?id=37793 ? It might offer some insight. HTH, Mark - 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]
Demonstration of Chroot when tomcat running in jail
Hi, How can the Chroot be demostrated in a very simple way without actually hacking the tomcat. I just need to show that someone has taken control of tomcat and now he's in the directory (chroot jail) where tomcat is running but won't be able to access the actual root of the webserver. What would a good way to demostrate this. Any kind of help would be highly appreciated. Thanks ~Jas - 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 Datbase Connection Pooling
Are there any best practices papers on how effectively DBCP parameters to be configured to have a efficient pool management I am asking this because there are commonly occuring issues with this all over the internet Regards Venkat Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front
Re: Tomcat Datbase Connection Pooling
Did you check this document? http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html There are some very good suggestions under: Preventing dB connection pool leaks Common Problems Also see: http://jakarta.apache.org/commons/dbcp/configuration.html -Rashmi - 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: Demonstration of Chroot when tomcat running in jail
You could create a file, write to it, and observe where it appears. -Original Message- From: Jasbinder Singh Bali [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 6:50 PM To: users@tomcat.apache.org Subject: Demonstration of Chroot when tomcat running in jail Hi, How can the Chroot be demostrated in a very simple way without actually hacking the tomcat. I just need to show that someone has taken control of tomcat and now he's in the directory (chroot jail) where tomcat is running but won't be able to access the actual root of the webserver. What would a good way to demostrate this. Any kind of help would be highly appreciated. Thanks ~Jas - 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: NullPointerException with Parameters.getParameterValues(String)
Hi Chris, Rahul Thakur wrote: Looks like it was the 'username'. The username is being initialised in the taglib handler implementation but the behaviour differs between JRun and Tomcat. That should not be the case. The servlet spec is quite clear about the order of execution of the various init/begin/body/end taglib calls. Are you sure you haven't changed anything? Now this can also accept other attributes (if the expected request param names were different). I updated it for Tomcat like this: users:login loginpage=login.jsp logout=logout username=username password=password / Why would it have to change for Tomcat? This particular web app was coded up 5+ years ago and deployed on JRun. I am not sure if the Servlet spec then was clear on taglib lifecycle or not (I admit I haven't read the spec!) While 'username', 'password' and 'logout' are initialised to the default values in the taglib handler implementation, the setter method for these attributes still gets called when they are not specified in the JSP, and NULL values are assumed for them. That's the only explanation I can think of :-) Sounds like it might happen that way. If you have a default value for username (and friends), why not set those defaults in the setUsername(String) method and use the default when NULL is passed? Also, why is a setter being called on the tag handler when there is no attribute value specified? Something sounds fishy. Does adding 'username=username' fix the problem when running under Tomcat? Yes, adding those attributes to the taglib works on Tomcat. Another difference that Robert pointed out in an earlier email on this thread was about the Request 'Parameter' objects not being created/assimilated by Tomcat container when another Servlet or Filter makes a call to Request.getInputStream() or getReader(). I did not hit any issues on JRun w.r.t this. Rahul - 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 5.5.23 Question
James Reinertson wrote: It was my understanding that Tomcat 5.5 could be configured to use JRE 1.4 and that it had no need for an external JDK compiler. This is correct. A 1.4 JRE works just as well as a 1.4 JDK. Mark - 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 Datbase Connection Pooling
Venkatesh I assume you've seen this introduction to DBCP? http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations Martin-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Venky Vasant [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, April 11, 2007 6:49 PM Subject: Tomcat Datbase Connection Pooling Are there any best practices papers on how effectively DBCP parameters to be configured to have a efficient pool management I am asking this because there are commonly occuring issues with this all over the internet Regards Venkat Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front - 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: Axis2 v1.1.1 with Tomcat 6.0.10?
Clearly there's something wrong in /axis2-web/Error/error500.jsp and may be another JSP file as well. -Rashmi On 4/4/07, Rudolph, Troy [EMAIL PROTECTED] wrote: Apr 3, 2007 12:38:55 PM org.apache.catalina.core.ApplicationDispatcher SEVERE: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP: SEVERE: Exception Processing ErrorPage[errorCode=500, location=/axis2-web/Error/error500.jsp] org.apache.jasper.JasperException: Unable to compile class for JSP: - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Singleton in Tomcat
I have a singleton class that I want to load The code is like such: % Pam pam = Pam.getInstance(); % I get a ClassNotFoundException which is odd seeing as how the following code works fine % Pam pam = null; % The fact that it finds Pam in the second example makes me wonder if there is something Im doing wrong by using the standard getInstance() method. I have deployed the class files to the standard WEB-INF/classes directory. Is there a trick to getting it to load? Thanks for any help Thomas - 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: Demonstration of Chroot when tomcat running in jail
I didn't get that. Can you please explain what are you trying to say here. Thanks On 4/11/07, Tim Lucia [EMAIL PROTECTED] wrote: You could create a file, write to it, and observe where it appears. -Original Message- From: Jasbinder Singh Bali [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 6:50 PM To: users@tomcat.apache.org Subject: Demonstration of Chroot when tomcat running in jail Hi, How can the Chroot be demostrated in a very simple way without actually hacking the tomcat. I just need to show that someone has taken control of tomcat and now he's in the directory (chroot jail) where tomcat is running but won't be able to access the actual root of the webserver. What would a good way to demostrate this. Any kind of help would be highly appreciated. Thanks ~Jas - 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: Singleton in Tomcat
There's no trick to getting it to load. There must be something wrong in the class, like incorrect package name or incorrect package directory structure etc. Try this small test, % Calendar calendar = Calendar.getInstance(); % %=calendar.getFirstDayOfWeek()% In the Pam class check if the package is defined and the class is located under proper folder structure under /WEB-INF/classes/ . -Rashmi - 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: Singleton in Tomcat
Calendar example worked (with page import java.util.Calendar) :) This is the Pam.java class the class compiles to WEB-INF/classes/net/digitalassembly/auth/Pam.class package net.digitalassembly.auth; import java.util.ArrayList; import java.util.List; import java.util.Properties; import java.io.FileInputStream; import java.io.IOException; import net.digitalassembly.auth.PamModule; import net.digitalassembly.auth.PamHibernateModule; // May need to have this in the config file to make it plugable public class Pam { /* Pam has a list of modules that it can support * There is a interface called PamModule that allows * other modules to interact with Pam * Pam should be a singleton * Does PAM ONLY allow one mechanism? I think Not */ private static Pam instance = new Pam(); private String pamConfigFile = pam.conf; // Static file for all modules private ListPamModule pamModules = new ArrayList(); private Properties pamProperties = new Properties(); private Pam() { try { pamProperties.load(new FileInputStream(pamConfigFile)); } catch (IOException ioe) { System.out.println(File not found); this.instance = null; } System.out.println(pamProperties.getProperty(pam.hibernate.plugin)); if (pamProperties.getProperty(pam.hibernate.plugin).equalsIgnoreCase(true)) { pamModules.add(PamHibernateModule.getInstance()); } if (pamProperties.getProperty(pam.db.plugin).equalsIgnoreCase(true)) { pamModules.add(PamHibernateModule.getInstance()); } if (pamProperties.getProperty(pam.ldap.plugin).equalsIgnoreCase(true)) { pamModules.add(PamHibernateModule.getInstance()); } if (pamProperties.getProperty(pam.file.plugin).equalsIgnoreCase(true)) { pamModules.add(PamHibernateModule.getInstance()); } } public boolean authenticate(String username, String password) { System.out.println(Running Authenticate); for (PamModule module: pamModules) { System.out.println(module); boolean pass = false; pass = module.authenticate(username,password); if (pass == true) { return true; } } return false; } public static Pam getInstance() { return instance; } } The file that is trying to use it is authenticate.jsp which contains the following: %@ page import=net.digitalassembly.auth.Pam % % Pam pam = Pam.getInstance(); if (pam != null) { if (pam.authenticate(request.getParameter(username),request.getParameter(password))) { session.setAttribute(validUser,request.getParameter(username)); } response.sendRedirect(/CharacterForge/forge/index.jsp); } else { out.println(Pam failed to initialize); } % * The error I get is:* org.apache.jasper.JasperException: Exception in JSP: /authenticate.jsp:3 1: %@ page import=net.digitalassembly.auth.Pam % 2: % 3: Pam pam = Pam.getInstance(); 4: if (pam != null) { 5: if (pam.authenticate(request.getParameter(username),request.getParameter(password))) { 6: session.setAttribute(validUser,request.getParameter(username)); Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) *root cause* javax.servlet.ServletException org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:843) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776) org.apache.jsp.authenticate_jsp._jspService(authenticate_jsp.java:63) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) *root cause* java.lang.NoClassDefFoundError
Re: Singleton in Tomcat
I tried a smaller version of your code since I don't have the dependent Classes as follows: \MyProject\WEB-INF\classes\net\digitalassembly\auth\Pam.class package net.digitalassembly.auth; public class Pam { private static Pam instance = new Pam(); private Pam() { } public boolean authenticate(String username, String password) { return false; } public static Pam getInstance() { return instance; } } .\MyProject\somefolder\authenticate.jsp %@ page import=net.digitalassembly.auth.Pam % % Pam pam = Pam.getInstance(); if (pam != null) { out.println( pam not null ); } else { out.println(Pam failed to initialize); } % And it printed pam not null on the screen. So it worked. -Rashmi - 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: Singleton in Tomcat
It looks like the problem is in this snippet of code: On 4/11/07, Thomas Polliard [EMAIL PROTECTED] wrote: Check if you placed pam.conf under /WEB-INF/classes/ --- I think that's where Properties files are loaded from. private String pamConfigFile = pam.conf; // Static file for all modules I think it is unable to locate the pam.conf, so it's probably throwing File not found --- and setting pam to null as here: private Pam() { try { pamProperties.load(new FileInputStream(pamConfigFile)); } catch (IOException ioe) { System.out.println(File not found); this.instance = null; } Or perhaps some other class is not being loaded. -Rashmi - 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: Demonstration of Chroot when tomcat running in jail
To clarify it further, I need demonstrate someone entering the chroot jail where tomcat is running and then he can issue all his commands there but won't be able to see the actual root being in chroot jail On 4/11/07, Jasbinder Singh Bali [EMAIL PROTECTED] wrote: I didn't get that. Can you please explain what are you trying to say here. Thanks On 4/11/07, Tim Lucia [EMAIL PROTECTED] wrote: You could create a file, write to it, and observe where it appears. -Original Message- From: Jasbinder Singh Bali [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 6:50 PM To: users@tomcat.apache.org Subject: Demonstration of Chroot when tomcat running in jail Hi, How can the Chroot be demostrated in a very simple way without actually hacking the tomcat. I just need to show that someone has taken control of tomcat and now he's in the directory (chroot jail) where tomcat is running but won't be able to access the actual root of the webserver. What would a good way to demostrate this. Any kind of help would be highly appreciated. Thanks ~Jas - 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: Demonstration of Chroot when tomcat running in jail
Just create a jsp page with a text input that whatever you submit there is executed at a shell and returns the result. On 4/11/07, Jasbinder Singh Bali [EMAIL PROTECTED] wrote: To clarify it further, I need demonstrate someone entering the chroot jail where tomcat is running and then he can issue all his commands there but won't be able to see the actual root being in chroot jail On 4/11/07, Jasbinder Singh Bali [EMAIL PROTECTED] wrote: I didn't get that. Can you please explain what are you trying to say here. Thanks On 4/11/07, Tim Lucia [EMAIL PROTECTED] wrote: You could create a file, write to it, and observe where it appears. -Original Message- From: Jasbinder Singh Bali [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 6:50 PM To: users@tomcat.apache.org Subject: Demonstration of Chroot when tomcat running in jail Hi, How can the Chroot be demostrated in a very simple way without actually hacking the tomcat. I just need to show that someone has taken control of tomcat and now he's in the directory (chroot jail) where tomcat is running but won't be able to access the actual root of the webserver. What would a good way to demostrate this. Any kind of help would be highly appreciated. Thanks ~Jas - 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: Tomcat 6.0.x OpenEJB
http://geronimo.apache.org they did it :) filip José Perdigão wrote: Hi, has anyone been able to integrate OpenEJB with Apache-Tomcat 6.0.x? Or is it just impossible to do it? - 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 5.5.23 Question
All right. So then I have two questions. 1. Is it possible to have two JRE versions (1.4.x and 1.6.x) installed on the system running Tomcat 5.5 and set Tomcat to use JRE 1.4? 2. Is it possible to set Tomcat 5.5 to use JDK 1.4 for compiling JSP instead of the Tomcat 5.5 built in compiler? -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 5:00 PM To: Tomcat Users List Subject: Re: Tomcat 5.5.23 Question James Reinertson wrote: It was my understanding that Tomcat 5.5 could be configured to use JRE 1.4 and that it had no need for an external JDK compiler. This is correct. A 1.4 JRE works just as well as a 1.4 JDK. Mark - 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: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.23 Question
On 4/11/07, James Reinertson [EMAIL PROTECTED] wrote: All right. So then I have two questions. 1. Is it possible to have two JRE versions (1.4.x and 1.6.x) installed on the system running Tomcat 5.5 and set Tomcat to use JRE 1.4? Of course. $JAVA_HOME, $JRE_HOME - set them as you like. 2. Is it possible to set Tomcat 5.5 to use JDK 1.4 for compiling JSP instead of the Tomcat 5.5 built in compiler? google tomcat java compiler -- see first result :-) HTH, -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]