RE: JDBCStore
You may want to have a look at parallel deployment ( http://tomcat.apache.org/tomcat-7.0-doc/config/context.html). At the moment /Catalina/localhost/ is used as value in column app. It is the root app. Would a war ROOT##2.war use another value? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: JDBCStore
Are you using distributed sessions? If so, you'll have to override the internal serialization mechanism and do it all manually in a way that is going to be cross-version-compatible. It's not impossible, but it does take some planning and forethought. OK; thought so. Thank you. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: JDBCStore
You may want to have a look at parallel deployment ( http://tomcat.apache.org/tomcat-7.0-doc/config/context.html). At the moment /Catalina/localhost/ is used as value in column app. It is the root app. Would a war ROOT##2.war use another value? No. OK, then this would not solve the prob. Thx! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: JDBCStore
Well, I think it solves your problem. Old session-ids will get routed to the old version of your webapp and thus will be deserialized without a problem. New sessions will be created in the new version. Yes, but the session persistence will go into the same table rows - chrash while deserialization. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
JDBCStore
Hi, when I deploy a new app version with incompatible serialization version of same classes I get: java.io.InvalidClassException: org.hibernate.collection.internal.AbstractPersistentCollection; local class incompatible: stream classdesc serialVersionUID = -8914173462748164853, local class serialVersionUID = -7238232378593030571,at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:615), at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620), at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515), at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620), at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515), at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769), at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348), at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989), at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913), at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796), at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348), at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989), at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913), at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796), at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348), at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989), at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913), at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796), at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348), at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989), at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913), at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796), at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348), at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370), at org.apache.catalina.session.StandardSession.readObject(StandardSession.java: 1595), at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.j ava:1060), at org.apache.catalina.session.JDBCStore.load(JDBCStore.java:657), at org.apache.catalina.session.StoreBase.processExpires(StoreBase.java:159), at Is there something in Tomcat to configure that can solve this problem? If not, how to handle such a problem? Especially in clusters where servers get updated one by one and not all at once. Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
JMX and the SessionManager
Hi, if I use StandardManager or PersistentManager I have a Manager MBean. Fine. But if I use DynamoDBSessionManager which extends PersistentManagerBase (as PersistentManager does) then there is no Mbean. I cannot see in the code why this happens. https://github.com/aws/aws-dynamodb-session-tomcat/blob/master/src/main/java /com/amazonaws/services/dynamodb/sessionmanager/DynamoDBSessionManager.java Any ideas? Thank you. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: JMX and the SessionManager
Create a mbeans-descriptor.xml file? http://tomcat.apache.org/tomcat-7.0-doc/mbeans-descriptor-howto.html Ah ok, thank you! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: org.apache.catalina.session.PersistentManager
Hm... no opinions? -Original Message- From: spr...@gmx.eu [mailto:spr...@gmx.eu] Sent: Donnerstag, 5. Dezember 2013 20:08 To: 'Tomcat Users List' Subject: org.apache.catalina.session.PersistentManager Hi, if I want to use org.apache.catalina.session.PersistentManager but do not want the async storage of session data is it sufficient to add a valve which stores the session data after the request via manager.getStore().save(..)? And how can I prevent that the session is stored again by the background process of the manager? Any drawbacks with this approach (besides performance)? Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
org.apache.catalina.session.PersistentManager
Hi, if I want to use org.apache.catalina.session.PersistentManager but do not want the async storage of session data is it sufficient to add a valve which stores the session data after the request via manager.getStore().save(..)? And how can I prevent that the session is stored again by the background process of the manager? Any drawbacks with this approach (besides performance)? Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: org.apache.catalina.filters.CorsFilter
Exactly where? The full path is needed here. TOMCAT/webapps/myapp/WEB-INF/classes/org/apache/catalina/filters/CorsFilter. class Rather than mucking about with an old Tomcat version, just throw away the 3rd-party repackaged crap and install the current one from tomcat.apache.org; it will make everyone's life simpler. Just wanna now why the class is not loadable as org.apache.catalina.filters.CorsFilter but as com.apache.catalina.filters.CorsFilter (different dir in classes of course). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: org.apache.catalina.filters.CorsFilter
Just wanna now why the class is not loadable as org.apache.catalina.filters.CorsFilter but as com.apache.catalina.filters.CorsFilter (different dir in classes of course). Because Tomcat prevents web applications from replacing container classes. Ah, so we do have special rules for org.apache.catalina.filters.* (and other tomcat packages/classes). Thank you. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: org.apache.catalina.filters.CorsFilter
There aren't any. Without the details of how you configured the filter, where you put the class file and the stack trace of the exception we can't help you. Class is in WEB-INF/classes of the webapp. SEVERE: Exception starting filter CorsFilter java.lang.ClassNotFoundException: org.apache.catalina.filters.CorsFilter at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceMan ager.java:522) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(Def aultInstanceManager.java:514) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceM anager.java:133) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter Config.java:256) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil terConfig.java:382) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterCon fig.java:103) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:46 50) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java: 5306) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:15 59) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:15 49) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11 10) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6 03) at java.lang.Thread.run(Thread.java:722) filter filter-nameCorsFilter/filter-name filter-classorg.apache.catalina.filters.CorsFilter/filter-class init-param param-namecors.allowed.origins/param-name param-value*/param-value /init-param init-param param-namecors.allowed.methods/param-name param-valueGET,POST,HEAD,OPTIONS,PUT,DELETE/param-value /init-param init-param param-namecors.allowed.headers/param-name param-valueX-Requested-With, accept-language, accept, cache-control, if-modified-since, if-none-match, content-type, Origin, Access-Control-Request-Method, Access-Control-Request-Headers/param-value /init-param init-param param-namecors.exposed.headers/param-name param-valuedate, location, Access-Control-Allow-Origin,Access-Control-Allow-Credentials/param-value /init-param init-param param-namecors.support.credentials/param-name param-valuetrue/param-value /init-param init-param param-namecors.preflight.maxage/param-name param-value84600/param-value /init-param /filter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
org.apache.catalina.filters.CorsFilter
Hi, I 'm using the CorsFilter in Tomcat 7.0.47, all good. Then tried it in 7.0.37 - no luck, only available since 7.0.41. OK, I put the class into the war file and expected that it is loadable now. But I get a ClassNotFound. Guessing some special classloader rules I remaned the class to com.apache.catalina.filters.CorsFilter and now it is working. So - what are the special rules for org.apache.catalina.*? Thank you P.S. yum update tomcat7 did not help, lastest tomcat7 is 7.0.37. How can I update it to the lastest version? Just wget the tar from tomcat downloads and extract it into the current tomcat dir? Or will this destroy the tomcat? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: PersistentManager + JdbcStore
I think I will fix the DynamoDB-Sessionmanager. Also an option. Already in process it seems ;) https://github.com/aws/aws-dynamodb-session-tomcat/issues/3 I hope they will use the code from tomcat for managing the classloader issues. Well, just realized that this Manager is based on PersistentManagerBase. So I see no improvement in terms of reliability, because it still writes the data async into DynamoDB. I even cannot see the reason why they created DynamoDBSessionManager, DynamoDBSessionStore would have done the job too then. Looking into the Manager interface (public void backgroundProcess()) tells me, that it seems to be always async? So what is the right stategy to distribute sessions across an arbitrary amount of servers with a 100% guarantee that the session will be found at any time on any server? Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: PersistentManager + JdbcStore
Given some method of automatic discovery, other than multicast, it sounds like you could still use Tomcat's clustering support. So perhaps you could write your own membership service? Yes, I think with Jgroups + S3 ping this could be solved. But since both ClusterManagers are based on ManagerBase too and they have to option for synchronous replication, it should be possible with a central session store (e.g. JdbcStore) too? But I cannot find the magic to replace the async background processing with sync. processing... Any idea? An alternative could be to use a servlet filter to store/load the session but this sounds a bit strange to me, because I would roll my complete own session handling solution... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
PersistentManager + JdbcStore
Hi, is it possible to use the PersistentManager + JdbcStore to enable a 100% failover/cluster solution for sessions? As far as I can see not, because the session data is written async into the database and only in a min. interval of 1 s. Is this right? Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: PersistentManager + JdbcStore
If you need sessions replicated as changes occur then you'll want to look at a different solution, like the built-in cluster support. Unfortunately it does not work on AWS, no multicast. I think I will fix the DynamoDB-Sessionmanager. Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: PersistentManager + JdbcStore
Multicast is not a requirement, that just defines how Tomcat nodes will locate each other. Since multicast is not available for you, you could statically list your Tomcat nodes in your configuration. https://tomcat.apache.org/tomcat-7.0-doc/config/cluster-interc eptor.html#Static_Membership a) Since instances come up and down occasionally and IPs are not fixed, this is not an option on AWS. b) Furthermore DeltaManager is not applicable for large instances counts and BackupManager is impossible too, because of a). I think I will fix the DynamoDB-Sessionmanager. Also an option. Already in process it seems ;) https://github.com/aws/aws-dynamodb-session-tomcat/issues/3 I hope they will use the code from tomcat for managing the classloader issues. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
com.amazonaws.services.dynamodb.sessionmanager.DynamoDBSessionManager
Hi, when I use the com.amazonaws.services.dynamodb.sessionmanager.DynamoDBSessionManager I get classloader issues when a session gets deserialized and my session contains classes which are not available to the shared loader. My question: Is this a bug in com.amazonaws.services.dynamodb.sessionmanager.DynamoDBSessionManager? I do not want to put these classes into the shared loader because they belong only to a special webapp. Thank you. P.S. Code can be found here: https://github.com/aws/aws-dynamodb-session-tomcat/tree/master/src/main/java /com/amazonaws/services/dynamodb/sessionmanager - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: com.amazonaws.services.dynamodb.sessionmanager.DynamoDBSessionManager
1.) Seeing as it's their code, have you asked Amazon? Not sure if this is you, but seems like a similar issue. https://github.com/aws/aws-dynamodb-session-tomcat/issues/1 Oh yes, same issue. 2.) Have you tried one of Tomcat's included persistent session managers? Do you see the same behavior? My guess is that you won't, but it never hurts to try and it would certainly point the finger at Amazon's code. http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html Yes, they use the correct classloader, then it works. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: com.amazonaws.services.dynamodb.sessionmanager.DynamoDBSessionManager
Their code (DynamoDBSessionStore.load(...)) uses ObjectInputStream Tomcat code (e.g. o.a.catalina.session.FileStore.load(..)) uses CustomObjectInputStream which knows how to deal with class loaders. Yes. It is their bug (or feature). :) Thank you! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Question about usernames being case insensitive
I have observed using tomcat 7.027 and 6.026 an issue with BASIC authentication. My intent was to have both user names and passwords be case sensitive. I know of nothing I did that would change that. The database table is plain vanilla. Passwords are case sensitive, but upper or lower case usernames work. Is there any way to prevent this? Operating systems are windows 7 and windows Server 2008R2 both 64 bit. web.xml includes login-config auth-methodBASIC/auth-method realm-name/realm-name /login-config context.xml includes Realm className=org.apache.catalina.realm.JDBCRealm connectionURL=jdbc:mysql://localhost/XXX?user=XXXamp;password=a4HLw3Jx digest=MD5 driverName=com.mysql.jdbc.Driver roleNameCol=role userCredCol=password userNameCol=username userRoleTable=USER_ROLES userTable=USERS/ Resource auth=Container driverClassName=com.mysql.jdbc.Driver maxActive=30 maxIdle=30 maxWait=1200 name=jdbc/wmmd_db password=test type=javax.sql.DataSource url=jdbc:mysql://localhost/WMMD_WMMD?user=testamp;password=test username=test/ Thanks in advance for any help or guidance, I've spent a half day scouring documentation and can't find a lead. -- With best wishes, Michael Michael B. Spring Associate Professor Information Science and Telecommunications Voice: (412)-624-9429 Fax: (412)-624-2788 WWW: http://www.sis.pitt.edu/~spring http://www.sis.pitt.edu/%7Espring Pmail: 701B SIS Building, 135 North Bellefield University of Pittsburgh, PA 15260
Re: Question about usernames being case insensitive
All three responses are exactly right. I checked my script and assumed -- and we know what happens when you do that -- that since I had made no specification for case insensitive that it would be case sensitive. It wasn't. I will go see why MYSQL is doing that and make the change there. Thank you every so much. Teaches me to make sure I check all the possibilities before I start pointing a finger in teh wrong direction. Love those features! With best wishes, Michael Michael B. Spring Associate Professor Information Science and Telecommunications Voice: (412)-624-9429 Fax: (412)-624-2788 WWW: http://www.sis.pitt.edu/~spring http://www.sis.pitt.edu/%7Espring Pmail: 701B SIS Building, 135 North Bellefield University of Pittsburgh, PA 15260 On 8/27/2013 3:28 PM, David kerber wrote: On 8/27/2013 3:26 PM, Propes, Barry L wrote: -Original Message- From: Daniel Mikusa [mailto:dmik...@gopivotal.com] Sent: Tuesday, August 27, 2013 2:22 PM To: Tomcat Users List Subject: Re: Question about usernames being case insensitive On Aug 27, 2013, at 2:52 PM, Michael Spring spr...@pitt.edu wrote: I have observed using tomcat 7.027 and 6.026 an issue with BASIC authentication. My intent was to have both user names and passwords be case sensitive. I know of nothing I did that would change that. The database table is plain vanilla. Passwords are case sensitive, but upper or lower case usernames work. Is there any way to prevent this? Operating systems are windows 7 and windows Server 2008R2 both 64 bit. Have you checked to see if your database is causing this behavior? Perhaps connect directly to the DB and issue the same queries that Tomcat would issue. Then check to see if those are case insensitive. Dan --- This was my guess as well. Would you have some kind of procedure in the DB that forces upper or lower to the username value? Or the db may simply be doing case-insensitive comparisons. Mine is configurable for that. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Question about usernames being case insensitive
Christopher: Thank you for your very comprehensive and thoughtful answer. We have at this point come to all the points you so eloquently make. We need to do a little DBMS modification to allow tomcat to do what we expect. You detail will help us make those modifications in the correct way. I am so pleased to have all the advice that has been given. It is so unlike much of the misinformation on the web. Thank you. With best wishes, Michael - Michael B. Spring Associate Professor Information Science and Telecommunications Voice: (412)-624-9429 Fax: (412)-624-2788 WWW: http://www.sis.pitt.edu/~spring http://www.sis.pitt.edu/%7Espring Pmail: 701B SIS Building, 135 North Bellefield University of Pittsburgh, PA 15260 On 8/27/2013 5:22 PM, Christopher Schultz wrote: Michael, On 8/27/13 2:52 PM, Michael Spring wrote: I have observed using tomcat 7.027 and 6.026 an issue with BASIC authentication. My intent was to have both user names and passwords be case sensitive. I know of nothing I did that would change that. The database table is plain vanilla. Passwords are case sensitive, but upper or lower case usernames work. Is there any way to prevent this? MySQL does string-matching in a case-insensitive way by default. The solution is to give the db a hint when doing your SELECT, like this: Old: SELECT * FROM user WHERE username='CHRIS'; New: SELECT * FROM user WHERE BINARY username='CHRIS'; The new query will only select users whose usernames are 'CHRIS' exactly -- case-sensitively. Note that if you have an INDEX on user.username, it can't be used in its current form -- which is expected to be case-insensitive. If you do an EXPLAIN on the above queries, you'll see that both of them use the INDEX you have on the table, but in one case it will be a quick lookup (likely a hash-based lookup) and in the other (BINARY) case, you'll have to perform an index traversal in order to do the match. I haven't tried it, but you might be able to add another INDEX for BINARY username that will give you better performance. As for using Tomcat's built-in authentication, you won't be able to modify the queries as I have shown above. You have to tell the server some other way. One way is to make the column a BINARY column: ALTER TABLE user MODIFY COLUMN username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ; Obviously, you'll have to match the data type and length to meet your needs. Once you do this, username will act like a case-sensitive column for even queries without a BINARY hint: SELECT * FROM user WHERE username='CHRIS'; I think that's what you're going to want to do: it will basically magically make everything work the way you expected. Honestly, I would caution against case-sensitive usernames. Way too many users like to re-invent their own capitalization every time they log in. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat does not start with -Dcom.sun.management.jmxremote.port=9001
Hi, I want to monitor my tomcat 7 via JMX remotely. The problem is, as soon as I add -Dcom.sun.management.jmxremote.port=9001 to my setenv.sh tomcat does not start anymore. No error message, no log, nothing... The system is a ubuntu which uses start-stop-demon to execute catalina.sh. What could be the problem? Thank you. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat does not start with -Dcom.sun.management.jmxremote.port=9001
there must be a log message somewhere. But I do not find it... The problem is probably that under Ubuntu, the startup script redirects the STDERR log somewhere, where you are not looking (via SYSLOG to /var/log/daemon.log e.g.). There is a syslog file, but it has no error messages. This is a switch for the Java JVM, and it probably bumps out before Tomcat is even started inside the JVM. Yep. As to the basic error cause, do a netstat -an and look at what else may be using port 9001 already. Port is free - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat uses only a single Core
Hi, I have an application running on Tomcat 7 on a 8-Core Linux 64 bit System. Unfortunately it uses only a single core. I have googled alot about this fact but did not found a solution, even not a clear reason for it. What can be the problem here? Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: RemoteIpFilter not working
Can you send a dump of the HTTP headers received by the webapp and the return value of the various request.getXXX methods? That would be very helpful, here. getRemoteAddr(): 85.214.210.60 -- proxy IP x-forwarded-for: 85.178.56.216 -- client IP x-forwarded-host: foobar.eu -- proxy x-forwarded-server: foobar.eu -- proxy It looks like the Filter does not kick in. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RemoteIpFilter not working
Hi, I have set up the RemoteIpFilter (Tomcat 7.0.8) in the webapps web.xml like this: filter filter-nameRemoteIpFilter/filter-name filter-classorg.apache.catalina.filters.RemoteIpFilter/filter-class /filter filter-mapping filter-nameRemoteIpFilter/filter-name url-pattern/*/url-pattern dispatcherREQUEST/dispatcher /filter-mapping The mapping is the first in the filter chain. But when I call request.getRemoteAddr() in a plain jsp in the root of the webapp I get the IP from the proxy not from the client. The proxy sends x-forwared-for correctly. What can be the problem? Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Classloaders in catalina.properties
Because, while the functionality remains, it's no longer the default. See: http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html Ah ok, thx. But why is this no longer documented? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Classloaders in catalina.properties
Hi, in catalina.properties I can define paths for common, server and shared loaders. Where do I find them here in the docs?: http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html Here we have only system and common... Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: EL in Tomcat 7
In 7.0.21 it works: OK, thank you. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
EL in Tomcat 7
Hi, in a jsp I have an expression like this: ${states.get(state)} On my dev machine everything works fine, on the staging it does not work, I get: java.lang.NoSuchMethodException: java.util.HashMap.get(java.lang.Integer) states is: Map states = new HashMap(); states.put(1, foo); ... Both machines running Java 1.6 with Tomcat 7. What may be the problem here? Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: EL in Tomcat 7
${states.get(state)} Did it work before, and in what exact versions of Tomcat? Only on dev with 7.0.5 I would write that as ${states[state]} This works. What exactly version on Tomcat 7.0.x? There is a new one every month. .get(..) works on 7.0.5 but not on 7.0.8 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Modular Deployment
Hi, I have an application which has a core app, some optional modules and config files. Until now I deploy the app into /webapps (NOT as war-File), copy needed optional modules into WEB-INF/classes or lib and maintain config files outside of the tomcat directory by adding the config directory as an additional root into tomcats classpath. Config files are maintained outside of the webapp, because I do not want to overwrite them while deploying a new version of the app. What I want is: * Deploy the core app as war-File into webapps (or somewhere else via a context.xml) * deploy optional needed modules as .class Files or jar's somewhere outside tomcat but only visible to the core app * deploy config Files somewhere outside tomcat but only visible to the core app A restart of the app after deployment is no problem (no OSGi or similar needed). Can I achieve this with tomcat 6? How can I achieve this with tomcat 7 (should work with servlet 3.0)? Thank you P.S. maybe any better proposals? ;) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Modular Deployment
Maybe the virtualWebappLoader is interesting for you: http://tomcat.apache.org/tomcat-7.0-doc/config/loader.html#Vir tualWebappLoader%20Implementation Yes, I thought that this will be the solution for tomcat 7. It already exists in Tomcat 6 but was made official and documented in Tomcat 7. The only deficiency in TC 6 I'm aware of is thst you can't configure, whether resources inside or outside of the war take precedence in case of conflicts. Ah... ok, thank you! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Order of classloading in WEB-INF/lib
Hi, in which order are classes loaded in jars in WEB-INF/lib? Alphabetically? By date? Unordered? My problem is: My WEB-INF/lib contains jar's where on jar contains older versions of a classes than the other jar. I will ensure to load the newer versions of the classes. How can this be done? Thank you! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Order of classloading in WEB-INF/lib
in which order are classes loaded in jars in WEB-INF/lib? Alphabetically? By date? Unordered? There is no order. Thank you. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Terminating long running request threads
Have a look at this Valve: http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/catalina/valves /StuckThreadDetectionValve.java For Tomcat 7.0.14 -Original Message- From: Afkham Azeez [mailto:afk...@gmail.com] Sent: Samstag, 11. Juni 2011 19:23 To: Tomcat Users List Subject: Re: Terminating long running request threads Thanks Rainer. I think I can use the RequestProcessor MBeans. Thanks Azeez On Sat, Jun 11, 2011 at 8:41 PM, Rainer Jung rainer.j...@kippdata.dewrote: On 11.06.2011 09:30, Afkham Azeez wrote: Folks, Is there any API to get hold of Tomcat's Connector thread pools? Each request is registered with an MBean in the MBeanServer. As long as the request is running, the MBean contains additional info, like the URI, when the request started, the thread name etc. This gives you enough info to find long running requests and to find the thread. But there's no non-deprecated Java API known to have no side effects to terminate a thread. If it were (or you find one), we had to check how the thread pool behaves w.r.t. vanishing threads. Regards, Rainer On Thu, Jun 9, 2011 at 10:58 PM, Afkham Azeez afk...@gmail.com wrote: On Thu, Jun 9, 2011 at 10:51 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Afkham Azeez [mailto:afk...@gmail.com] Subject: Terminating long running request threads is there a way to get hold of these long running threads terminate them? This is not an issue specific to Tomcat; there is no way to safely terminate a Java thread without the cooperation of that thread. Best if you can code your webapp so that your request processors periodically check if they've been running too long and give up if so. Yes, it is not a Tomcat specific issue. The thing is, we don't have total control over what type of webapps will be deployed. We do restrict certain operations using a Java Security Manager, but I do not think we can restrict the running time of a Thread using a security manager. Using the ThreadMXBean we can monitor the time each thread takes, and get the thread IDs of long running threads. It may be possible to get that thread to terminate if we have some support for that from the Tomcat threadpool. Just thinking out loud. Thanks Azeez - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Windows Authentication: Issue 49318 vs 47679
I should have SPNEGO support in Tomcat 7 fairly soon. This would be great! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
CsrfPreventionFilter
Hi, 2 questions: 1. Are there any plans to implement wildcard (e.g. ANT-like) matching for the entrypoints of the CsrfPreventionFilter? I have several static ressources like css, images etc. which do not need a nonce and I really cannot list all of them explicitly. The main problem are urls in css files which are editable by the customer. 2. Are the any plans to make the nonce-parameter name configurable? Thank you. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Where are my compiled jsp's?
Hi, I have an expanded webapp moved into a directory out of tomcats webapps-dir. I have changed the docbase in server.xml (I know, bad practice). But now the compiled jsp's are no longer in tomcats work directory. Where are they now? Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: what to do in conf. files
Especially, what are things to deploy jsf_webapp in its real host after developing it in the localhost ? You will also have to make sure that your URLs are built properly. If the string localhost appears anywhere in your webapp, you're probbaly doing something wrong. Also, if you're not building URLs in pages like this: a href=%= response.encodeURL(request.getContextPath() + /path/to/resource) %your link/a Isn't this very, very old Java-mixed-with-JSP code style? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Updating CRL
Hi, are there any plans to implement a life update (without restarting the connector) of the CRL in tomcat 7? And maybe via URL not via File? Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Updating Tomcate Windows Service
Hi, I have a tomcat 7.0.2 service under W2K8 64bit. I want to update it to 7.0.8. Can I just run the service installer for 7.0.8 again or will this reset my current configuration? Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Updating Tomcate Windows Service
I have a tomcat 7.0.2 service under W2K8 64bit. I want to update it to 7.0.8. Can I just run the service installer for 7.0.8 again or will this reset my current configuration? https://issues.apache.org/bugzilla/show_bug.cgi?id=10021 It will reset your configuration. OK, so I will save my conf dir and wars, reinstall tomcat and then copy the conf and wars back to tomcat (and pray that server.xml Co are still compatible :)). Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
SSL not working
Hi, I did it now so many times - it always worked - configuring tomcat for SSL. Today: New server, new certificate. Create new keystore, imported root, intermediate and server certificate, configured the connector, same as usual. But... http does not work. No error in tomcats log, nothing. Browser says that it cannot load the page due to a connection problem, maybe security issue. How can I debug this ssl problem? Connector SSLEnabled=true clientAuth=want maxThreads=150 port=8443 protocol=org.apache.coyote.http11.Http11NioProtocol scheme=https secure=true sslProtocol=TLS keystoreFile=conf/tomcat.jks keystoreType=JKS keyAlias=tomcat keystorePass=changeit / Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: SSL not working
Hi, it is TC 7.0.5, Java 1.6_22. When I use a selfsigned certificate everything is fine - same server config, just the other certificate. So it must be something wrong with the certificate. But I have no clue what. How can I debug the SSL-Handshake process? The cert not working has: #7: ObjectId: 2.5.29.37 Criticality=false ExtendedKeyUsages [ serverAuth clientAuth ] #8: ObjectId: 2.16.840.1.113730.1.1 Criticality=false NetscapeCertType [ SSL client SSL server ] So it should be the right type of cert. Thank you -Original Message- From: Thad Humphries [mailto:thad.humphr...@gmail.com] Sent: Freitag, 28. Januar 2011 16:47 To: Tomcat Users List Subject: Re: SSL not working I've been fooling around *a lot* lately with SSL, so I thought I'd give this a try. I'm not very experienced, but I'll offer my two cents. First of all, what version of Tomcat, Java, etc. are you running? Such a statement is *de rigueur* for practically any question to this forum. My system looks like ** Server: SuSE 11.3 (2.6.34.7-0.7-desktop #1 SMP PREEMPT 2010-12-13 11:13:53 +0100 i686 i686 i386 GNU/Linux) ** Tomcat 6.0.30 ** Java: JRE 1.5.0_22 (though my keystore was self-generated with JDK 1.6.0_23) That said, the connector you describe is working for me, even when I intentionally misname my keyAlias. However I have only one entry in my keystore. I'm guessing that it can screw up if you have more than one and you give the wrong alias. You're using a JSSE implementation, correct? Run $ keytool -list -keystore $CATALINA_HOME/conf/keystore.jks -v and see what you get. (BTW, my self-generated openssl can be read with $ keytool -printcert -file /srv/apache2/conf/server.crt -v I say this only because I've also been fiddling, successfully, with the APR and mod_jk connector.) On Fri, Jan 28, 2011 at 8:06 AM, spr...@gmx.eu wrote: Hi, I did it now so many times - it always worked - configuring tomcat for SSL. Today: New server, new certificate. Create new keystore, imported root, intermediate and server certificate, configured the connector, same as usual. But... http does not work. No error in tomcats log, nothing. Browser says that it cannot load the page due to a connection problem, maybe security issue. How can I debug this ssl problem? Connector SSLEnabled=true clientAuth=want maxThreads=150 port=8443 protocol=org.apache.coyote.http11.Http11NioProtocol scheme=https secure=true sslProtocol=TLS keystoreFile=conf/tomcat.jks keystoreType=JKS keyAlias=tomcat keystorePass=changeit / Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Hell hath no limits, nor is circumscrib'd In one self-place; but where we are is hell, And where hell is, there must we ever be --Christopher Marlowe, *Doctor Faustus* (v, 121-24) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: SSL not working
OK, i enabled ssl-debug an got this: Using SSLEngineImpl. http-8443-exec-6, READ: TLSv1 Handshake, length = 72 *** ClientHello, TLSv1 RandomCookie: GMT: 1296237960 bytes = { 29, 26, 93, 201, 51, 195, 57, 220, 172, 159, 182, 24, 23, 109, 229, 241, 219, 44, 93, 9, 215, 107, 176, 92, 192, 250, 134, 108 } Session ID: {} Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_RSA_EXPORT1024_WITH_RC4_56_SHA, SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA] Compression Methods: { 0 } Unsupported extension type_65281, data: 00 *** http-8443-exec-6, fatal error: 40: no cipher suites in common javax.net.ssl.SSLHandshakeException: no cipher suites in common http-8443-exec-6, SEND TLSv1 ALERT: fatal, description = handshake_failure http-8443-exec-6, WRITE: TLSv1 Alert, length = 2 http-8443-exec-6, fatal: engine already closed. Rethrowing javax.net.ssl.SSLHandshakeException: no cipher suites in common http-8443-exec-6, called closeOutbound() http-8443-exec-6, closeOutboundInternal() Using SSLEngineImpl. http-8443-exec-7, READ: SSLv3 Handshake, length = 67 *** ClientHello, SSLv3 RandomCookie: GMT: 1296237960 bytes = { 167, 41, 66, 68, 100, 105, 126, 191, 190, 109, 143, 141, 122, 89, 201, 33, 1, 45, 228, 214, 141, 218, 73, 253, 8, 9, 118, 204 } Session ID: {} Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_RSA_EXPORT1024_WITH_RC4_56_SHA, SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA, Unknown 0x0:0xff] Compression Methods: { 0 } *** http-8443-exec-7, fatal error: 40: no cipher suites in common javax.net.ssl.SSLHandshakeException: no cipher suites in common http-8443-exec-7, SEND SSLv3 ALERT: fatal, description = handshake_failure http-8443-exec-7, WRITE: SSLv3 Alert, length = 2 http-8443-exec-7, fatal: engine already closed. Rethrowing javax.net.ssl.SSLHandshakeException: no cipher suites in common http-8443-exec-7, called closeOutbound() http-8443-exec-7, closeOutboundInternal() Using SSLEngineImpl. http-8443-exec-8, called closeOutbound() http-8443-exec-8, closeOutboundInternal() http-8443-exec-8, SEND TLSv1 ALERT: warning, description = close_notify http-8443-exec-8, WRITE: TLSv1 Alert, length = 2 When I open the cert I can see: MD5: 3C:33:0A:7C:BC:8B:8D:9E:A5:C1:8C:49:F9:E1:84:0A SHA1: 7F:02:49:61:4E:55:AE:11:F0:93:82:06:8A:44:95:56:2D:1E:0E:EB Unterschrift-Algorithmusname: SHA1withRSA Version: 3 So is my java runtime mising SHA1withRSA? -Original Message- From: spr...@gmx.eu [mailto:spr...@gmx.eu] Sent: Freitag, 28. Januar 2011 18:35 To: 'Tomcat Users List' Subject: RE: SSL not working Hi, it is TC 7.0.5, Java 1.6_22. When I use a selfsigned certificate everything is fine - same server config, just the other certificate. So it must be something wrong with the certificate. But I have no clue what. How can I debug the SSL-Handshake process? The cert not working has: #7: ObjectId: 2.5.29.37 Criticality=false ExtendedKeyUsages [ serverAuth clientAuth ] #8: ObjectId: 2.16.840.1.113730.1.1 Criticality=false NetscapeCertType [ SSL client SSL server ] So it should be the right type of cert. Thank you -Original Message- From: Thad Humphries [mailto:thad.humphr...@gmail.com] Sent: Freitag, 28. Januar 2011 16:47 To: Tomcat Users List Subject: Re: SSL not working I've been fooling around *a lot* lately with SSL, so I thought I'd give this a try. I'm not very experienced, but I'll offer my two cents. First of all, what version of Tomcat, Java, etc. are you running? Such a statement is *de rigueur* for practically any question to this forum. My system looks like ** Server: SuSE 11.3 (2.6.34.7-0.7-desktop #1 SMP PREEMPT 2010-12-13 11:13:53 +0100 i686 i686 i386 GNU/Linux) ** Tomcat 6.0.30 ** Java: JRE 1.5.0_22 (though my keystore was self-generated with JDK 1.6.0_23) That said, the connector you describe is working for me, even when I intentionally misname my keyAlias. However I have only one entry in my keystore. I'm guessing that it can screw up if you have more than one and you give the wrong alias. You're using a JSSE implementation, correct? Run $ keytool -list -keystore $CATALINA_HOME/conf/keystore.jks -v and see what you get. (BTW, my self-generated openssl can be read with $ keytool -printcert -file /srv/apache2/conf/server.crt -v I say this only because I've also been fiddling, successfully, with the APR and mod_jk
RE: Applet, session-ID - TC 6 vs. TC7
The behaviour is configurable. Set the changeSessionIdOnAuthentication attribute to false on the FORM authenticator valve Hm, ok. I do not use tomcat's auth mechanisms. I use spring security. Something must have changed between TC 6.0 and 7.0. And I have no idea what... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Applet, session-ID - TC 6 vs. TC7
Hm, ok. I do not use tomcat's auth mechanisms. I use spring security. Something must have changed between TC 6.0 and 7.0. And I have no idea what... As has already been explained, the session ID changes on authentication. What do you mean with authentication? I do NOT use tomcat's auth mechanisms. What kind of event let tomcat change the session id? And how can I disable this behaviour? Thank you! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Applet, session-ID - TC 6 vs. TC7
Well, saying you use Form auth was misleading, wasn't it? Is called FormAuth in Spring too. If you're using Spring Security maybe your question would be better addressed to one of the Spring forums? Hm. But it works in TC 6.0 with the same version of spring. Are you unable to retrieve the new session id? This is all done magically by the Applet-Java-Runtime. Really... ? Somehow the Java-Browser-Plugin is communicating with the browser and when you are doing HTTP request from within an applet, the session cookie gets automatically sent too. And here something goes wrong when the applet talks to TC 7.0. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Applet, session-ID - TC 6 vs. TC7
I have a web app where the user logs in and starts an applet which uploads a file and then opens a page in the browser. I use Java 1.6_16. When I do this in TC 6.0.13 the session-ID stays the same after login. Fine. When I do this in TC 7.0.5 the session-ID changes when the applet starts to communicate with the server. So the user is losing his login and the app is broken. What feature in TC 7 leads to this problem? The new session fixation prevention? OK, I think I've got it. Somewhat forces httponly cookies in IE, FF, Chrome. NOT in safari. Same machine, same java. After that it seems that that the transfer of cookies between the browser and the java-plugin does not work anymore. I do not understand, why httponly is forced, because my web.xml is like this: session-config session-timeout30/session-timeout cookie-config http-onlyfalse/http-only /cookie-config /session-config How can I solve this? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Applet, session-ID - TC 6 vs. TC7
You will also need to set useHttpOnly=false on the Context. For security, Tomcat sets the httpOnly flag on the cookie if either of these are true. Uh... Where is this documented? I was already looking for it... Thank you! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat 6.0.29 webdav servlet support for file uploading with browser
On Sat, 15 Jan 2011 18:21:26 +0100, Al wq eee...@hotmail.com wrote: The problem is that I am missing a JSP for it. JSP generates HTML. HTML only supports GET and POST. WebDav uses PUT for uploads. A browser isn't a full WebDav client. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Applet, session-ID - TC 6 vs. TC7
The interaction between the settings isn't documented as far as I recall. (Patches welcome) Can I patch it? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Applet, session-ID - TC 6 vs. TC7
Hi, I have a web app where the user logs in and starts an applet which uploads a file and then opens a page in the browser. I use Java 1.6_16. When I do this in TC 6.0.13 the session-ID stays the same after login. Fine. When I do this in TC 7.0.5 the session-ID changes when the applet starts to communicate with the server. So the user is losing his login and the app is broken. What feature in TC 7 leads to this problem? The new session fixation prevention? How can I solve this? Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Applet, session-ID - TC 6 vs. TC7
What are you using the session id for? I use form auth. Subsequent calls after a successful login in the same session are not authenticated again. This is standard I would say. Don't rely on the session id remaining the same. Then the applet has to know the user credentials and has to post to the login servlet. This is not possible (3rd party applet). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Applet, session-ID - TC 6 vs. TC7
Are you unable to retrieve the new session id? This is all done magically by the Applet-Java-Runtime. Programmatic login is now possible in Servlet 3.0, would this help? I know, but the applet does NOT know the credentials. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader
running under W2K3, tomcat 6.0.26 and java 1.6_22 I get after a while: java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader at: Iterator it = ImageIO.getImageReadersByFormatName(TIF); r = (TIFFImageReader)it.next(); //==BANG I solved that problem by moving jai_imageio.jar into JAVA/lib/ext. Moving it to TOMCAT/lib did NOT solve the problem. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader
java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader at: Iterator it = ImageIO.getImageReadersByFormatName(TIF); r = (TIFFImageReader)it.next(); //==BANG I solved that problem by moving jai_imageio.jar into JAVA/lib/ext. Moving it to TOMCAT/lib did NOT solve the problem. I think you're referring to an older thread you posted, but I can't find it in my mail client. Yes, had a similar problem with Tomcat 7. Here it was not ClassCastEx but a NoSuchElementEx indicating that the TIFF-Plugin cannot be found. In both cases the problem was solved when moving the jar into ext. If you're using a Java 6 JDK, isn't the JAI stuff included? I thought it was only a separate download for older versions of Java (please correct me if I'm wrong). Hm, I think I need the jar for TIFF-Support. Plain JRE has JPEG, PNG, GIF and BMP only - imo... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: APR and async request
OK; I've got it... when I change the Connector from HTTP/1.1 to org.apache.coyote.http11.Http11NioProtocol is works. Sounds a bit logical (Non-Blocking and async) but can someone please explain? Thank you when I disable APR by removing the tcnative-1.dll or by removing the APR listener from server.xml async requests do not work anymore. I get immediately after the request an empty response body with status 200. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: APR and async request
I mean the new servlet 3.0 capabilities: startAsync() and the resulting AsyncContext: request.startAsync() AsyncContext#getResponse() sample: HttpServletResponse res = (HttpServletResponse)ac.getResponse(); res.setStatus(200); res.setHeader(X-Foo, bar); res.setContentType(application/xml); PrintWriter w = res.getWriter(); w.println(foo/); w.flush(); ac.complete(); It seem that the response object is some what damaged, the code does not fail, but the client only receives status 200, no body and no custom headers send via Response#setHeader(X-..., ...). Thank you! -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Dienstag, 21. Dezember 2010 14:10 To: Tomcat Users List Subject: Re: APR and async request On 21/12/2010 13:07, spr...@gmx.eu wrote: OK; I've got it... when I change the Connector from HTTP/1.1 to org.apache.coyote.http11.Http11NioProtocol is works. Sounds a bit logical (Non-Blocking and async) but can someone please explain? You'll need to explain what you mean by async requests before anyone can answer that. Mark Thank you when I disable APR by removing the tcnative-1.dll or by removing the APR listener from server.xml async requests do not work anymore. I get immediately after the request an empty response body with status 200. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader
Hi, running under W2K3, tomcat 6.0.26 and java 1.6_22 I get after a while: java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader at: Iterator it = ImageIO.getImageReadersByFormatName(TIF); r = (TIFFImageReader)it.next(); //==BANG When I restart tomcat, everything is fine again for some hours and the it happens again until tomcat is restartet. It seems that somewhat reloads the webapp which uses TIFFImageReader but that plugin is still somewhere in another classloader which causes this CCE then. The problem is: No one explicitly reloads the app. Nothing to be seen in the logs. The app is the only app on this tomcat. NO JreMemoryLeakPreventionListener is configured in server.xml. What can be the problem here? Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader
ImageIO pins the classloader it first uses. So if that's a WebappClassloader you subsequently reload the app you'll have a memory leak the potential for class cast exceptions. As I said, nobody reloads the app (at least I cannot see this in the logs). It just happens after a while. The leak prevention stuff handles this, but you've turned it off. When I active the listener I get a NPE... Iterator it = ImageIO.getImageReadersByFormatName(TIF); r = (TIFFImageReader)it.next(); //== NPE Thank you! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
APR and async request
Hi, when I disable APR by removing the tcnative-1.dll or by removing the APR listener from server.xml async requests do not work anymore. I get immediately after the request an empty response body with status 200. I'm using TC 7.0.5 under windows 2003. Thank you. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 7.0.0 Beta1 - AsyncListener
Hello, I have a AsyncListener registered for an AsyncContext. Everytime I call AsyncContext#complete fist onError gets called (throwable is null) and then onComplete(). Is this a known Bug or did I made something wrong? Here is the relevant Code: member vars: private final QueueAsyncContext queue = new ConcurrentLinkedQueueAsyncContext(); private ScheduledExecutorService s = Executors.newScheduledThreadPool(2); in doGet: final AsyncContext ac = req.startAsync(); ac.setTimeout(1 * 60 * 1000); ac.addListener(new AsyncListener() { public void onComplete(AsyncEvent event) throws IOException { queue.remove(ac); } public void onTimeout(AsyncEvent event) throws IOException { queue.remove(ac); } public void onError(AsyncEvent event) throws IOException { queue.remove(ac); } public void onStartAsync(AsyncEvent event) throws IOException { } }); queue.add(ac); in doPost I call notify(some message): private void notify(final String cMessage) throws IOException { s.schedule(new Runnable() { @Override public void run() { for (AsyncContext ac : queue) { try { PrintWriter acWriter = ac.getResponse().getWriter(); acWriter.println(cMessage); acWriter.flush(); ac.complete() } catch (IOException ex) { System.out.println(ex); queue.remove(ac); } } } }, 3, TimeUnit.SECONDS); } Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org