Re: NIOSelector busy wait
Hi, I'm running an embedded tomcat, so I don't have the server.xml file. When I place a breakpoint in the selector loop though I find that the value of selectorTimeout is 1000. Regards, Sebastiaan Martin Gainty wrote: curious what the value tcpSelectorTimeout is defines in %TOMCAT_HOME%/conf/server.xml Bedankt/ Martin-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Sebastiaan van Erk" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Thursday, May 03, 2007 1:07 PM Subject: NIOSelector busy wait Hi, I have a problem that sometimes the NIO selector goes into a busy wait loop. In line 1430 the code of NIOEndpoint.java, keyCount = selector.select(selectorTimeout); select keeps returning 0 without waiting. I'm running on the latest trunk version of tomcat 6, on Ubuntu Linux Feisty, with java version: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode) However, I've seen this same behavior with other JDK's (1.5). To me it seems that it's a bug in the JVM implementation because select should only return 0 if it's woken up, which does not happen (since all other threads are suspended in my debugger). However, I was wondering if anybody else has seen this behavior and perhaps knows what's causing it in the first place. Regards, Sebastiaan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
firewall setting for AJP1.3 connector
I have a machine sitting in the DMZ with IIS 6.0 as the web server. I am trying to redirect request to an internal server running Tomcat sitting behind the firewall using isapi_redirect.dll I have opened up port 8009 which is defined as the AJP1.3 connector in the server.xml. 8009 has been opened up in the firewall for TCP communication. But the reverse proxy redirection fails with the following message [Thu May 03 20:43:42 2007] [error] jk_ajp_common.c (961): Can't receive the response message from tomcat, network problems or tomcat is down (10.170.4.96:8009), err=-54 [Thu May 03 20:43:42 2007] [error] jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Thu May 03 20:43:42 2007] [info] jk_ajp_common.c (1721): Receiving from tomcat failed, recoverable operation attempt=0 [Thu May 03 20:43:42 2007] [info] jk_ajp_common.c (1749): Sending request to tomcat failed, recoverable operation attempt=1 Should I be openeing up the port for a different kind of traffic other than TCP - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NIOSelector busy wait
curious what the value tcpSelectorTimeout is defines in %TOMCAT_HOME%/conf/server.xml Bedankt/ Martin-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Sebastiaan van Erk" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Thursday, May 03, 2007 1:07 PM Subject: NIOSelector busy wait Hi, I have a problem that sometimes the NIO selector goes into a busy wait loop. In line 1430 the code of NIOEndpoint.java, keyCount = selector.select(selectorTimeout); select keeps returning 0 without waiting. I'm running on the latest trunk version of tomcat 6, on Ubuntu Linux Feisty, with java version: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode) However, I've seen this same behavior with other JDK's (1.5). To me it seems that it's a bug in the JVM implementation because select should only return 0 if it's woken up, which does not happen (since all other threads are suspended in my debugger). However, I was wondering if anybody else has seen this behavior and perhaps knows what's causing it in the first place. Regards, Sebastiaan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JDBCRealm
Murtuza here is server.xml example from Tomcat 5.5 docs where test is name of db user=testr and password=testr HTH Martin-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Murtuza" <[EMAIL PROTECTED]> To: Sent: Thursday, May 03, 2007 6:37 PM Subject: Re: JDBCRealm below is my context.xml file. I can connect to the mysql database from a java class with the same username/pass. Martin Gainty wrote: Have you verified the mysql listener is listening? Have you verified the JDBCRealm is configured using the parameters which will allow you to connect? If you are able to confirm both please post your JDBCRealm parameters here Martin This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Murtuza" <[EMAIL PROTECTED]> To: Sent: Thursday, May 03, 2007 5:22 PM Subject: JDBCRealm -I am using mysql as database.. -I have mysql-connector-java-5.0.5 jdbc driver in my tomcat/lib directory -I am using JDBCRealm for authentication -On my windows machine it works fine -when I deployed it on linux box it does't work -I get the foloowing error message from my localhost log file any idea May 3, 2007 4:52:38 PM org.apache.catalina.realm.JDBCRealm start SEVERE: Exception opening database connection java.sql.SQLException: com.mysql.jdbc.Driver at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691) at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:769) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) --- May 3, 2007 4:55:44 PM org.apache.catalina.realm.JDBCRealm authenticate SEVERE: Exception performing authentication java.sql.SQLException: com.mysql.jdbc.Driver at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:346) at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634
Re: JDBCRealm
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Murtuza, > docBase="security" You should specify neither the "path" nor the "docBase" attributes when you are using a context.xml file. This is probably not the problem, but could be causing some other problems. The only thing I can think of is that you have your MySQL driver JAR file in the wrong place. You said you had it in $TOMCAT_HOME/lib... I think you want it in $TOMCAT_HOME/common/lib. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGOm6E9CaO5/Lv0PARAudAAJ9xjZ52kMIAn2H3U1O9GnRjy795rQCdHxlt 6cTl8B8MXaIjRVAWGncENPE= =hwrW -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JDBCRealm
below is my context.xml file. I can connect to the mysql database from a java class with the same username/pass. Martin Gainty wrote: > > Have you verified the mysql listener is listening? > Have you verified the JDBCRealm is configured using the parameters which > will allow you to connect? > If you are able to confirm both please post your JDBCRealm parameters here > > Martin > This email message and any files transmitted with it contain confidential > information intended only for the person(s) to whom this email message is > addressed. If you have received this email message in error, please > notify > the sender immediately by telephone or email and destroy the original > message without making a copy. Thank you. > > - Original Message - > From: "Murtuza" <[EMAIL PROTECTED]> > To: > Sent: Thursday, May 03, 2007 5:22 PM > Subject: JDBCRealm > > >> >> -I am using mysql as database.. >> -I have mysql-connector-java-5.0.5 jdbc driver in my tomcat/lib directory >> -I am using JDBCRealm for authentication >> -On my windows machine it works fine >> -when I deployed it on linux box it does't work >> -I get the foloowing error message from my localhost log file >> >> any idea >> >> >> May 3, 2007 4:52:38 PM org.apache.catalina.realm.JDBCRealm start >> SEVERE: Exception opening database connection >> java.sql.SQLException: com.mysql.jdbc.Driver >>at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691) >>at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:769) >>at >> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) >>at >> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761) >>at >> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741) >>at >> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) >>at >> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) >>at >> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) >>at >> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) >>at >> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) >>at >> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) >>at >> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) >>at >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023) >>at >> org.apache.catalina.core.StandardHost.start(StandardHost.java:719) >>at >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015) >>at >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) >>at >> org.apache.catalina.core.StandardService.start(StandardService.java:448) >>at >> org.apache.catalina.core.StandardServer.start(StandardServer.java:710) >>at org.apache.catalina.startup.Catalina.start(Catalina.java:552) >>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>at java.lang.reflect.Method.invoke(Method.java:585) >>at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) >>at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) >> >> --- >> >> May 3, 2007 4:55:44 PM org.apache.catalina.realm.JDBCRealm authenticate >> SEVERE: Exception performing authentication >> java.sql.SQLException: com.mysql.jdbc.Driver >>at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691) >>at >> org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:346) >>at >> org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181) >>at >> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491) >>at >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) >>at >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) >>at >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) >>at >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216) >>at >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) >>at >> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634) >>at >> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) >>at java.lang.Thread.run(Thread.java:595) >> >> -- >> View this message in context: >> http://www.nabble.com/JDBCRealm-tf3689024.html#a10313417 >> Sent from the Tomcat - User mailing list archive at Nabble.com. >> >> >> --
Re: JDBCRealm
Have you verified the mysql listener is listening? Have you verified the JDBCRealm is configured using the parameters which will allow you to connect? If you are able to confirm both please post your JDBCRealm parameters here Martin This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Murtuza" <[EMAIL PROTECTED]> To: Sent: Thursday, May 03, 2007 5:22 PM Subject: JDBCRealm -I am using mysql as database.. -I have mysql-connector-java-5.0.5 jdbc driver in my tomcat/lib directory -I am using JDBCRealm for authentication -On my windows machine it works fine -when I deployed it on linux box it does't work -I get the foloowing error message from my localhost log file any idea May 3, 2007 4:52:38 PM org.apache.catalina.realm.JDBCRealm start SEVERE: Exception opening database connection java.sql.SQLException: com.mysql.jdbc.Driver at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691) at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:769) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) --- May 3, 2007 4:55:44 PM org.apache.catalina.realm.JDBCRealm authenticate SEVERE: Exception performing authentication java.sql.SQLException: com.mysql.jdbc.Driver at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:346) at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) at java.lang.Thread.run(Thread.java:595) -- View this message in context: http://www.nabble.com/JDBCRealm-tf3689024.html#a10313417 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JDBCRealm
-I am using mysql as database.. -I have mysql-connector-java-5.0.5 jdbc driver in my tomcat/lib directory -I am using JDBCRealm for authentication -On my windows machine it works fine -when I deployed it on linux box it does't work -I get the foloowing error message from my localhost log file any idea May 3, 2007 4:52:38 PM org.apache.catalina.realm.JDBCRealm start SEVERE: Exception opening database connection java.sql.SQLException: com.mysql.jdbc.Driver at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691) at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:769) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) --- May 3, 2007 4:55:44 PM org.apache.catalina.realm.JDBCRealm authenticate SEVERE: Exception performing authentication java.sql.SQLException: com.mysql.jdbc.Driver at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:346) at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) at java.lang.Thread.run(Thread.java:595) -- View this message in context: http://www.nabble.com/JDBCRealm-tf3689024.html#a10313417 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploying Default Webapp in Tomcat 6.0
:) I liked this one On 5/3/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > From: Matthew Inger [mailto:[EMAIL PROTECTED] > Subject: Deploying Default Webapp in Tomcat 6.0 > > I've been trying to figure out how to deploy a .war file as > the root webapp in Tomcat 6.0.10. > > Say I have a "foo.war" file, and create a > conf/Catalina/localhost/foo.xml file with the > following contents: > > (I'm going to get a rubber stamp for this one.) The path attribute is not allowed when is in conf/Catalina/[host]/[appname].xml, and the docBase attribute must not be used if the app is deployed under the 's appBase directory. Read the description of the path attribute for the element: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html You would normally name the default app ROOT.war, as the doc states, and place it in the appBase directory (webapps, by default). If you insist on naming the .war something else, then keep it outside of Tomcat's directory structure, and put your element in conf/Catalina/[host]/ROOT.xml with a docBase attribute pointing to the location of the .war file (do not include a path attribute). > Can anyone figure out what I'm doing wrong? Not reading the doc or recent messages on this mailing list. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.23 with Sun JDK 1.5.0_11 can't find the Apache Tomcat Native library
Try de dir where you compiled the files, where you did: sh buildconf; ./configure and make There is a directory .libs in there you will find the native library's copy them to your $JAVA_HOME/jre/lib/i386/client There should be 6 files: libtcnative-1.a libtcnative-1.lai libtcnative-1.so.0 libtcnative-1.la libtcnative-1.so libtcnative-1.so.0.1.9 cp .libs/* $JAVA_HOME/jre/lib/i386/client Where JAVA_HOME is where you have the java that is going to be used by tomcat. I prefer to do it this way in case you have several versions of tomcat with different java versions which is my case. "A developers need is a developers need" ;) On 5/3/07, Rafael Caceres <[EMAIL PROTECTED]> wrote: Hi all, The Apache Tomcat Native library was built from the untarred source on /usr/local/apache-tomcat-5.5.23/bin/tomcat-native-1.1.6-src/jni/native using: ./configure --with-apr=/usr/local/apache2/bin/apr-config --with-ssl --prefix=/usr/local/apr;make;make install On startup the Tomcat logs show: INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/apr/lib:/usr/local/apache2/lib:/lib/tls:/lib:/usr/lib:/usr/local/jdk1.5.0_11/jre/lib/i386/client:/usr/local/jdk1.5.0_11/jre/lib/i386 The above java.library.path contains all the library directories indicated by doing ldd /usr/local/apr/lib/libtcnative-1.so Setting java.library.path though changing LD_LIBRARY_PATH (and exporting LD_LIBRARY_PATH) or by passing -Djava.library.path=library:paths to the jsvc start as indicated on posts to this list and the APR docs, do not solve the problem. Any pointers will be appreciated, Rafael Analizado por ThMailServer para Linux. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deploying Default Webapp in Tomcat 6.0
> From: Matthew Inger [mailto:[EMAIL PROTECTED] > Subject: Deploying Default Webapp in Tomcat 6.0 > > I've been trying to figure out how to deploy a .war file as > the root webapp in Tomcat 6.0.10. > > Say I have a "foo.war" file, and create a > conf/Catalina/localhost/foo.xml file with the > following contents: > > (I'm going to get a rubber stamp for this one.) The path attribute is not allowed when is in conf/Catalina/[host]/[appname].xml, and the docBase attribute must not be used if the app is deployed under the 's appBase directory. Read the description of the path attribute for the element: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html You would normally name the default app ROOT.war, as the doc states, and place it in the appBase directory (webapps, by default). If you insist on naming the .war something else, then keep it outside of Tomcat's directory structure, and put your element in conf/Catalina/[host]/ROOT.xml with a docBase attribute pointing to the location of the .war file (do not include a path attribute). > Can anyone figure out what I'm doing wrong? Not reading the doc or recent messages on this mailing list. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deploying Default Webapp in Tomcat 6.0
I've been trying to figure out how to deploy a .war file as the root webapp in Tomcat 6.0.10. Say I have a "foo.war" file, and create a conf/Catalina/localhost/foo.xml file with the following contents: I would expect (as in Tomcat 5), that the url: http://localhost:8080/ would be routed to the webapp in foo.war. However, I simply get a blank page (yes, i've removed the webapps/ROOT directory). I've found not much of anything useful in the documentation on doing this. Can anyone figure out what I'm doing wrong? [EMAIL PROTECTED] "Once you start down the dark path, forever will it dominate your destiny. Consume you it will " - Yoda __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War with timestamp not using META-INF/context.xml path
On 5/3/07, Garner, Shawn <[EMAIL PROTECTED]> wrote: We don't use a deployment script. Not sure if we could, it's all secured and isolated. Without the timestamp and the environment in the war name somebody could deploy a war to the wrong environment or an old war. Sounds to me like if it is easy enough to use the filename that you could use the path attribute in META-INF/context.xml just as easy. As Chuck mentioned, this is not possible. If you consider using an Ant Build Script or Maven or other (your choice), then you could auto deploy remotely to any location with just the WAR file name minus the timestamp as Chuck mentioned. However, build scripts are out of the scope of this list, but each build tool has their own mailing list - I know Ant has one, probably Maven and others have their own. Shawn -Regards Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: War with timestamp not using META-INF/context.xml path
> From: Garner, Shawn [mailto:[EMAIL PROTECTED] > Subject: RE: War with timestamp not using META-INF/context.xml path > > We don't use a deployment script. > Not sure if we could, it's all secured and isolated. If you do it by hand, you can do it with a script. > Without the timestamp and the environment in the war name > somebody could deploy a war to the wrong environment or an > old war. Which is why you should be using a script to avoid such human errors. > Sounds to me like if it is easy enough to use the filename that you > could use the path attribute in META-INF/context.xml just as easy. The path attribute is there primarily for compatibility with the bad old days, where it occasionally caused a great deal of confusion. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: User-password from the HttpServletRequest
Sebbo the word you looking for is SYMMETRICAL encryption I think Sun has an Class... cant remember. Anyway have a look at things like DES... and the one I like IDEA. You can read up on all that stuff and I'm pretty sure you will find java implementations. I did have this all coded a long time ago... but I dont know where I put it off hand. Probably better to use a Sun lib anyway... - Original Message - From: <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Thursday, May 03, 2007 7:45 PM Subject: Re: User-password from the HttpServletRequest I saw, that I can get the password via the Principle: The Tomcat server has his own implementation of Principle: GenericPrinciple which holds all the stuff (pw, roles, etc). I know the problem with the changing of password, but thats not the main probelm now ;-) Does somebody know a good encryption/decryption algorithm wich works only with a password (String)? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: War with timestamp not using META-INF/context.xml path
We don't use a deployment script. Not sure if we could, it's all secured and isolated. Without the timestamp and the environment in the war name somebody could deploy a war to the wrong environment or an old war. Sounds to me like if it is easy enough to use the filename that you could use the path attribute in META-INF/context.xml just as easy. Shawn -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, May 03, 2007 2:29 PM To: Tomcat Users List Subject: RE: War with timestamp not using META-INF/context.xml path > From: Garner, Shawn [mailto:[EMAIL PROTECTED] > Subject: RE: War with timestamp not using META-INF/context.xml path > > So there is no way to have the war tell the container what context to > use other than the filename? Correct, unless you manually place the element in server.xml, which is strongly discouraged. Why not have your deployment script strip the time stamp off before actual deployment? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NIOSelector busy wait
Hi, it will return 0 after the timeout has expired if there was no events. most likely its not a bug in the JDK but in your linux kernel/distro Well Ubuntu is pretty big, so I'd expect other people to have seen this as well. I have been able to reproduce a select busy loop in the JDK myself, by registering for OP_CONNECT *before* calling socketChannel.connect(). In the time between the two, the selector keeps returning 0 without blocking. By reversing the operations the busy wait goes away. The problem that I have now seems to be related to sockets going bad on one side of the equation but without being closed, but I have not been able to reproduce the exact conditions under which it happens. I have seen bug reports on the sun developer sites/forums related to NIO busy waiting, but no resolutions, and was hoping somebody here had similar experiences. Regards, Sebastiaan so far I haven't seen the behavior you've explained. Filip Sebastiaan van Erk wrote: Hi, I have a problem that sometimes the NIO selector goes into a busy wait loop. In line 1430 the code of NIOEndpoint.java, keyCount = selector.select(selectorTimeout); select keeps returning 0 without waiting. I'm running on the latest trunk version of tomcat 6, on Ubuntu Linux Feisty, with java version: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode) However, I've seen this same behavior with other JDK's (1.5). To me it seems that it's a bug in the JVM implementation because select should only return 0 if it's woken up, which does not happen (since all other threads are suspended in my debugger). However, I was wondering if anybody else has seen this behavior and perhaps knows what's causing it in the first place. Regards, Sebastiaan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: War with timestamp not using META-INF/context.xml path
> From: Garner, Shawn [mailto:[EMAIL PROTECTED] > Subject: RE: War with timestamp not using META-INF/context.xml path > > So there is no way to have the war tell the container what context to > use other than the filename? Correct, unless you manually place the element in server.xml, which is strongly discouraged. Why not have your deployment script strip the time stamp off before actual deployment? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: War with timestamp not using META-INF/context.xml path
So there is no way to have the war tell the container what context to use other than the filename? Shawn -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, May 03, 2007 2:23 PM To: Tomcat Users List Subject: RE: War with timestamp not using META-INF/context.xml path > From: Garner, Shawn [mailto:[EMAIL PROTECTED] > Subject: RE: War with timestamp not using META-INF/context.xml path > > The fourth bullet says this: > > -if the previous file was not found for this application, in an > individual file at /META-INF/context.xml inside the application files > > Sure sounds like it should to me. You seem to be rigorously ignoring the primary statement in my earlier response: "Neither the path nor the docBase attributes are allowed when the element is in META-INF/context.xml." Read the description of the path attribute for the element: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: War with timestamp not using META-INF/context.xml path
> From: Garner, Shawn [mailto:[EMAIL PROTECTED] > Subject: RE: War with timestamp not using META-INF/context.xml path > > The fourth bullet says this: > > -if the previous file was not found for this application, in an > individual file at /META-INF/context.xml inside the application files > > Sure sounds like it should to me. You seem to be rigorously ignoring the primary statement in my earlier response: "Neither the path nor the docBase attributes are allowed when the element is in META-INF/context.xml." Read the description of the path attribute for the element: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: War with timestamp not using META-INF/context.xml path
The fourth bullet says this: -if the previous file was not found for this application, in an individual file at /META-INF/context.xml inside the application files Sure sounds like it should to me. Shawn -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, May 03, 2007 2:03 PM To: Tomcat Users List Subject: RE: War with timestamp not using META-INF/context.xml path > From: Garner, Shawn [mailto:[EMAIL PROTECTED] > Subject: War with timestamp not using META-INF/context.xml path > > path in the META-INF/context.xml of the war. Neither the path nor the docBase attributes are allowed when the element is in META-INF/context.xml. As the doc states, the URI path to the webapp is derived from the name of the .war file. Look here for details: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: War with timestamp not using META-INF/context.xml path
> From: Garner, Shawn [mailto:[EMAIL PROTECTED] > Subject: War with timestamp not using META-INF/context.xml path > > path in the META-INF/context.xml of the war. Neither the path nor the docBase attributes are allowed when the element is in META-INF/context.xml. As the doc states, the URI path to the webapp is derived from the name of the .war file. Look here for details: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] User-password from the HttpServletRequest
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sam, [EMAIL PROTECTED] wrote: > I saw, that I can get the password via the Principle: The Tomcat > server has his own implementation of Principle: GenericPrinciple > which holds all the stuff (pw, roles, etc). Wow, Tomcat keeps the user's password lying around in memory? That's unfortunate... :( > Does somebody know a good encryption/decryption algorithm which works > only with a password (String)? There are many symmetric encryption algorithms. DES, 3DES ("Triple DES"), AES, and Blowfish are quire popular. Java supports many of these algorithms out of the box. Figuring out how to use them can be a challenge, so here's some of the things I've learned. With my (relatively standard) Sun JDK 1.5.0_11-b03, I have the following ciphers available from the "SunJCE version 1.5" provider: AES Blowfish DES 3DES Each of these can be used with a simple password. You'll need to massage your strings to get them into the proper format, though. Here is some helpful code. In order to do anything with a cipher, you'll need a key. The easiest way to create a key is like this: byte[] password = ...; String algorithm = ...; // "AES", "3DES", etc. Key encryptionKey = new javax.crypto.spec.SecretKeySpec(password, algorithm); Now that you have a key (which can be used for decryption, btw), you can use a cipher: byte[] clearText = ...; // convert your data-to-encrypt to bytes Cipher cipher = javax.crypto.Cipher.getInstance(algorithm); cipher.init(Cipher.ENCRYPT_MODE, key); byte[] cipherText = cipher.doFinal(clearText); Decryption is the same, just that you use DECRYPT_MODE when you call Cipher.init. DO NOT TRY TO SHARE Cipher OBJECTS. A few other notes: * Be careful about converting Strings to and from byte arrays. Make sure that you consistently use the same character encoding (UTF-8 is always a good bet) or your efforts will end in tears. * If you want to store your encrypted data in a database, you have to decide if you want to store binary byte data (BLOB) or character data (CLOB). BLOBs are probably smaller (keep reading) but not as easy to "read" when observing data in the database. CLOBs will take more space but are easier to "read" when looking at your db. If you choose to use a CLOB, then you'll need to convert the cipher text into a readable format. Base64 encoding is often chosen because it results in 4 bytes of output for every 3 bytes of input, so you "waste" only 1/3 extra storage. Compare that to a "character binary encoding" (my term) where you have 1 byte -> 2 character conversion (results look like "1a2b3c" etc.) which doubles your data, which sucks. This is only one way to interact with Java's crypto APIs. I'm sure there are other ways, but after a lot of reading this is what I came up with. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGOjHL9CaO5/Lv0PARAmhuAJ9dmZchojiDSNOGBiPE8RCtZn8WHgCfXJL6 spL4xNqgsIAuKgHBLnD3KFo= =RssM -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with tomcat clusters sso with apache load balancer
Hi, the clusterSSO implementation is not ready: - at normal shutdown from one application or a node all sessions are expired. clusterSSO is a normal session listener and context stop expires all sessions. - The sessionID rewrite from JvmRouteBinderValve are not coordinated with clusterSSO sessionID cache. - I have made some improvements at the tomcat 5.5 backport :-( Peter Am 03.05.2007 um 19:24 schrieb Filip Hanik - Dev Lists: I don't think the clusterSSO implementation ever really got finished. It got submitted, but never completed. At least that was my impression of it Filip Alejandro Fernandez wrote: Hi, I am Alejandro from Argentina. I am having an issue with tomcat 6.0.10 using clusters and single sign on, while performing load balance with apache 2.2 When I am accessing a secured page, I try to login (the login form is shown correctly) but I receive the following: HTTP Status 400 - Invalid direct reference to form login page Note: The load balancer makes me switch between 2 tomcat servers. One switch by page request. Please tell me if the info is not enough. Thank you in advance. - - httpd.conf - - SetHandler balancer-manager BalancerMember ajp://sismcarrizo:8009 BalancerMember ajp://servisitadores4:8009 BalancerMember ajp://servisitadores4:8009 ProxyPass balancer://cluster/portal-a stickysession=JSESSIONID ProxyPass balancer://clusterb/portal-b stickysession=JSESSIONID ProxyPass balancer://cluster/portal-c stickysession=JSESSIONID ProxyPass balancer://cluster/accesos-sso stickysession=JSESSIONID - - server.xml - - className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8"> className="org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false" notifyListenersOnReplication="true"/> className="org.apache.catalina.tribes.group.GroupChannel"> className="org.apache.catalina.tribes.membership.McastService" address="228.0.0.4" port="45564" frequency="500" dropTime="3000"/> className="org.apache.catalina.tribes.transport.nio.NioReceiver" address="auto" port="4000" autoBind="100" selectorTimeout="5000" maxThreads="6"/> className="org.apache.catalina.tribes.transport.ReplicationTransmitte r"> className="org.apache.catalina.tribes.transport.nio.PooledParallelSen der"/> className="org.apache.catalina.tribes.group.interceptors.TcpFailureDe tector"/> className="org.apache.catalina.tribes.group.interceptors.MessageDispa tch15Interceptor"/> className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/> className="org.apache.catalina.ha.session.JvmRouteBinderValve"/> className="org.apache.catalina.ha.deploy.FarmWarDeployer" tempDir="/tmp/war-temp/" deployDir="/tmp/war-deploy/" watchDir="/tmp/war-listen/" watchEnabled="false"/> className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderList ener"/> className="org.apache.catalina.ha.session.ClusterSessionListener"/> className="org.apache.catalina.authenticator.SingleSignOn" debug="0"/> driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver" connectionURL="jdbc:microsoft:sqlserver:// desa-0:1433;databasename=accesos;selectmethod=cursor" connectionName="accesosusr" connectionPassword="j1ra808fa" userTable="users" userNameCol="username" userCredCol="password" userRoleTable="user_role" roleNameCol="role" debug="99" /> autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> - - web.xml - - portal-a /mercados.jsp /mercados.page /mercados.jsf accesos FORM Portal A Application /login.jsp /error.jsp The role that is required to log in to the Manager Application accesos - --- No virus found in this inc
War with timestamp not using META-INF/context.xml path
Tomcat 5.5.17 JDK 1.5 I deployed a war through the online manager and it deployed it under the filename instead of the path in the META-INF/context.xml of the war. So my war is mycontext-20070427-0946-sys.war And my context.xml has path="/mycontext" in it but it deployed it under mycontext-20070427-0946-sys. I thought it should read the path and deploy it under /mycontext without the timestamp. Shawn
Re: User-password from the HttpServletRequest
I saw, that I can get the password via the Principle: The Tomcat server has his own implementation of Principle: GenericPrinciple which holds all the stuff (pw, roles, etc). I know the problem with the changing of password, but thats not the main probelm now ;-) Does somebody know a good encryption/decryption algorithm wich works only with a password (String)? Original-Nachricht Datum: Wed, 02 May 2007 16:54:22 -0400 Von: Christopher Schultz <[EMAIL PROTECTED]> An: Tomcat Users List Betreff: Re: User-password from the HttpServletRequest > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Sam, > > [EMAIL PROTECTED] wrote: > > I'm using the password of the [authentication] to encrypt and decrypt > > some data to a database user specific (each users own data has the > > users password). > > Uh... are you sure this is a good idea? If the user changes his or her > password, do you re-encrypt all of their data? This doesn't seem like a > very efficient way to store encrypted information. > > My advice: randomly generate an encryption key when the account is > created (or afterward for existing users) and encrypt /that/ with the > user's password. Then, when the user's password is changed, you only > have to re-encrypt the encryption/decryption key itself, instead of > every piece of information in there. > > > To get to the password must be possibly, not? > > The servlet API provides no way to get the user's password. You'll have > to do this yourself. If you need the password all the time, you could > store it in the session during login and you'd have it available > whenever you want. > > If you use my suggestion from above, you could use the login password to > decrypt the general encryption/decryption key and then store that in the > session, which might be more convenient (or safer?) than storing the > user's actual password in the session. > > On second thought, the encryption key is more sensitive (at least, as > far as your application goes) than the user's password, so perhaps the > user's password in the session is better "just in case". > > - -chris > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.7 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFGOPp+9CaO5/Lv0PARAmcWAJ4t20OJWt1cm7ypLLLRm6mUtIAOZwCfZFJX > I+XT0VE6lyijDBtb/JScUnM= > =0QB0 > -END PGP SIGNATURE- > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NIOSelector busy wait
it will return 0 after the timeout has expired if there was no events. most likely its not a bug in the JDK but in your linux kernel/distro so far I haven't seen the behavior you've explained. Filip Sebastiaan van Erk wrote: Hi, I have a problem that sometimes the NIO selector goes into a busy wait loop. In line 1430 the code of NIOEndpoint.java, keyCount = selector.select(selectorTimeout); select keeps returning 0 without waiting. I'm running on the latest trunk version of tomcat 6, on Ubuntu Linux Feisty, with java version: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode) However, I've seen this same behavior with other JDK's (1.5). To me it seems that it's a bug in the JVM implementation because select should only return 0 if it's woken up, which does not happen (since all other threads are suspended in my debugger). However, I was wondering if anybody else has seen this behavior and perhaps knows what's causing it in the first place. Regards, Sebastiaan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.23 with Sun JDK 1.5.0_11 can't find the Apache Tomcat Native library
Hi all, The Apache Tomcat Native library was built from the untarred source on /usr/local/apache-tomcat-5.5.23/bin/tomcat-native-1.1.6-src/jni/native using: ./configure --with-apr=/usr/local/apache2/bin/apr-config --with-ssl --prefix=/usr/local/apr;make;make install On startup the Tomcat logs show: INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/apr/lib:/usr/local/apache2/lib:/lib/tls:/lib:/usr/lib:/usr/local/jdk1.5.0_11/jre/lib/i386/client:/usr/local/jdk1.5.0_11/jre/lib/i386 The above java.library.path contains all the library directories indicated by doing ldd /usr/local/apr/lib/libtcnative-1.so Setting java.library.path though changing LD_LIBRARY_PATH (and exporting LD_LIBRARY_PATH) or by passing -Djava.library.path=library:paths to the jsvc start as indicated on posts to this list and the APR docs, do not solve the problem. Any pointers will be appreciated, Rafael Analizado por ThMailServer para Linux. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with tomcat clusters sso with apache load balancer
I don't think the clusterSSO implementation ever really got finished. It got submitted, but never completed. At least that was my impression of it Filip Alejandro Fernandez wrote: Hi, I am Alejandro from Argentina. I am having an issue with tomcat 6.0.10 using clusters and single sign on, while performing load balance with apache 2.2 When I am accessing a secured page, I try to login (the login form is shown correctly) but I receive the following: HTTP Status 400 - Invalid direct reference to form login page Note: The load balancer makes me switch between 2 tomcat servers. One switch by page request. Please tell me if the info is not enough. Thank you in advance. -- httpd.conf -- SetHandler balancer-manager BalancerMember ajp://sismcarrizo:8009 BalancerMember ajp://servisitadores4:8009 BalancerMember ajp://servisitadores4:8009 ProxyPass balancer://cluster/portal-a stickysession=JSESSIONID ProxyPass balancer://clusterb/portal-b stickysession=JSESSIONID ProxyPass balancer://cluster/portal-c stickysession=JSESSIONID ProxyPass balancer://cluster/accesos-sso stickysession=JSESSIONID -- server.xml -- notifyListenersOnReplication="true"/> -- web.xml -- portal-a /mercados.jsp /mercados.page /mercados.jsf accesos FORM Portal A Application /login.jsp /error.jsp The role that is required to log in to the Manager Application accesos No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.2/784 - Release Date: 5/1/2007 2:57 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NIOSelector busy wait
Hi, I have a problem that sometimes the NIO selector goes into a busy wait loop. In line 1430 the code of NIOEndpoint.java, keyCount = selector.select(selectorTimeout); select keeps returning 0 without waiting. I'm running on the latest trunk version of tomcat 6, on Ubuntu Linux Feisty, with java version: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode) However, I've seen this same behavior with other JDK's (1.5). To me it seems that it's a bug in the JVM implementation because select should only return 0 if it's woken up, which does not happen (since all other threads are suspended in my debugger). However, I was wondering if anybody else has seen this behavior and perhaps knows what's causing it in the first place. Regards, Sebastiaan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to access application in the root?
Hi Ashok, On 5/3/07, Ashok Sahu <[EMAIL PROTECTED]> wrote: Hi All, I am migrating my J2EE application from JRun to Tomcat 5.0.28. I deployed successfully the 'myAppname.war' file in Tomcat. Now here is my problem: In the JRun, we were calling the jsp or servlet without giving the application name in the URL. Same thing I need to do in the tomcat otherwise it will requires lots of code changes. In the code it is written like for example: Hence I want to access the application by using http://localhost:8080/servletname instead of Here it helps to know some of the basics of Tomcat. You're looking to deploy the application at the root Context, and the root Context is the first slash after the URL , for example http://localhost:8080/ <<< thats the root Context. http://localhost:8080/myAppname/servletname In the above case , myAppname is the Context. The default behavior I've seen is that when one places a someApp.war under the webapps folder someApp automatically becomes the context. I am not much familiar with tomcat. Please let me know how to achieve it. There are different configurations possible, the list of configurations I'm writing here is just to give a hint and may not be complete and may be partially correct but it gives the desired behavior. 1) One configuration is back up the default ROOT folder that ships with Tomcat and then rename myAppname.war to ROOT.war , then you can access the app at http://localhost:8080/ --- the root Context. 2) Another configuration is: In development environment , remove the myAppname.war and delete the myAppname folder from the webapps folder --- assuming you backed this up somewhere. Also delete ROOT.war and ROOT folder under webapps folder. Then simply create a ROOT.xml (Context file) under Tomcat's /conf/Catalina/localhost/ folder , define the With the above configuration also you can access your application at http://localhost:8080/ 3) Other configurations are also possible, but the above are what I know as of now. Thanks in advance Ashok -Regards Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk and ClientAbortException
Hi, we are using Tomcat 5.5.20 with Apache 1.3.37 via mod_jk and Struts 1.1. Furthermore we cache the reponses with OSCache 2.1. >From time to time when building up the cache a SocketException occurs. In the >Tomcat logs we can see that this Exception is wrapped in a >ClientAbortException. The problem is, probably due to mod_jk that this Exception is not handled/thrown in the Struts RequestProcessor where any IOException (ClientAbortException is just a subclass) should have been thrown. As a reason the pre-ended reponse is written to the cache and used for all following requests! Very bad. Has anyone experienced similar problems? greetz Sven - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling SSL Client Auth abort
...unfortunately I never get that far where I can catch the exception. The exception is thrown within Tomcat and in my application code. regards, kews Martin Gainty wrote: in the event of failed login you can throw AuthenticationException This is a comprehensive example is for SunOne you can use the bits you need http://java.sun.com/developer/technicalArticles/WebServices/appserv8-1.html M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Subscriber" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Thursday, May 03, 2007 7:35 AM Subject: Handling SSL Client Auth abort Hi guys, When a client cancels a SSL Client Auth request, Tomcat ends the request and it's not possible to "catch" this error - Does anybody have a solution to this problem? Regards, kews - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ NOD32 2236 (20070503) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat context issue
Thanks for the extremely quick reply. :) I'll check this out after work. /Tommy Caldarale, Charles R wrote: > >> From: tb323 [mailto:[EMAIL PROTECTED] >> Subject: Tomcat context issue >> >> In server.xml I have this: >> >> > appBase="/home/tb323/projects/www/public_html/webapps" >> unpackWARs="true" autoDeploy="true" >> xmlValidation="false" xmlNamespaceAware="false"> >> >> This way I want to be able to start an app by going to >> http://www.domain.com/webapps/appName > > Normally, you wouldn't put "webapps" in the URL, since it's already part > of the appBase. However, since you want to use that to route requests > from httpd to Tomcat, you'll need something to strip it out along the > way. A valve in Tomcat could do the job; there's probably something in > httpd that will do it as well. > >> JkMount /*.war ajp13_worker > > The *.war setting is useless, since there won't be any direct requests > with a .war extension. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail > and its attachments from all computers. > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Tomcat-context-issue-tf3686346.html#a10305254 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Handling SSL Client Auth abort
> From: Subscriber [mailto:[EMAIL PROTECTED] > Subject: Re: Handling SSL Client Auth abort > > ...unfortunately I never get that far where I can catch the > exception. > The exception is thrown within Tomcat and in my application code. (I'll assume there's a rather critical "not" missing from the last clause in the above sentence.) If the client refuses the certificate or otherwise breaks the connection during the SSL negotiation, no servlet has been selected to receive the message, so there's no one to deliver the exception to. The servlet spec doesn't seem to have any notion of container-oriented error pages, so I think you're out of luck without custom code inside Tomcat. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat context issue
> From: tb323 [mailto:[EMAIL PROTECTED] > Subject: Tomcat context issue > > In server.xml I have this: > > appBase="/home/tb323/projects/www/public_html/webapps" > unpackWARs="true" autoDeploy="true" > xmlValidation="false" xmlNamespaceAware="false"> > > This way I want to be able to start an app by going to > http://www.domain.com/webapps/appName Normally, you wouldn't put "webapps" in the URL, since it's already part of the appBase. However, since you want to use that to route requests from httpd to Tomcat, you'll need something to strip it out along the way. A valve in Tomcat could do the job; there's probably something in httpd that will do it as well. > JkMount /*.war ajp13_worker The *.war setting is useless, since there won't be any direct requests with a .war extension. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Comet and Async Servlets - Architecture Question
Praveen Balaji wrote: Thanks Sebastiaan. I came to about the same conclusions as you listed out here. I also saw your post on parsing POST parameters and I think it's going to create problems for me as well! I am unsure the API would be "improved". I simply think, as Filip pointed out earlier, what we want to use is Async servlets and Comet is not intended to solve the same problem. this is work in progress, and probably, you'd be able to do it using the same API. check in on the dev list Filip Let's see what I can come up with! Praveen - Original Message From: Sebastiaan van Erk <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Wednesday, May 2, 2007 11:19:29 AM Subject: Re: Comet and Async Servlets - Architecture Question Praveen Balaji wrote: The last few days I have been evaluating using CometProcessor to work like an Async Servlet for me. I pick up the CometEvent object on BEGIN event and process the whole request asynchronously. When I am done, I close the I/O stream. I would like to know what the Tomcat developers and the developers in general think about this approach. Is it a misuse of the API to process requests asynchronously, outside of the event method? Are there any issues that I should be cautious about? Synchronization issues? See the mailing list archive of the last month and filter on "comet". There have been quite a few posts on exactly this subject. There are multiple issues: 1) Closing the I/O stream (on the response) does not end the request/response. It takes another 30-60 seconds before the event method gets called with an END event leaving a lot of request open unnecessarily. 2) Nothing is synchronized in Comet, so you have to do all synchronization yourself. You have to make sure that you do not write to the output stream after the event is closed (even though you may still have the reference in your asynchronous application code). I seem to have eliminated most issues by synchronizing access to the response output stream and using the same lock around the event.close() method in the event() method of the CometProcessor. However I still very sporadically get a ClientAbortException/ClosedChannelException which suggests that I've missed a place where synchronization is necessary. It might not be possible to synchronize this though, because it could happen deep inside Tomcat. The API has no information about what to synchronize for asynchronous use. 3) If you rely on the POST method to send parameters to your CometProcessor, then you have to parse the parameters yourself; there is an issue that doing getParameter() on the request in the BEGIN event may return null because the request body has not yet been received by the server at the moment of the getParameter() call. One of the Comet developers (Remy) suggests that it might be better to just use normal servlets and buy some extra memory for the extra threads. As far as the current API goes, I would say it is probably a "misuse", though I would very much like to see the API improved so that this is no longer the case. Regards, Sebastiaan Thanks, Praveen Balaji. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.2/785 - Release Date: 5/2/2007 2:16 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling SSL Client Auth abort
in the event of failed login you can throw AuthenticationException This is a comprehensive example is for SunOne you can use the bits you need http://java.sun.com/developer/technicalArticles/WebServices/appserv8-1.html M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Subscriber" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Thursday, May 03, 2007 7:35 AM Subject: Handling SSL Client Auth abort Hi guys, When a client cancels a SSL Client Auth request, Tomcat ends the request and it's not possible to "catch" this error - Does anybody have a solution to this problem? Regards, kews - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat context issue
Hi there! This is probably a dumb question if you're not a newbie like me. I just installed Tomcat 6.0.10 on Ubuntu Feisty and I'm having some problems configuring it. I'm attempting to move the appBase into a directory under my public_html. In server.xml I have this: This way I want to be able to start an app by going to http://www.domain.com/webapps/appName I also have Apache + Php on my server so in apache2.conf I've added : JkMount /*.jsp ajp13_worker JkMount /*.war ajp13_worker JkMount /webapps/* ajp13_worker Is there a way to avoid writing context.xmls for every webapp I place in the appBase? Like it is now Tomcat is looking for app at "/webapps/appName" while it should be looking for "/appName" .. // Tommy -- View this message in context: http://www.nabble.com/Tomcat-context-issue-tf3686346.html#a10304508 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: shutdown restart
$CATALINA_HOME/conf/server.xml reboot server and server will now auto deploy any war in $CATALINA_HOME/webapps folder M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "William Biggs" <[EMAIL PROTECTED]> To: Sent: Tuesday, May 01, 2007 10:10 PM Subject: shutdown restart I'm a newbie. After I upload my war file how do I shutdown and restart tomcat 5.5 ? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Installation in VPS
Hi there! I have a VPS (Virtual private server) and I want to install Tomcat, this is my first time, from this which one should i go with! I'm confused! * Core: o zip (pgp, md5) o tar.gz (pgp, md5) * Deployer: //im thinking for going with this but im not sure o zip (pgp, md5) o tar.gz (pgp, md5) is the tomcat very hard to configure in VPS Thanks
Handling SSL Client Auth abort
Hi guys, When a client cancels a SSL Client Auth request, Tomcat ends the request and it's not possible to "catch" this error - Does anybody have a solution to this problem? Regards, kews - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Comet: problem with request.getParameter() in Comet POST requests
Hi, I am working on a scenario with browsers as clients. The client does requests with JavaScript code like this: req = new XMLHttpRequest(); req.onreadystatechange = handler; req.open("post", "/somecontext/somecometservlet/somerequest?param1=val1¶m2=val2" ); req.send(null); We intentionally use POST requests to avoid problems that occurred with some caches at customer sites and with web crawlers that monitor the GET requests of a browser and send the identical requests themselves to analyze the responses. Thus, only with POST we can achieve an "exactly once" submission of the request. However, by passing the request parameters in the URL (i.e. in the header and not in the body) I don't have any problems with reading the request parameters. You can imagine, that I would not be happy if the API would only offer me a request facade that throws an exception when the servlet tries to access the parameters of a POST request. Yes, I can imagine. It amazes me just what kind of hacks are sometimes necessary. :-) Anyway, after thinking on it some more, I think the best solution would be a fix so that getParameter() in a POST request does a blocking read, the same way the headers are read. If you do getParameter() in a POST that automatically interferes with getInputStream() anyway, and expect data to arrive pretty much immediately so there is not really a good reason for not blocking in this case. Regards, Sebastiaan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Comet: problem with request.getParameter() in Comet POST requests
> -Original Message- > From: Rémy Maucherat [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 02, 2007 11:13 PM > On 5/2/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote: > > It's a race condition and the problem occurs quite infrequently > > (especially with small request bodies). The larger the > request body of > > the POST request, the more likely it is that the problem > occurs. I was > > testing at a few thousand request per second, and even then > it rarely > > showed up. The fact that other people out there are using > getParameter() > > on Comet POST requests and expect it to work seems to me to > warrant 1) > > acknowledgement that it is a bug, 2) a warning in the > documentation, or > > 3) a request facade for the Comet API which throws an > exception when the > > getParameter() method is called on a POST request. > > Whatever ;) > > Rémy > I am working on a scenario with browsers as clients. The client does requests with JavaScript code like this: req = new XMLHttpRequest(); req.onreadystatechange = handler; req.open("post", "/somecontext/somecometservlet/somerequest?param1=val1¶m2=val2" ); req.send(null); We intentionally use POST requests to avoid problems that occurred with some caches at customer sites and with web crawlers that monitor the GET requests of a browser and send the identical requests themselves to analyze the responses. Thus, only with POST we can achieve an "exactly once" submission of the request. However, by passing the request parameters in the URL (i.e. in the header and not in the body) I don't have any problems with reading the request parameters. You can imagine, that I would not be happy if the API would only offer me a request facade that throws an exception when the servlet tries to access the parameters of a POST request. Matthias - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Tomcat on Windows Server 2003 x64
We have recently migrated to this platform and have had smooth success with a SUN 64-bit JRE (version 1.5.0_10) We are using a pre-compiled Tomcat binary (5.5.23, Tomcat5.exe and Tomcat5w.exe) and tc-native.dll (APR) which can be found at http://svn.apache.org/viewvc/tomcat/connectors/tags/tc5.5.x/TOMCAT_5_5_2 3/procrun/bin/ and http://tomcat.heanet.ie/native/ Go through the motions of installing Tomcat and replace the abovementioned exe files and dll (if you are using it). You will also need to install the Microsoft ASP.Net libraries as the precompiled binaries will need their reference libs to run. As an alternative, if you're feeling adventurous you could try compiling your own binaries as described in http://www.nabble.com/Mini-HOW-TO%3A-Tomcat-as-a-service-on-Windows-Serv er-2003-64-bit-edition-tf1735687.html#a4716292 ... this will give you more flexibility with the version of Tomcat you want to run. Hope this helps! -Original Message- From: Adrian Bell [mailto:[EMAIL PROTECTED] Sent: 02 May 2007 22:05 To: users@tomcat.apache.org Subject: Installing Tomcat on Windows Server 2003 x64 Hi, I need to advise someone on how to install Tomcat on a Windows Server 2003 64-bit edition server with an AMD64 processor. Unfortunately I do not have this hardware/software setup myself so am unable to test. I see from a google search that others have encoutered problems with Win2k3 64. Can anyone please advise: * the correct JRE from Sun that they should install? Release? 32bit or 64bit? * the correct Tomcat version to install? Is there a 64bit compiliation available? Many thanks in advance. Regards Adrian Connaught wins RoSPA Gold Award for fourth year running Considerate Contractor Gold Award in 2006 Partnering Contractor of the Year Award in 2005 Please visit our website to see a full list of Connaught?s Registered Companies www.connaught.plc.uk/Investors/Registered-Companies Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete this message. Connaught plc, Head Office 01392 444546 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Comet: problem with request.getParameter() in Comet POST requests
> -Original Message- > From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] > > Wouldn't every application which isn't as dumb as the chat example > > (which does not care about the content it reads but simply passes it > > back to it's clients) need to implement it's own mechanism to check > > whether there is enough input available to start parsing a chunk of > > data? > > > huh? This exact same problem exist with regular servlets, and has > existed for the last 8 years. > Filip > I have written some servlet code during the last years, but I never had to deal with the question if the servlet can start parsing - it simply does, and the underlying read operations on the stream block if necessary to wait until more data is available to proceed. (Or the servlet simply accesses request parameters of a POST request and expects that they are available.) The question whether I have to wait for another READ event before I have the complete request available (or a complete message from a series of messages transferred within the scope of one http request) only arises if I am told that I should not do a blocking read. So far I did not read a clear statement which says: With Comet is is not desirable to do blocking read, but the API allows to do it, as well in the BEGIN event handling as in the READ event handling. If this statement is true, I don't have any problem. The Servlet can read all it expects to be delivered by the client when the client starts a request (and don't care if it fits into one TCP packet or not, because the read will block until the remaining TCP packets have arrived.) Afterwards, there won't be anything more to be read until the client sends the next message. Thus, if the servlet gets a READ event, it can assume that the client has sent a new message and read it. (Again, the read will block if some TCP packets are missing which contain remaining parts of the message.) However, if the statement is not true, the Servlet has to care about what is going on on the transport (TCP) level, and it has to count bytes to know when a message is completely available. So can you tell me: Is the above statement true? Matthias - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]