Re: Session across Realm and Servlet
On 10/15/11, Chema wrote: >> >> So how it is possible to access HttpRequestServlet and set some >> session attribute in my Custom Realm which extends RealmBase. >> > > > I guess you can't do it that > > >> >> Or else it should be a different Procedure. >> > > > You can try by using filters or try Spring Security > > > >> >> Waiting for some clue. >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > Thanks for the reply. 1.Actually as of now iam using a customValve by extending ValveBase and there is a abstract invoke method there iam implementing it . 2 .and now it is possible for me to use add sessions and get sessions in the jsps 3. and now whats happening is this invoke method is getting triggered before my CustomRealm's authenticate method. (Now iam checking how to add session after triggering) But it is clear that this Valve --> Filter Realm --> Servlet (Just an analogy i assumed and happening) As You said Filters or Spring-context Spring-security --> i dont have any idea Filters --> not helpful So Valve side or else Spring-security give me some information. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Session across Realm and Servlet
> > So how it is possible to access HttpRequestServlet and set some > session attribute in my Custom Realm which extends RealmBase. > I guess you can't do it that > > Or else it should be a different Procedure. > You can try by using filters or try Spring Security > > Waiting for some clue. > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Configuration for both protected and public URLs in a web application
On 10/15/11, Yogesh Shankarappa wrote: > Hello All, > > >I am trying to configure web.xml to have both protected and > public URLs but still the app > authenticates the public URLs. Protected URLs works fine. I would greatly > appreciate if you can > help to configure the whole application has protected except for few URLs > which should be public > and without authentication. I could have added each URL for protected but > there are plenty hence > using /* for protected. > > *protected URLs* > > > Protected > /* > > > AUTHENTICATED_USERS > > > > *public URLs* > > > Unprotected > /public/welcome.html > > > > > Thanks in advance. > > > Thanks > Yogesh > Try to do like this for public urls Put an empty auth-constraint Tag > *public URLs* > > > Unprotected > /public/welcome.html > > > > > Reference:- http://java.dzone.com/articles/understanding-web-security - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Session across Realm and Servlet
I need to maintain a session object between Realm and Servlet. I have written a CustomRealm and every thing working fine and now it is required to send an object to servlets (possibly by HttpRequestServlet ) But i know/think Servlet is not yet Initiated. So how it is possible to access HttpRequestServlet and set some session attribute in my Custom Realm which extends RealmBase. Or else it should be a different Procedure. Waiting for some clue. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Configuration for both protected and public URLs in a web application
Hello All, I am trying to configure web.xml to have both protected and public URLs but still the app authenticates the public URLs. Protected URLs works fine. I would greatly appreciate if you can help to configure the whole application has protected except for few URLs which should be public and without authentication. I could have added each URL for protected but there are plenty hence using /* for protected. *protected URLs* Protected /* AUTHENTICATED_USERS *public URLs* Unprotected /public/welcome.html Thanks in advance. Thanks Yogesh
Re: redirection error due to context path after JAAS authentication with mod_proxy
> >From: André Warnier >To: Tomcat Users List >Sent: Wednesday, October 12, 2011 11:52 AM >Subject: Re: redirection error due to context path after JAAS authentication >with mod_proxy > >Woonsan Ko wrote: >> Hi, >> >> I have a reverse proxy configuration like this: >> >> ServerName localhost ProxyPreserveHost On ProxyPass >> / http://localhost:8080/app1/ ProxyPassReverse / >> http://localhost:8080/app1/ ProxyPassReverseCookiePath /app1 / >> > >If it is really like above, then why are you using an Apache httpd front-end >at all? >Would it not be easier (+ simpler, + more efficient) to just get Tomcat to >listen on port 80 and whatever IP address Apache httpd is listening to right >now ? > >(To get exactly the same behaviour as above, you would also have to make >"app1" be the Tomcat ROOT application.) > >Note: I also use a lot of setups with Apache httpd as front-end, and Tomcat as >a back-end, and sometimes this is very practical. At least, when the Apache >httpd front-end is actually "doing something" other than forwarding the >requests to Tomcat. >But here, it does not seem to be doing anything at all. Yeah, actually I gave a simplified example configuration in order to show proxy mappings. We have many other reasons to keep apache httpd as front-end here. I've suggested a system administrator about deploying app to ROOT as a workaround, but they are not willing to do that for some reasons. Anyway, if there's no way to customize redirection behavior after JAAS login, then I probably need to find a more controllable solution instead of using Tomcat's JAAS login feature. (Spring Security seems a good alternative which is filter based.) Thanks anyway, Woonsan > > > > > > > >- >To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >For additional commands, e-mail: users-h...@tomcat.apache.org > > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Help with mixed SSL and non-SSL pages in Tomcat 7.0
On 14/10/2011 21:09, Janet Preston wrote: > Hi, > > I have a web site with a login page that has to be accessed using SSL so > that the password is not sent as clear text. The rest of the site is > non-SSL. So the password is worth protecting but the session ID is not? The session ID is as good as the password for most nefarious purposes. > My web.xml is configured as follows: > >index.html > > >App Security > >App Security > >*.jsp >*.do >*.html >GET >PUT >POST >DELETE > Using any other HTTP method (e.g. HEAD) will bypass the security constraints. I'd strongly recommend removing those methods from the constraint. > > >person > > > >FORM > >/login.jsp >/loginerr.jsp > > I don't see anything that forces logins to be over SSL. > > All users who can login should be able to use this > application > person > > > I created a certificate using the Java keystore and updated tomcat > server.xml > connectionTimeout="2" >redirectPort="8443" /> > maxThreads="150" scheme="https" secure="true" >clientAuth="false" sslProtocol="TLS" >keystoreFile="/security/.keystore" > keystorePass="appcertkey" keyAlias="keyalias"/> > > > > > Index.html redirects the user from https to http. Is that the only redirect in either direction? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Help with mixed SSL and non-SSL pages in Tomcat 7.0
Hi, I have a web site with a login page that has to be accessed using SSL so that the password is not sent as clear text. The rest of the site is non-SSL. My configuration worked with this combination: Tomcat 5.5.27; Apache 2.0.58; JAVA 1.5.0_13 and, mod_jk (I'm not sure what version of mod_jk but it's old). After upgrading to Tomcat 7.0.22; Apache 2.2.21; JAVA 1.6.0_23; and tomcat jk connector version 1.2.32 I find my application doesn't work the same. The problem is I never get past the login page because whenever a redirect from port 8443 to port 8080 occurs I get bumped back to the log in page. I can use the application if I stay totally within SSL and I can use the application totally without SSL so I think this is a configuration issue, I just don't know what needs to change. I read the tomcat 7 SSL Configuration How-to and it says it's "customary to only run certain pages under SSL" but I'm missing something or have used a hole in the past that has now been plugged. My web.xml is configured as follows: index.html App Security App Security *.jsp *.do *.html GET PUT POST DELETE person FORM /login.jsp /loginerr.jsp All users who can login should be able to use this application person I created a certificate using the Java keystore and updated tomcat server.xml Index.html redirects the user from https to http. Any suggestions would be appreciated. Regards, Janet
Re: Disabling RNG initialization
We use this during testing: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/FastNonSecureRandom.java?view=annotate Once you have built this and added it to the lib directory, you need to configure the Manager to use it (in conf/context.xml). Excellent, I'll give that a shot, thanks. For now I just installed randomsound and haveged to improve my entropy pool enough that it only takes a few seconds (and doesn't actually print out a line about how long the RNG took to initialize). - Scott - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot retrieve client cert when requesting javax.net.ssl.peer_certificates
Right, I have only been able to find a reference to it in the 2.1 servlet specification as well. On Fri, Oct 14, 2011 at 12:27 PM, Caldarale, Charles R < chuck.caldar...@unisys.com> wrote: > > From: Mark Thomas [mailto:ma...@apache.org] > > Subject: Re: Cannot retrieve client cert when requesting > javax.net.ssl.peer_certificates > > > I don't see that parameter anywhere in the servlet specification. > > It was in the 2.1 spec for ServletRequest, but seems to have disappeared > somewhere along the way. > > > http://download.oracle.com/docs/cd/E17802_01/products/products/servlet/2.1/api/javax.servlet.ServletRequest.html#getAttribute%28javax.servlet.String%29 > > It's still mentioned in some docs for other app servers. > > - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Bryant Panyarachun bpanyarac...@gmail.com (661)644-5174
RE: Cannot retrieve client cert when requesting javax.net.ssl.peer_certificates
> From: Mark Thomas [mailto:ma...@apache.org] > Subject: Re: Cannot retrieve client cert when requesting > javax.net.ssl.peer_certificates > I don't see that parameter anywhere in the servlet specification. It was in the 2.1 spec for ServletRequest, but seems to have disappeared somewhere along the way. http://download.oracle.com/docs/cd/E17802_01/products/products/servlet/2.1/api/javax.servlet.ServletRequest.html#getAttribute%28javax.servlet.String%29 It's still mentioned in some docs for other app servers. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Disabling RNG initialization
On 14/10/2011 19:48, Scott Van Wart wrote: > I tend to start/stop Tomcat a fair amount during the day through Eclipse > for my development. I don't use SSL or sessions. Here's what I've been > getting during startup: > > INFO: Creation of SecureRandom instance for session ID generation > using [SHA1PRNG] took [17,053] milliseconds. > > Usually it's anywhere from 4-12 seconds (but I just ran a task a little > while ago that exhausted my entropy pool, I guess). Is there any way to > disable this? I remember searching for a solution to this awhile back > and only finding things relating to Tomcat 6 (this is 7; though I don't > remember having this startup delay with version 6). So I decided to > just put up with it. But now it's almost half of my startup time. We use this during testing: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/FastNonSecureRandom.java?view=annotate Once you have built this and added it to the lib directory, you need to configure the Manager to use it (in conf/context.xml). Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Disabling RNG initialization
I tend to start/stop Tomcat a fair amount during the day through Eclipse for my development. I don't use SSL or sessions. Here's what I've been getting during startup: INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [17,053] milliseconds. Usually it's anywhere from 4-12 seconds (but I just ran a task a little while ago that exhausted my entropy pool, I guess). Is there any way to disable this? I remember searching for a solution to this awhile back and only finding things relating to Tomcat 6 (this is 7; though I don't remember having this startup delay with version 6). So I decided to just put up with it. But now it's almost half of my startup time. Thanks, Scott - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot retrieve client cert when requesting javax.net.ssl.peer_certificates
On 14/10/2011 18:47, Bryant Panyarachun wrote: > Hi all, > > I am upgrading from Tomcat 6.0.18 to 7.0.21 (32-bit Win zip). > > Previously, when requesting a client certificate I would use: > > X509Certificate[] certs = > (X509Certificate[])req.getAttribute("javax.net.ssl.peer_certificates"); > > However, after upgrading to 7.0.21 this no longer works. Instead it returns > null. > > However, I can retrieve the client certificate when I use: > > X509Certificate[] certs = > (X509Certificate[])req.getAttribute("javax.servlet.request.X509Certificate"); > > I'm curious as to why the javax.net.ssl.peer_certificates parameter no > longer works in this case. Is it an issue cause by a Tomcat regression > change? I don't see that parameter anywhere in the servlet specification. Neither do I see it in the Tomcat code base. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Cannot retrieve client cert when requesting javax.net.ssl.peer_certificates
Hi all, I am upgrading from Tomcat 6.0.18 to 7.0.21 (32-bit Win zip). Previously, when requesting a client certificate I would use: X509Certificate[] certs = (X509Certificate[])req.getAttribute("javax.net.ssl.peer_certificates"); However, after upgrading to 7.0.21 this no longer works. Instead it returns null. However, I can retrieve the client certificate when I use: X509Certificate[] certs = (X509Certificate[])req.getAttribute("javax.servlet.request.X509Certificate"); I'm curious as to why the javax.net.ssl.peer_certificates parameter no longer works in this case. Is it an issue cause by a Tomcat regression change?
Classloaders in catalina.properties
Hi, in catalina.properties I can define paths for common, server and shared loaders. Where do I find them here in the docs?: http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html Here we have only system and common... Thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problem in spring-tomcat project
I am following the tutorial: http://static.springsource.org/docs/Spring-MVC-step-by-step/part2.html on developing and configuring the views and the controller. But i am getting following error: org.apache.jasper.JasperException: /index.jsp (line: 1, column: 1) The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed I have already copied jstl.jar and jsltl-standard.jar to WEB-INF folder but the problem is not solved. How to solve this problem ?any help would be appreciated. Sincrely, Anisha Karki
Re: Configure tomcat using init.d
On 14/10/2011 16:15, Mark H. Wood wrote: > This I can agree with. They don't allow application managers > access to Tomcat's config., but anyone can drop stuff into > /etc/init.d, whence it will run as root? Really? Something is not > right here. Is it just me, or is the simple privilege escalation attack that this makes possible the quickest way to solve this? :) Granted, it isn't the best way to solve it but boy would I be tempted in your shoes. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configure tomcat using init.d
On Fri, Oct 14, 2011 at 07:33:28AM -0700, Hassan Schroeder wrote: > On Fri, Oct 14, 2011 at 1:52 AM, ettoregia wrote: > > My system: Linux, the version I'don't know how to realize, since I've got > > just an ssh connection and typing some command I've not been able to > > discover it, maybe you can help me out on this as well. > > `cat /proc/version` should give you something useful. 'uname -a' is another possibility. > > Alright, I need to deploy .war file under tomcat that actually has 4 engines > > (5.5, 6.0.16, 6.0.18, 7.0), and as I'm used to, I would put under > > /conf/Catalina/localhost, of the engine 6.0.18, a file called > > .xml to specify the context path of my webApp then I would modify > > the server.xml to specify the jdbc connection and the like. As I've no > > rights to modify anything under the tomcat's home the IT guy told me to use > > the folder init.d/ in order to use any script at boot time to > > accomplish the configuration above. > > Huh? Your app's context path should be taken from the name of the > WAR file, No, his method (conf/Catalina/[engineName]/${contextName}.xml is the one I use all the time. It works well, and I can install the app wherever I like, and don't have to reinstall the whole thing every time I need to tweak a context parameter. > and the JDBC config should be contained in the WAR file > in a META-INF/context.xml file. or ${contextName}.xml where, again, it's much more accessible for tweaking. Either one is better than hacking server.xml, though, unless the data source is meant to be used by every app. > Nothing else required. Other than an better IT department. :-) This I can agree with. They don't allow application managers access to Tomcat's config., but anyone can drop stuff into /etc/init.d, whence it will run as root? Really? Something is not right here. That init script would need to start Yet Another Tomcat Instance. Is that what IT wants? That has implications for memory demand, port and address space, and linking among app.s. Maybe the IT guy understands how Tomcat works, but I think I would explore the possibility that he doesn't. -- Mark H. Wood, Lead System Programmer mw...@iupui.edu Asking whether markets are efficient is like asking whether people are smart. pgpvyER2Qn4t8.pgp Description: PGP signature
Re: Configure tomcat using init.d
ettoregia wrote: Hi guys, hope you're all doing well. Today I'm facing a new challenge, at least for myself. My system: Linux, the version I'don't know how to realize, since I've got just an ssh connection and typing some command I've not been able to discover it, maybe you can help me out on this as well. Tomcat 6.0.18 Java 1.6 Alright, I need to deploy .war file under tomcat that actually has 4 engines (5.5, 6.0.16, 6.0.18, 7.0), and as I'm used to, I would put under /conf/Catalina/localhost, of the engine 6.0.18, a file called .xml to specify the context path of my webApp then I would modify the server.xml to specify the jdbc connection and the like. As I've no rights to modify anything under the tomcat's home the IT guy told me to use the folder init.d/ in order to use any script at boot time to accomplish the configuration above. Here comes the problem. I've checked on the web, but the main use of init.d, is to make tomcat a linux service using some shell scripting language, but what about the deploy and jdbc configuration? I could not ask the IT guys because we communicate through a ticketing system and btw they are not so willing to... Do you have any clue? Hi. From the situation that you describe above, let me give you a personal and practical answer and recommendation : get your boss to talk to the boss of these IT guys, and give you a practical access level to that system, or else you will not be able to solve these issues in any practical time. People here are also not going to be able to help you in any practical time, because by not having access to the Tomcat directories, you will not be able to provide answers to the questions being asked. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using the Apache Tomcat 6.0 SSL Configuration HOW-TO guide, but it is not working
2011/10/14 ML Harmon : > > I don't even know enough about Tomcat to know how to troubleshoot this, am > very new to this. > 1) If you know where your server.xml is, you should know where your log files are as well. There is logs folder that is sibling to conf. 2) There are two different implementations of SSL connector (Java-based and OpenSSL-based), that are configured rather differently. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Using the Apache Tomcat 6.0 SSL Configuration HOW-TO guide, but it is not working
Using this link, to setup my Apache Tomcat 6.0 webserver with SSL, but I can't get it to work. I am very new to Apache Tomcat 6.0. Infact this is the first time I have ever worked with it. http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html Our Apache Tomcat 6.0 is currently running on a Windows 2003 server. We *CAN * currently bring up a browser and login to our application on port 8086, and have been using this for several years. But* now* we want to secure our connection with SSL, so I have been trying to use the above link to set it up. Here is what I have done. 1. Create a keystore file to store the server's private key and self-signed certificate by executing the following command: Windows: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA 2. Uncomment the "SSL HTTP/1.1 Connector" entry in $CATALINA_BASE/conf/server.xml and modify as described. 3. Define a SLL Connector in my server.xml Define a SSL Coyote HTTP/1.1 Connector on port 8443 --> 4. Create a local certificate keytool -genkey -alias tomcat -keyalg RSA \ -keystore 5. Create a CSR for my Issuing RootCA to sign. keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr \ -keystore 6. Have my issuing RootCA sign and create my cert. 7. Import my Chain Certificate into my keystore i.e. I have created my on RootCA certificate with a stand-alone CA since we are using a two tier approach to creating certs. Our certs are created and signed on a Windows 2008 Certificate Service Server. keytool -import -alias root -keystore \ -trustcacerts -file 8. Import my Certificate. keytool -import -alias tomcat -keystore \ -file RESULTS are as follows: I can run http://localhost:8086 from my browser on our Tomcat Web server and the default web page does load. Running https://localhost:8443 does not display a web page. I can at least load up a web page if I exclude SSLEnabled=TRUE from my connector entry using port 8443 but of course I don't have SSLEnabled=True. I don't even know enough about Tomcat to know how to troubleshoot this, am very new to this.
Re: Configure tomcat using init.d
On Fri, Oct 14, 2011 at 1:52 AM, ettoregia wrote: > My system: Linux, the version I'don't know how to realize, since I've got > just an ssh connection and typing some command I've not been able to > discover it, maybe you can help me out on this as well. `cat /proc/version` should give you something useful. > Alright, I need to deploy .war file under tomcat that actually has 4 engines > (5.5, 6.0.16, 6.0.18, 7.0), and as I'm used to, I would put under > /conf/Catalina/localhost, of the engine 6.0.18, a file called > .xml to specify the context path of my webApp then I would modify > the server.xml to specify the jdbc connection and the like. As I've no > rights to modify anything under the tomcat's home the IT guy told me to use > the folder init.d/ in order to use any script at boot time to > accomplish the configuration above. Huh? Your app's context path should be taken from the name of the WAR file, and the JDBC config should be contained in the WAR file in a META-INF/context.xml file. Nothing else required. Other than an better IT department. :-) -- Hassan Schroeder hassan.schroe...@gmail.com http://about.me/hassanschroeder twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: async per servlet 3.0
2011/10/14 Mete BALCI : > I found the problem using new Exception().printStackTrace() > > The problem was PsiProbe application that I am using to monitor Tomcat. The > valve it is using to instrument tomcat is probably not async aware. After > undeploying it, async support works as expected. I will notify PsiProbe team > about the issue. OK. A fix might look like http://svn.apache.org/viewvc?view=revision&revision=823713 >> >> 2. Try (new Exception().printStackTrace()) in your servlet, so that it >> prints stacktrace with all Filters and Valves that are in the chain >> that serves your request. >> Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 7 won't run as Windows service
2011/10/14 David Rush : > I've been running Tomcat 6.0.18 for a long time, and am now trying to > upgrade to 7.0.22 (64 bit .zip download). > > I can start Tomcat 7 with startup.bat and it's working fine. > > The script to install it as a service worked without complaint, and the > service is there. > > However when I try to start it I get "Error 1067: The process terminated > unexpectedly". > > commons-daemon.2011-10-14.log says: [error] FindClass > org/apache/catalina/startup/Bootstrap failed > > I'm using Java 7 JDK (1.7.0, 64 bit), JAVA_HOME points to the JDK > installation, and Java's "bin" is in my system path, on my Windows 7 > machine. There is not much experience in running with JDK 1.7.0 yet and there are known problems http://mail-archives.apache.org/mod_mbox/www-announce/201107.mbox/%3C001601cc4d6b$37618880$a6249980$@apache.org%3E > > I'm using the setenv.bat in tomcat\bin that I copied from my Tomcat 6 > installation, which explicitly sets JAVA_HOME (which technically may not be > necessary since I have JAVA_HOME env var set to the same value, but I need > to have the option to support more that one JVM on my development box). > I've added a debug statement in setenv.bat that echoes something to a file. > When I run startup.bat, I get the echoed output. When I try to start the > service, I do not. setenv.bat is not used when starting as a service. The service runner is actually Apache Commons Daemon procrun component http://commons.apache.org/daemon/ It launches JVM dll directly without any bat files. If there are issues with this service launcher, it is better to report them to the Commons Daemon project. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 7 won't run as Windows service
I've been running Tomcat 6.0.18 for a long time, and am now trying to upgrade to 7.0.22 (64 bit .zip download). I can start Tomcat 7 with startup.bat and it's working fine. The script to install it as a service worked without complaint, and the service is there. However when I try to start it I get "Error 1067: The process terminated unexpectedly". commons-daemon.2011-10-14.log says: [error] FindClass org/apache/catalina/startup/Bootstrap failed I'm using Java 7 JDK (1.7.0, 64 bit), JAVA_HOME points to the JDK installation, and Java's "bin" is in my system path, on my Windows 7 machine. I'm using the setenv.bat in tomcat\bin that I copied from my Tomcat 6 installation, which explicitly sets JAVA_HOME (which technically may not be necessary since I have JAVA_HOME env var set to the same value, but I need to have the option to support more that one JVM on my development box). I've added a debug statement in setenv.bat that echoes something to a file. When I run startup.bat, I get the echoed output. When I try to start the service, I do not. Help? David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: async per servlet 3.0
I found the problem using new Exception().printStackTrace() The problem was PsiProbe application that I am using to monitor Tomcat. The valve it is using to instrument tomcat is probably not async aware. After undeploying it, async support works as expected. I will notify PsiProbe team about the issue. Thanks Konstantin. Mete On Fri, Oct 14, 2011 at 2:50 PM, Konstantin Kolinko wrote: > 2011/10/14 Mete BALCI : > > web.xml root is: > > http://java.sun.com/xml/ns/javaee"; > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > > http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; > > version="3.0"> > > > > I tried mapping both with annotation and web.xml. Annotation itself > works, I > > can use it without async, but isAsyncSupported returns false (both with > > annotation and web.xml mapping) so I cannot startAsync (raises > IllegalState) > > 1. If you were mapping it explicitly, were you using the following for > the servlet as the examples webapp does? > > true > > 2. Try (new Exception().printStackTrace()) in your servlet, so that it > prints stacktrace with all Filters and Valves that are in the chain > that serves your request. > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: async per servlet 3.0
2011/10/14 Mete BALCI : > web.xml root is: > http://java.sun.com/xml/ns/javaee"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; > version="3.0"> > > I tried mapping both with annotation and web.xml. Annotation itself works, I > can use it without async, but isAsyncSupported returns false (both with > annotation and web.xml mapping) so I cannot startAsync (raises IllegalState) 1. If you were mapping it explicitly, were you using the following for the servlet as the examples webapp does? true 2. Try (new Exception().printStackTrace()) in your servlet, so that it prints stacktrace with all Filters and Valves that are in the chain that serves your request. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: async per servlet 3.0
I want to clarify the situation with a simpler example. I have created a war with 2 servlets, without a web.xml. So war contains only 2 classes (for each servlet). One servlet is annotated as: @WebServlet(value = "/async", asyncSupported = true) Other is annotated as: @WebServlet(value = "/sync") Both overrides the service method with this code: resp.getWriter().print("async=" + req.isAsyncSupported()); I am deploying this to Tomcat 7.0.21 running on JDK 1.6.0_27 on Linux (ubuntu 10.04 x32) with APR connector. When I call /sync and /async, both of them displays async=false Mete On Fri, Oct 14, 2011 at 1:43 PM, Mete BALCI wrote: > web.xml root is: > http://java.sun.com/xml/ns/javaee"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; > version="3.0"> > > I tried mapping both with annotation and web.xml. Annotation itself works, > I can use it without async, but isAsyncSupported returns false (both with > annotation and web.xml mapping) so I cannot startAsync (raises IllegalState) > > Mete > > On Fri, Oct 14, 2011 at 1:38 PM, Konstantin Kolinko < > knst.koli...@gmail.com> wrote: > >> 2011/10/14 Mete BALCI : >> > Hello, >> > >> > I am trying to use Servlet 3 async support in Tomcat 7.0.21. I tried >> setting >> > annotation asyncSupported=true and writing this to web.xml, tried using >> apr >> > and nio, still getting false from isAsyncSupported, what am I missing ? >> > >> > Mete >> > >> > PS: There is no filter, just a single servlet overriding doPost, marked >> > with @WebServlet(asyncSupported = true, urlPatterns = {"/2/*"}) >> >> What is at the top of your web.xml? Is it using 3.0 version of schema? >> Compare it with the examples webapp. >> >> If the servlet mapped using the annotation, or it is explicitly mapped >> in web.xml? >> >> Best regards, >> Konstantin Kolinko >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >
Re: async per servlet 3.0
web.xml root is: http://java.sun.com/xml/ns/javaee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; version="3.0"> I tried mapping both with annotation and web.xml. Annotation itself works, I can use it without async, but isAsyncSupported returns false (both with annotation and web.xml mapping) so I cannot startAsync (raises IllegalState) Mete On Fri, Oct 14, 2011 at 1:38 PM, Konstantin Kolinko wrote: > 2011/10/14 Mete BALCI : > > Hello, > > > > I am trying to use Servlet 3 async support in Tomcat 7.0.21. I tried > setting > > annotation asyncSupported=true and writing this to web.xml, tried using > apr > > and nio, still getting false from isAsyncSupported, what am I missing ? > > > > Mete > > > > PS: There is no filter, just a single servlet overriding doPost, marked > > with @WebServlet(asyncSupported = true, urlPatterns = {"/2/*"}) > > What is at the top of your web.xml? Is it using 3.0 version of schema? > Compare it with the examples webapp. > > If the servlet mapped using the annotation, or it is explicitly mapped > in web.xml? > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: async per servlet 3.0
2011/10/14 Mete BALCI : > Hello, > > I am trying to use Servlet 3 async support in Tomcat 7.0.21. I tried setting > annotation asyncSupported=true and writing this to web.xml, tried using apr > and nio, still getting false from isAsyncSupported, what am I missing ? > > Mete > > PS: There is no filter, just a single servlet overriding doPost, marked > with @WebServlet(asyncSupported = true, urlPatterns = {"/2/*"}) What is at the top of your web.xml? Is it using 3.0 version of schema? Compare it with the examples webapp. If the servlet mapped using the annotation, or it is explicitly mapped in web.xml? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
async per servlet 3.0
Hello, I am trying to use Servlet 3 async support in Tomcat 7.0.21. I tried setting annotation asyncSupported=true and writing this to web.xml, tried using apr and nio, still getting false from isAsyncSupported, what am I missing ? Mete PS: There is no filter, just a single servlet overriding doPost, marked with @WebServlet(asyncSupported = true, urlPatterns = {"/2/*"})
Configure tomcat using init.d
Hi guys, hope you're all doing well. Today I'm facing a new challenge, at least for myself. My system: Linux, the version I'don't know how to realize, since I've got just an ssh connection and typing some command I've not been able to discover it, maybe you can help me out on this as well. Tomcat 6.0.18 Java 1.6 Alright, I need to deploy .war file under tomcat that actually has 4 engines (5.5, 6.0.16, 6.0.18, 7.0), and as I'm used to, I would put under /conf/Catalina/localhost, of the engine 6.0.18, a file called .xml to specify the context path of my webApp then I would modify the server.xml to specify the jdbc connection and the like. As I've no rights to modify anything under the tomcat's home the IT guy told me to use the folder init.d/ in order to use any script at boot time to accomplish the configuration above. Here comes the problem. I've checked on the web, but the main use of init.d, is to make tomcat a linux service using some shell scripting language, but what about the deploy and jdbc configuration? I could not ask the IT guys because we communicate through a ticketing system and btw they are not so willing to... Do you have any clue? Many thanks in advance guys, Ettore. -- View this message in context: http://old.nabble.com/Configure-tomcat-using-init.d-tp32650998p32650998.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org