Re: [Apache Tomcat Maven plugin] Howto specify the Document base ?
Hello, See http://tomcat.apache.org/maven-plugin-2.0-beta-1/tomcat7-maven-plugin/run-mojo.html#warSourceDirectory So you must be able to configure the plugin : configuration warSourceDirectorytarget/${artifactId}-${version}/warSourceDirectory will be better with warSourceDirectory${project.build.outputDirectory}/${artifactId}-${version}/warSourceDirectory /configuration 2012/2/1 Blaise Gervais gervai...@gmail.com: Dear tomcat users, I try to use the Tomcat Maven pluginhttp://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/index.html's run goal on a webapp. The webapp is generated by Enunciatehttp://enunciate.codehaus.org/ into the *target\${artifactId}-${version}* folder. So the tomcat plugin complains because it can't found the expected document base. How can I change the document base ? Thanks. GRAVE: Error starting static Resources java.lang.IllegalArgumentException: Document base C:\Dev\Sources\xyz\sample\src\main\webapp does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4894) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5074) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1568) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1558) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) -- Gervais Blaise Mail : gervai...@gmail.com -- Olivier Lamy Talend: http://coders.talend.com http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Correct behavior while checking the thread binding in DirContextURLStreamHandler ?
No sure whether I understood you clearly, if a context is binding on the current thread, and current context classloader has parent classloader, current get method will throw an IllegalStateException. So my question is that, in this scenario, should the context binded on the thread be ignored ? I did not find too many comments on the svn log, while I guess that the logic may be : a. Check whether there is a context binding on the current context classloader, if does, return it. b. Check whether there is a context binding on the current thread, if does, return it. c. Check whether there is a context binding on the classloader tree of the current context classloader, if does return it. d. Throw an IllegalStateException. 2012/2/1 Christopher Schultz ch...@christopherschultz.net -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ivan, On 1/27/12 11:40 PM, Ivan wrote: if (result != null) return result; // Checking thread biding result = threadBindings.get(currentThread); -- Here, the value from threadBindings is always ignored ? is there something like if (result != null) return result; required there ? // Checking parent CL binding currentCL = currentCL.getParent(); while (currentCL != null) { result = clBindings.get(currentCL); if (result != null) return result; currentCL = currentCL.getParent(); } if (result == null) throw new IllegalStateException(Illegal class loader binding); return result; That does look fishy. result will be ignored if currentCL.getParent returns non-null. If currentCL.getParent returns null, then the method throws an exception. It looks like this could be re-written in a more straightforward way like this: currentCL = currentCL.getParent(); if(null == result null == currentCL) throw new IllegalArgumentException(...); while(currentCL != null) // continue Of course, you still need to check for null after the loop, so it's not like the change really affects anything other than minor readability. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8oUbUACgkQ9CaO5/Lv0PDGvwCgkELv0wJaVlzVxJc+UkUxi+Vx 9vAAnAgQYg0loutHFkxYxEzoJFqZYb3I =e8sd -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Ivan
Re: Correct behavior while checking the thread binding in DirContextURLStreamHandler ?
On 01/02/2012 11:50, Ivan wrote: Here's what the reply should have looked like, without the top-posting. 2012/2/1 Christopher Schultz ch...@christopherschultz.net Ivan, On 1/27/12 11:40 PM, Ivan wrote: if (result != null) return result; // Checking thread biding result = threadBindings.get(currentThread); -- Here, the value from threadBindings is always ignored ? is there something like if (result != null) return result; required there ? // Checking parent CL binding currentCL = currentCL.getParent(); while (currentCL != null) { result = clBindings.get(currentCL); if (result != null) return result; currentCL = currentCL.getParent(); } if (result == null) throw new IllegalStateException(Illegal class loader binding); return result; That does look fishy. result will be ignored if currentCL.getParent returns non-null. If currentCL.getParent returns null, then the method throws an exception. It looks like this could be re-written in a more straightforward way like this: currentCL = currentCL.getParent(); if(null == result null == currentCL) throw new IllegalArgumentException(...); while(currentCL != null) // continue Of course, you still need to check for null after the loop, so it's not like the change really affects anything other than minor readability. No sure whether I understood you clearly, if a context is binding on the current thread, and current context classloader has parent classloader, current get method will throw an IllegalStateException. So my question is that, in this scenario, should the context binded on the thread be ignored ? I did not find too many comments on the svn log, while I guess that the logic may be : a. Check whether there is a context binding on the current context classloader, if does, return it. b. Check whether there is a context binding on the current thread, if does, return it. c. Check whether there is a context binding on the classloader tree of the current context classloader, if does return it. d. Throw an IllegalStateException. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature
Tomcat Form Authentication Timeout Behavior
I've noticed that if I POST to an authenticated URL in a web app configured for form-based authentication, Tomcat delivers the login form, and then replays the POST just fine *unless* the current state of the browser is one where I had already been authenticated but that session had timed out. In that case, Tomcat fails to deliver the POST data. I assume this is a known issue/limitation. If not, is there some configuration setting I'm missing or some such? This is with Tomcat 7.0.23. -- Jess Holle - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Form Authentication Timeout Behavior
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jess, On 2/1/12 2:10 PM, Jess Holle wrote: I've noticed that if I POST to an authenticated URL in a web app configured for form-based authentication, Tomcat delivers the login form, and then replays the POST just fine *unless* the current state of the browser is one where I had already been authenticated but that session had timed out. In that case, Tomcat fails to deliver the POST data. I assume this is a known issue/limitation. If not, is there some configuration setting I'm missing or some such? This is with Tomcat 7.0.23. If you are logged-in and experience a timeout while you stare at a POST form, the next POST should ask for your credentials and then re-POST the form. Your description about seems to claim that Tomcat can somehow tell the difference between a POST to a timed-out session and a post to a session which never existed. Tomcat does not keep old sessions around for the purposes of messing up your flows. Are you sure you are describing your observations properly? Tomcat *does* have a maximum size for a saved post (see http://tomcat.apache.org/tomcat-7.0-doc/config/http.html, maxSavePostSize - the default is 4kb). I actually don't know what happens if the POST size exceeds this value since I've never needed more than the default. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8plDEACgkQ9CaO5/Lv0PC2OgCgr27LjLMrycQrWS4dEgH4qsiM kzQAn3rWP/BUT/wbKiQudxMYLpiNnQC4 =jybe -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to configure certificate file (*.cer) in Tomcat 6
Thanks Chris!!! Please tell steps to configure *.cer certificate file. On Wed, Feb 1, 2012 at 2:18 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Geet, On 1/29/12 11:42 PM, Geet Chandra wrote: Actually I don't want to use keytool -import command to import the *.cer file into *.keystore file. Any particular reason for your preference? - The customer has got very secure environment...they don't want to use the *.keystore being shipped with particular product. You can create your own keystore. Just remember that it has to have the server key as well as the certificate itself. - I am using Tomcat 6.x, J2EE based web application on Windows 2003 64 bit R2, SP2 OS. Very secure environment, eh? Is it possible to configure like this Connector port=8446 maxHttpHeaderSize=8192 protocol=org.apache.coyote.http11.Http11Protocol SSLEnabled=true maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=want sslProtocol=TLS keystoreFile=c:/tomcat.keystore truststoreFile =C:/user.cer It doesn't work that way. I think the only trust store types usable by Tomcat are JKS which are those that keytool creates and maintains. Please let me know the correct syntax to configure user.cer in server.xml You'll have to use APR (which uses OpenSSL) in order to use bare certificate files like that. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8oU6wACgkQ9CaO5/Lv0PALNwCdEH8p8SV9kkcrh56exib2IhOu PvgAnj2wpRkBQ1oU2DOO/dUwG6lET6eu =1+X5 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Thanks Regards Geet
RE: How to configure certificate file (*.cer) in Tomcat 6
FYI, Here's how we did it with APR for local workstation SSL. Download APR from here: http://tomcat.apache.org/download-native.cgi Copy the files (openssl.exe and tc-native.dll) into the tomcat bin directory Set up your SSL connector, pointing to your CA signed server SSLCertificateFile and the CA as SSLCACertificateFile: Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true maxThreads=150 scheme=https secure=true clientAuth=false sslProtocol=TLS SSLCertificateFile=c:/temp/localhost.cer SSLCACertificateFile=c:/temp/ca2cert.pem / -Original Message- From: Geet Chandra [mailto:gee...@gmail.com] Sent: Thursday, 2 February 2012 3:05 p.m. To: Tomcat Users List Subject: Re: How to configure certificate file (*.cer) in Tomcat 6 Thanks Chris!!! Please tell steps to configure *.cer certificate file. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to configure certificate file (*.cer) in Tomcat 6
Thanks Dale!!! Few more questions 1. As I have exported *.cer as I have using Digital Badge in Internet Explorer.Can I use the same *.cer to configure in server.xml.If not, how can I generate the same file. 2. How can I generate ca2cert.pem file to use in server.xml On Thu, Feb 2, 2012 at 10:04 AM, Dale Ogilvie dale_ogil...@trimble.comwrote: FYI, Here's how we did it with APR for local workstation SSL. Download APR from here: http://tomcat.apache.org/download-native.cgi Copy the files (openssl.exe and tc-native.dll) into the tomcat bin directory Set up your SSL connector, pointing to your CA signed server SSLCertificateFile and the CA as SSLCACertificateFile: Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true maxThreads=150 scheme=https secure=true clientAuth=false sslProtocol=TLS SSLCertificateFile=c:/temp/localhost.cer SSLCACertificateFile=c:/temp/ca2cert.pem / -Original Message- From: Geet Chandra [mailto:gee...@gmail.com] Sent: Thursday, 2 February 2012 3:05 p.m. To: Tomcat Users List Subject: Re: How to configure certificate file (*.cer) in Tomcat 6 Thanks Chris!!! Please tell steps to configure *.cer certificate file. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Thanks Regards Geet
Re: tomcat service version can't access intranet(not internet) files
André Warnier, Thank you very much, I've solve the problem before I saw your solution, thank you anyway-:). On Tue, Jan 31, 2012 at 4:41 PM, André Warnier a...@ice-sa.com wrote: chenqiang wrote: BTW, I change the user account from local system account to Administrator account using tomcat configuration console, but I cannot start the service under administrator account. There we are getting into Windows-specific considerations. Google (or baidu) may be a better source for help there. Search for changing windows service account. Quick summary : - right-click on my computer - choose services on the left side - in the list on the right side, find Apache Tomcat - right-click on on it, choose properties - in the tabs, select the login tab - change the account --**--**- To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.orgusers-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
[ANN] Apache Tomcat Maven Plugin 2.0-beta-1 Released
Hello, The Apache Tomcat team is pleased to announce the release of Tomcat Maven Plugin 2.0-beta-1. The Apache Tomcat Maven Plugin provides goals to manipulate WAR projects within the Apache Tomcat servlet container. Documentation site: http://tomcat.apache.org/maven-plugin-2.0-beta-1/ You should specify the version in your project's plugin configuration: plugin groupIdorg.apache.tomcat.maven/groupId artifactIdtomcat6-maven-plugin/artifactId version2.0-beta-1/version /plugin or plugin groupIdorg.apache.tomcat.maven/groupId artifactIdtomcat7-maven-plugin/artifactId version2.0-beta-1/version /plugin Release Notes - Apache Tomcat Maven Plugin - Version 2.0-beta-1 ** New Feature * [MTOMCAT-70] - Make useNaming=false the default for the embedded Tomcat and make it configurable * [MTOMCAT-77] - Add support for using the test classpath instead of the compile classpath with tomcat:run * [MTOMCAT-87] - Make http protocol configurable for the embedded Tomcat * [MTOMCAT-102] - Add a mojo to build a standalone jar to run a web application * [MTOMCAT-110] - Support Slf4j bridge logger ** Bug * [MTOMCAT-85] - Perfoming tomcat:redeploy is not reflected in log messages * [MTOMCAT-103] - Executable War fails to run with a NullPointerException * [MTOMCAT-104] - Running java -jar from a parent directory causes a Zip file error * [MTOMCAT-106] - tomcat7-maven-plugin extraDependency not working with class not found * [MTOMCAT-108] - THe httpsPort flag starts another http thread not an https thread * [MTOMCAT-109] - protocolorg.apache.coyote.http11.Http11NioProtocol/protocol not honoured ** Improvement * [MTOMCAT-15] - Add dependency scanning support to tomcat:run * [MTOMCAT-43] - Allow configuration of URI encoding for tomcat run goals * [MTOMCAT-62] - Support Tomcat 7 * [MTOMCAT-78] - Upgrade to tomcat 6.0.32 * [MTOMCAT-95] - Add directories to the embedded tomcat classloader (equivalent to shared.loader property in regular tomcat instance). * [MTOMCAT-100] - support war overlay to add war external dependencies in tomcat run * [MTOMCAT-111] - Make extract directory configurable * [MTOMCAT-113] - Show progress on WAR uploads * [MTOMCAT-114] - Add an archetype project sample * [MTOMCAT-115] - Allow configuration of URI encoding for executable war Have Fun! -- The Apache Tomcat Team - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org