RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached
Hi Marcus, About that log entry that doesn't seem to be caught by the default java.util.logging, I was wondering if it's a bug in the code per my original post, noted below.. On all calls to log, isn't it required to do a check for that log level before making the call... i.e. isDebugEnabled(), isInfoEnabled(), etc. Maybe for some reason, log4j with filter without the check? (speculation), if this is the case.. The below mentioned change may fix the problem, I don't have the tomcat build environment setup or I would try it.. Anyone else do their own tomcat builds that could try it quick? 'org.apache.jk.common.ChannelSocket', the line reads... log.info( connection timeout reached); Should it not instead read... if(log.isInfoEnabled()) log.info( connection timeout reached); -Rick -Original Message- From: Marcus Franke [mailto:[EMAIL PROTECTED] Posted At: Friday, October 07, 2005 10:07 AM Posted To: Tomcat Dev Conversation: [5.5.9] Excessive jk INFO log msgs connection timeout reached Subject: Re: [5.5.9] Excessive jk INFO log msgs connection timeout reached On Fri, Oct 07, 2005 at 05:24:27PM +0100, Allistair Crossley wrote: Hi, looks like jk is using commons logging, you'll have better success using a log4j or commons-logging properties configuration to set the threshold to ERROR. you may be able to do that in jk's config files too, i am sure there is an error level setting. check out the jk docs. Hello Allistair, Ok, did not understand a word :) Seems to be too late. I now changed the debug value in the Connector now step by step down to Zero. But no changes, the catalina.out file still fills with those timeout Infos. !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 debug=0 minProcessors=50 maxProcessors=500 connectionTimeout=2 protocol=AJP/1.3 / I tried to modify the logger definition in the server.xml using verbosity=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt verbosity=0 timestamp=true/ But its just the catalina_log and not the catalina.out which according to the start scripts of the tomcat daemon is a redirection of stdout of the daemon itself into the logfile. Is there an option to make the tomcat daemon less noisy? Thanks, Marcus -- History tends to exaggerate. -- Col. Green, The Savage Curtain, stardate 5906.4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Modjk and Tomcat 5.5.4 problem
Hi Marcus, idle connections running for hours and hours That was our problem as well, with those idle connections just sitting there, as I said, I wasn't sure if my solution was the correct one.. Just telling you, it seemed to work for us. I would say give it a try, the only issue we have, is a large amount of log messages in catalina.out about the timeouts. For some reason I can't get the default java.util.logging to catch them. -Rick -Original Message- From: Marcus Franke [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 4:11 AM On Wed, Oct 05, 2005 at 04:24:08PM -0700, Rick wrote: We had an issue where it seemed like it would crash using mod_jk, the trouble was the connections were not letting go. By default, I think the timeout is infinite, so after setting the property: connectionTimeout, in the server.xml's connector descriptor as follows, Connector port= protocol=AJP/1.3 connectionTimeout=6 .../ The old connections would get cleaned up and we stopped having problems, however, I'm not sure this was the correct way to do this, seems to work. Hi, but concerning to the documentation connectionTimeout is the amount of time between opening the session and receiving the URI to process. So your connector would wait 60 seconds for an empty request before it would cut off the connection. I for example have the interesting behaviour that I have idle connections running for hours and hours which I would like to end but do not know how. Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached
Jean-Marc, Actually, without the connectionTimeout set, jk seems to hold on to its connections indefinitely and after a while, the apache to tomcat connection hangs (pages quit serving). Could you tell me which combo of versions you use for apache, jk, and tomcat. I'm trying to figure out what is the correct configuration. Or if you have a link to a guide, I have yet to find a best practices. Thanks, Rick -Original Message- From: Jean-Marc Marchand [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 6:36 AM Posted To: Tomcat Dev Conversation: [5.5.9] Excessive jk INFO log msgs connection timeout reached Subject: RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached I got rid of this message when I realized that my AJP connector's configuration (in server.xml) had a connectionTimeout set. Try setting it bigger or simply removing it, which will default to 'no timeout'. Cheers, Jean-Marc -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 18:19 To: 'Tomcat Users List' Subject: [5.5.9] Excessive jk INFO log msgs connection timeout reached Anyone know the proper way to handle these messages? I get piles of them in catalina.out Oct 5, 2005 3:00:23 PM org.apache.jk.common.ChannelSocket processConnection INFO: connection timeout reached Tried adding the following line to the default catalina_home/common/classes/logging.properties org.apache.jk.common.ChannelSocket.level=WARN Has no effect. The only thing I have been able to find is people using Log4j instead of the default java.util.logging that came setup with Tomcat 5.5. Was wondering, is that the only way? If so, why does it work w/ Log4j and not the default java.util.logging? Looking at the source for 'org.apache.jk.common.ChannelSocket', the line reads... log.info( connection timeout reached); Should it not instead read... if(log.isInfoEnabled()) log.info( connection timeout reached); Anyway, thanks for any help to this. -Rick Gavin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Modjk and Tomcat 5.5.4 problem
Hey John, I have been looking into this on my end as well, since I'm not fully satisfied that it's the proper solution. As a question, what does your Apache workers.properties file look like. Do you have any of the properties such as recycle_timeout, socket_timeout, cachesize, or cache_timeout set? -Rick -Original Message- From: John Martyniak [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 8:43 AM Posted To: Tomcat Dev Conversation: Modjk and Tomcat 5.5.4 problem Subject: Re: Modjk and Tomcat 5.5.4 problem Rick, Thanks for the info. I will try it out. It is interesting when I look at the config for all of the other Connectors, they all have a connectionTimeout value. -John On Oct 5, 2005, at 7:24 PM, Rick wrote: We had an issue where it seemed like it would crash using mod_jk, the trouble was the connections were not letting go. By default, I think the timeout is infinite, so after setting the property: connectionTimeout, in the server.xml's connector descriptor as follows, Connector port= protocol=AJP/1.3 connectionTimeout=6 .../ The old connections would get cleaned up and we stopped having problems, however, I'm not sure this was the correct way to do this, seems to work. Not sure if this is related to your problem. -Rick -Original Message- From: John Martyniak [mailto:[EMAIL PROTECTED] Posted At: Wednesday, October 05, 2005 3:53 PM Posted To: Tomcat Dev Conversation: Modjk and Tomcat 5.5.4 problem Subject: Modjk and Tomcat 5.5.4 problem Has anyone had any problems with ModJK crashing the server? I haven't been able to fully debug yet, primarily because it doesn't update any logs to state there is a problem, and I can't reliably replicate the problem. I am using Apache 2.0.47, modjk 1.2.5 and tomcat 5.5.4 I think that it has something to do with modjk because when I go directly to the appserver the problem doesn't seem to exist. Any help would be greatly appreciated. Thank you, -John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached
Thanks Jean-Marc, After checking over my workers.properties, orginally configured by someone else, it appears to be missing some of the connection timeout handling properties you have listed in yours. I'm guessing this is the root of my issue. I'll give them a try. Thanks again, Rick -Original Message- From: Jean-Marc Marchand [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 9:15 AM Posted To: Tomcat Dev Conversation: [5.5.9] Excessive jk INFO log msgs connection timeout reached Subject: RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached I`m using Tomcat 5.0.30 / Apache 2.0.54 / JK 1.2.14.1 I looked a bit in the source of the Tomcat JK connector, and the 'connectionTimeout' parameter of the Connector is relayed to 'soTimeout' of the listening JK sockets ChannelSocket.java. ...which takes us to the java.net.Socket api and SO_TIMEOUT parameter. Seems to me that mod_jk in Apache keeps the connection opened, therefore never closing it and reusing it for future calls. If so, and if I set a connectionTimeout on the Tomcat JK connector, it would always close the connection with a TimeoutException. That would explain the log entries. I don't know, I'm just guessing because my system is not in production yet, but if I set my Tomcat connector to 'no timeout' and my Apache worker to socket_timeout=30 secs, wouldn't the sockets be recycled on both ends anyway when not active for 30 secs? My Apache workers.properties looks like: worker.tomcat1.port=8009 worker.tomcat1.host=localhost worker.tomcat1.type=ajp13 worker.tomcat1.cachesize=150 worker.tomcat1.cache_timeout=600 worker.tomcat1.recycle_timeout=300 worker.tomcat1.socket_timeout=30 worker.tomcat1.socket_keepalive=1 and I haven't had the log entry in Tomcat since I set the cache and timeouts in Apache. Hope it helps... Jean-Marc -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Thursday, October 06, 2005 09:54 To: 'Tomcat Users List'; [EMAIL PROTECTED] Subject: RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached Jean-Marc, Actually, without the connectionTimeout set, jk seems to hold on to its connections indefinitely and after a while, the apache to tomcat connection hangs (pages quit serving). Could you tell me which combo of versions you use for apache, jk, and tomcat. I'm trying to figure out what is the correct configuration. Or if you have a link to a guide, I have yet to find a best practices. Thanks, Rick -Original Message- From: Jean-Marc Marchand [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 6:36 AM Posted To: Tomcat Dev Conversation: [5.5.9] Excessive jk INFO log msgs connection timeout reached Subject: RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached I got rid of this message when I realized that my AJP connector's configuration (in server.xml) had a connectionTimeout set. Try setting it bigger or simply removing it, which will default to 'no timeout'. Cheers, Jean-Marc -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 18:19 To: 'Tomcat Users List' Subject: [5.5.9] Excessive jk INFO log msgs connection timeout reached Anyone know the proper way to handle these messages? I get piles of them in catalina.out Oct 5, 2005 3:00:23 PM org.apache.jk.common.ChannelSocket processConnection INFO: connection timeout reached Tried adding the following line to the default catalina_home/common/classes/logging.properties org.apache.jk.common.ChannelSocket.level=WARN Has no effect. The only thing I have been able to find is people using Log4j instead of the default java.util.logging that came setup with Tomcat 5.5. Was wondering, is that the only way? If so, why does it work w/ Log4j and not the default java.util.logging? Looking at the source for 'org.apache.jk.common.ChannelSocket', the line reads... log.info( connection timeout reached); Should it not instead read... if(log.isInfoEnabled()) log.info( connection timeout reached); Anyway, thanks for any help to this. -Rick Gavin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Q:how to remove charset from HTTP responce to allow browser use a browser selected charset?
Hi Mark, Can you talk a little about what the data is.. Just form data from different locales? I store all my data in UTF-8 and just instruct the page encoding to be the same (UTF-8) and I'm able to handle input and display of whatever people enter. Had a few odd things to overcome to get it working like, JSP: I had to save the actual JSP file in UTF8 otherwise I couldn't get it to serve the page with UTF8 properly.. This started after Tomcat 5.0.16 or something like that. Servlet: don't think I had to do anything wild.. Just set the charset before you do anything with the output stream, including just getting a handle to the stream writer. Set the contenttype first. response.setContentType(text/html;charset=UTF-8); Depending on what you are reading from and such. You may also want to set some Java ARGs when starting Tomcat... Like: -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8 -DjavaEncoding=UTF-8 Not sure if this is relevant, but hope it helps, Rick -Original Message- From: Mark [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 12:13 PM Posted To: Tomcat Dev Conversation: Q:how to remove charset from HTTP responce to allow browser use a browser selected charset? Subject: Re: Q:how to remove charset from HTTP responce to allow browser use a browser selected charset? Hi Mark, In my case servlet generates an output, so no JSP for now... Can I do it using filters? Or define and store user's prefs with encoding outside of tomcat and in the session and use if it's exists in the session? Thanks a lot! Mark. --- Mark Thomas [EMAIL PROTECTED] wrote: Mark wrote: Hello, In my application users enter data using different languages. The problem I'm facing is the browser sets the page encoding always to ISO-8859-1. (I guess this is default based on server OS) User can change encoding on the page (Browser settings) and everything looks OK but only for one page. On the next page encoding is back to ISO-8859-1. Is there any way to instruct tomcat not to send the page encoding? If you are using JSPs, no. The spec requires that the charset is set. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Yahoo! for Good Donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[5.5.9] Excessive jk INFO log msgs connection timeout reached
Anyone know the proper way to handle these messages? I get piles of them in catalina.out Oct 5, 2005 3:00:23 PM org.apache.jk.common.ChannelSocket processConnection INFO: connection timeout reached Tried adding the following line to the default catalina_home/common/classes/logging.properties org.apache.jk.common.ChannelSocket.level=WARN Has no effect. The only thing I have been able to find is people using Log4j instead of the default java.util.logging that came setup with Tomcat 5.5. Was wondering, is that the only way? If so, why does it work w/ Log4j and not the default java.util.logging? Looking at the source for 'org.apache.jk.common.ChannelSocket', the line reads... log.info( connection timeout reached); Should it not instead read... if(log.isInfoEnabled()) log.info( connection timeout reached); Anyway, thanks for any help to this. -Rick Gavin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Modjk and Tomcat 5.5.4 problem
We had an issue where it seemed like it would crash using mod_jk, the trouble was the connections were not letting go. By default, I think the timeout is infinite, so after setting the property: connectionTimeout, in the server.xml's connector descriptor as follows, Connector port= protocol=AJP/1.3 connectionTimeout=6 .../ The old connections would get cleaned up and we stopped having problems, however, I'm not sure this was the correct way to do this, seems to work. Not sure if this is related to your problem. -Rick -Original Message- From: John Martyniak [mailto:[EMAIL PROTECTED] Posted At: Wednesday, October 05, 2005 3:53 PM Posted To: Tomcat Dev Conversation: Modjk and Tomcat 5.5.4 problem Subject: Modjk and Tomcat 5.5.4 problem Has anyone had any problems with ModJK crashing the server? I haven't been able to fully debug yet, primarily because it doesn't update any logs to state there is a problem, and I can't reliably replicate the problem. I am using Apache 2.0.47, modjk 1.2.5 and tomcat 5.5.4 I think that it has something to do with modjk because when I go directly to the appserver the problem doesn't seem to exist. Any help would be greatly appreciated. Thank you, -John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using Catalina API
We get a list of sessions from a specific webapp by using the JMX interface, once you get a connection you could get a list of all manager mbeans (webapps) and then invoke the listsessions method on each manager to get a list of sessions.. However.. This only seems to work with the older 1.1.1 version of MX4J and for some reason, I can't get anyone to give me a clue as to how to use the 3.0.1 newer version properly, from the tomcat list nor the MX4J list. The 1.1.1 version has the bad side-effect of not always cleaning up its threads and can hang tomcat on shutdown. This was used on Tomcat 5.0.28, using the MX4J 1.1.1 libs. -- conf/jk2.properties mx.port=1099 mx.enabled=true mx.jrmpPort=1099 mx.jrmpHost=localhost -- Code -- Hashtable environment = new Hashtable(); environment.put(Context.INITIAL_CONTEXT_FACTORY, com.sun.jndi.rmi.registry.RegistryContextFactory); environment.put(Context.PROVIDER_URL,rmi://localhost:1099); JRMPConnector connector = new JMRPConnector(); connector.connect(jrmp, environment); RemoteMBeanServer server = connector.getRemoteMBeanServer(); ObjectName ob = new ObjectName(mywebapp); Object[] params = {}; String[] signature = {}; String result = (String)mServer.invoke(ob,listSessionIds,params,signature); -Rick -Original Message- From: Charl Gerber [mailto:[EMAIL PROTECTED] Posted At: Tuesday, June 14, 2005 9:09 AM Posted To: Tomcat Dev Conversation: Using Catalina API Subject: Using Catalina API How can you determine all the loaded webapps and active sessions across all webapps using the Catalina (or other Tomcat) API? The Javadoc does not seem to provide a sort of utility class with static methods to get this info. Thanks Charl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: 5.0.28 w/ MX4J 3.0.1, possible?
Repost, hadn't heard anything... Anyone have a code example of talking to the JMX Http interface pragmatically? With latest MX4J or JMXRI? Thanks Bill, So if I can only use the http method, then I assume I should be able to make the code work using the newer MX4J HTTPConnector? Or am I missing something. Anyone have a code snippet using the HTTPConnector to connect to Tomcat's Mbean server? I seem to be having trouble getting the url syntax to work with.. --- JMXServiceURL address = new JMXServiceURL(http, localhost, 9000); --- I get the error.. --- java.net.MalformedURLException: Could not find provider for protocol http --- So I'm a bit stumped, if I'm using http, why is it saying it has no provider for it, is there some other I need to use in its place? Thanks again -Rick -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker Posted At: Thursday, June 09, 2005 9:55 PM Posted To: Tomcat Dev Conversation: Re: 5.0.28 w/ MX4J 3.0.1, possible? Subject: Re: 5.0.28 w/ MX4J 3.0.1, possible? Rick [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I have been trying to migrate to the latest version of MX4J (3.0.1) from the old 1.1.1 version. And for the life of me, I don't seem to be able to get it to work. I use JMX to communicate to various servers in our webapp to show session info on different nodes, and I would also like to implement some other features.. Old 1.1.1 implementation -- jk2.properties mx.enabled=true mx.jrmpPort=1099 mx.jrmpHost=localhost -- Code -- Hashtable environment = new Hashtable(); environment.put(Context.INITIAL_CONTEXT_FACTORY, com.sun.jndi.rmi.registry.RegistryContextFactory); environment.put(Context.PROVIDER_URL,rmi://localhost:1099); JRMPConnector connector = new JMRPConnector(); connector.connect(jrmp, environment); RemoteMBeanServer server = connector.getRemoteMBeanServer(); Ok.. So I replaced jmx.jar with the latest version of mx4j.jar (renamed to jmx.jar) under tomcat_home/bin And replaced or added Mx4j-jmx.jar Mx4j-tools.jar Mx4j-remote.jar To /tomcat_home/common/lib Now, when I start tomcat I get the error.. MX4j RMI adapter not loaded: java.lang.ClassNotFoundException: mx4j.adaptor.rmi.jrmp.JRMPAdaptor Which is correct, since that's not a valid class now, but how do I configure tomcat to properly use the new mx4j. Yep. The jrmp adapter is gone. If I enable mx.httpPort=9000/mx.httpHost=localhost then JMX does enable and I get a pretty little message like... HttpAdapter version 3.0.1 started on port 9000 , but I have no idea at this point how to properly use the HTTP connector. Any info or suggestions to getting the RMI adapter working, or how to use the http adapter, or just the best way to go about Using MX4J, not sure if either is possible with out updating to tomcat 5.5.x. The RMI adapter is gone in mx4j 3.x. There is nothing that Tomat can do about it. You can access the http adapter by simply typing http://localhost:9000 in you favorite browser. The only thing you gain by upgrading to 5.5.x is the ability to use the http adapter in XML instead of HTML. Thanks, Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: 5.0.28 w/ MX4J 3.0.1, possible?
Thanks Bill, So if I can only use the http method, then I assume I should be able to make the code work using the newer MX4J HTTPConnector? Or am I missing something. Anyone have a code snippet using the HTTPConnector to connect to Tomcat's Mbean server? I seem to be having trouble getting the url syntax to work with.. --- JMXServiceURL address = new JMXServiceURL(http, localhost, 9000); --- I get the error.. --- java.net.MalformedURLException: Could not find provider for protocol http --- So I'm a bit stumped, if I'm using http, why is it saying it has no provider for it, is there some other I need to use in its place? Thanks again -Rick -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker Posted At: Thursday, June 09, 2005 9:55 PM Posted To: Tomcat Dev Conversation: Re: 5.0.28 w/ MX4J 3.0.1, possible? Subject: Re: 5.0.28 w/ MX4J 3.0.1, possible? Rick [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I have been trying to migrate to the latest version of MX4J (3.0.1) from the old 1.1.1 version. And for the life of me, I don't seem to be able to get it to work. I use JMX to communicate to various servers in our webapp to show session info on different nodes, and I would also like to implement some other features.. Old 1.1.1 implementation -- jk2.properties mx.enabled=true mx.jrmpPort=1099 mx.jrmpHost=localhost -- Code -- Hashtable environment = new Hashtable(); environment.put(Context.INITIAL_CONTEXT_FACTORY, com.sun.jndi.rmi.registry.RegistryContextFactory); environment.put(Context.PROVIDER_URL,rmi://localhost:1099); JRMPConnector connector = new JMRPConnector(); connector.connect(jrmp, environment); RemoteMBeanServer server = connector.getRemoteMBeanServer(); Ok.. So I replaced jmx.jar with the latest version of mx4j.jar (renamed to jmx.jar) under tomcat_home/bin And replaced or added Mx4j-jmx.jar Mx4j-tools.jar Mx4j-remote.jar To /tomcat_home/common/lib Now, when I start tomcat I get the error.. MX4j RMI adapter not loaded: java.lang.ClassNotFoundException: mx4j.adaptor.rmi.jrmp.JRMPAdaptor Which is correct, since that's not a valid class now, but how do I configure tomcat to properly use the new mx4j. Yep. The jrmp adapter is gone. If I enable mx.httpPort=9000/mx.httpHost=localhost then JMX does enable and I get a pretty little message like... HttpAdapter version 3.0.1 started on port 9000 , but I have no idea at this point how to properly use the HTTP connector. Any info or suggestions to getting the RMI adapter working, or how to use the http adapter, or just the best way to go about Using MX4J, not sure if either is possible with out updating to tomcat 5.5.x. The RMI adapter is gone in mx4j 3.x. There is nothing that Tomat can do about it. You can access the http adapter by simply typing http://localhost:9000 in you favorite browser. The only thing you gain by upgrading to 5.5.x is the ability to use the http adapter in XML instead of HTML. Thanks, Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
5.0.28 w/ MX4J 3.0.1, possible?
Hello, I have been trying to migrate to the latest version of MX4J (3.0.1) from the old 1.1.1 version. And for the life of me, I don't seem to be able to get it to work. I use JMX to communicate to various servers in our webapp to show session info on different nodes, and I would also like to implement some other features.. Old 1.1.1 implementation -- jk2.properties mx.enabled=true mx.jrmpPort=1099 mx.jrmpHost=localhost -- Code -- Hashtable environment = new Hashtable(); environment.put(Context.INITIAL_CONTEXT_FACTORY, com.sun.jndi.rmi.registry.RegistryContextFactory); environment.put(Context.PROVIDER_URL,rmi://localhost:1099); JRMPConnector connector = new JMRPConnector(); connector.connect(jrmp, environment); RemoteMBeanServer server = connector.getRemoteMBeanServer(); Ok.. So I replaced jmx.jar with the latest version of mx4j.jar (renamed to jmx.jar) under tomcat_home/bin And replaced or added Mx4j-jmx.jar Mx4j-tools.jar Mx4j-remote.jar To /tomcat_home/common/lib Now, when I start tomcat I get the error.. MX4j RMI adapter not loaded: java.lang.ClassNotFoundException: mx4j.adaptor.rmi.jrmp.JRMPAdaptor Which is correct, since that's not a valid class now, but how do I configure tomcat to properly use the new mx4j. If I enable mx.httpPort=9000/mx.httpHost=localhost then JMX does enable and I get a pretty little message like... HttpAdapter version 3.0.1 started on port 9000 , but I have no idea at this point how to properly use the HTTP connector. Any info or suggestions to getting the RMI adapter working, or how to use the http adapter, or just the best way to go about Using MX4J, not sure if either is possible with out updating to tomcat 5.5.x. Thanks, Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No such list! s
Chris wrote: Is anyone else getting these when they try to send mail to the list? Yes. My guess is that the Apache list administrator needs to remove [EMAIL PROTECTED] from the tomcat-user list. I may be wrong; either way, I'd like someone to work out how to stop these annonyances please. Rick -- Visit our website at www.roke.co.uk Roke Manor Research Ltd, Roke Manor, Romsey, Hampshire SO51 0ZN, UK. The information contained in this e-mail and any attachments is proprietary to Roke Manor Research Ltd and must not be passed to any third party without permission. This communication is for information only and shall not create or change any contractual relationship. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat banner
André Cruz wrote: Hello! Is there anyway to remove the tomcat banner that appears in the header of all pages served by tomcat? I don't want to disclose that information to my users. The standard webapps (ROOT, manager, admin etc) include the Tomcat banner. If it's also in your own webapp, then perhaps someone put it there. That's where I'd suggest you need to have a look. Rick -- Visit our website at www.roke.co.uk Roke Manor Research Ltd, Roke Manor, Romsey, Hampshire SO51 0ZN, UK. The information contained in this e-mail and any attachments is proprietary to Roke Manor Research Ltd and must not be passed to any third party without permission. This communication is for information only and shall not create or change any contractual relationship. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Illegal IMail List Server Command!
Are you trying to get these mailing lists subscribed to each other? If you are, DON'T!!! It's a very very very antisocial thing to do. R. [EMAIL PROTECTED] wrote: subscribe bluedragon-interest jturbo-interest servletexec-interest Donald R Milotte -- [EMAIL PROTECTED] (List Server) wrote: New Atlanta List Server General Help File - Lists hosted by this server are: bluedragon-interest jturbo-interest servletexec-interest bluedragon-customers jturbo-customers servletexec-customers bluedragon-announce newatlanta-announce Use one of these list names where you see list name in the command syntax below. All list server commands must be addressed to: [EMAIL PROTECTED] Commands must be placed on the first line of the message body and may not be preceded by blanks, whitespace, or other characters. Valid Commands are: To subscribe to a list: subscribe list name your full name For example: subscribe servletexec-interest John Smith If you don't include your name in the subscribe command you'll receive an Invalid Syntax error message from the list server. To unsubscribe from a list: unsubscribe list name To receive help send after subscribing to a list: help list name If you have any questions or need additional help, send email to: [EMAIL PROTECTED] -- Visit our website at www.roke.co.uk Roke Manor Research Ltd, Roke Manor, Romsey, Hampshire SO51 0ZN, UK. The information contained in this e-mail and any attachments is proprietary to Roke Manor Research Ltd and must not be passed to any third party without permission. This communication is for information only and shall not create or change any contractual relationship. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IE 20 session cookies limitation
Hi, I am using Tomcat 5.0.26. I have 20+ web applications hooked up with single-sign-on. Each web application generates a JESSIONID session cookie with a different path, and shares a single JSESSIONIDSSO. When testing my suite of applications, I notice that IE consistently drops my login after accessing the 20th web application within a session. I did some research and learned about RFC 2109 where HTTP agents should support a minimum of 20 session cookies per domain. That appears to be just what IE does. The following Microsoft knowledgebase article explains that: http://support.microsoft.com/default.aspx?scid=kb;EN-US;306070. I suspect JSESSIONIDSSO was the oldest cookie, and was the first to get dropped by IE when reaching over 20 session cookies. Firefox does not have this problem. Knowing that I cannot easily refactor the application suite to make less number of web application ( 19), I am wondering if anyone else has this problem, and if and how I might work around this IE limitation. Thanks, -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using SSL with IIS and Tomcat 4.1
Hi. I have successfully set up IIS 5.0 as the web server in a DMZ servicing Tomcat 4.1 as the application server in a secure zone. Now I am trying to enable SSL from the client's browser through to the application server. I cannot get this to work. I don't know if I need to activate SSL in Tomcat, in IIS, or in both. I've found conflicting articles on this. I have successfully enabled SSL in Tomcat, but IIS can't access the application server when I do. I tried to enable SSL in IIS, but had no luck at all there, even with a little test web site. Any help would be appreciated. Richard A. Anderson, NCR Corporation (519) 884-1710 X5543 (519) 884-0610 (fax) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Programmatically call the error page for a 500 error
Even if Tomcat 5 works this way, you are counting on a container specific implementation behavior that may be changed in future version. Why not do it with a standard servlet approach? You can specify an error handler in web.xml to handle different exception classes. error-page exception-typeorg.my.Exception1/exception-type location/handler/case1.jsp/location /error-page error-page exception-typeorg.my.Exception2/exception-type location/handler/case2.jsp/location /error-page error-page exception-typeorg.my.Exception3/exception-type location/handler/case3.jsp/location /error-page You application would raise the corresponding exception to trigger the handler page you want to display. Or you can create a single custom exception with embedded information to a single error handler page that knows how to render different error report depending on the embedded information in the exception. Note that inside the error page, you can get back the Exception object you raised. So you have all the information you need to render the page properly. That would guarantee to work in all Servlet 2.4 web containers. Thanks, -- Rick Chris Hyzer wrote: Hello, This works in Tomcat 4, but not 5 (5.0.25) response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); RequestDispatcher dispatcher = request.getRequestDispatcher(somePage); dispatcher.forward(request, response); I would like to set a 500 error code, and call different pages in different circumstances. Right now it calls the default Tomcat 500 page. If I add an error page in the web.xml it will call that. But I need to programmatically decide, so I can have a 500 error go to various JSPs that communicate the problem. Any ideas? Thanks, Chris ps. I tried an error page that was just text, so the error page is not triggering an error I believe... the same code works fine in tomcat 4 (.1.28 I think) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 2/14/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
New user Virtual host problem
Hi all, I have previously setup tomcat 5.x running on apache 1.3.x. Everything works fine and I'm learning lots as I go, although I have run into a problem with adding new domains to my apache. I have setup another site in the webapps directory however apache will only serve it using my primary machine ip, e.g. http://192.168.0.5/newsite which then gets redirected to my newsite on port 8080. I want to be able to have http://192.168.0.6 just go to that new site, however when I place that in my httpd.conf it does not work. Is there some docs which explain adding VirtualHosts to apache which point to the tomcat webapps directory? Thank you for any help, Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Customizing Tomcat error page
Unfortunately, the exception-type does not catch return code. I already have one exception-typejava.lang.Exception/exception-type which is a good umbrella for all exception an alike. However, it does not catch 404, for example. It seems like Tomcat catches it and handles it separately. Due to the modula nature of my application, I have 40 web applications. I really don't look forward to managing a long list of error-page for each error code in 40+ web.xml files. I wonder if I can use a filter to catch the setting of a status code 200 and does a page forward there -- Rick Shapira, Yoav wrote: Hi, You can use exception-type to catch a broad class of exceptions (such as java.lang.Exception for example ;) Or maybe javax.servlet.ServletException). If you use the error-code approach, you have to list them individually, which you're right is verbose and time-consuming. There might be a visual web.xml editor out there that can help you. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Rick Wong [mailto:[EMAIL PROTECTED] Sent: Thursday, October 14, 2004 8:43 PM To: Tomcat Users List Subject: Customizing Tomcat error page Hi, I am trying to replace the default Tomcat error page for my web applications. I understand that I can specify error-page in the web.xml deployment descriptor, but that would require me to do that for every single error code. Looking at the HTTP response code, there is a potentially long list of code that I might be interested in handling. Is there a simple way to trap these errors and redirect to my specific error page? Thanks, -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: disable Restart Persistence using the standard Manager implementation
This might work for stand-alone Tomcat. I am using Tomcat 5.0.28? that ships with JBoss 3.2.5. There isn't a Manager or Context in server.xml. It does have a DefaultContext, but according to the Tomcat configuration page, the Manager node does not live under DefaultContext. My problem is creating a Context, which I have to specify a 'docBase'. I can't give a hard-code path to the 'docBase' because Tomcat lives inside JBoss. -- Rick Shapira, Yoav wrote: Hi, I do not have a manager element in my server.xml. When Tomcat ships, a Manager is in server.xml by default. Did you remove it? Is this mean that i HAVE to set this element? Yes, as with all other elements, if you want non-default behavior you must specify it. That's the meaning of default ;) And if so, how do i achieve the default behavior? Either grab a fresh server.xml from a Tomcat distro, or look at the Manager docs page and declare one with the default attribute values. will this configuration do the work? context manager pathname= className= org.apache.catalina.session.StandardManager distributable=false / /context Maybe if you're more careful about your quoting ;) But yes, that's pretty close. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with web.xml error-page not invoking servlet filter
Thank you very much. I re-read the servlet 2.4 spec, and it works after I added the following to my filter: filter-mapping filter-nameChannelFilter/filter-name url-pattern/*/url-pattern dispatcherREQUEST/dispatcher dispatcherERROR/dispatcher /filter-mapping -- Rick Shapira, Yoav wrote: Hi, I think this is according to the spec. It took us a while to sort this out, and several consultations with the JSP Spec leads. It's related to those new filter mapping types defined in Spec version 2.4. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Rick Wong [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 8:14 PM To: Tomcat Users List Subject: Problem with web.xml error-page not invoking servlet filter Hi, I am using Tomcat 5. In my application, my web.xml declares a filter, and a global error page error-page exception-typejava.lang.Exception/exception-type location/error.jsp/location /error-page By examining the call stack in my error page JSP, I notice that when this error page is invoked, my filter is not called. However, if I define %@ page errorPage=/error.jsp % in my JSP file, my filter is invoked (and as a part of the call stack). Is this a Tomcat bug? Or does this behavior conform with the Servlet 2.4 spec? Thanks, -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Customizing Tomcat error page
Hi, I am trying to replace the default Tomcat error page for my web applications. I understand that I can specify error-page in the web.xml deployment descriptor, but that would require me to do that for every single error code. Looking at the HTTP response code, there is a potentially long list of code that I might be interested in handling. Is there a simple way to trap these errors and redirect to my specific error page? Thanks, -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How todestroy a session manually???
Yes. session.invalidate(). What is cool is that it even works with single-sign-on! Thanks to the Tomcat team! -- Rick John MccLain wrote: I have a session listener that clears out some static data on sessionDestroy. Is there a way for a logout button in a .jsp view to call some kind of destroy session function so that a sessionDestroyed(..) handler in a session listener gets called? John McClain Senior Software Engineer TCS Healthcare [EMAIL PROTECTED] (530)886-1700x235 Before you criticize someone, walk a mile in their shoes. That way, you'll be a mile from them, and you'll have their shoes. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with web.xml error-page not invoking servlet filter
Hi, I am using Tomcat 5. In my application, my web.xml declares a filter, and a global error page error-page exception-typejava.lang.Exception/exception-type location/error.jsp/location /error-page By examining the call stack in my error page JSP, I notice that when this error page is invoked, my filter is not called. However, if I define %@ page errorPage=/error.jsp % in my JSP file, my filter is invoked (and as a part of the call stack). Is this a Tomcat bug? Or does this behavior conform with the Servlet 2.4 spec? Thanks, -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: UTF-8 Encoding Issue Since 5.0.27 ( gun in my mouth )
Thanks for you info Mark. It does appear that a part of my issue stems from my .properties files being in UTF-8. So I have to ask the question, why has this changed since if I run the same code in 5.0.24, I have no issue, and 5.0.28 has a problem. It sounds like a substantial problem that UTF-8 resource bundles aren't supported any more. Besides this simple example, I'm still seeing problems with a servlet returning XML in UTF-8. Again, no issue in 5.0.24, only after 5.0.25. I will put together a sample and post it shortly. Thanks again for the help, Rick -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Posted At: Wednesday, September 01, 2004 4:14 PM Posted To: Tomcat Dev Conversation: UTF-8 Encoding Issue Since 5.0.27 ( gun in my mouth ) Subject: RE: UTF-8 Encoding Issue Since 5.0.27 ( gun in my mouth ) OK. I have a simple test case and all seems to be well. See the end of this message for the contents of my test files. My environment: Win XP SP2 - brave I know but all has been OK so far ;) JDK 1.4.2_05 Tomcat 5.0 branch, HEAD (latest) from CVS (very close to 5.0.28) Points to note: 1. All my test files are ASCII files. 2. I had all sorts of problems with non-ASCII properties files. I didn't get to the bottom of it but I think Windows was adding junk to the start of the file if it was UTF-8 encoded. Maybe having the first line as a comment would fix this but I haven't tested this. 3. There were times where Eclipse and Windows were reporting the exact same file as having different encodings. There is something odd here but I didn't look at this any further. 4. I had property file issues with 4.1.HEAD as well as 5.0.HEAD. 5. The downside of using ASCII files is that entering the UTF-8 characters by hand is a real pain. A simple conversion app should fix this though. 6. Apart from the property file issue, everything seems fine. Test files follow. Hope this helps, Mark PS I noticed that you cross-posted to the dev list. Please don't do this. Any message cross-posted is less likely rather than more likely to get a response. === utf8.jsp %@ page language=java import=java.lang.*,java.util.* contentType=text/html; charset=UTF-8 % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titleUTF-8 Encoding issue/title /head body pText from JSP page (which is ASCII encoded)./p form action=utf8.jsp method=post pEnglishinput type=radio value=en name=language /p pJapaneseinput type=radio value=ja name=language /p input type=submit value=Post form data / /form pText from resources bundle:/p % String language = request.getParameter(language); if (language == null) { language=en; } Locale locale = null; if (language.equalsIgnoreCase(en)) { locale = Locale.ENGLISH; } else { locale = Locale.JAPAN; } ResourceBundle bundle = ResourceBundle.getBundle(foo.bar.LocalStrings, locale); out.println(p + bundle.getString(test) + /p); % p%=request.getParameter(language) %/p /body /html = LocalStrings_en.properties = test=Test string from resources bundle = LocalStrings_ja.properties = test=\u30d5\u30a1\u30a4\u30eb\u30ed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I logout application(s) with Single-sign-on?
Thanks Keith, I figured out what I did wrong. It turns out that my logout servlet was running in a separate Web application that is not part of the SSO Realm. Of course, session.invalidate() does nothing to the SSO session! Thanks a lot for your help! Thanks a lot, -- Rick Keith Bottner wrote: request.getSession().invalidate(); You may also want to invalidate any cookies you have set, but that is specific to your needs. Cookie cookies[] = request.getCookies(); Cookie cookie = null; for (int i = 0; i cookies.length; i++) { cookie = cookies[i]; cookie.setMaxAge(0); response.addCookie(cookie); } Keith -Original Message- From: Rick Wong [mailto:[EMAIL PROTECTED] Sent: Friday, August 27, 2004 5:14 PM To: Tomcat Users List Subject: How do I logout application(s) with Single-sign-on? Hi, I am using Tomcat 5.0. I enabled SSO to several application. I'd like to be about to logout from any application, and force subsequent access to any application to logout as well. How would I do that? Thanks, -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
UTF-8 Encoding Issue Since 5.0.27 ( gun in my mouth )
Since 5.0.27, pretty much all of my UTF-8 i8 code seems to be messed up. The problem seems to have been caused by whatever fix was created for issue -- ServletResponse.setContentType sets response encoding after getWriter was called (Bugtraq 5062838) (luehe) -- Now it seems almost impossible to properly set the encoding type of some of my JSPs and all of my Servlets that return UTF-8 XML data. As an example, my login page allows the user to switch to Japanese text. Text data is read with a ResourceBundle, which reads from a UTF-8 encoded .properties file. If the encoding of the .jsp page itself is in ASCII, then I can't get the characters to show up at all any more. I have to save the .jsp page as UTF-8. Added set JAVA_OPTS=-Dfile.encoding=UTF-8 to my catalina.bat file Then, If I try to set a character set in my page header, it messes up. This works in some cases... %@ page language=java import=java.util.* contentType=text/html % response.getCharacterEncoding() = ISO-8859-1 The really scary part is that with no meta or charset actually set, that the browser(IE) correctly changes to UTF-8 and displays the content fine. But if I change the actual file encoding of the .jsp page from UTF-8 back to ASCII. Then IE does not change to UTF-8 and the page is messed up again. Why does the actual encoding of the .jsp file itself dictate the response sent to the client? It appears that the actual encoding of the source file someone how gets past along and then I'm unable to alter the character encoding, and if I try, it just causes everything to go to hell. This use to work before 5.0.27, but now doesn't, even though all data and pages are encoded in UTF-8. %@ page language=java import=java.util.* contentType=text/html; charset=UTF-8 % response.getCharacterEncoding() = UTF-8 Before 5.0.27, all I had to do to get my output in UTF-8 was ... contentType=text/html; charset=UTF-8 Now I have to mess with the actual .jsp file page encodings and still can't get most to work properly as well as none of my servlets will return correct UTF-8 data. I have tried setting pageEncoding in the page tag as well with no luck. Thanks for anyone's insight or help on this, its never fun to find out that something that had been working quite solid , up and blows up for no good reason. Current dev machine is on windows xp by the way, vanilla install of Tomcat 5.0.28. I will be setting this up on a Linux box for more testing shortly. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do I logout application(s) with Single-sign-on?
Hi, I am using Tomcat 5.0. I enabled SSO to several application. I'd like to be about to logout from any application, and force subsequent access to any application to logout as well. How would I do that? Thanks, -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do I configure Tomcat to translate UTF-8 encoded parameters
Hi, I am using Tomcat 5.0.26. I configured the HTTP connector to decode URI with setting URIEncoding=UTF-8 Connector port=8080 address=${jboss.bind.address} maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 URIEncoding=UTF-8 connectionTimeout=2 disableUploadTimeout=true/ This works for my pages that accept HTTP GET request. Unicode input parameter values that are UTF-8 encoded are properly decoded when calling request.getParameter(). However, if the request is HTTP POST, the input parameter values are mangled. Am I missing some configuration settings? I have the following simple JSP page to illustrate the problem. %@ page contentType=text/html;charset=UTF-8 % html head titleTesting UTF-8/title meta http-equiv=Content-Type content=text/html; charset=UTF-8 /head body Type in UNICODE characters in input field and click the Submit button. h1Testing UTF-8 using GET/h1 form action=%=request.getRequestURI()% method=GET input type=text name=data value='%=request.getParameter(data)%'/ input type=submit name=submit value=submit/ /form h1Testing UTF-8 using POST/h1 form action=%=request.getRequestURI()% method=POST input type=text name=data value='%=request.getParameter(data)%'/ input type=submit name=submit value=submit/ /form /body /html -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I configure Tomcat to translate UTF-8 encoded parameters
Filip Hanik (lists) wrote: doesn't URIEncoding suggest that the URI is encoded, in a POST, the parameters are passed in the body, not in the URI? Yes it does, and hence the second part of my question. Do you know how one can configure Tomcat to decode input parameters with UTF-8 encoding? -- Rick -Original Message- From: Rick Wong [mailto:[EMAIL PROTECTED] Sent: Monday, August 23, 2004 8:08 PM To: Tomcat Users List Subject: How do I configure Tomcat to translate UTF-8 encoded parameters Hi, I am using Tomcat 5.0.26. I configured the HTTP connector to decode URI with setting URIEncoding=UTF-8 Connector port=8080 address=${jboss.bind.address} maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 URIEncoding=UTF-8 connectionTimeout=2 disableUploadTimeout=true/ This works for my pages that accept HTTP GET request. Unicode input parameter values that are UTF-8 encoded are properly decoded when calling request.getParameter(). However, if the request is HTTP POST, the input parameter values are mangled. Am I missing some configuration settings? I have the following simple JSP page to illustrate the problem. %@ page contentType=text/html;charset=UTF-8 % html head titleTesting UTF-8/title meta http-equiv=Content-Type content=text/html; charset=UTF-8 /head body Type in UNICODE characters in input field and click the Submit button. h1Testing UTF-8 using GET/h1 form action=%=request.getRequestURI()% method=GET input type=text name=data value='%=request.getParameter(data)%'/ input type=submit name=submit value=submit/ /form h1Testing UTF-8 using POST/h1 form action=%=request.getRequestURI()% method=POST input type=text name=data value='%=request.getParameter(data)%'/ input type=submit name=submit value=submit/ /form /body /html -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring Tomcat 5 to not display null value as word null
Thanks for the response. Unfortunately, the objects are not necessarily obtained directly from the request parameter. Sometimes data is massaged or obtained from other sources. I was hoping that there is a generic way to override the behavior. Since you mentioned about the used of filter, I actually do have a servlet filter and a servlet request wrapper for my application. Maybe I would just override the getWriter method with a PrintWriter wrapper that outputs for null value? Let me try to see what happens if I do that... Thanks, -- Rick Justin Ruthenbeck wrote: There is no Tomcat magic configuration parameter to make this happen. Instead, take a look at HttpServletRequestWrapper. You can combine that with a Filter to override the behavior of getParameter() for the pages that need it such that it returns instead of null when no such parameter value exists. If you're unfamiliar with the above concepts, check Google, so see: http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters-p4.html Good luck, justin At 04:54 PM 8/20/2004, you wrote: Hi, I have the following JSP fragment: case 1 = %=request.getParameter(no_such_thing)% case 2 = ${requestScope[no_such_thing]} The output of the page is ... case 1 = null case 2 = ... Is there any way that Tomcat can be configured to not display the word null if the value is null? It is easy to replace the above example in case 1 by case 2, but in my case it is not easy to make such change to my existing code base (which I am migrating from another servlet engine that outputs null as ). I have pages with the input type=text elements displaying the string null when there is no default value. Thanks, -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Justin Ruthenbeck Lead Software Engineer, NextEngine Inc. justinr - AT - nextengine DOT com Confidential. See: http://www.nextengine.com/confidentiality.php __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL 1.1 / Tomcat 4.1.30
Sorry. The answer is no. JSTL 1.1 requires servlet 2.4 spec, which is implemented in Tomcat 5. -- Rick Julian wrote: Does anyone know if it's possible to use JSTL 1.1 with versions of Tomcat prior to V.5? Upgrading the server is not an option. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Configuring Tomcat 5 to not display null value as word null
Hi, I have the following JSP fragment: case 1 = %=request.getParameter(no_such_thing)% case 2 = ${requestScope[no_such_thing]} The output of the page is ... case 1 = null case 2 = ... Is there any way that Tomcat can be configured to not display the word null if the value is null? It is easy to replace the above example in case 1 by case 2, but in my case it is not easy to make such change to my existing code base (which I am migrating from another servlet engine that outputs null as ). I have pages with the input type=text elements displaying the string null when there is no default value. Thanks, -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[5.0.27] change to setContentType() causing problem in UTF-8 servlet, plz help
Hi all, I have a servlet that gets a bunch of data from the DB and returns in the form of XML, in UTF-8. This has been working with all the 5x versions until 5.0.27. It seems to be caused specifically by the change listed in the change log. org.apache.cayote.tomcat5.CayoteResponse.java -- ServletResponse.setContentType sets response encoding after getWriter was called (Bugtraq 5062838) (luehe) -- Now, my servlet is unable to set the character set to UTF-8 as illustrated in. -- public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException { Document doc = XMLUtil.getNewDocument(); . populate document . response.setContentType(text/xml;charset=UTF-8); PrintWriter out = response.getWriter(); out.write(XMLUtil.docToString(doc)); } -- Even though the setContentType is called before getWriter, the new code added in this release seems to be filtering out the charset=UTF-8. I have removed the only filter created by me in the access of said servlet, I know of nothing that would be calling the getWriter before I call setContentType. So I do not understand how to set the charset at this point. I assume there is some kind of workaround that I haven't seen. Any help would be greatly appreciated. Thanks in advance, Rick
Re: Why does nobody never answer my question ??
Yo Oliver, This is a great list, don't be discouraged. People here are really helpful. Try to search the list for related things while you are waiting, Try to phrase the question in another way... This is an open source community and answers to your questions will no doubt help others. One thing for sure, it has nothing to do with if people like you or not, so don't be afraid to post even the simplest questions... Olivier wrote: Don't you like me - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk2, apache2, tomcat5, on redhat 9 issue
Mark Eggers wrote: You will need to install the httpd-devel rpm as well. This will give you apxs and other material needed to compile mod_jk2. You might check on yum to see if mod_jk2 is already compiled. It is for Fedora Core 2. I don't know if it is for Redhat 9. I build my own Apache, mod_jk2, etc. from source so all I can tell you is what Synaptic, yum, and rhn tell me. /mde/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks Mark! That did the trick for that, however, I am getting problems when I run apxs after the make. -- # /usr/sbin/apxs -n jk2 -i mod_jk2.so /usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib/httpd/build/libtool' mod_jk2.so /usr/lib/httpd/modules /usr/lib/httpd/build/libtool --mode=install cp mod_jk2.so /usr/lib/httpd/modules/ cp mod_jk2.so /usr/lib/httpd/modules/mod_jk2.so mv: cannot move `/usr/lib/httpd/modules/' to a subdirectory of itself, `/usr/lib/httpd/modules/mod_jk2.so.so' chmod 755 /usr/lib/httpd/modules/mod_jk2.so chmod: failed to get attributes of `/usr/lib/httpd/modules/mod_jk2.so': No such file or directory apxs:Error: Command failed with rc=65536 -- My apache2 install is in /etc/httpd not /usr/lib/httpd so I don't know why it is trying put the module there. After I ran that, I copied the mod_jk2.so to /etc/httpd/modules/. but then apache does not work: I put this line in httpd.conf: LoadModule jk2_module modules/mod_jk2.so then ran this test: -- # /usr/sbin/httpd -t Syntax error on line 213 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_jk2.so into server: /etc/httpd/modules/mod_jk2.so: undefined symbol: apr_socket_send -- I'm not sure how to fix this Does anyone have any suggestions? Thanks again! Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk2, apache2, tomcat5, on redhat 9 issue
Rick Bragg wrote: Mark Eggers wrote: You will need to install the httpd-devel rpm as well. This will give you apxs and other material needed to compile mod_jk2. You might check on yum to see if mod_jk2 is already compiled. It is for Fedora Core 2. I don't know if it is for Redhat 9. I build my own Apache, mod_jk2, etc. from source so all I can tell you is what Synaptic, yum, and rhn tell me. /mde/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks Mark! That did the trick for that, however, I am getting problems when I run apxs after the make. -- # /usr/sbin/apxs -n jk2 -i mod_jk2.so /usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib/httpd/build/libtool' mod_jk2.so /usr/lib/httpd/modules /usr/lib/httpd/build/libtool --mode=install cp mod_jk2.so /usr/lib/httpd/modules/ cp mod_jk2.so /usr/lib/httpd/modules/mod_jk2.so mv: cannot move `/usr/lib/httpd/modules/' to a subdirectory of itself, `/usr/lib/httpd/modules/mod_jk2.so.so' chmod 755 /usr/lib/httpd/modules/mod_jk2.so chmod: failed to get attributes of `/usr/lib/httpd/modules/mod_jk2.so': No such file or directory apxs:Error: Command failed with rc=65536 -- My apache2 install is in /etc/httpd not /usr/lib/httpd so I don't know why it is trying put the module there. After I ran that, I copied the mod_jk2.so to /etc/httpd/modules/. but then apache does not work: I put this line in httpd.conf: LoadModule jk2_module modules/mod_jk2.so then ran this test: -- # /usr/sbin/httpd -t Syntax error on line 213 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_jk2.so into server: /etc/httpd/modules/mod_jk2.so: undefined symbol: apr_socket_send -- I'm not sure how to fix this Does anyone have any suggestions? Thanks again! Rick oops, /etc/httpd/modules is a symlink of /usr/lib/httpd/modules/ But I still don't know why I am haveing the errors running apxs... Thanks again Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jk2, apache2, tomcat5, on redhat 9 issue
Hello; I am trying to install tomcat so that many of my users can use jsp with there virtual hosts in apache. I have looked through the archives and docs on this and there seems to be good info, but I am running into a strange problem when I try to build the mod_jk2 for apache I have no apxs installed on my system. what is the apxs? and why do I not have it anywere on my system. I have apache2 installed via rpm and I cannont build the mod_jk2 Is there a binary that I can download for this? Any help building this module and setting up virtual hosts would be great! Thanks Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP expression with null value
Hi, Should a JSP expression evaluate a null expression as a string 'null', or as an empty string ''? In other words, should '%=null%' be evaluated to 'null' or ''? Thanks, -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How difficult is it to upgrade from 4.1.24 to 5.0.19?
Can I *just*: 1. copy my existing contexts into the 5.0.19 webapps directory 2. copy my existing jk2.properties into the 5.0.19 conf directory 3. change my $TOMCAT_HOME env variable to point to the new 5.0.19 directory 4. contunue to use my existing workers2.properties in httpd/conf/ In other words... Is it just like upgrading 4.1.24 to 4.1.27 ? Thanks, -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.aitsupport.com * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: All of your e-mails are coming to our in box on outlook what do we do?
- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Douglas Hodgeman wrote: Hello: Could you please tell me how we unsubscribe to this website. We are getting copies of all of your inbox e-mails and it is taking up tunes of room on our computer. This occurred when I subscribed to St Odillia.org/soar4jobss web page. Any help you could give would be appreciated. Thanks, Sue Hodgeman -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.aitsupport.com * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connector build error
Am trying to build the .so connector to integrate tomcat 4.1.30 with apache 2.0.48 on debian linux. Both tomcat and apache are up and running just fine individually, but need a mod_jk2.so Ajp13 connector to get a servlet working. The current connectors source distribution jakarta-tomcat-connectors-jk2-2.0.2-src fails as follows: -- $ cd jakarta-tomcat-connectors-jk2-2.0.2-src/jk jk$ ant Buildfile: build.xml detect: [echo] jakarta-tomcat-connectors prepare: BUILD FAILED /fs/hdb9/hdc4/home/gnu/net/www/apache/connectors/jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build.xml:105: Warning: Could not find file /fs/hdb9/hdc4/home/gnu/net/www/apache/connectors/jakarta-tomcat-connectors-jk2-2.0.2-src/coyote/build/lib/tomcat-coyote.jar to copy. --- Sure enough, build/lib does not contain any tomcat-coyote.jar file. In fact, lib is totally empty. The current connector source distro appears to be missing some needed files. Well, all I need is the binary connector, so let's just try: jk$ ant native Buildfile: build.xml jkant: BUILD FAILED /fs/hdb9/hdc4/home/gnu/net/www/apache/connectors/jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build.xml:232: srcdir /fs/hdb9/hdc4/home/gnu/net/www/apache/connectors/jakarta-tomcat-connectors-jk2-2.0.2-src/jk/jkant/java does not exist! Turns out it is looking for a file jkant/java/ant.tasks, which also does not exist in the current distro. Can anyone supply 1. tomcat-coyote.jar 2. ant.tasks or, better stiil 3. A complete version of the connectors source distro that works? Thanks very much. PS: apache 2.0.48 built flawlessly using 'make' on debian. Real slick! The connectors source should do at least as well since it is java-based (and java is less error prone than c ;-) -- Rick Lutowski Principal, JReality [EMAIL PROTECTED] http://www.jreality.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connector build error
Adam Fowler wrote: Hi, This made me a bit miffed too. The developers have changed the jk/native2/README.txt to explain how to do it natively. Here is the post to the dev list below. If you get some annoying message saying could not find library -lapr-0 then fear not. You either: a) edit the jk/native2/server/apache2/Makefile file. Line 57 I think where it says -lapr-0 and change it to -lapr. then run make again. b) Install libapr-0. I chose the first option and it worked fine. It puts the so file in /build/jk2/apach2/ tho so be warned. Its a horrible horrible hack but it will allegedly be fixed in the upcoming 2.0.4 release. Yes, this works. Also, apache 2.0.48 contains an apr-0 lib, so the -1apr hack was not necessary with 2.0.48 Thanks for the assistance! -- Rick Lutowski Principal, JReality [EMAIL PROTECTED] http://www.jreality.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fwd: Net Integrator Virus Alert
I have unsubscribed from this group. please stop sending me email. about 90% of the email from this group contain viruses. --- Virus Scanner [EMAIL PROTECTED] wrote: Date: Sat, 20 Mar 2004 18:55:35 +0800 From: Virus Scanner [EMAIL PROTECTED] Subject: Net Integrator Virus Alert WARNING: a virus (probably I-Worm.NetSky.d) or suspicious attachment was detected and removed from the following message from [EMAIL PROTECTED] to [EMAIL PROTECTED] Some of the content may still be readable. ATTACHMENT part 2 message/rfc822 name=original.eml From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: My details Date: Sat, 20 Mar 2004 13:53:23 -0800 Please read the attached file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = Use the link below to send a Nice Card today! http://nicecards.com/partner.cgi?p15602 please reply to [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Stubborn simple servlet
An trying to convert a simple servlet of the HelloWorld variety (pure HTML -- no JSP, EJB, JDBC, etc) from tomcat 3.2.3 to 4.1.30. It works fine with tomcat 3.2.3 in standalone mode but gives a 404 error in 4.1.30 with both netscape and mozilla. The 4.1.30 demos work so tomcat is installed ok. My servlet's web.xml is unchanged from 3.2.3, where it works. The servlet Context was added to the demo tomcat conf/server.xml file in the 4.1.30 style and the demos still work (so the conf file cannot be botched too badly!) My servlet even shows up in the 'manager' listing as deployed and active. The logs show no errors either on tomcat start or stop. Everything looks fine except for the darn 404 error. Have tried inserting println's into my servlet to see if the servlet is actually entered on the assumption that servlet println's will get dumped to the log files. None of this output shows up in the logs, so either 4.1.30 is not executing the servlet or my println assumption is false (or both). I'm at a loss what to do next to fix this config problem (as it must surely be). Any suggestions appreciated. -- Rick Lutowski Principal, JReality [EMAIL PROTECTED] http://www.jreality.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stubborn simple servlet
Wendy Smoak wrote: From: [EMAIL PROTECTED] An trying to convert a simple servlet of the HelloWorld variety (pure HTML -- no JSP, EJB, JDBC, etc) from tomcat 3.2.3 to 4.1.30. It works fine with tomcat 3.2.3 in standalone mode but gives a 404 error in 4.1.30 with both netscape and mozilla. What URL are you visiting when you get the 404 error? Any chance it has /servlet/ in it? If so, read here: http://test.javaranch.com/wiki/view?InvokerServlet Probably not the problem. The following Context's were added to the end of the distro server.xml: !-- JReality contexts !-- equiv to apache htdocs -- this one works and gives 4.1.30 access to the vanilla html pages -- Context path=/jreality docBase=jreality debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=jreality_log. suffix=.txt timestamp=true/ /Context !-- for support of an applet, not a servlet -- does not work, but one problem at a time! -- Context path=/surveyor docBase=surveyor debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=surveyor_log. suffix=.txt timestamp=true/ /Context !-- the Stubborn Simple Servlet -- Context path=/ship_pix docBase=ship_pix debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=ship_pix_log. suffix=.txt timestamp=true/ /Context The above pairs with the following in the servlet web.xml file: servlet servlet-nameLdjServlet/servlet-name description Generates dynamic pages for the LDJ web site. Currently this consists of frame list pages for displaying selected ship photos. The pages generated have the names pix_dir.html for the list of ship photo subdirectories (the upper left list of the photo frame) and pix_[subdir].html for the list of photos in one subdirectory (the lower left list of the photo frame). /description servlet-classcom.jreality.ldj.l_ships.LdjServlet/servlet-class /servlet servlet-mapping servlet-nameLdjServlet/servlet-name url-pattern*.pxhtml/url-pattern /servlet-mapping The above does not appear to match the 'invoker' patterns shown in the referenced URL's. The above works in tomcat 3.2.3. -- Rick Lutowski Principal, JReality [EMAIL PROTECTED] http://www.jreality.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stubborn simple servlet
Mike Curwen wrote: What URL are you using to access a given page (one that gives you a 404)? something like: http://www.foo.com/ship_pix/index.pxhtml ? That is the next step. Currently just trying to get standalone working, so the URL is more like: http://localhost:8080/jreality/ldj/l.ships/servlet/pix.pxhtml?base=CV10 This is the resolved path that appears in the browser. The link in the html file is a href=servlet/pix.pxhtml?base=CV10 The parent html file is in jreality/ldj/l.ships which is correctly resolved by 4.1.30 via the /jreality Context. On the off chance that /servlet may be a problem in 4.1.30, also tried changing the path to pix_servlet, i.e., http://localhost:8080/jreality/ldj/l.ships/pix_servlet/pix.pxhtml?base=CV10 in the web.xml and the parent html files. Same 404 error: HTTP status 404 - the resource /jreality/ldj/l.ships/pix_servlet/pix.pxhtml?base=CV10 is not available -- Rick Lutowski Principal, JReality [EMAIL PROTECTED] http://www.jreality.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stubborn simple servlet
Wendy Smoak wrote: Rick Lutowski wrote: Probably not the problem. Okay, but you still haven't told us what URL gives the 404. That you're getting a 404 means that Tomcat cannot map the URL you're providing to anything it has to offer. Context path=/ship_pix docBase=ship_pix debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=ship_pix_log. suffix=.txt timestamp=true/ /Context Where is the 'ship_pix' directory and what does it contain? ship_pix is a soft link in webapps to the actual directory. In case the link might be causing the problem, also tried an absolute path in the Context, e.g.: Context path=/ship_pix docBase=/path_to_base_dir as well as a relative path. e.g., Context path=/ship_pix docBase=../../..//path_to_base_dir No difference. 404. The /jreality Context also uses a link in webapps and works fine in both 3.2.3 and 4.1.30. So 4.1.30 accepts a link here. aside I did discover that 3.2.3 accepted a link to jar files in WEB-INF/lib but 4.1.30 did not. So I moved all the jars physically into WEB-INF/lib. After that all startup errors in the 4.1.30 log files went away and the jars are now deploying properly (based on the logs). /aside Are you sure that the context is starting? Any errors in catalina.out, or in the context log files on startup, or right after you get the 404? No errors in any log files. All log messages are INFO and appear to reflect normal operation. No, am not sure the context is starting. 3.2.3 printed context activation messages to the screen on startup but 4.1.30 does not. Rather 4.1.30 prints log messages about contexts being ignored (or somesuch) if there are errors. Assume this means that 'no news is good news' in the logs. The logs are no longer printing bad news about contexts. That's all I know for sure. My money is on a config problem. Personally I do not mess with server.xml other than to change the hostname and port number. So if I had to debug this problem locally, I would put server.xml back the way it was, put the contexts directly under 'webapps' and watch the logs closely. Am sure you are right; am also assuming it is a config problem. Have also tried deleting the Context's from server xml and letting it deploy with defaults based on what is in webapps. According to the logs the jars deploy the same as before. Same problem -- 404 -- so went back to explicit Context in server.xml since I know that worked in 3.2.3. Also allows some refinements like separate log files, which _is_ working so the Context's are at least partly correct. I usually get these things to go by beating them 'every which way but loose but this time nothing has been able to 'make my day.' Appreciate the help. -- Rick Lutowski Principal, JReality [EMAIL PROTECTED] http://www.jreality.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stubborn simple servlet
Mike Curwen wrote: Is the servlet configured under the jreality webapp or the ship_pix one? The /ship_pix context. No servlets are under /jreality If it's the jreality, try linking: a href=pix.pxhtml?base=CV10 if it's the other, try: a href=http://localhost:8080/ship_pix/pix.pxhtml?base=CV10; Good thought, but no joy: 404 -- /ship_pix/pix.pxhtml is not available With a href=http://localhost:8080/ship_pix/pix_servlet/pix.pxhtml?base=CV10; the error is 404 -- /ship_pix/pix_servlet/pix.pxhtml is not available your link has /servlet in it, so yes, the invoker servlet being off by default in 4.1.30 is likely(?) coming into play. Frames always confuse the issue for me, so maybe I'm not entirely understanding your page layouts and how/when servlets are being called. Rechecked server.xml and you are right, invoker is not included. This might be the problem. Will look into enabling it (unless there is another way to launch simple servlets.) Also , when did 'pix_servlet' come into it? what is that? pix_servlet is just a rename of the servlet subdirectory in case 4.1.30 blacklists servlet for being a 'dirty word'. However, the rename made no difference. -- Rick Lutowski Principal, JReality [EMAIL PROTECTED] http://www.jreality.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stubborn simple servlet
Rick Lutowski wrote: Mike Curwen wrote: if it's the other, try: a href=http://localhost:8080/ship_pix/pix.pxhtml?base=CV10; With a href=http://localhost:8080/ship_pix/pix_servlet/pix.pxhtml?base=CV10; the error is 404 -- /ship_pix/pix_servlet/pix.pxhtml is not available With further fussing, this works! I had changed web.xml to key on /pix_servlet/*.pxhtml as an experiment. When I changed it back to the original *.pxhtml and used the Context base 'ship_pix' in the URL (either absolute or relative), everything started clicking. Thanks for the help! :-)) BTW -- Read in some web doc that the plan is to write a tool tool for _generating_ all these config files rather than having to tweak them by hand. A good config tool would certainly have helped avoid a lot of head bashing. If anyone on this list knows of someone who is contemplating writing a tomcat config tool, please let me know. I know some requirements methodology approaches that can be applied when scoping such tools to help make them more user friendly and more maintainable. Be happy to teach these techniques to the folks involved. Thanks again. -- Rick Lutowski Principal, JReality [EMAIL PROTECTED] http://www.jreality.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Hosting
Hello: Does anyone know of a good hosting company that hosts Java? If your needs are modest, you might look at http://www.myjavaserver.com It boasts some decent facilities for application deployment, but no ssh/telnet access. There are other constraints, but for my simple requirements (i.e. learning), it's suitable. Check out: http://www.myjavaserver.com/~rickumali -- Rick Umali[EMAIL PROTECTED]www.rickumali.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple instructions
Michael: I am trying to learn how everything slots together with Jakarta and other things (like openejb etc) has anyone seen or could help put together the Dummys guide to Installing Configuring and Understanding Tomcat I'm on a similar learning curve, experimenting and playing with Tomcat to learn about servlets and JSPs. I've had good luck with: http://www.coreservlets.com/Apache-Tomcat-Tutorial/ The author is Marty Hall, who wrote Core Servlets and More Servlets (both from Sun Microsystems Press/Prentice-Hall). What I like is that his tutorial has just enough Tomcat config stuff so that you can be productive working through simple examples. Combine his tutorial with the Tomcat documentation, and you're on your way! Rick Umali (http://www.myjavaserver.com/~rickumali/) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Attention, Tomcat Web pages' maintainer
I'm writing to this mailing list about an item on the Tomcat FAQ's page about this mailing list, http://jakarta.apache.org/tomcat/faq/tomcatuser.html , which is causing me problems. (Why here? Because the Contacting Us page for jakarta.apache.org says to do so. See section The Jakarta Website on http://jakarta.apache.org/site/contact.html ) Anyhow, http://jakarta.apache.org/tomcat/faq/tomcatuser.html includes the following: For those who can't handle that kind of traffic, you can also get it in digest form. If you post to tomcat-user, use good etiquette [link], ask good questions [link] The good questions link goes directly to an essay that I co-wrote with Eric S. Raymond, Asking Questions the Smart Way. Now, Eric and I are delighted that so many projects make use of our essay to help their users, but unfortunately vast numbers of people get mislead by links like that into sending their technical problems to _us_. Yesterday, I got three Tomcat configuration questions in my personal mailbox, for example. (This problem is not unique to Tomcat's use of our essay: I've been chasing down misleading hyperlinks ever since we wrote the piece.) _Please_ change the wording on that Web page to clarify that Tomcat users should not send their Tomcat questions to Eric and me. Thank you. Also, further queries to me will need to be via direct mail, because I will not be remaining on this mailing list. -- Cheers,There are only 10 types of people in this world -- Rick Moen those who understand binary arithmetic and those who don't. [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with Tomcat5 session replication.
Thanks Apu, I knw it was going to be something simple and stupid on my part, as these things are always are. I added the distributable/ to my web.xml and they are at least trying to replicate the sessions over to each other. Me thinks a lot of them do not implement the Serializable interface. But at least I am getting exceptions(who ever said exceptions are a bad thing? =)). Thanks again for the help from people in this mailing list, Rick Szeto -Original Message- From: Apu Shah [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 7:43 PM To: Tomcat Users List Subject: Re: Problem with Tomcat5 session replication. also make sure that the web.xml for the webapp has the distributable / element and all session vars are serializable. apu On Wed, 11 Feb 2004 15:13:39 -0800 Filip Hanik \(lists\) [EMAIL PROTECTED] wrote: on RH 9 you must also set, export LD_ASSUME_KERNEL=2.4 Filip -Original Message- From: Rick Szeto [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 2:55 PM To: tomcat Subject: Problem with Tomcat5 session replication. Hi all, I am having quite a bit of trouble getting the sessions from one node in the cluster to the other nodes of the cluster. The multicast is working fine as I can see that each of the nodes can recognize when a new node is brought up as well as when they are removed. No where in the logs are there mention of sessions being replicated and/or errors encounter while trying to do so. I have Apache in front doing URL rewriting and forwarded via proxy so the client does not know the difference. I have pasted the relevant snippets from the server.xml, which are identical on both nodes. I am running Tomcat 5.0.18 with one node running on Windows XP and the other node on RH 9.0(which should not make any difference). I guess that what I am hoping for is someone can look at my replication config and tell me that I did something stupid. I rather have that happen then not being able to get the sessions replicated. =) ps. Out of curiousity, I have been unable to find any documentation on the JDBCManager, reference here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html Thanks in advance, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with Tomcat5 session replication.
Hi all, I am having quite a bit of trouble getting the sessions from one node in the cluster to the other nodes of the cluster. The multicast is working fine as I can see that each of the nodes can recognize when a new node is brought up as well as when they are removed. No where in the logs are there mention of sessions being replicated and/or errors encounter while trying to do so. I have Apache in front doing URL rewriting and forwarded via proxy so the client does not know the difference. I have pasted the relevant snippets from the server.xml, which are identical on both nodes. I am running Tomcat 5.0.18 with one node running on Windows XP and the other node on RH 9.0(which should not make any difference). I guess that what I am hoping for is someone can look at my replication config and tell me that I did something stupid. I rather have that happen then not being able to get the sessions replicated. =) ps. Out of curiousity, I have been unable to find any documentation on the JDBCManager, reference here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html Thanks in advance, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with Tomcat5 session replication.
Sorry, my bad... Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster name=FilipsCluster debug=10 serviceclass=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.1.2.3 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000 tcpThreadCount=2 tcpListenAddress=auto tcpListenPort=4001 tcpSelectorTimeout=100 printToScreen=true expireSessionsOnShutdown=false useDirtyFlag=false replicationMode=synchronous / Valve className=org.apache.catalina.cluster.tcp.ReplicationValve debug=9 filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ Thanks again, Rick Szeto -Original Message- From: Rick Szeto [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 5:55 PM To: tomcat Subject: Problem with Tomcat5 session replication. Hi all, I am having quite a bit of trouble getting the sessions from one node in the cluster to the other nodes of the cluster. The multicast is working fine as I can see that each of the nodes can recognize when a new node is brought up as well as when they are removed. No where in the logs are there mention of sessions being replicated and/or errors encounter while trying to do so. I have Apache in front doing URL rewriting and forwarded via proxy so the client does not know the difference. I have pasted the relevant snippets from the server.xml, which are identical on both nodes. I am running Tomcat 5.0.18 with one node running on Windows XP and the other node on RH 9.0(which should not make any difference). I guess that what I am hoping for is someone can look at my replication config and tell me that I did something stupid. I rather have that happen then not being able to get the sessions replicated. =) ps. Out of curiousity, I have been unable to find any documentation on the JDBCManager, reference here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html Thanks in advance, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Parameters from context.xml not being picked up.
Hi, I am exploring TC 5.0.18 and found that the Parameter are not being set to the ServletContext. Here is my context.xml: Context path=/explorer docBase=explorer debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=explorer_log. suffix=.txt timestamp=true/ Environment name=maxExemptions type=java.lang.Integer value=15/ Parameter name=country value=Canada override=false/ /Context In my InitServlet.init() method, I call: ServletConfig conf = .. ServletContext ctx = conf.getServletContext(); String paramValue = ctx.getInitParameter(country); paramValue is NULL. Is this a know bug/issue? Or am I not doing somthing right? Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Parameters from context.xml not being picked up.
Thanks will try that. Rick Daniel Gibby wrote: I believe the Parameter line is wrong. It should be in the format of context-param param-nameSyslogConfig/param-name param-value/usr/local/etc/rr/sales-syslog.xml/param-value descriptionFile containing the Syslog configuration for this webapp/description /context-param And this should be in your web.xml... I don't think that you can put the parameters into server.xml in the context... maybe you can, but not that I know about. Daniel Gibby Rick Szeto wrote: Hi, I am exploring TC 5.0.18 and found that the Parameter are not being set to the ServletContext. Here is my context.xml: Context path=/explorer docBase=explorer debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=explorer_log. suffix=.txt timestamp=true/ Environment name=maxExemptions type=java.lang.Integer value=15/ Parameter name=country value=Canada override=false/ /Context In my InitServlet.init() method, I call: ServletConfig conf = .. ServletContext ctx = conf.getServletContext(); String paramValue = ctx.getInitParameter(country); paramValue is NULL. Is this a know bug/issue? Or am I not doing somthing right? Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deployment with multiple contexts using the same docBase in Tomcat5
That just doesn't seem right to me. How then do you deploy branded sites without deploying the same common code(possibly different version of it) in each version of the site? Rick Shapira, Yoav wrote: Howdy, You wouldn't. One webapp = one context = one docBase. Yoav Shapira Millennium ChemInformatics -Original Message- From: Rick Szeto [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 21, 2004 4:38 PM To: Tomcat Users List Subject: Deployment with multiple contexts using the same docBase in Tomcat5 Hi, I am trying to deploy multiple webapps using the same docBase. How would I go about this? Say that I have a baseapp.war that has all the content files and java class and libraries as well as the web.xml that are common to all the different contexts. Then I would have appctx1.war, appctx2.war, .. ,etc, where each would have it's own context.xml file as well as other context dependent files. I have tried to deploy in this scenario and unfortuneately, Tomcat 5 created the /baseapp context without creating the /appctx1, /appctx2, .. etc contexts. The main thing for us is to be able to deploy the contexts independantly and be able to update the docBase which gets applied to all the contexts. Any help would be greatly appreciated, Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clustering question...
As I was not involved in the design decision, I can not say whether or not that it is a good call or not. But the reason that we need application context replication is that the entire site serves up relatively static data(infrequent updates) to all of it the users. They did not feel that hitting the DB every time a page is accessed was efficient. Rick Filip Hanik wrote: application context data doesn't get replicated, since this is not tied to a user, hence it doesn't serve any purpose in fail over. ie, what ever got stored in application context on server A, should have got stored on B by the same mechanism, not by session replication. Is there a huge need to replicate context data? Filip - Original Message - From: Rick Szeto [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 19, 2004 1:53 PM Subject: Clustering question... Hi All, I have question about synchronizing data within the application context. If the data of a webapp's application context changes within one of the nodes in the cluster, how does the other nodes get the updated application context data? Is it handle the same way as user session data(via some session manager implementation)? Or does the change(s) get distributed? Thanks for any help you can give, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Quick context question.
Hi, Does Tomcat 5 allow starting, stopping and/or restarting of a context without affecting the other contexts of the same webapp? Also, can a context be stopped or restarted gracefully(ie keep running until all of the sessions are dead)? Thanks, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deployment with multiple contexts using the same docBase in Tomcat5
Hi, I am trying to deploy multiple webapps using the same docBase. How would I go about this? Say that I have a baseapp.war that has all the content files and java class and libraries as well as the web.xml that are common to all the different contexts. Then I would have appctx1.war, appctx2.war, .. ,etc, where each would have it's own context.xml file as well as other context dependent files. I have tried to deploy in this scenario and unfortuneately, Tomcat 5 created the /baseapp context without creating the /appctx1, /appctx2, .. etc contexts. The main thing for us is to be able to deploy the contexts independantly and be able to update the docBase which gets applied to all the contexts. Any help would be greatly appreciated, Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clustering question...
Ok, thanks for your quick response. Rick [EMAIL PROTECTED] wrote: As of now I don' think the Tomcat clustering code of Filip supports any of what you ask. The only thing replicated is the session and the date within. The principal is not replicated as of yet. (I think Filip is working on that) You will have to find another centralized spot to store those data for each node to access. Jean-Philippe BĂ©langer CGI Rick Szeto wrote: Hi All, I have question about synchronizing data within the application context. If the data of a webapp's application context changes within one of the nodes in the cluster, how does the other nodes get the updated application context data? Is it handle the same way as user session data(via some session manager implementation)? Or does the change(s) get distributed? Thanks for any help you can give, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Clustering question...
Hi All, I have question about synchronizing data within the application context. If the data of a webapp's application context changes within one of the nodes in the cluster, how does the other nodes get the updated application context data? Is it handle the same way as user session data(via some session manager implementation)? Or does the change(s) get distributed? Thanks for any help you can give, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Upgrading mod_jk to mod_jk2 - problem with uri map to old /servlet
I am in the process of upgrading my servers from: apache 1.3 , jakarta-tomcat-3.2.1, mod_jk 1.2 to: apache 2 , jakarta-tomcat-4.1.29, mod_jk 2 I am having problems finding information on how to forward calls to sevlets from jsp's in the context. old mod_jk 1.2 JkMount /mycontext/*.jsp worker2 JkMount mycontext/servlet/* worker2 New mod_jk Location /*.jsp JkUriSet worker ajp13:localhost:8025 /Location Location /bobjects/servlet/* JkUriSet worker ajp13:localhost:8025 /Location I have the workers2.properties file if anyone needs it. My problems is that I have a number of applications that were built to use the /mycontext/servlet/servlets.path-to-servlet format. When I call the servlets from the jsp it comes back with an error requested resource not available error - (it can't find the path to the servlets) I don't want to rewrite a large number of jsp files and controllers. Is there a way to use the new mod_jk2 JkUriSet to allow these calls to the /mycontext/servlet/ without having to fix a large number of jsp files? Thanks in advance Rick.
RE: Tomcat OpenJMS Design Pattern?
Hi Yoav, I was looking for a basic design model, that worked well, such as a high level class diagram( classes,interfaces, etc ) that shows a good way to implement openJMS within tomcat. Some code snipets would be nice if possible. As I said, my main consern in Point-to-Point Queue processing, I don't have any need for Subscription / Topic. Basically I was looking to have some manager class that on tomcat startup, would read in a config file, then create listeners for all specified queues. It my current tests, I have been having trouble getting the listeners to work properly. I have no trouble putting messages in the queue, but my listener some how is removing the item from the queue but not calling the onMessage() method, so I never get a chance to handle the message, it just vanishes. My listeners have this structure.. class FtpQueueListener implements javax.jms.MessageListener { private QueueSession session; private QueueReceiver receiver; FtpQueueListener() close() // closes jms session // clears the reciever's message listener.. receiver.setMessageListener(null); startListener() // gets a jms connection,session, receiver and bind them to local variabls // sets the reciever's message listener to self.. receiver.setMessageListener(this); onMessage() // handles messages, but seems to never get called, broken } I was reading some info that talked about using the MessageListner.run() method in a threaded sense. You need to make the class implement runnable. Is this required for doing async message handling? Thanks for your help, Rick -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 5:26 AM To: Tomcat Users List Subject: RE: Tomcat OpenJMS Design Pattern? Howdy, I've used and use OpenJMS with tomcat all the time, including in several production systems. What are you looking for specifically? A document? Code that sends messages to an OpenJMS queue/topic, received from an OpenJMS queue/topic, all of the above? I've actually gone from using tomcat's JNDI support to specifying the JMS connection parameters in an app-specific configuration file and creating the JMS objects myself. But I had it working via tomcat's JNDI before as well. Yoav Shapira Millennium ChemInformatics -Original Message- From: Gavin, Rick [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 6:25 PM To: Tomcat Users List Subject: Tomcat OpenJMS Design Pattern? Hi All, Just wondering if any could post a working design pattern for using openJMS or another open JMS engine with tomcat, preferably a model using asynchronous queue message handling. I figured someone around here has done it and I would rather use a tried and true model. Looking for some basics about best intregration method, and or for dealing with async message Handling. I currently have openJMS setup using persistent Database storage, using JNDI content lookup to Get the JMS connection factory, is this better looked up once and bound to servlet context as an Application scope variable, etc, etc? Thanks for you any help, Rick This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat OpenJMS Design Pattern?
Hi All, Just wondering if any could post a working design pattern for using openJMS or another open JMS engine with tomcat, preferably a model using asynchronous queue message handling. I figured someone around here has done it and I would rather use a tried and true model. Looking for some basics about best intregration method, and or for dealing with async message Handling. I currently have openJMS setup using persistent Database storage, using JNDI content lookup to Get the JMS connection factory, is this better looked up once and bound to servlet context as an Application scope variable, etc, etc? Thanks for you any help, Rick
JMS Provider w/ Tomcat?
Hi All, Just wondering if Tomcat 5 included a JMS Engine/Provider, or if not, what is recommended? Thanks for any help, Rick
RE: JMS Provider w/ Tomcat?
Thanks Yoav, I'll give it a look, I found the Sun implementation and will try that also. Thanks again, Rick -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2003 11:35 AM To: Tomcat Users List Subject: RE: JMS Provider w/ Tomcat? Howdy, Nope, tomcat doesn't include a JMS provider. I've found OpenJMS to be an excellent stand-alone JMS provider, and it's very easy to connect to an OpenJMS server using their openjms-client jar from any program, including servlets running in tomcat. Yoav Shapira Millennium ChemInformatics -Original Message- From: Gavin, Rick [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2003 2:29 PM To: Tomcat Users List ([EMAIL PROTECTED]) Subject: JMS Provider w/ Tomcat? Hi All, Just wondering if Tomcat 5 included a JMS Engine/Provider, or if not, what is recommended? Thanks for any help, Rick This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to disable info and warning messages at tomcat startup?
I have searched through the mailing list archive and the FAQ and I can't seem to fins a way to disable the INFO and WARNING messages that tomcat outputs at startup. Here are some of the messages Oct 31, 2003 1:43:53 PM org.apache.commons.modeler.Registry loadRegistry INFO: Loading registry information Oct 31, 2003 1:43:53 PM org.apache.commons.modeler.Registry getRegistry INFO: Creating new Registry instance Oct 31, 2003 1:43:53 PM org.apache.commons.modeler.Registry getServer INFO: Creating MBeanServer Oct 31, 2003 1:43:54 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8080 Starting service Tomcat-Standalone Apache Tomcat/4.1.27 Oct 31, 2003 1:43:55 PM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Depends-On Oct 31, 2003 1:43:55 PM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Depends-On Also, if anyone how to fix the WARNING: Duplicate name in Manifest: Depends-On message that would be much appreciated. -- Rick
Re: Removing extra white spaces in source
Also, the title is about white space in source, but in the message he talks about removing white space from generated jsp and servlet?? Generated servlet is a .class file and I would be very reluctant to diddle with the tomcat generated .jsp files. And I dont see the need to ever mess with those, so I don't think he really means generated files. There are several code beautifiers around if that is what he is really looking for. Shapira, Yoav wrote: Howdy, It simple: what does he mean by extra white space? White space at the end of a line? White space preceding text? White space in the middle of words? This is a text-processing problem. Depending on the requirements, writing such a text processors can be trivial or highly complex. Yoav Shapira Millennium ChemInformatics -Original Message- From: Oscar Carrillo [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 12:52 PM To: Tomcat Users List Subject: RE: Removing extra white spaces in source Whatdoyoumean? On Fri, 24 Oct 2003, Shapira, Yoav wrote: Howdy, That depends on the definition of extra ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Luiz Ricardo [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 1:51 PM To: Tomcat-Users List Subject: Removing extra white spaces in source Hi everyone, I would like to know if someone here knows some filter that removes extra white spaces from content generated by servlet or jsp. Luiz Ricardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jakarta connector, jBoss 3.0.6 and iPlanet version 6
Hi all I've compiled version 4.1.27 of the jakarta nsapi_redirector, but can't seem to get anything to redirect. jBoss is for sure working, because I can access the examples directly, using http://norman:8080/idm/ui/ping.jsp However, if I try to access these same examples using http://norman/idm/ui/ping.jsp I get a 404 error - page not found. In my limited understanding of this whole affair, that means that the redirector isn't redirecting. I do have all the proper NameTrans directives in my obj.conf. Any takers?? TIA Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Waiting for 4 instance(s) to be deallocated?
OK. I know I must be doing something stupid, in order to get this message. What is it? StandardWrapper[/ai:jsp]: Waiting for 4 instance(s) to be deallocated -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Calendar Tool?
Anyone know of a decent calendar tool / server that would integrate well with java/jsp/jdbc/tomcat? Thanks, -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Calendar Tool?
I thought that I had read something about a calendaring effort at Jakarta or maybe at tigris.org, but went looking and can't find what I thought I remembered. Rick Roberts wrote: Anyone know of a decent calendar tool / server that would integrate well with java/jsp/jdbc/tomcat? Thanks, -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SSL and tomcat behind apache
Hi all, Question about running SSL through apache and using tomcat for jsp. In the tomcat documentation it says that tomcat only needs to be configured if it is running stand alone. I'm using apache 2 with openssl for the front end. Here's my problem: when I go to the https server (apache) the lock icon turns on in IE, but as soon as I hit a jsp page the lock icon turns off. With Mozilla it shows a lock with a red line through it. Did I miss something in the setup documentation? Rick
Re: Jan West/US/AM/TSA is out of the office.
He just got a special filter - trash until 26Aug03 You may want to do the same. Stuart MacPherson wrote: This will happen 50 times a day until 26th august... Ahh -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SSL and tomcat behind apache
the setup is Apache 2 tomcat 4.1.27 mod_jk2 connectors 4.1.27 Rick -Original Message- From: Stuart Stephen [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 8:51 AM To: Tomcat Users List Subject: RE: SSL and tomcat behind apache Which connector are you using to link tomcat to apache? -Original Message- From: Bradberry, Rick [mailto:[EMAIL PROTECTED] Sent: 18 August 2003 13:47 To: 'Tomcat Users List' Subject: SSL and tomcat behind apache Hi all, Question about running SSL through apache and using tomcat for jsp. In the tomcat documentation it says that tomcat only needs to be configured if it is running stand alone. I'm using apache 2 with openssl for the front end. Here's my problem: when I go to the https server (apache) the lock icon turns on in IE, but as soon as I hit a jsp page the lock icon turns off. With Mozilla it shows a lock with a red line through it. Did I miss something in the setup documentation? Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SSL and tomcat behind apache
Thanks for the response, I added scheme and secure to the Connector with the same results. not sure what you mean by mounting the connector in httpd.conf or ssl.conf. here is my connector definition in tomcat/conf/server.xml Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=0 useURIValidationHack=false scheme=https secure=true protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ in apache2/conf/httpd.conf I have: LoadModule jk2_module modules/mod_jk2.so SSL works within apache. What about the workers.properties or the jk2.properties? any changes needed here? Rick -Original Message- From: Stuart Stephen [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 9:09 AM To: Tomcat Users List Subject: RE: SSL and tomcat behind apache In your httpd.conf or ssl.conf in the virtual hosts, this should be where the connectors are mounted. Also, in the server.xml make sure that your using the org.apache.coyote.tomcat4.CoyoteConnector on port 8443, scheme=https and secure=true -Original Message- From: Bradberry, Rick [mailto:[EMAIL PROTECTED] Sent: 18 August 2003 13:56 To: 'Tomcat Users List' Subject: RE: SSL and tomcat behind apache the setup is Apache 2 tomcat 4.1.27 mod_jk2 connectors 4.1.27 Rick -Original Message- From: Stuart Stephen [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 8:51 AM To: Tomcat Users List Subject: RE: SSL and tomcat behind apache Which connector are you using to link tomcat to apache? -Original Message- From: Bradberry, Rick [mailto:[EMAIL PROTECTED] Sent: 18 August 2003 13:47 To: 'Tomcat Users List' Subject: SSL and tomcat behind apache Hi all, Question about running SSL through apache and using tomcat for jsp. In the tomcat documentation it says that tomcat only needs to be configured if it is running stand alone. I'm using apache 2 with openssl for the front end. Here's my problem: when I go to the https server (apache) the lock icon turns on in IE, but as soon as I hit a jsp page the lock icon turns off. With Mozilla it shows a lock with a red line through it. Did I miss something in the setup documentation? Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat vs. Apache Performance Comparison for static HTML
Very interesting. Thanks for making the effort and sharing your results. -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** Shapira, Yoav wrote: Howdy, Of course not. I'm only regergitating stuff I have read. But I have seen it from several different sources, so I took it as truth. Do you have benchmarks to prove otherwise? It could be the sources you read are outdated. I don't question their accuracy at the time they came out, although I don't even know what sources you're talking about (and it doesn't matter). Just for kicks, even though I've done this many times in the past for in-house purposes, I just did a simple benchmark so that people don't blindly accept X year old sources regarding tomcat performance. - Server hardware: Solaris 8, specifically from uname -a: SunOS 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-5_10. It has 512MB RAM. - Tomcat version: 4.1.27-LE - Apache version: 2.0.47, compiled on above platform - JDK version: 1.4.2, with no switches at all, i.e. client mode with no special heap of GC settings (yes, I know I could improve performance for tomcat by tuning these). - Server.xml setup: nearly exactly the same as unpacked distribution. I just removed unneeded connectors, leaving only the port 8080 connector. Yes, I know I could improve performance by modifying min/maxProcessors, etc. - httpd.conf setup: nearly exactly the same as unpacked distrubition. I just changed the listen port from 80 to 8080 so that I could use the exact same JMeter test plan. Yes, I know there are many things I can tune here to increase performance. - Test file: a simple test.html file, static, simple content. In fact it's so small I'll include the whole thing: htmlheadtitleTest page/title/headbodyThis is a test page/body/html - Test program: Apache JMeter 1.9 final running on Windows2000 Pro, with JDK 1.4.2. - Test plan tree: Test Plan - Thread Group: 10 threads, 1sec ramp-up, 100 loops - HTTP Request: GET, myhost, port 8080, /test.html - Graph Results (with file output) - Findings: Server #of Samples Average Deviation Median Apache 1000 17ms2510 Tomcat 1000 29ms4410 For both servers, CPU usage was light, and memory wasn't taxed much at all. So what does that say? Apache is faster by about 70% on average ((29-17)/17) at serving this small text file, with both servers very close to their out of the box configuration. Out of curiosity, I tried the test again with a larger text file: 30K or so in size. The results then were: Server #of Samples Average Deviation Median Apache 1000 182ms 277 90 Tomcat 1000 185ms 249 80 So now tomcat is faster? ;) We could debate forever about whether it's representative of real-world conditions, whether care should be taken to configure the server for optimal performance, etc. That's why everyone can and should run their own benchmarks for their own applications. With the above information anyone could easily reproduce the test. My point, however, is not that tomcat is faster or that apache is faster. My point is that it's easy to test performance and that you shouldn't trust sources, especially if they don't directly apply to your platform/server/application. Yoav Shapira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat will not install
The error you are getting has nothing to do with Tomcat. Your error has to do with the fact that xerces needs JDK in order to install. You dont need xerces before you install tomcat anyways. Just grab the tomcat RPM and install it, or better yet; get the binary from here: http://www.apache.org/dist/jakarta/tomcat-4/binaries/ However; tomcat will need the JDK also, so you need to install the JDK first anyways. Also the current JDK is 1.4. You can get it from here: http://java.sun.com/downloads/ Hope this helps. Rick [EMAIL PROTECTED] wrote: I'm trying to install xerces so I can install TOMCAT but I keep getting this message although my path is set bash-2.05b# rpm -ivh xerces-j-1.3.0-1.noarch.rpm error: Failed dependencies: jdk = 1.2 is needed by xerces-j-1.3.0-1 Bobbie Atristain Internet Systems Administrator Media General, INC. 804.649.6156 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connection Pool / Connection Bean ?
That looks like exactly what I am after. I never paid much attention to Jakarta-Commons before. Thanks for pointing it out :) -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** Shapira, Yoav wrote: Howdy, Sure thing: I like DBCP a lot. Its home page is here: http://jakarta.apache.org/commons/dbcp/ And tomcat-specific DBCP how-to is here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples -howto.html Yoav Shapira Millennium ChemInformatics -Original Message- From: Rick Roberts [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 9:21 AM To: Tomcat Users List Subject: Re: Connection Pool / Connection Bean ? Possibly. Can you point me to it, so I can read up on it? I have some old JDBC apps, originally written under Tomcat 3.1 or 3.2. I'm looking for a relatively painless way to modernize my JDBC connection techniques. Thanks -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** Shapira, Yoav wrote: Howdy, You mean a connection pool like DBCP? Yoav Shapira Millennium ChemInformatics -Original Message- From: Rick Roberts [mailto:[EMAIL PROTECTED] Sent: Sunday, August 10, 2003 3:52 PM To: Tomcat Users List Subject: Connection Pool / Connection Bean ? Is there a good, free ConnectionPool, ConnectionBean available? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stable tomcat + apache + mod_j2 + ssl
Are you sure that you need to encrypt traffic between Apache and Tomcat? That is an unusual requirement, because usually both tomcat and Apache are running on the same computer or at least running in the same LAN sub-net. Ramanan Ramadoss wrote: Thanks for your reply. We need to implement end to end encryption. I do not have an option with respect to the OS. I have Windows 2000 as our OS for both the webserver and app server. Due to end to end encryption, we have to secure the communication between the webserver and app server. I have heard about mod_ssl but have not used it. Would that be an option to secure the communication between apache and tomcat. Your opinion is highly appreciated. --Ramanan -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 11:17 AM To: Tomcat Users List Subject: Re: Stable tomcat + apache + mod_j2 + ssl Apache 2.0.47 Tomcat 4.1.24 There isn't an SSL version of either the mod_jk or jk2 connector. Since JK and JK2 don't ever communicate with a client, there's really no need. You might be able to setup a tunnel using stunnel or similar, but on Windows that will be problematic. Apache binary: http://httpd.apache.org/download.cgi Tomcat binary: http://jakarta.apache.org/site/binindex.cgi Connectors: http://jakarta.apache.org/builds/jakarta-tomcat-connectors/ Connector FAQ: http://jakarta.apache.org/tomcat/faq/connectors.html John Ramanan Ramadoss wrote: Dear friends, I am a newbie and have to set up a secure enviroment between tomcat and apache. Can someone tell me which is the stable production ssl version of tomcat and apache? Is there a ssl version of mod_jk or mod_j2 connector? If no which connector should we use? Where can I get a built version of the webserver, app server and the connectors that work with each other for a windows 2000 environment. Thanks Ramanan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getRemoteUser()
Have you set up your Tomcat container managed security? http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** Johnson, David wrote: I'm having some difficulty making the getRemoteUser() method work. It's possible I have missed the point of this method, but I'll explain what I'm trying to do anyway. I'm using mod_jk to map the url /lemons to a servlet which is running on Tomcat 1.4.27. I've got mod_jk set up okay and the mapping works fine: JkMount /lemons ajp13 I have then set up a Limit directive in my apache configuration for the url, thus: Location /lemons Limit GET PUT POST require user dave /Limit /Location This works as expected. If I go to this url I am prompted for a username and password. If I enter dave and the correct password then the request is passed through to my servlet. If I enter an incorrect username and password I get our server's authentication/authorization failed page and it doesn't get anywhere near the servlet. Within my servlet I then want to use getRemoteUser() method of the HttpServletRequest object to obtain the username which was supplied. Whenever I try this though, it always returns null. The request does contain an authorization header, but I can't seem to get a username out of it. Any ideas please? (If I need to RTFM, please point me in the right direction.) Thanks, Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to suppor 30000 concurrent users
I have always wondered how serious load balancing was done :) Is this technique documented anywhere? I would love to read up on it. Thanks Angus Mezick wrote: Ahh, the is the beauty of the cookie! All my servers respond to www.guidestar.org. I start a session, save that session id in the cookie, save the sessionid and data to the DB table that all the servers share. The next request goes to a different server but it can still see the id in the cookie. That id is used to get the session data out of the table for use and then put the data back in. As long as the DB can handle the load I can add servers. I am not worried about the network handling the load because the only other way of doing this that I know of is to use Filip Hank's In Memory Session Replication at http://www.filip.net/tomcat/tomcat-javagroups.html which uses IP multicast. I didn't want all my servers to get load every time one server got a hit. If the DB gets overloaded I can always split my servers into 2 groups and use apache session affinity to split the work between them. Which leads to my next email :) Do the worker names in worker2.properties and the jvmroute in server.xml have any relation? --Angus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 10:25 AM To: Tomcat Users List Subject: RE: how to suppor 3 concurrent users Sorry for being thick but Im a bit confused as to when you are doing anything with the sessions? If I make a request to one server, then go on to another for the next request, how does server 2 get my session from server 1 without server 1 having had to persist the session to disk every time any change is made to it? Pete Angus Mezick [EMAIL PROTECTED] 05/08/2003 15:11 Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: how to suppor 3 concurrent users Doesn't seem to have that much of an effect. I guess I should profile it though. I don't want to use session persistence because then I would need to use network session clustering. Session clustering is a requirement for my app. I figure using a DB instead of memory to store my sessions is better than sending 5 network connections to the other 5 of the 6 web servers with the session data that will only be valid to ONE of those servers. Before tomcat we were using Iplanet 4.1 and the cisco load balance we have SAID it could handle session affinity but it didn't seem to be able to. So we went with a DB solution which, to me, seems to be the more optimal solution. The DB also means I can have a MUCH larger number of active sessions using my servers because I don't have to worry about the sessions using all my memory. I just have to worry about DB disk space but I had have 2 or 3 terabytes of disk while only have 2 GB of memory. Seems to be an easy trade. --Angus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 9:40 AM To: Tomcat Users List Subject: RE: how to suppor 3 concurrent users Angus, doesnt using a shared jdbc based session manager slow the whole thing down a lot? Why dont you just use session persistence? Pete -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connection Pool / Connection Bean ?
Possibly. Can you point me to it, so I can read up on it? I have some old JDBC apps, originally written under Tomcat 3.1 or 3.2. I'm looking for a relatively painless way to modernize my JDBC connection techniques. Thanks -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** Shapira, Yoav wrote: Howdy, You mean a connection pool like DBCP? Yoav Shapira Millennium ChemInformatics -Original Message- From: Rick Roberts [mailto:[EMAIL PROTECTED] Sent: Sunday, August 10, 2003 3:52 PM To: Tomcat Users List Subject: Connection Pool / Connection Bean ? Is there a good, free ConnectionPool, ConnectionBean available? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tried alot of searching - caving in and emailing this list now
I could never get WARP to WORK I think it has been abandoned by the developers now also Rick jherschel wrote: I just talked with the lead on this and it seems we used WARP by default since it is provided with Stronghold. We were having WARP specific issues, so we're going to look into getting mod_j2k to work with Stronghold. Shouldn't be too big an issue I hope. Thanks for your help Angus! James Herschel -Original Message- From: Angus Mezick [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 2:36 PM To: Tomcat Users List Subject: RE: tried alot of searching - caving in and emailing this list now 1) it is what I use and the only one I know about :) 2) from the site: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/connectors.html mod_webapp WARP/1.0WarpConnector Deprecated. Not for Win32; no in-process nor load balancing; works in 4.x. Use APR. Supported Apache-2.0 and Apache-1.3). See Webapp -Original Message- From: jherschel [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 2:30 PM To: Tomcat Users List Subject: RE: tried alot of searching - caving in and emailing this list now As an aside, do you recommend using JK2 over WARP, and if so why? James Herschel Systems Administrator Quarry Integrated Communications (519)570-2020x2489 (519)503-2563 [EMAIL PROTECTED] -Original Message- From: Angus Mezick [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 1:04 PM To: Tomcat Users List Subject: RE: tried alot of searching - caving in and emailing this list now Um, are you using the JK2 connector to like up apache and tomcat? I don't see it mentioned. If you are, your workers2.propertties, jk2.properties (sp), and server.xml would also be helpful. --Angus -Original Message- From: jherschel [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 12:32 PM To: [EMAIL PROTECTED] Subject: tried alot of searching - caving in and emailing this list now Google has failed me! I have been trying to get IP based access control working for a java site using Apache directives to no avail. I am using Stronghold 4.0 with Tomcat 4.1.24 - Here is the Apache conf I am working with ... VirtualHost [omitted] ServerName [omitted] ServerAdmin [omitted] DocumentRoot /var/wwwroot/wrcm-staging/htdocs/ Directory / AllowOverride None Options +ExecCGI +FollowSymLinks order deny,allow Deny from all Allow from [omitted] Allow from [omitted] /Directory Directory /var/wwwroot/wrcm-staging/tomcat/ AllowOverride None Options +ExecCGI +FollowSymLinks order deny,allow Deny from all Allow from [omitted] Allow from [omitted] /Directory WebAppDeploy /var/wwwroot/wrcm-staging/tomcat/ conn / #Logging directives TransferLog var/log/wrcm-staging/access_log ErrorLog var/log/wrcm-staging/error_log /VirtualHost The java site resides in /var/wwwroot/wrcm-staging/tomcat - these directives usually work for normal HTTP sites - maybe this is a Jakarta config issue and not Apache? I'm also thinking that maybe my DocumentRoot directive is overriding the /var/wwwroot/wrcm-staging/tomcat Directory block? Thanks in advance for your help! James Herschel -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ServletContext.getInitParameter() for a Bean?
What is recomended technique for reading initialization parameters from a Bean? -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
unable to infer tagged configuration
Hi everyone, I am trying to compile mod_jk on a sparc solaris 8 system and get the following error. I'm using apache 2.0.47 and tomcat 4.1.27. apache compile just find and is working great. I found a mod_jk-2.0.42.so binary, but I can't get the two talking with it. So, I'm trying to compile. Can some one tell me what the tag configuration is? I've looked everywhere. Thanks [mkdir] Created dir: /export/connectors-4.1.27-src/jk/build/jk/apache2 [so] Compiling 19 out of 19 Compiling /export/connectors-4.1.27-src/jk/native/apache-2.0/mod_jk.c [so] Compile failed 1 /export/connectors-4.1.27-src/jk/native/apache-2.0/mod_jk.c [so] Command:libtool --mode=compile cc -c -o /export/connectors-4.1.27-src/jk/build/jk/apache2/apache-2.0/mod_jk.o -I/export/connectors-4.1.27-src/jk/native/common -I/opt/msadmin/apache2/include -I/opt/msadmin/j2sdk1.4.1_02/jre/../include -g -W -D_REENTRANT -DCHUNK_SIZE=4096 -DREUSE_WORKER -DUSE_APACHE_MD5 /export/connectors-4.1.27-src/jk/native/apache-2.0/mod_jk.c [so] Output: [so] libtool: compile: unable to infer tagged configuration [so] StdErr: [so] libtool: compile: specify a tag with `--tag' BUILD FAILED file:/export/connectors-4.1.27-src/jk/native/build.xml:134: Compile failed /export/connectors-4.1.27-src/jk/native/apache-2.0/mod_jk.c Rick Bradberry NCR WCS Managed Services Telephone: 937-848-2203 Cell Phone: 937-367-1879 efax: 413-674-7094
404 with 3.2.3
Am at the end of my rope trying to get tomcat 3.2.3 to run a simple webapp on my debian linux server. The same tomcat binary runs the webapp fine on my development debian linux system in tomcat standalone mode, but gets a 404 error (page not found) when run with apache on the server box. Figured it has to be a simple stupid problem with the apache-tomcat adapter config. Have tried everything in the docs about setting up the adapter and still keep getting 404. Have both mod_jserv.so and mod_jk.so installed in the apache libexec directory, and have pointed httpd.conf alternately to tomcat-apache.conf and mod_jk.conf-auto, but nothing makes any difference. Keeping getting 404. This is a simple servlet, not a jsp although am currently using a .jsp extension for the generated pages. Was originally using an app-specific extension for the generated files, which also works fine on the development system standalone but gives 404 with apache on the server. Being a Java developer, have considered bugging the tomcat source with printlns to see where the problem might be, but there are a lot of .java files and I don't have a clue re the tomcat architecture to know what to instrument and recompile to get a handle on this using that approach (not that I think the problem is in the tomcat code, but it might give a clue as to what in the config files is incorrect. Have also downloaded tomcat 4 in exasperation and considered junking tomcat 3.2.3, but tomcat 4 has a while new set of config files, and I've just started getting used to the structure of the 3.2.3 config files. My mind is about fried and can't handle learning a whole new tomcat config set up at this point. Have been beating my head against the wall for a couple weeks on this. (A nice tomcat config tool where you enter the name of the servlet, the classpath to the servlet, the path to to the webapps file, and other simple data like that, and have the various config files gen'd automatically would probably solve my problem.) Have checked this group's archive logs for 404 errors to see if anyone else has had this problem, but there are 15800 messages related to 404 problems! Maybe someone has, but tough to find it in that big a pile. So my apologies for yet another 404 post, but this is driving me nuts (and not doing my web site any good either.) Any clues or ideas as to the solution would be appreciated. Thanks. -- Rick Lutowski Principal, JReality [EMAIL PROTECTED] www.jreality.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connection Pool / Connection Bean ?
Is there a good, free ConnectionPool, ConnectionBean available? -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cannot resolve symbol
I have apache and tomcat up and running. Now I'm trying to compile mod_mk2 and get the following error. Does any one know which jar file I'm missing? [javac] /export/home/jakarta-tomcat-connectors-4.1.27-src/util/java/org/apache/tomca t/util/net/PoolTcpEndpoint.java:122: cannot resolve symbol [javac] symbol : class ThreadPoolRunnable [javac] location: class org.apache.tomcat.util.net.PoolTcpEndpoint [javac] ThreadPoolRunnable listener; [javac] ^ [javac] /export/home/jakarta-tomcat-connectors-4.1.27-src/util/java/org/apache/tomca t/util/net/SSLImplementation.java:114: cannot resolve symbol [javac] symbol : class JSSEImplementation [javac] location: package jsse [javac] return new org.apache.tomcat.util.net.jsse.JSSEImplementation(); Thnak for any help. Rick
Re: [OT] how to pronounce Apache ?
It's true. The name comes from A PatCHy server. It was first developed as a series of patches to the NCSA (National Center for Supercomputer Applications) httpd 1.3 web server, and was informally named A PatCHy server. The first stable release, V1.0, was released on 1 December, 1995. This was essentially the NCSA 1.3 server with a number of fixes and enhancements. http://www.zdnet.com/anchordesk/story/story_1284.html -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** Yiannis Mavroukakis wrote: Yes, if memory serves me right the server name was a wordplay on A patchy server :) -Original Message- From: Stuart MacPherson [mailto:[EMAIL PROTECTED] Sent: 11 August 2003 10:23 To: 'Tomcat Users List' Subject: RE: [OT] how to pronounce Apache ? Ah-patch-ee? -Original Message- From: Eugene Lee [mailto:[EMAIL PROTECTED] Sent: 11 August 2003 10:23 To: tomcat mail list Subject: Re: [OT] how to pronounce Apache ? On Mon, Aug 11, 2003 at 02:49:52PM +0530, Antony paul wrote: : : I would like to know how to pronoune Apache in US English. I found two : pronounciations at http://dictionary.reference.com/search?q=apache which one : is right ?. Or any other forms ? If we're talking about the web server, look at the pronunciation given for the definition of A Native American people. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I get an answer please -- Re: Why integrate Tomcat with aweb server?
Because a web server serves static content (html, images, etc.) much faster than tomcat will. Nathan Ward wrote: Hello John, I hate to be pushy, but are you going to post a reply to this question at some point? Nathan - Original Message - From: Nathan Ward To: [EMAIL PROTECTED] ; Tomcat Users List Sent: Monday, August 04, 2003 11:05 AM Subject: Why integrate Tomcat with a web server? I have a question for John Turner about a statement in the book Apache Tomcat Security. Page 12 says: As discussed earlier, running publicly available web services as root or superuser is typically a bad idea, so the solution is to avoid using Tomcat as a stand-alone web server on port 80 by integrating it with a standard HTTP web server such as Apache, Microsoft's IIS, or Sun Microsystem's iPlanet. Question: Does this apply when running under Windows? The reference to as discussed earlier talks about running Tomcat as a service with more permissions than necessary. Windows defaults to running services as SYSTEM which has administrator privileges. Fine, but as also mentioned earlier, you can create a user account with less permissions and setup the service to run Tomcat under that account. So, how does the statement on page 12 relate to running Tomcat under windows, i.e. why run Tomcat with IIS rather than just run Tomcat? There may be performance reasons, but from a security point of view, is there increased security risks in running Tomcat without IIS when running as a service under Windows? Nathan -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I get an answer please -- Re: Why integrate Tomcat with aweb server?
Of course not. I'm only regergitating stuff I have read. But I have seen it from several different sources, so I took it as truth. Do you have benchmarks to prove otherwise? -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** Shapira, Yoav wrote: Howdy, Because a web server serves static content (html, images, etc.) much faster than tomcat will. Really? Do you have a benchmark using tomcat 4.1.x that supports the above? Yoav Shapira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RE: Java and tomcat issues
Try export PATH=$PATH:$JAVA_HOME/bin make sure you don't have spaces around the = Rick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 2:33 PM To: [EMAIL PROTECTED] Subject: RE: RE: Java and tomcat issues Okay this happens bash-2.05b# export $PATH=$JAVA_HOME/bin -bash: export: `/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin =/usr/java/j2sdk1.4.1_04//bin': not a valid identifier -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 2:18 PM To: Tomcat Users List Subject: Re: RE: Java and tomcat issues Sure, APPEND the PATH variable with JAVA_HOME, don't overwrite it! Path=$PATH;JAVA_HOME/bin - Original Message - From: [EMAIL PROTECTED] Date: Tuesday, August 5, 2003 2:07 pm Subject: RE: Java and tomcat issues Okay everytime I do it my commands don't work on the box like ls, cd, ll - the only command that works is the exit command Any ideas? -Original Message- From: Shapira, Yoav [EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 2:06 PM To: Tomcat Users List Subject: RE: Java and tomcat issues Howdy, I'm trying to set up JAVA for tomcat on a redhat 8.1 box and I keep getting this message after I set the JAVA_HOME path -bash-2.05b# which java /usr/bin/which: no java in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R 6/bi n ) -bash-2.05b# That's pretty clear, isn't it? ;) Add $JAVA_HOME/bin to your $PATH. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietaryand/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediatelydelete this e-mail from your computer system and notify the sender. Thank you. --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where can I find mod_jk-2.0.47.so?
Your going to need to build it. Get it from here: http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/ -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * * http://www.ait-web.com * *** Raible, Matt wrote: Anyone know where I can download mod_jk-2.0.47.so for Apache 2.0.47 on RH 9? The closest I could find was 2.0.46 for RH 7.2 at: http://tinyurl.com/j6hf Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FORBIDDEN access
Hi, This may be a bit os specific but I would appreciate any help. I am trying to get apache and tomcat talking on Mandrake 9.0 using the default installation. Each server work independently. When I try access examples through apache I get a FORBIDDEN , you do not have permissions to access example on this server. error message. However, I can get to the ~home pages. Is there some security I can turn off. Can you give me an idea of where to look or what to look for. Here is the versions that are installed apache 1.3.26 tomcat 4.1.18 mod_jk 1.3 Thanks for any help Rick
RE: FORBIDDEN access
Mike, Thanks for the help, but all the directories have a minimum of r-x, most have rwx and are owned by root. Tomcat runs as root and apache runs as apache. Rick -Original Message- From: Mike Millson [mailto:[EMAIL PROTECTED] Sent: Saturday, August 02, 2003 9:20 AM To: Tomcat Users List Subject: Re: FORBIDDEN access Does the directory above your Apache DocumentRoot directory have execute permissions? For example, if DocumentRoot = /home/tomcat/your_app, then /home/tomcat needs to have execute permissions. chmod u+x /home/tomcat/your_app Does the user that tomcat runs under own the directory and files /home/tomcat/your_app? chown -R tomcat.tomcat /home/tomcat/your_app Change the above to match your installation. Mike On Sat, 2003-08-02 at 08:49, Bradberry, Rick wrote: Hi, This may be a bit os specific but I would appreciate any help. I am trying to get apache and tomcat talking on Mandrake 9.0 using the default installation. Each server work independently. When I try access examples through apache I get a FORBIDDEN , you do not have permissions to access example on this server. error message. However, I can get to the ~home pages. Is there some security I can turn off. Can you give me an idea of where to look or what to look for. Here is the versions that are installed apache 1.3.26 tomcat 4.1.18 mod_jk 1.3 Thanks for any help Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]