How to change the CLASSPATH in tomcat 5.028 for a concrete webservice
Hello I would like to change the classpath for a concrete webservice in Tomcat 5.028 because the webservice has to use a concrete folder in order to work. This folder should be in the CLASSPATH in order to make the webservice work properly and because the webservice can't find it, it doesn't work. I've tried a lot of ways to solve it: I tried to launch tomcat with the classpath modified from the shell itself(making it point to the folder), tried to export the classpath from startup.sh script, tried to export the classpath from catalina.sh script, tried to modify the CATALINA_OPTS variable, tried to put the folder in both lib and classes folders of the webservice folder... but nothing worked. could you please help me? Anyway i'll continue researching by myself. thank you very much - 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: mod_jk errors and http status code 503 under load
Good morning Rainer, bash-3.00# /usr/local/apache2/bin/httpd -V Server version: Apache/2.0.55 Server built: Mar 5 2007 11:10:17 Server's Module Magic Number: 20020903:11 Architecture: 32-bit Server compiled with -D APACHE_MPM_DIR=server/mpm/worker -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=/usr/local/apache2 -D SUEXEC_BIN=/usr/local/apache2/bin/suexec -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=conf/mime.types -D SERVER_CONFIG_FILE=conf/httpd.conf I shall upgrade our mod_jk component and set the connection timeout property. I am currently using jmeter to try and re-produce the problem in our lab before I update anything - just so I can be sure if I have solved the issue. May I get back to you later if I am still having issues? Damien -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: Thursday, September 06, 2007 4:52 PM To: Tomcat Users List Subject: Re: mod_jk errors and http status code 503 under load Damien Corbishley wrote: Hi Rainer, Apache: Server version: Apache/2.0.55 Server built: Mar 5 2007 11:10:17 Server's Module Magic Number: 20020903:11 Yes, we are thinking about updating the Java, I was in the process of checking the release notes to see if anything specific was mentioned. Mod JK: mod_jk/1.2.15 OK, 1.2.15 is a little antique. At the moment we reached 1.2.25. Worker or prefork MPM? - I don't understand the question, sorry. MPM = Multi processing module prefork = multiple processes, but only one thread per process worker = multiple processes with a couple of threads per process (default=25) The strings prefork or worker are also cintained in the output of httpd -V. Example: ... Server compiled with -D APACHE_MPM_DIR=server/mpm/prefork ... Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 acceptCount=50 minSpareThreads=240 maxThreads=950 backlog=50 address=127.0.0.1 debug=0 / You should have a connectionTimeout. Tomcat is installed on the same machine as Apache. With respect to the number of connections to the tomcat port I can't give a complete answer - looking at the crash I can see there are around 4000 stuck at TIME_WAIT. Another 30 or so are at ESTABLISHED. All of those 4000 TIME_WAIT for port 8009? That would be very much, indicating, that you are rapidly opening and closing the connections between Apache/mod_jk and tomcat. Those connections are supposed to be reused for some time. The mod jk configuration: This file only consits of comments? ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED ## WHEN YOU EDIT THE FILE. ## COMMENTS WILL BE _LOST_ ## DOCUMENTATION OF THE FORMAT IN JkMain javadoc. # Set the desired handler list # handler.list=apr,request,channelJni # # Override the default port for the socketChannel # channelSocket.port=8019 # Default: # channelUnix.file=${jkHome}/work/jk2.socket # Just to check if the the config is working # shm.file=${jkHome}/work/jk2.shm # In order to enable jni use any channelJni directive # channelJni.disabled = 0 # And one of the following directives: # apr.jniModeSo=/opt/apache2/modules/mod_jk2.so # If set to inprocess the mod_jk2 will Register natives itself # This will enable the starting of the Tomcat from mod_jk2 # apr.jniModeSo=inprocess bash-3.00# cat ./callflow-server/webserver/conf/workers.properties workers.apache_log=/usr/local/apache2 This attribute never existed (so it's ignored). workers.tomcat_home=/opt/tomcat workers.java_home=/usr/j2se/ Thos two don't have a meaning any more. worker.list= worker1 worker.worker1.type=ajp13 worker.worker1.host=127.0.0.1 worker.worker1.port=8009 worker.worker1.lbfactor=2.5 Not needed, if you are not using a JK load balancer. If you upgrade and later want to use a JK load balancer: newer JK versions use integer numbers here. # Number of concurrent users. worker.worker1.cachesize=950 worker.worker1.cache_timeout=600 So set connectionTimeout in the AJP connector (server.xml) to 60 (Milliseconds). worker.worker1.socket_timeout=300 Yes, I agree with you about contacting SUN, I'm digging out our service plan at the moment. I don't see a good reason, why you should get those error messages for this configuration. But you should update to a more recent mod_jk in order to research this problem from a better starting point (and maybe it will be gone). Damien -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: Thursday, September 06, 2007 3:42 PM To: Tomcat Users List Subject: Re:
RE: Connection pooling, is it the right way to do it?
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: RE: Connection pooling, is it the right way to do it? I'm using Tomcat 5.5.9. Which is nearly 2.5 years old. Anytime you utilize invalid parameters, you run the risk of encountering undefined behavior in any level of the software. The fact that it hasn't shown up yet says little about the future, especially if you upgrade to a newer version. Follow the doc. at this link http://www.onjava.com/pub/a/onjava/2006/04/19/database-connection-pooling-with-tomcat.html i see the two parameters, but i suppose there are correct since the context is added to server.xml instead of context.xml. Is it right? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Leggi GRATIS le tue mail con il telefonino i-mode di Wind http://i-mode.wind.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: mod_jk errors and http status code 503 under load
Hi Damien, Damien Corbishley wrote: Good morning Rainer, bash-3.00# /usr/local/apache2/bin/httpd -V Server version: Apache/2.0.55 Server built: Mar 5 2007 11:10:17 Server's Module Magic Number: 20020903:11 Architecture: 32-bit Server compiled with -D APACHE_MPM_DIR=server/mpm/worker -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=/usr/local/apache2 -D SUEXEC_BIN=/usr/local/apache2/bin/suexec -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=conf/mime.types -D SERVER_CONFIG_FILE=conf/httpd.conf I shall upgrade our mod_jk component and set the connection timeout property. I am currently using jmeter to try and re-produce the problem in our lab before I update anything - just so I can be sure if I have solved the issue. May I get back to you later if I am still having issues? Of course, and in case I'm to busy: there are more JK users out there reading the list and helping with problems. Damien 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: How to change the CLASSPATH in tomcat 5.028 for a concrete webservice
Hi again I've tried to set the classpath in catalina.sh in order to have my own classpath set when tomcat starts up ( I show it in catalina.sh as well and it looks good). But my problem is that when I show it in my webservice (using System.out.println(System.getProperty(java.class.path))) it is changed again (it only points to a few jar files in /bin folder) and therefore my webservice can't work properly. Shouldn't it be pinting to my my /webapp/webservice/WEB-INF/lib folder as well? Does anybody know how to fix this problem? Hakan: I've tried the solution you gave me (create a setenv.sh script called from startup.sh) but tomcat don't start up! Thank you very much for your future answers :p Tomás Tormo escribió: Hi Hakan First of all thank you for your fast answer ;). Do you mean to create an script called setenv.sh wich will set the CLASSPATH (by export CLASSPATH.. etc)? This script should be called by a modified startup.sh? By they way, I printed the CLASSPATH in my webservice (using System.out.println(System.getProperty(java.class.path)); ) and it says that my CLASSPATH is only pointing to a few jars in the bin folder, not even to my /lib folder in my webservice folder (I hope I explained myself well, I'm not using war files). Shouldn't it be pointing to my /webapp/webservice/WEB-INF/lib folder as well? Thank you!! Greetings!! Hakan Koseoglu escribió: Hi Tomás, Tomás Tormo said the following on 09/10/2007 08:26 AM: I would like to change the classpath for a concrete webservice in Tomcat 5.028 because the webservice has to use a concrete folder in order to work. This folder should be in the CLASSPATH in order to make the webservice work properly and because the webservice can't find it, it doesn't work. With Tomcat 5, creating a setenv.sh solves the problem for me. It gets called if you start the Tomcat using startup.sh. Any variable you define there will be used, including the classpath. We use it to point to the libraries which we don't put into common/lib nor war files. - 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: Connection pooling, is it the right way to do it?
Sorry I didn't respond earlier -- it's been a busy weekend. Comments inline... --David [EMAIL PROTECTED] wrote: Hi. 1. Your docBase and path attributes are at best optional. As long as your context.xml is delivered in your webapp's META-INF folder, it should be used automagically. So context.xml and web.xml are fine? And yes, both are dployed with the application Yes. Aside from removing docBase and path attributes in context.xml. The name of the folder in tomcat's webapps folder will be the default for both path and docBase. 2. I would trade the autoReconnect=true parameter to the database url with a validationQuery attribute in the Resource .../ element. That tells the db pool to do use the query to do a quick test of the connection (and possibly recreate it) before you get it. So i should remove autoReconnect=true from url parameter and add the validationQuery parameter? Which value should i assign to validationQuery? The validation query can be as simple as 'select 1'. The point is to exercise the connection and make sure it works before attempting to do any business. autoReconnect=true on the db connect url will only reconnect after generating an exception. See the MySQL site for details. 3. I see a lot of places where you catch and summarily eat the exception with no logging or even passing it up to the method's caller. If you don't pass it up and it's significant to the response, at least log it. If you are throwing a new exception in response to an underlying exception, pass the root cause along. I didn't paste the whole code, just the structure of it... there are logs lines in those catches :) Ok 4. If the Database class is truly stateless (no class instance variables) like what's listed, static methods are fine. However, I would personally keep the DataSource object around after the first access in some manner as a performance optimization for subsequent method calls. Maybe something to the effect of: db = new Database() ; Object something = db.getSomething() ; Object something2 = db.getSomeOtherThing() ; In this way, i would keep the db object around but the DataSource (according to my code) would be accessed each time due to the getConnection() method that is in each method of Database class, isn't it? Right, but the getConnection() code would just something to the effect of: if ( this.dbsource == null ) { // get the datasource } // Continue on with dbsource.getConnection() and finish. In that case, store the DataSource object in the Database class and don't make any methods static. Otherwise it looks good. Have you tried the code? Yes, code is already in use but since i had some problems with the previous installation of tomcat (after some days connection pooling collapsed) i just wonder if the problem was the connection pooling or the bad tomcat installation (now i reinstalled it and seems acting in a better way). Anyway, in the way it is, it shouldn't cause any problem in connection pooling, i mean, the code as it is, could cause any connection problem after some day/weeks of use? Or the pool is handled in the right way? Thanks I haven't seen any issue if you just make sure to close connections as soon as you are done with them. I see in the code you are doing that, so no problem. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Context deletion on redeploy
Hi, Is there a way to prevent Tomcat to delete the webappname.xml from conf/Catalina/localhost at every redeployment? I have application specific environment settings there, but at redeploy it gets deleted and I lose the settings. I have tried with and without context.xml in META-INF in my war. It gets copied to the conf/Catalina/localhost but contains the default settings. I could use jndi with putting a resource link into the webapp's META-INF/context.xml and defined the setting in GlobalResource. But now I have to deploy the same webapp.war more times (with different name and settings) to the same Tomcat. I use autodeploy (copy the .war to the webapps). Please help! Thanks, Balázs - 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: How to change the CLASSPATH in tomcat 5.028 for a concrete webservice
I wold STRONLY recommend you DO NOT touch the CLASSPATH env variable. It's just a horrible idea. What is it about your webservice that requires the alteration of CLASSPATH? Can you describe that a bit more? The standard classloader structure works very well in virtually all other cases. --David Tomás Tormo wrote: Hi again I've tried to set the classpath in catalina.sh in order to have my own classpath set when tomcat starts up ( I show it in catalina.sh as well and it looks good). But my problem is that when I show it in my webservice (using System.out.println(System.getProperty(java.class.path))) it is changed again (it only points to a few jar files in /bin folder) and therefore my webservice can't work properly. Shouldn't it be pinting to my my /webapp/webservice/WEB-INF/lib folder as well? Does anybody know how to fix this problem? Hakan: I've tried the solution you gave me (create a setenv.sh script called from startup.sh) but tomcat don't start up! Thank you very much for your future answers :p Tomás Tormo escribió: Hi Hakan First of all thank you for your fast answer ;). Do you mean to create an script called setenv.sh wich will set the CLASSPATH (by export CLASSPATH.. etc)? This script should be called by a modified startup.sh? By they way, I printed the CLASSPATH in my webservice (using System.out.println(System.getProperty(java.class.path)); ) and it says that my CLASSPATH is only pointing to a few jars in the bin folder, not even to my /lib folder in my webservice folder (I hope I explained myself well, I'm not using war files). Shouldn't it be pointing to my /webapp/webservice/WEB-INF/lib folder as well? Thank you!! Greetings!! Hakan Koseoglu escribió: Hi Tomás, Tomás Tormo said the following on 09/10/2007 08:26 AM: I would like to change the classpath for a concrete webservice in Tomcat 5.028 because the webservice has to use a concrete folder in order to work. This folder should be in the CLASSPATH in order to make the webservice work properly and because the webservice can't find it, it doesn't work. With Tomcat 5, creating a setenv.sh solves the problem for me. It gets called if you start the Tomcat using startup.sh. Any variable you define there will be used, including the classpath. We use it to point to the libraries which we don't put into common/lib nor war files. - 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: *SPAM* Re: How to change the CLASSPATH in tomcat 5.028 for a concrete webservice
Hi David I'm using tomcat 5.028 in Ubuntu 6.10 . I've written a java applicattion wich uses a wrapper to communicate with an applicattion written in C, wich is the core of my applicattion. Both the wrapper and the core are third party applicattions, and because of that i don't have the source code, I just have the API. The third party sent me an example application wich uses the core. And, as I could see in the script wich lauches the application, this folder should be added to the classpath in order to be able to be located by the wrapper applicattion. The documentation of the wrapper just says that this folder has to exist with an specific name. My problem is that my applicattion works fine launched from shell (it founds the folder and uses the core perfectly) but it doesn't work as a webservice. It is not able to find the resource folder (let's call it cfg). As I can see in the catalina log, the application tries to load the resources (via ClassLoader I guess) and then launches an exception saying that is not able to find it. The client gets a HTTPErrorCode0. I think I've tried everything to make it find the folder, but I wasn't successful. do you have any idea? thank you very much David Smith escribió: I wold STRONLY recommend you DO NOT touch the CLASSPATH env variable. It's just a horrible idea. What is it about your webservice that requires the alteration of CLASSPATH? Can you describe that a bit more? The standard classloader structure works very well in virtually all other cases. --David Tomás Tormo wrote: Hi again I've tried to set the classpath in catalina.sh in order to have my own classpath set when tomcat starts up ( I show it in catalina.sh as well and it looks good). But my problem is that when I show it in my webservice (using System.out.println(System.getProperty(java.class.path))) it is changed again (it only points to a few jar files in /bin folder) and therefore my webservice can't work properly. Shouldn't it be pinting to my my /webapp/webservice/WEB-INF/lib folder as well? Does anybody know how to fix this problem? Hakan: I've tried the solution you gave me (create a setenv.sh script called from startup.sh) but tomcat don't start up! Thank you very much for your future answers :p Tomás Tormo escribió: Hi Hakan First of all thank you for your fast answer ;). Do you mean to create an script called setenv.sh wich will set the CLASSPATH (by export CLASSPATH.. etc)? This script should be called by a modified startup.sh? By they way, I printed the CLASSPATH in my webservice (using System.out.println(System.getProperty(java.class.path)); ) and it says that my CLASSPATH is only pointing to a few jars in the bin folder, not even to my /lib folder in my webservice folder (I hope I explained myself well, I'm not using war files). Shouldn't it be pointing to my /webapp/webservice/WEB-INF/lib folder as well? Thank you!! Greetings!! Hakan Koseoglu escribió: Hi Tomás, Tomás Tormo said the following on 09/10/2007 08:26 AM: I would like to change the classpath for a concrete webservice in Tomcat 5.028 because the webservice has to use a concrete folder in order to work. This folder should be in the CLASSPATH in order to make the webservice work properly and because the webservice can't find it, it doesn't work. With Tomcat 5, creating a setenv.sh solves the problem for me. It gets called if you start the Tomcat using startup.sh. Any variable you define there will be used, including the classpath. We use it to point to the libraries which we don't put into common/lib nor war files. - 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: Legal Risk of Using Tomcat
From: Irvine, Chuck R [EQ] [mailto:[EMAIL PROTECTED] There are many in the company I work for that would like to leverage open source software in general and and Tomcat in particular. However, our legal staff resists the idea because of perceived legal risks. I know that there are companies who provide indemnification as part of their open source support products, but I wonder to what extent such indemnification is really necessary. [Disclaimer: I Am Not A Lawyer, I've just worked with several of them on various OSS issues. Disregard this message if the legal framework in your country is not precedent-based] Without knowing *which* risks your legal staff are concerned about, it's difficult to comment specifically. The biggest risk I've seen lawyers concerned about goes roughly as follows: - Open Source software was not covered in my course, there is no specific primary legislation, there have been few cases through insert top court of country concerned and there is therefore little precendent to go on; - Therefore if I recommend for it I will be risking my career, whereas if I recommend against it I will not; - I am a lawyer, I am self-selected to be risk averse, therefore I will recommend against it. To an extent, this is fair enough. OSS licensing is a new area. Test cases are sparse, and therefore it's genuinely difficult for lawyers to know which way the courts will rule when such cases do come through. Therefore the risks *are* somewhat higher than with commercial software, where there's decades or centuries of precedent to go on. The risks can typically be addressed for any given product, for example by sourcing it from a company that provides support and indemnification, *if* you can get the legal team to state precisely what the risks are. I'm guessing you won't get a clear statement of the risks out of them, or it'll take a long time as they research the issues. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: *SPAM* Re: How to change the CLASSPATH in tomcat 5.028 for a concrete webservice
Can you post a) the working classpath from the command line and b) the stack trace you get when it's launched as a webservice? One other thought that comes to mind is you might want to check all your environment variables as a user and as a webservice -- see if the installation created something that's not in the profile tomcat is running under. I still think setting CLASSPATH should be an absolutely last resort. --David Tomás Tormo wrote: Hi David I'm using tomcat 5.028 in Ubuntu 6.10 . I've written a java applicattion wich uses a wrapper to communicate with an applicattion written in C, wich is the core of my applicattion. Both the wrapper and the core are third party applicattions, and because of that i don't have the source code, I just have the API. The third party sent me an example application wich uses the core. And, as I could see in the script wich lauches the application, this folder should be added to the classpath in order to be able to be located by the wrapper applicattion. The documentation of the wrapper just says that this folder has to exist with an specific name. My problem is that my applicattion works fine launched from shell (it founds the folder and uses the core perfectly) but it doesn't work as a webservice. It is not able to find the resource folder (let's call it cfg). As I can see in the catalina log, the application tries to load the resources (via ClassLoader I guess) and then launches an exception saying that is not able to find it. The client gets a HTTPErrorCode0. I think I've tried everything to make it find the folder, but I wasn't successful. do you have any idea? thank you very much David Smith escribió: I wold STRONLY recommend you DO NOT touch the CLASSPATH env variable. It's just a horrible idea. What is it about your webservice that requires the alteration of CLASSPATH? Can you describe that a bit more? The standard classloader structure works very well in virtually all other cases. --David Tomás Tormo wrote: Hi again I've tried to set the classpath in catalina.sh in order to have my own classpath set when tomcat starts up ( I show it in catalina.sh as well and it looks good). But my problem is that when I show it in my webservice (using System.out.println(System.getProperty(java.class.path))) it is changed again (it only points to a few jar files in /bin folder) and therefore my webservice can't work properly. Shouldn't it be pinting to my my /webapp/webservice/WEB-INF/lib folder as well? Does anybody know how to fix this problem? Hakan: I've tried the solution you gave me (create a setenv.sh script called from startup.sh) but tomcat don't start up! Thank you very much for your future answers :p Tomás Tormo escribió: Hi Hakan First of all thank you for your fast answer ;). Do you mean to create an script called setenv.sh wich will set the CLASSPATH (by export CLASSPATH.. etc)? This script should be called by a modified startup.sh? By they way, I printed the CLASSPATH in my webservice (using System.out.println(System.getProperty(java.class.path)); ) and it says that my CLASSPATH is only pointing to a few jars in the bin folder, not even to my /lib folder in my webservice folder (I hope I explained myself well, I'm not using war files). Shouldn't it be pointing to my /webapp/webservice/WEB-INF/lib folder as well? Thank you!! Greetings!! Hakan Koseoglu escribió: Hi Tomás, Tomás Tormo said the following on 09/10/2007 08:26 AM: I would like to change the classpath for a concrete webservice in Tomcat 5.028 because the webservice has to use a concrete folder in order to work. This folder should be in the CLASSPATH in order to make the webservice work properly and because the webservice can't find it, it doesn't work. With Tomcat 5, creating a setenv.sh solves the problem for me. It gets called if you start the Tomcat using startup.sh. Any variable you define there will be used, including the classpath. We use it to point to the libraries which we don't put into common/lib nor war files. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using foreign session ids
Hi all. I have a small problem here and could use some toughts how to handle that. A client to my tomcat application will send me a kind of session identifier as part of the request. Is it possible somehow to emulate the following behaviour: - if the session identifier is unknown - start a new session on the requested webapp (with a predefined session timeout to prevent wasting resources) - if the session identifier is known - use the session for the request with which the session was started. There is not much more what has to be done there. There is no data which has to be replicated to the requesting server or anything else. Any ideas how to start on this? Thanks 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]
MOD_JK
Hello! How can I call from Apache HTTP Server using mod_jk, an web application that is not on Context.XML Directory? Basically I've an application located on WEBAPPS, but WEBAPPS is not Context.XML directory. Could you help me please? Thanks a lot
Re: mod_jk - connectionTimeout en connection_pool_timeout
Changing to the default for retries fixed our problem. I still have one question. How does retries 1 work for a loadbalancer with sticky requests? A user started a session on a worker and got a jvmRoute to that worker in its session cookie. The worker fails and is put in error state. Will a sticky request for that worker be routed to another worker or will the request fail? regards Henk Henk Fictorie wrote: Rainer, Thanks for your response. You mentioned our setting of retries=1, so I reread the documentation to find out that it actually means 'no retries'. I have now commented out that line, so it will get the default value of 2. It will let you know if it helped. regards Henk -- View this message in context: http://www.nabble.com/mod_jk---connectionTimeout-en-connection_pool_timeout-tf4390617.html#a12591428 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: Connection pooling, is it the right way to do it?
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: RE: Connection pooling, is it the right way to do it? at this link http://www.onjava.com/pub/a/onjava/2006/04/19/database-connect ion-pooling-with-tomcat.html i see the two parameters, but i suppose there are correct since the context is added to server.xml instead of context.xml. Is it right? That URL is currently giving out a 500 error, but from your description, it appears to be somewhat out of date (true of much 3rd-party documentation). Use the real Tomcat doc: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: *SPAM* Re: How to change the CLASSPATH in tomcat 5.028 for aconcrete webservice
From: David Smith [mailto:[EMAIL PROTECTED] Subject: Re: *SPAM* Re: How to change the CLASSPATH in tomcat 5.028 for aconcrete webservice I still think setting CLASSPATH should be an absolutely last resort. Strongly agree, and even trying to do so is likely a complete waste of time. There shouldn't be any need for the native library to be in the same location as the .jar (or .class) file that refers to it; the compiled Java code should be placed in WEB-INF/lib or WEB-INF/classes, and the location of the native code given on he LD_LIBRARY_PATH environment variable. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Graphics2D problems with Tomcat 5.5.23 on Windows machine
Hi, I encounter a problem with Image Resize on Apache Tomcat 5.5.23. I have Tomcat installed on Windows machine, but whenever I call some function/method/declaration from java.awt (i.e. BufferedImage.createGraphics) it raises the following problem: Exception in thread Image Fetcher 0 java.lang.UnsatisfiedLinkError: no jpeg in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.image.JPEGImageDecoder.clinit(JPEGImageDecoder.java:39) at sun.awt.image.InputStreamImageSource.getDecoder(InputStreamImageSource.java:214) at sun.awt.image.ByteArrayImageSource.getDecoder(ByteArrayImageSource.java:41) at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240) at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172) at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136) java.lang.NullPointerException at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1173) at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:146) at sun.awt.FontConfiguration.init(FontConfiguration.java:71) at sun.awt.windows.WFontConfiguration.init(WFontConfiguration.java:23) at sun.awt.Win32GraphicsEnvironment.createFontConfiguration(Win32GraphicsEnvironment.java:256) at sun.java2d.SunGraphicsEnvironment$1.run(SunGraphicsEnvironment.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.java2d.SunGraphicsEnvironment.init(SunGraphicsEnvironment.java:105) at sun.awt.Win32GraphicsEnvironment.init(Win32GraphicsEnvironment.java:70) 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:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68) at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1135) at org.apache.axis2.handler.module.imageProcessor.ImageProcessorHandler.invoke(ImageProcessorHandler.java:93) at org.apache.axis2.engine.Phase.invoke(Phase.java:382) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:655) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:48) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:497) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:328) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:254) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:619) As I understand, they cannot get the localGraphicsEnvironment. I try to set java.awt.headless = true, but the exception is raised even before they check for java.awt.headless. Could you please help me figure out this exception.
RE: Graphics2D problems with Tomcat 5.5.23 on Windows machine
From: Gia Hieu Dinh [mailto:[EMAIL PROTECTED] Subject: Graphics2D problems with Tomcat 5.5.23 on Windows machine Exception in thread Image Fetcher 0 java.lang.UnsatisfiedLinkError: no jpeg in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.image.JPEGImageDecoder.clinit(JPEGImageDecoder.java:39) What JVM are you using? Have you changed the java.library.path system property? There should be a jpeg.dll file in your jre\bin directory. You may have a corrupted JVM installation and may need to reinstall it. (Note that this has nothing to do with being headless - graphics manipulation is always available.) - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Graphics2D problems with Tomcat 5.5.23 on Windows machine
The stack doesn't indicate this to be a graphics environment problem. Further, it looks like from the stack that you are on a Windows environment where there should always be a graphics environemt. It does indicate it can't load a file or library. What version of Java do you have? --David Gia Hieu Dinh wrote: Hi, I encounter a problem with Image Resize on Apache Tomcat 5.5.23. I have Tomcat installed on Windows machine, but whenever I call some function/method/declaration from java.awt (i.e. BufferedImage.createGraphics) it raises the following problem: Exception in thread Image Fetcher 0 java.lang.UnsatisfiedLinkError: no jpeg in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.image.JPEGImageDecoder.clinit(JPEGImageDecoder.java:39) at sun.awt.image.InputStreamImageSource.getDecoder(InputStreamImageSource.java:214) at sun.awt.image.ByteArrayImageSource.getDecoder(ByteArrayImageSource.java:41) at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240) at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172) at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136) java.lang.NullPointerException at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1173) at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:146) at sun.awt.FontConfiguration.init(FontConfiguration.java:71) at sun.awt.windows.WFontConfiguration.init(WFontConfiguration.java:23) at sun.awt.Win32GraphicsEnvironment.createFontConfiguration(Win32GraphicsEnvironment.java:256) at sun.java2d.SunGraphicsEnvironment$1.run(SunGraphicsEnvironment.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.java2d.SunGraphicsEnvironment.init(SunGraphicsEnvironment.java:105) at sun.awt.Win32GraphicsEnvironment.init(Win32GraphicsEnvironment.java:70) 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:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68) at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1135) at org.apache.axis2.handler.module.imageProcessor.ImageProcessorHandler.invoke(ImageProcessorHandler.java:93) at org.apache.axis2.engine.Phase.invoke(Phase.java:382) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:655) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:48) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:497) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:328) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:254) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
Error-page directive not working
Hello: I added this error-page directive in my web.xml for an app I am developing using Struts 2: error-page exception-typejava.lang.Exception/exception-type location/error.action/location /error-page The error.action exists and loads correctly: http://cbsweb.jammconsulting.com/cbsweb/error.action I then created a jsp which throws an exception: %throw new Exception(Testing error handling);% Which I linked to this url: http://cbsweb.jammconsulting.com/cbsweb/createError.action When I load that url, I get an error in the tomcat log but the error page does not come up on the browser. Any ideas what went wrong? Here is the output in catalina.out: Sep 2, 2007 4:04:58 PM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.Exception: Testing error handling at org.apache.jsp.createError_jsp._jspService(createError_jsp.java:54) // Rest of trace removed Any ideas how to correct this? Thanks, Neil -- Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com Eliminate junk email and reclaim your inbox. Visit http://www.spammilter.com for details. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Force URL encoding
Hello I'm looking for a way to force url session tracking regardless of whether the user has cookies enabled. My thoughts right now are to create a session filter that deletes the cookie on the way out the door. if this seems like a good idea who should I go about deleting the the cookie. -- View this message in context: http://www.nabble.com/Force-URL-encoding-tf4415223.html#a12594298 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: Force URL encoding
You can just set cookies=false in the Context element in the app's context.xml file. See the docs for your version of Tomcat for details. -- Len On 9/10/07, Michael Dehmlow [EMAIL PROTECTED] wrote: Hello I'm looking for a way to force url session tracking regardless of whether the user has cookies enabled. My thoughts right now are to create a session filter that deletes the cookie on the way out the door. if this seems like a good idea who should I go about deleting the the cookie. -- View this message in context: http://www.nabble.com/Force-URL-encoding-tf4415223.html#a12594298 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Concurrency with HttpSession
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wade, Wade Chandler wrote: Do you want to file a bug or do you want me to? I'm looking at the Tomcat 6.0.9 source code. Even if nobody decides to do anything, please PLEASE log this bug and get this discussion into bugzilla. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG5WNd9CaO5/Lv0PARAuEOAKCdmSe8o0U6HNVhux9GTDKCXDOZmQCgutEk K2bbhI7o08vs6iYOChp1U34= =Cugw -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: Force URL encoding
The caviot to my question was that I wanted to force session rewritting for only one servlet. But I now see the flaw in this if another servlet in the same context sets a cookie (jsessionid) that cookie will now be set for the all other servlets as well. The solution is to use the cookies=false in the context file. And simply encode all URLs. Michael Dehmlow wrote: Hello I'm looking for a way to force url session tracking regardless of whether the user has cookies enabled. My thoughts right now are to create a session filter that deletes the cookie on the way out the door. if this seems like a good idea who should I go about deleting the the cookie. -- View this message in context: http://www.nabble.com/Force-URL-encoding-tf4415223.html#a12596041 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: Using foreign session ids
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas, Thomas Gelzhaeuser wrote: - if the session identifier is known - use the session for the request with which the session was started. You can make any request to a Tomcat server using a session id encoded in the URL like this: http://host/resource;jsessionid=[sessionid] This will act just like any other client, and if the session id is valid, it will be used. - if the session identifier is unknown - start a new session on the requested webapp (with a predefined session timeout to prevent wasting resources) Do you mean that you want Tomcat to use the session id provided after creating it? Tomcat doesn't do this... if you request an invalid session id, you'll get a new session with an unrelated session id. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG5WkG9CaO5/Lv0PARAhQFAJ9ShdGAGZkSV8J2CtHRXy0s5KYYigCdGQzt pncF0BVBLHt8E5R+wAd3OUo= =ryX7 -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: classpath problems with a custom valve
From: Steve Souza [mailto:[EMAIL PROTECTED] Subject: classpath problems with a custom valve Shouldn't my war be able to see the classes from a jar put into server/lib? No - read the doc: http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html You probably need to put your jar in common/lib. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error-page directive not working
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Neil, Neil Aggarwal wrote: When I load that url, I get an error in the tomcat log but the error page does not come up on the browser. What /do/ you get in the browser? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG5Wpj9CaO5/Lv0PARAsmqAKC3OsjqQCNf3a4456WzdiOvIi46EACfSEUV atC4Bo3Y4PAZR2EWs5HeyR4= =YEHG -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]
Understanding jvmRoute usage
Hi I am going through all of the potential settings I can set for mod_jk and am not sure how the route property in mod_jk might be used. I understand that this help to differentiate different servers in a load balanced cluster to prevent sessions getting mixed up and to do session stickyness. If however this defaults to machine name this would only be used when running two instances of tomcat on the same physical box. It then seems to me that the only time you would really use jvmroute is when you have multiple instances of tomcat running on the same box. Does anyone know of other scenarios when this might be usefull or imaginative ways of using this. Regards __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __
Re: [OT/RANT] Quartz
Hehe. It's amazing what you can do with one line of code using cron and wget. On Thu, 2007-09-06 at 17:43, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Doesn't anyone know how to use cron anymore? Sheesh... - -chris Andrew Hole wrote: I can't find an example of using Quartz to scheduling jobs on Tomcat Web application. Someone already work with Quartz? Could you share a hello world sample? Thanks a lot -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4HR59CaO5/Lv0PARAvxYAJ48g3JyLuF23xhnS5lp3OKNg7An7gCgruKm hiiwHPYjs27HigRvF+03Hw4= =Z0pm -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] - 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: Using foreign session ids
On 9/10/07, Christopher Schultz [EMAIL PROTECTED] wrote: Thomas Gelzhaeuser wrote: - if the session identifier is known - use the session for the request with which the session was started. You can make any request to a Tomcat server using a session id encoded in the URL like this: http://host/resource;jsessionid=[sessionid] This will act just like any other client, and if the session id is valid, it will be used. - if the session identifier is unknown - start a new session on the requested webapp (with a predefined session timeout to prevent wasting resources) Do you mean that you want Tomcat to use the session id provided after creating it? Tomcat doesn't do this... if you request an invalid session id, you'll get a new session with an unrelated session id. Hi Chris. Thanks for your answer. I guess I have to clarify my situation here a bit: We are creating an application which will run as a kind of slave to another (for us completely unknown) application server. This server has a kind of custom session handling and all it can provide to us is an identifier of the session used by that server. Thus we need to mimik somehow the session handling provided by the other server. The open question for me ist where the entry point to such a thing is (I think it's quite improbable that we are the first ones actually trying to solve a problem like this) Thanks. 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: classpath problems with a custom valve
based on this document I placed my jar in server/lib as both web apps and tomcat need access to the classes in this jar. Still it will not boot. If i use a servlet filter that is in the same jar everything works fine, so it has something to do with the Valve. WARNING: Catalina.start using conf/server.xml: java.lang.ClassNotFoundException: com.jamonapi.http.JAMonTomcatValve at org.apache.tomcat.util.digester.Digester.createSAXException( Digester.java:2726) at org.apache.tomcat.util.digester.Digester.createSAXException( Digester.java:2752) at org.apache.tomcat.util.digester.Digester.startElement(Digester.java :1279) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement( AbstractSAXParser.java:533) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement (AbstractXMLDocumentParser.java:220) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement (XMLDocumentFragmentScannerImpl.java:872) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch (XMLDocumentFragmentScannerImpl.java:1693) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument (XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse( XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse( XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse( XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse( AbstractSAXParser.java:1242) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562) at org.apache.catalina.startup.Catalina.load(Catalina.java:490) at org.apache.catalina.startup.Catalina.start(Catalina.java:544) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Sep 10, 2007 1:11:45 PM org.apache.catalina.startup.Catalina start On 9/10/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Steve Souza [mailto:[EMAIL PROTECTED] Subject: classpath problems with a custom valve Shouldn't my war be able to see the classes from a jar put into server/lib? No - read the doc: http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html You probably need to put your jar in common/lib. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT/RANT] Quartz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ben, Ben Souther wrote: Hehe. It's amazing what you can do with one line of code using cron and wget. For real. I've never found an application where it makes sense to have a scheduled job run inside the webapp. I realize that lots of folks don't have direct access to their own production servers (basically WAR drop-offs), but when you start to need your own scheduled jobs, it's time to grow up and admin your own boxes. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG5X879CaO5/Lv0PARApy0AJ9YRW2HFuenZKxK8mYWeSAWRjfPdwCeNrRJ 0v54aZRuxgzhZL7dtJGnYNQ= =Wvvi -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: Using foreign session ids
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas, Thanks for your answer. I guess I have to clarify my situation here a bit: We are creating an application which will run as a kind of slave to another (for us completely unknown) application server. This server has a kind of custom session handling and all it can provide to us is an identifier of the session used by that server. Thus we need to mimik somehow the session handling provided by the other server. Hmm... I'm not sure of your exact situation, but I'll tell you how we do something similar. We have a Cocoon instance sitting in front of part of our application, and it's (intentionally) within the same URL space. The user logs into the normal part of the application, and then (later) issues a request to Cocoon. Here's what happens: - - Cocoon gets the session id from the cookie sent from the client. - - Cocoon uses a dynamic URL (including session id, unmodified by using request.getRequestedSessionId) to call the real application and fetch XML data for transformation This works very well for us since Cocoon doesn't need its own sessions. We basically just pass-through the session id provided by the client. We do something similar yet completely different when we use Cocoon (in the same context as above) to make a request to a secondary service that supports sessions. This secondary service returns XML (again) and includes the session id that the server has chosen. Cocoon sniffs that session id and uses it to make any callbacks to this service using the ;jsessionid technique. I hope that helps a little. Basically, using request.getRequestedSessionId can be used to get a session id, even if it's invalid in the eyes of /your/ server. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG5YC09CaO5/Lv0PARApAhAJsFYH3DAmskLHXEPD+ixRBd5sEKoQCgqoDy tnysf730bfn3LIjMmH0mWoU= =3G6O -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: Concurrency with HttpSession
I had been too quick with it before, and came up with what I think is a better fix. I haven't submitted a patch, but I suppose I could. I work on the NetBeans project and it would be about the same. For anyone interested in this issue it is at: http://issues.apache.org/bugzilla/show_bug.cgi?id=43343 Wade --- Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wade, Wade Chandler wrote: Do you want to file a bug or do you want me to? I'm looking at the Tomcat 6.0.9 source code. Even if nobody decides to do anything, please PLEASE log this bug and get this discussion into bugzilla. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG5WNd9CaO5/Lv0PARAuEOAKCdmSe8o0U6HNVhux9GTDKCXDOZmQCgutEk K2bbhI7o08vs6iYOChp1U34= =Cugw -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] - 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: classpath problems with a custom valve
From: Steve Souza [mailto:[EMAIL PROTECTED] Subject: Re: classpath problems with a custom valve based on this document I placed my jar in server/lib as both web apps and tomcat need access to the classes in this jar. What part of the Tomcat doc led you to that conclusion? It's clear from even a cursory reading (or just looking at the picture) that classes in server/lib are not available to webapps. As I said before, put your jar in common/lib. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT/RANT] Quartz
Well, I have a couple of web applications which suck up a thread for such things as well. I do it so that I can schedule processes through this single application and the end people do not need anything else, and also because if they had to admin their own servers in these instances it would just look bad on me as the scheduled processes need to be configured by simple end users who don't know anything about the server. I guess it really depends on the usages, and these applications run on Windows or *nix. I don't use Quartz, but instead just some custom classes. Wade --- Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ben, Ben Souther wrote: Hehe. It's amazing what you can do with one line of code using cron and wget. For real. I've never found an application where it makes sense to have a scheduled job run inside the webapp. I realize that lots of folks don't have direct access to their own production servers (basically WAR drop-offs), but when you start to need your own scheduled jobs, it's time to grow up and admin your own boxes. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG5X879CaO5/Lv0PARApy0AJ9YRW2HFuenZKxK8mYWeSAWRjfPdwCeNrRJ 0v54aZRuxgzhZL7dtJGnYNQ= =Wvvi -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] - 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: classpath problems with a custom valve
i apologize for the typo. I actually meant to say i put the jar in shared/lib. Based on the documentation I think that is where it should go. common/lib is for jars are only needed by web apps whereas shared/lib is for web apps AND tomcat. Being as the valve should be used by tomcat i put it in shared/lib. If I put the jar in shared/lib my war which references some of the classes to display the data gets a ClassNotFoundException. I also tried putting it in common/lib then the server doesn't boot and i get a ClassNotFoundException on my valve. From the link: http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html *Shared* - This class loader is the place to put classes and resources that you wish to share across *ALL* web applications (unless Tomcat internal classes also need access, in which case you should put them in the *Common*class loader instead).All unpacked classes and resources in $CATALINA_BASE/shared/classes, as well as classes and resources in JAR files under $CATALINA_BASE/shared/lib, are made visible through this class loader. If multiple Tomcat instances are run from the same binary using the $CATALINA_BASE environment variable, then this classloader repositories are relative to $CATALINA_BASE rather than $CATALINA_HOME. On 9/10/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Steve Souza [mailto:[EMAIL PROTECTED] Subject: Re: classpath problems with a custom valve based on this document I placed my jar in server/lib as both web apps and tomcat need access to the classes in this jar. What part of the Tomcat doc led you to that conclusion? It's clear from even a cursory reading (or just looking at the picture) that classes in server/lib are not available to webapps. As I said before, put your jar in common/lib. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT/RANT] Quartz
I've had good luck creating timed events with java.util.Timer and java.util.TimerTask. No external libs needed... D Ben Souther wrote: Hehe. It's amazing what you can do with one line of code using cron and wget. On Thu, 2007-09-06 at 17:43, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Doesn't anyone know how to use cron anymore? Sheesh... - -chris Andrew Hole wrote: I can't find an example of using Quartz to scheduling jobs on Tomcat Web application. Someone already work with Quartz? Could you share a hello world sample? Thanks a lot -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4HR59CaO5/Lv0PARAvxYAJ48g3JyLuF23xhnS5lp3OKNg7An7gCgruKm hiiwHPYjs27HigRvF+03Hw4= =Z0pm -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] - 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: classpath problems with a custom valve
From: Steve Souza [mailto:[EMAIL PROTECTED] Subject: Re: classpath problems with a custom valve common/lib is for jars are only needed by web apps whereas shared/lib is for web apps AND tomcat. Read the doc again - you have it backwards. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Force URL encoding
Alright now I have another problem which is baffling me: I have: %@ page session=true % '%=response.encodeURL(test/) %' in a jsp page. the result is always 'test/' so i tried forcing: '%=test;jsessionid=+request.getSession().getId() %' And the result looks like i expect it too But when I make another request tomcat the session I've appended. I have a session filter which: In my context.xml file i have: ?xml version=1.0 encoding=UTF-8 ? Context cookies=false/Context While the session is not stored in a cookie it appears that tomcat is not finding the session i specify. which I think has something to do with the fact that encodeURL does not work. -- View this message in context: http://www.nabble.com/Force-URL-encoding-tf4415223.html#a12599331 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: classpath problems with a custom valve
From: Steve Souza [mailto:[EMAIL PROTECTED] Subject: Re: classpath problems with a custom valve I get the following exception which seems odd as I saw the missing class in catalina.jar and I compiled against it. Java classloading hierarchy is not bidirectional - classes can see only up the tree (unless you're using reflection). For Tomcat 5.5, I think you'll need to refactor your code, separating the valve and the part needed by both the valve and the webapp. The jar containing valve proper should be placed in server/lib, and the jar holding the common bits into common/lib. If you moved up to Tomcat 6, the classloading hierarchy is much simpler; your existing jar would just go into the single lib directory. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Understanding jvmRoute usage
[EMAIL PROTECTED] wrote: Hi I am going through all of the potential settings I can set for mod_jk and am not sure how the route property in mod_jk might be used. I understand that this help to differentiate different servers in a load balanced cluster to prevent sessions getting mixed up and to do session stickyness. If however this defaults to machine name this would only be used when running two instances of tomcat on the same physical box. It then seems to me that the only time you would really use jvmroute is when you have multiple instances of tomcat running on the same box. Does anyone know of other scenarios when this might be usefull or imaginative ways of using this. Regards The load balancer docs http://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html tell us: === If you want to use session stickyness, you must set different jvmRoute attributes in the Engine element in Tomcat's server.xml. Furthermore the names of the workers which are managed by the balancer have to be equal to the jvmRoute of the Tomcat instance they connect with. === The workers properties documentation gives us information about the alternative attribute route: === Normally the name of a balanced worker in a load balancer is equal to the jvmRoute of the corresponding Tomcat instance. If you want to include a worker corresponding to a Tomcat instance into several load balancers with different balancing configuration (e.g. disabled, stopped) you can use this attribute. Define a seperate worker per lb and per Tomcat instance with an arbitrary worker name and set the route attribute of the worker equal to the jvmRoute of the target Tomcat instance. If this attribute is left empty, the name of the worker will be used. This attribute can be changed at runtime using status worker. === 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]
mod_jk --enable-prefork
Hi, The documentation for mod_jk (eg. version 1.2.25) about --enable-prefork says: In case you build mod_jk for a multi-threaded Apache httpd 2.0/2.2 MPM (Multi-Processing Module), some areas of mod_jk code need to be synchronized to make it thread-safe. Because configure can not easily detect, whether your are using a multi-threaded MPM, mod_jk by default is always build thread-safe for Apache httpd 2.0/2.2. If you are sure, that your MPM is not multi-threaded, you can use --enable-prefork to force the removal of the synchronization code (thus increasing performance a bit). For instance, the prefork MPM is not multi-threaded. For Apache httpd 1.3 this flag will be set automatically. If you specify apxs, doesn't it require a config_vars.mk which has a value pair MPM_NAME = prefork and thus configure could know that prefork was used? Alternatively assuming that apxs is in the same directory then 'httpd -V' could tell that Server MPM: Prefork The question I have: if the Apache httpd v2.2 is prefork and the mod_jk is compiled default threaded, are there any potential instabilities? (on Solaris and Linux) Many thanks - Fred -- View this message in context: http://www.nabble.com/mod_jk---enable-prefork-tf4417291.html#a12599440 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: mod_jk --enable-prefork
fredk2 wrote: Hi, The documentation for mod_jk (eg. version 1.2.25) about --enable-prefork says: In case you build mod_jk for a multi-threaded Apache httpd 2.0/2.2 MPM (Multi-Processing Module), some areas of mod_jk code need to be synchronized to make it thread-safe. Because configure can not easily detect, whether your are using a multi-threaded MPM, mod_jk by default is always build thread-safe for Apache httpd 2.0/2.2. If you are sure, that your MPM is not multi-threaded, you can use --enable-prefork to force the removal of the synchronization code (thus increasing performance a bit). For instance, the prefork MPM is not multi-threaded. For Apache httpd 1.3 this flag will be set automatically. If you specify apxs, doesn't it require a config_vars.mk which has a value pair MPM_NAME = prefork and thus configure could know that prefork was used? Alternatively assuming that apxs is in the same directory then 'httpd -V' could tell that Server MPM: Prefork You are right: apxs -q MPM_NAME would do the trick. I didn't find that one, thanks. On the other hand, we would still need to manage a list of MPMs (which MPM on which platform is single-threaded) and there is some danger, that people have more than one mpm installed (like on many linux distros) and compile against prefork, later use against worker. All in all I'm still in favor of building thread safe by default and only when explicitely requested removing the thread synchronization. The question I have: if the Apache httpd v2.2 is prefork and the mod_jk is compiled default threaded, are there any potential instabilities? (on Solaris and Linux) No, not that we aware of any. On both platforms, the default was building thread safe for a long time. We use pthread mutexes and no problems have been reported with those. Many thanks - Fred 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]
when does use mod_jk and jni?
Hi, Reading the documentation for mod_jk (1.2.25 --enable-jni), I am curious about something. In what case do you use mod_jk jni ? Thank you - Fred -- View this message in context: http://www.nabble.com/when-does-use-mod_jk-and-jni--tf4417743.html#a12600560 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: mod_jk --enable-prefork
Many thanks for your reply. Is it always implied that if an apache module is deemed 'thread safe' it also implies that it will work in prefork environment maybe at the cost of raw performance ? Thanks again - Fred Rainer Jung-3 wrote: fredk2 wrote: Hi, The documentation for mod_jk (eg. version 1.2.25) about --enable-prefork says: In case you build mod_jk for a multi-threaded Apache httpd 2.0/2.2 MPM (Multi-Processing Module), some areas of mod_jk code need to be synchronized to make it thread-safe. Because configure can not easily detect, whether your are using a multi-threaded MPM, mod_jk by default is always build thread-safe for Apache httpd 2.0/2.2. If you are sure, that your MPM is not multi-threaded, you can use --enable-prefork to force the removal of the synchronization code (thus increasing performance a bit). For instance, the prefork MPM is not multi-threaded. For Apache httpd 1.3 this flag will be set automatically. If you specify apxs, doesn't it require a config_vars.mk which has a value pair MPM_NAME = prefork and thus configure could know that prefork was used? Alternatively assuming that apxs is in the same directory then 'httpd -V' could tell that Server MPM: Prefork You are right: apxs -q MPM_NAME would do the trick. I didn't find that one, thanks. On the other hand, we would still need to manage a list of MPMs (which MPM on which platform is single-threaded) and there is some danger, that people have more than one mpm installed (like on many linux distros) and compile against prefork, later use against worker. All in all I'm still in favor of building thread safe by default and only when explicitely requested removing the thread synchronization. The question I have: if the Apache httpd v2.2 is prefork and the mod_jk is compiled default threaded, are there any potential instabilities? (on Solaris and Linux) No, not that we aware of any. On both platforms, the default was building thread safe for a long time. We use pthread mutexes and no problems have been reported with those. Many thanks - Fred 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] -- View this message in context: http://www.nabble.com/mod_jk---enable-prefork-tf4417291.html#a12600955 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: Connection pooling, is it the right way to do it?
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: RE: Connection pooling, is it the right way to do it? I can find the part where doc says that context shouldn't be put in server.xml but in context.xml, but can't see the part where docbase and path shouldn't be specified. http://tomcat.apache.org/tomcat-5.5-doc/config/context.html path ... The value of this field must not be set except when statically defining a Context in server.xml, as it will be inferred from the filenames used for either the .xml context file or the docBase. Looks like the analogous constraint on the docBase attribute has disappeared from the doc. When docBase is specified and the target is under the Host appBase directory, the deployment is likely to become corrupted or occur twice. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Default error page
Hi, I have been looking through the documentation to see if it is possible to change the default error pages in tomcat. For example, I currently have entries like error-page error-code404/error-code location/error.html/location /error-page in my web.xml file. The problem is that I must include seperate entries for each error-code. Is there a way of catching all of the errors with one error code? I have the same question for exception catching. The main reason why this is important to me is that I must hide the internals of my application from my users. One part of that task is to replace the error pages with custom ones. Thanks, Arend van der Veen [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: classpath problems with a custom valve
That worked. I created my valve as a single class and put it in server/classes. I kept my jar in common/lib. I tried inheriting from the valve in my jar and that didn't work, so i copied that code into a new package and it worked fine. It is still a bit mysterious and not ideal as installation requires a class put in server/classes as well as the jar in common/lib, but it will do. If there is a better way to do this let me know. Thanks for your help charles. On 9/10/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Steve Souza [mailto:[EMAIL PROTECTED] Subject: Re: classpath problems with a custom valve I get the following exception which seems odd as I saw the missing class in catalina.jar and I compiled against it. Java classloading hierarchy is not bidirectional - classes can see only up the tree (unless you're using reflection). For Tomcat 5.5, I think you'll need to refactor your code, separating the valve and the part needed by both the valve and the webapp. The jar containing valve proper should be placed in server/lib, and the jar holding the common bits into common/lib. If you moved up to Tomcat 6, the classloading hierarchy is much simpler; your existing jar would just go into the single lib directory. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: classpath problems with a custom valve
From: Steve Souza [mailto:[EMAIL PROTECTED] Subject: Re: classpath problems with a custom valve It is still a bit mysterious and not ideal as installation requires a class put in server/classes as well as the jar in common/lib, but it will do. Using a valve is by necessity tying you into Tomcat internals. If you could use a filter instead, you would avoid that dependency and make what you're doing more portable. If there is a better way to do this let me know. Move to Tomcat 6 - life's a lot simpler (and faster). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: classpath problems with a custom valve
To answer a couple of your questions. I am getting ready to release jamon 2.7 which will monitor performance of tomcat 5.5 and tomcat 6 and other http related stats for the server and have them viewable in a searchable/sortable webpage. It will have summary stats like which pages are currently executing, what was max/min/avg time for each page, as well as being able to track the N slowest page requests and also be able to show stack traces via the web page and much more. jamon comes with choices on how you want to monitor your app including a servlet filter, and a valve. I work in an environment where i can't enforce developers to use the servlet filters, but can change the valve. Others have the opposite situation so both valves and filters are useful. I had already gotten the valve to work in tomcat 6, but also know there are a lot of users that won't be able to upgrade to tomcat 6 for a while. What is confusing to me is why when i put my jar into server/lib, the web app doesn't also have access to classes loaded from there. Other server products I have used in the past allowed you to put jars at the server level and all web apps could see any classes loaded by the server class loader. Someone mentioned that i may be able to use the context property of 'priviledged' to do this. I tried it and it didn't seem to help though I may have missed something. Should that work? On 9/10/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Steve Souza [mailto:[EMAIL PROTECTED] Subject: Re: classpath problems with a custom valve It is still a bit mysterious and not ideal as installation requires a class put in server/classes as well as the jar in common/lib, but it will do. Using a valve is by necessity tying you into Tomcat internals. If you could use a filter instead, you would avoid that dependency and make what you're doing more portable. If there is a better way to do this let me know. Move to Tomcat 6 - life's a lot simpler (and faster). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connection pooling, is it the right way to do it?
ok thanks From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: RE: Connection pooling, is it the right way to do it? I can find the part where doc says that context shouldn't be put in server.xml but in context.xml, but can't see the part where docbase and path shouldn't be specified. http://tomcat.apache.org/tomcat-5.5-doc/config/context.html path ... The value of this field must not be set except when statically defining a Context in server.xml, as it will be inferred from the filenames used for either the .xml context file or the docBase. Looks like the analogous constraint on the docBase attribute has disappeared from the doc. When docBase is specified and the target is under the Host appBase directory, the deployment is likely to become corrupted or occur twice. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Leggi GRATIS le tue mail con il telefonino i-mode di Wind http://i-mode.wind.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: Force URL encoding
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael, Michael Dehmlow wrote: '%=response.encodeURL(test/) %' This should work. '%=test;jsessionid=+request.getSession().getId() %' Don't do this; find out what the problem is and fix that. I realize this is only a test, but it's good to debug it before you replicate a hack everywhere. ?xml version=1.0 encoding=UTF-8 ? Context cookies=false/Context While the session is not stored in a cookie Have you verified that no cookie exchange is occurring? If you have a cookie left over from a previous run-through, Tomcat might be using that for session identification and therefore leaving the ;jsessionid=... off of encoded URLs. I wouldn't be surprised if the TC code is very tolerant of this kind of abuse, rather than simply saying okay, cookies are disabled; we'll completely ignore them. it appears that tomcat is not finding the session i specify. which I think has something to do with the fact that encodeURL does not work. If your session does not exist, then encodeURL isn't going to change anything. Make sure that the session exists; I'm guessing that the JSP page directive session=true ensures that? Try purging your cookies for the test site and see if that fixes anything. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG5ax69CaO5/Lv0PARAvfLAJ4i5SqR4k4B3pXnPutXWI8XG00RkQCfacbx VOq1VVtIZP4/jTxztVwPtzU= =CYVf -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: Default error page
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Arend, Arend P. van der Veen wrote: The problem is that I must include seperate entries for each error-code. Is there a way of catching all of the errors with one error code? No. I have the same question for exception catching. Yes: error-page exception-typejava.lang.Throwable/exception location/error.html/location /error-page - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG5a1n9CaO5/Lv0PARAtR6AKCGRGLxw3GHfTn7AxgqNFgyLANM3ACcDDFk 1WVwHdXOSmCkk3PJi/2jARU= =ZBBb -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: classpath problems with a custom valve
From: Steve Souza [mailto:[EMAIL PROTECTED] Subject: Re: classpath problems with a custom valve What is confusing to me is why when i put my jar into server/lib, the web app doesn't also have access to classes loaded from there. Look at the 5.5 classloader hierarchy: Bootstrap | System | Common / \ Catalina Shared / \ Webapp1 Webapp2 ... The server/lib directory (Catalina in the above picture) isn't visible to webapps. Someone mentioned that i may be able to use the context property of 'priviledged' to do this. That deals with accessibility, not visibility. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connection pooling, is it the right way to do it?
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: RE: Connection pooling, is it the right way to do it? I can find the part where doc says that context shouldn't be put in server.xml but in context.xml, but can't see the part where docbase and path shouldn't be specified. http://tomcat.apache.org/tomcat-5.5-doc/config/context.html path ... The value of this field must not be set except when statically defining a Context in server.xml, as it will be inferred from the filenames used for either the .xml context file or the docBase. Looks like the analogous constraint on the docBase attribute has disappeared from the doc. When docBase is specified and the target is under the Host appBase directory, the deployment is likely to become corrupted or occur twice. - Chuck Anyway, my code was taken from the tomcat 5.5 doc: http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html but probably that Context was put in the server.xml file, else it should be wrong, according to what you say. And there is the ?autoReconnect=true option to url parameters too.. just to show that i got the code from an official jakarta tomcat page :) Anyway, i removed autoReconnect and docBase and path parameters.. hope that's all to have the web application fully performing. THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Leggi GRATIS le tue mail con il telefonino i-mode di Wind http://i-mode.wind.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]
tc xmlhttprequest
Hello Any tips on serving a ajax page with tomcat? I am now calling the page with a jsp:forward outside of the web-inf. Do I also have to fully unc path to the *.js files, like src=localhost:8080/context/intPages/myScripts.js ?
RES: tc xmlhttprequest
Hi, These questions sound really strange to me. Are you using an AJAX framework like DWR ? If not, I guess you should give it a try: http://getahead.org/dwr . You can easily find installing and deployment instructions there. Yours, Marcus -Mensagem original- De: Chris Pat [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 10 de setembro de 2007 19:23 Para: Tomcat Assunto: tc xmlhttprequest Hello Any tips on serving a ajax page with tomcat? I am now calling the page with a jsp:forward outside of the web-inf. Do I also have to fully unc path to the *.js files, like src=localhost:8080/context/intPages/myScripts.js ? - 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: RES: tc xmlhttprequest
Hi Marcus Sorry. I have an ajax page. It works. I need to add other technologies to it, the easiest way is with TC. I want to graft on ajax to TC technology, and got the error about directly accessing security violations. But the javascript code is not executing, so I was hoping someone had some tips on how to configure to access the script files. Thank you for the references, I will look into to those, now I just need to get this done, grin. Milanez, Marcus [EMAIL PROTECTED] wrote: Hi, These questions sound really strange to me. Are you using an AJAX framework like DWR ? If not, I guess you should give it a try: http://getahead.org/dwr . You can easily find installing and deployment instructions there. Yours, Marcus -Mensagem original- De: Chris Pat [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 10 de setembro de 2007 19:23 Para: Tomcat Assunto: tc xmlhttprequest Hello Any tips on serving a ajax page with tomcat? I am now calling the page with a jsp:forward outside of the web-inf. Do I also have to fully unc path to the *.js files, like src=localhost:8080/context/intPages/myScripts.js ? - 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: tc xmlhttprequest
hmm what exactly do you need ajax for? From my recollection, ajax is simply a method of making mini-requests to the server so the interaction with your webapp is a bit more fluid. As for that last bit, I have found that you can specify the path as /FolderInWebApp/Script/myScript.js instead of using the fully qualified name. When you start the path with '/' it looks in the base webapp directory. Lemme know if this helps any. [EMAIL PROTECTED] 09/10/07 3:23 PM Hello Any tips on serving a ajax page with tomcat? I am now calling the page with a jsp:forward outside of the web-inf. Do I also have to fully unc path to the *.js files, like src=localhost:8080/context/intPages/myScripts.js ? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: RES: tc xmlhttprequest
Hi, Ok, let me try to help you anyway. Inside the web-inf directory, you usualy store classes and classloader related stuff, like .jar or .properties files. Storing *.js files inside this direcory could possibly mean two things: 1) Your are not really accessing .js files directly. Instead, you are accessing a servlet that maps these url patterns to its instance. In these cases, you *must* know the full servlet class name, including of course its package name, in order to correctly map it in your web.xml application file. 2) Someone has stored these kind of files in that directory by mistake. In these case, just move all the files you need somewhere outside. When you say TC technology, you mean the mobile thing? Have they provided you a .jar file to accomplish AJAX, or you are trying to create your own AJAX engine that uses its resources? Yours, Marcus -Mensagem original- De: Chris Pat [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 10 de setembro de 2007 19:39 Para: Tomcat Users List Assunto: Re: RES: tc xmlhttprequest Hi Marcus Sorry. I have an ajax page. It works. I need to add other technologies to it, the easiest way is with TC. I want to graft on ajax to TC technology, and got the error about directly accessing security violations. But the javascript code is not executing, so I was hoping someone had some tips on how to configure to access the script files. Thank you for the references, I will look into to those, now I just need to get this done, grin. Milanez, Marcus [EMAIL PROTECTED] wrote: Hi, These questions sound really strange to me. Are you using an AJAX framework like DWR ? If not, I guess you should give it a try: http://getahead.org/dwr . You can easily find installing and deployment instructions there. Yours, Marcus -Mensagem original- De: Chris Pat [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 10 de setembro de 2007 19:23 Para: Tomcat Assunto: tc xmlhttprequest Hello Any tips on serving a ajax page with tomcat? I am now calling the page with a jsp:forward outside of the web-inf. Do I also have to fully unc path to the *.js files, like src=localhost:8080/context/intPages/myScripts.js ? - 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]
problem with accessClassInPackage exceptions with Java 5 web application
Hi All, I have been upgrading our web application using (Tomcat 5.x) and our EJB Container (weblogic 10) to java 5. While deploying the new java 5 compiled war file in tomcat I get the following exceptions when I attempt to make remote calls to weblogic 10: Sep 7, 2007 10:32:53 AM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Sep 7, 2007 10:32:53 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 2547 ms Error: access denied (java.lang.RuntimePermission accessClassInPackage.com.securatrak.flexui.util.delegate) Error: access denied (java.lang.RuntimePermission accessClassInPackage.com.securatrak.flexui.util.delegate) . etc.. I am not sure to how these classes are blocked. I checked out the java.policy and the security.properties files and none of these internal classes have blocked access there. I can workaround this problem by adding the access rights explicitly in the java.policy file as so: permission java.lang.RuntimePermission accessClassInPackage.com.securatrak.flexui.util.*; permission java.lang.RuntimePermission accessClassInPackage.com.securatrak.bom.parts.*; permission java.lang.RuntimePermission accessClassInPackage.com.securatrak..*; However I am not sure why I would need to do this as these are our internal. Does anyone know of any issues with connecting to a Weblogic Appserver using Tomcat and Java 5. Please let me know if you need any other information.; I would greatly appreciate any of your help. Thanks, Harpreet Sandhu -- View this message in context: http://www.nabble.com/problem-with-accessClassInPackage-exceptions-with-Java-5-web-application-tf4419500.html#a12605575 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: tc xmlhttprequest
If you are linking from inside a jsp page and using jsp spec 1.2+ / servlet spec 2.4+, you can do this: script type=text/javascript src=${request.contextPath}/intPages/myScripts.js!-- --/script The comment is there if you are using xml valid jsp to prevent tomcat from collapsing the script tag and breaking it in IE. The EL expression ${request.contextPath} fetches the context path live so you don't have to hard code. Otherwise this is a server relative path and the client will automagically add the http://[servername]:[port] part. --David Chris Pat wrote: Hello Any tips on serving a ajax page with tomcat? I am now calling the page with a jsp:forward outside of the web-inf. Do I also have to fully unc path to the *.js files, like src=localhost:8080/context/intPages/myScripts.js ? - 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: tc xmlhttprequest
As for that last bit, I have found that you can specify the path as /FolderInWebApp/Script/myScript.js You still need either the context path or make it relative to the page's URL or the client won't be able to resolve it. This doesn't work like the jsp internals that are aware of the context path. --David Nathan Bahr wrote: hmm what exactly do you need ajax for? From my recollection, ajax is simply a method of making mini-requests to the server so the interaction with your webapp is a bit more fluid. As for that last bit, I have found that you can specify the path as /FolderInWebApp/Script/myScript.js instead of using the fully qualified name. When you start the path with '/' it looks in the base webapp directory. Lemme know if this helps any. [EMAIL PROTECTED] 09/10/07 3:23 PM Hello Any tips on serving a ajax page with tomcat? I am now calling the page with a jsp:forward outside of the web-inf. Do I also have to fully unc path to the *.js files, like src=localhost:8080/context/intPages/myScripts.js ? - 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: tc xmlhttprequest
Hi David I did it partially this way, and it works. My objects in the js file are executing. bean:page id=context property=request/ bean:define id=myServletContexthttp://bean:write name=context property=serverName/:bean:write name=context property=serverPort/bean:write name=context property=contextPath///bean:define titledecarta javascript api example/title script language=JavaScript type=text/javascript src=bean:write name=myServletContext//extPages/myScripts.js!-- --/script However I still get the Permission denied to call XMLHttpRequest.open... I thought by putting a jsp:forward outside my WEB-INF and calling it internally from localhost I would avoid that and worry about how to access it from Internet; now I first have to get around this security issue on localhost so I can test and ass-ume it will also allow access from browsers externally. David Smith [EMAIL PROTECTED] wrote: As for that last bit, I have found that you can specify the path as /FolderInWebApp/Script/myScript.js You still need either the context path or make it relative to the page's URL or the client won't be able to resolve it. This doesn't work like the jsp internals that are aware of the context path. --David Nathan Bahr wrote: hmm what exactly do you need ajax for? From my recollection, ajax is simply a method of making mini-requests to the server so the interaction with your webapp is a bit more fluid. As for that last bit, I have found that you can specify the path as /FolderInWebApp/Script/myScript.js instead of using the fully qualified name. When you start the path with '/' it looks in the base webapp directory. Lemme know if this helps any. [EMAIL PROTECTED] 09/10/07 3:23 PM Hello Any tips on serving a ajax page with tomcat? I am now calling the page with a jsp:forward outside of the web-inf. Do I also have to fully unc path to the *.js files, like src=localhost:8080/context/intPages/myScripts.js ? - 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: tc xmlhttprequest
No comment on the whole bean construct other than to say that's too complicated for my tastes. My personal preference on the whole resources inside of WEB-INF front is to just place the resources outside of WEB-INF. Then configure a security constraint or write a filter on the request to handle access control. Just seems easier to me. --David Chris Pat wrote: Hi David I did it partially this way, and it works. My objects in the js file are executing. bean:page id=context property=request/ bean:define id=myServletContexthttp://bean:write name=context property=serverName/:bean:write name=context property=serverPort/bean:write name=context property=contextPath///bean:define titledecarta javascript api example/title script language=JavaScript type=text/javascript src=bean:write name=myServletContext//extPages/myScripts.js!-- --/script However I still get the Permission denied to call XMLHttpRequest.open... I thought by putting a jsp:forward outside my WEB-INF and calling it internally from localhost I would avoid that and worry about how to access it from Internet; now I first have to get around this security issue on localhost so I can test and ass-ume it will also allow access from browsers externally. David Smith [EMAIL PROTECTED] wrote: As for that last bit, I have found that you can specify the path as /FolderInWebApp/Script/myScript.js You still need either the context path or make it relative to the page's URL or the client won't be able to resolve it. This doesn't work like the jsp internals that are aware of the context path. --David Nathan Bahr wrote: hmm what exactly do you need ajax for? From my recollection, ajax is simply a method of making mini-requests to the server so the interaction with your webapp is a bit more fluid. As for that last bit, I have found that you can specify the path as /FolderInWebApp/Script/myScript.js instead of using the fully qualified name. When you start the path with '/' it looks in the base webapp directory. Lemme know if this helps any. [EMAIL PROTECTED] 09/10/07 3:23 PM Hello Any tips on serving a ajax page with tomcat? I am now calling the page with a jsp:forward outside of the web-inf. Do I also have to fully unc path to the *.js files, like src=localhost:8080/context/intPages/myScripts.js ? - 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: tc xmlhttprequest
Hi David That is just macro syntax. The real issue is why/how to avoid the security violation on using xmlhttprequest when launching the webapp from localhost or externally. I dont understand what to put where and how to access it so to allow xmlhttprequest to execute. David Smith [EMAIL PROTECTED] wrote: No comment on the whole bean construct other than to say that's too complicated for my tastes. My personal preference on the whole resources inside of WEB-INF front is to just place the resources outside of WEB-INF. Then configure a security constraint or write a filter on the request to handle access control. Just seems easier to me. --David Chris Pat wrote: Hi David I did it partially this way, and it works. My objects in the js file are executing. http://:/ decarta javascript api example /extPages/myScripts.js However I still get the Permission denied to call XMLHttpRequest.open... I thought by putting a jsp:forward outside my WEB-INF and calling it internally from localhost I would avoid that and worry about how to access it from Internet; now I first have to get around this security issue on localhost so I can test and ass-ume it will also allow access from browsers externally. David Smith wrote: As for that last bit, I have found that you can specify the path as /FolderInWebApp/Script/myScript.js You still need either the context path or make it relative to the page's URL or the client won't be able to resolve it. This doesn't work like the jsp internals that are aware of the context path. --David Nathan Bahr wrote: hmm what exactly do you need ajax for? From my recollection, ajax is simply a method of making mini-requests to the server so the interaction with your webapp is a bit more fluid. As for that last bit, I have found that you can specify the path as /FolderInWebApp/Script/myScript.js instead of using the fully qualified name. When you start the path with '/' it looks in the base webapp directory. Lemme know if this helps any. [EMAIL PROTECTED] 09/10/07 3:23 PM Hello Any tips on serving a ajax page with tomcat? I am now calling the page with a jsp:forward outside of the web-inf. Do I also have to fully unc path to the *.js files, like src=localhost:8080/context/intPages/myScripts.js ? - 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: when does use mod_jk and jni?
fredk2 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Reading the documentation for mod_jk (1.2.25 --enable-jni), I am curious about something. In what case do you use mod_jk jni ? TC 3.3.x is the only version that supports mod_jk's JNI module. The main reason is that since it only really works on Windows and Netware, there hasn't been a lot of interest in porting this functionality to later TC versions (for *nix platforms, Apache always forks multiple copies, so you end up with multiple versions of TC running with no way to ensure stickyness). Thank you - Fred -- View this message in context: http://www.nabble.com/when-does-use-mod_jk-and-jni--tf4417743.html#a12600560 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to manage Apache error msgs when Tomcat is down?
Sorry - I guess I wasn't specific enough. The HTTP status code that I got from Apache was 200 hence the OK. I assumed that it was probably 200 since I was actually able to communicate with Apache itself, even though its request to tomcat was unavailable. Or unless I am missing something in my apache configuration to display the correct error page. If I check the headers sent using Fiddler, I get the following: HTTP/1.1 200 OK Date: Fri, 07 Sep 2007 18:04:51 GMT Server: Apache/2.0.52 (White Box) Content-Length: 501 Connection: close Content-Type: text/html; charset=iso-8859-1 However, it is definitely not OK b/c my tomcat server is down. Do I have something foobar'ed in my apache config? Or is it a problem in my mod_jk params? If it makes any difference, I am running mod_jk v1.2.10 w/ Apache 2.0.52. JK version 1.2.10 is very old. A lot of things changed until we now reached 1.2.25. Typically backend problems will be answered with a non 200 status code. Try a more recent version (like 1.2.25). Thanks for the tip. I did just that and upgrade to 1.2.19 (I couldn't find any binaries for 1.2.25 compiled for http 2.0.52 - running CentOS4 and the latest httpd is 2.0.52-32 - would any binaries later than 1.2.19 work on that build?), and the status codes are returning properly now. I get 503 when my tomcat server is down, which made it very easy to then configure Apache with a standard ErrorDocument 503 msg in httpd.conf. However, this does raise an interesting question for me now. I haven't tried this, so don't know if/how it would work. If I am mapping an entire directory in my virtual host - ie: Virtual HostJkMount /tomcat/*/VirtualHost and my tomcat server is unavailable, it will return a 503 error status, which httpd will then respond with an appropriate error document. Can I customize the error page on a per mount basis by creating a .htaccess file in my /tomcat/ directory within my httpd file workspace? Given that httpd is supposed to be ignoring that directory altogether (ie: passing all requests over to tomcat thru the jk connector), will it even see / read the .htaccess file? If not, do I need to manually add a JkUnmount /tomcat/.htaccess command? Or is there a better way to do this to have apache still read the .htaccess file even if the entire path is mapped to a jk connector? Thanks for the info / help! Eric (sorry if this is posted multiple times - I seem to be having trouble with my relay server) - 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: *SPAM* Re: How to change the CLASSPATH in tomcat 5.028 for a concrete webservice
Tomás Tormo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi David I'm using tomcat 5.028 in Ubuntu 6.10 . I've written a java applicattion wich uses a wrapper to communicate with an applicattion written in C, wich is the core of my applicattion. Both the wrapper and the core are third party applicattions, and because of that i don't have the source code, I just have the API. The third party sent me an example application wich uses the core. And, as I could see in the script wich lauches the application, this folder should be added to the classpath in order to be able to be located by the wrapper applicattion. The documentation of the wrapper just says that this folder has to exist with an specific name. My problem is that my applicattion works fine launched from shell (it founds the folder and uses the core perfectly) but it doesn't work as a webservice. It is not able to find the resource folder (let's call it cfg). As I can see in the catalina log, the application tries to load the resources (via ClassLoader I guess) and then launches an exception saying that is not able to find it. The client gets a HTTPErrorCode0. I think I've tried everything to make it find the folder, but I wasn't successful. do you have any idea? I agree with David and Chuck: Setting the CLASSPATH is evil. If you *really* need to do this, then put the third-party jar in shared/lib and edit conf/catalina.properties to add your external directory to the classpath. thank you very much David Smith escribió: I wold STRONLY recommend you DO NOT touch the CLASSPATH env variable. It's just a horrible idea. What is it about your webservice that requires the alteration of CLASSPATH? Can you describe that a bit more? The standard classloader structure works very well in virtually all other cases. --David Tomás Tormo wrote: Hi again I've tried to set the classpath in catalina.sh in order to have my own classpath set when tomcat starts up ( I show it in catalina.sh as well and it looks good). But my problem is that when I show it in my webservice (using System.out.println(System.getProperty(java.class.path))) it is changed again (it only points to a few jar files in /bin folder) and therefore my webservice can't work properly. Shouldn't it be pinting to my my /webapp/webservice/WEB-INF/lib folder as well? Does anybody know how to fix this problem? Hakan: I've tried the solution you gave me (create a setenv.sh script called from startup.sh) but tomcat don't start up! Thank you very much for your future answers :p Tomás Tormo escribió: Hi Hakan First of all thank you for your fast answer ;). Do you mean to create an script called setenv.sh wich will set the CLASSPATH (by export CLASSPATH.. etc)? This script should be called by a modified startup.sh? By they way, I printed the CLASSPATH in my webservice (using System.out.println(System.getProperty(java.class.path)); ) and it says that my CLASSPATH is only pointing to a few jars in the bin folder, not even to my /lib folder in my webservice folder (I hope I explained myself well, I'm not using war files). Shouldn't it be pointing to my /webapp/webservice/WEB-INF/lib folder as well? Thank you!! Greetings!! Hakan Koseoglu escribió: Hi Tomás, Tomás Tormo said the following on 09/10/2007 08:26 AM: I would like to change the classpath for a concrete webservice in Tomcat 5.028 because the webservice has to use a concrete folder in order to work. This folder should be in the CLASSPATH in order to make the webservice work properly and because the webservice can't find it, it doesn't work. With Tomcat 5, creating a setenv.sh solves the problem for me. It gets called if you start the Tomcat using startup.sh. Any variable you define there will be used, including the classpath. We use it to point to the libraries which we don't put into common/lib nor war files. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]