Allow Servlet to Control "100-continue" response
Hi Currently if a client supplies the "Expect: 100-continue" header on a POST or PUT, Tomcat appears to send the response header ("100-continue") before passing control to the servlet. I need to use the servlet to control this response and accept/reject the request before receiving the request content, Is there anyone could give me some advice? Thanks.
RE: Tomcat 7 Embedded: Manager
> From: Dark Before Dawn [mailto:dark.before.d...@gmail.com] > Subject: Re: Tomcat 7 Embedded: Manager > Where can i find the unit test examples? > I browsed the src distribution but couldn't find any > examples (I think I am blind :) Quite possibly, since they're cunningly hidden in a directory named ... test. - 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: Tomcat 7 Embedded: Manager
Hi Mark, thanks for your fast reply. Where can i find the unit test examples? I browsed the src distribution but couldn't find any examples (I think I am blind :) Cheers Darky Am 17.06.2011 23:14, schrieb Mark Thomas: On 17/06/2011 21:14, Dark Before Dawn wrote: Hi guys, I am trying to deploy a WAR-File programmaticaly via ANT or manually. Therefore I would like to have a Manager Servlet which supports deploying/undeploying. My first try was something like this: Context ctx = server.addContext("/manager", baseDirectory); HTMLManagerServlet mgmt = new HTMLManagerServlet(); mgmt.setWrapper(Tomcat.addServlet(ctx, "manager", mgmt)); I just get a 404 Error when visiting localhost:8080/manger and console output says: org.apache.catalina.realm.JAASRealm setContainer INFO: Set JAAS app name Tomcat I am also not sure where to set the manger name and password? Cheers and thanks in advance You need to configure a Realm. Take a look in the Tomcat 7 unit tests for examples. There are a couple of other issues with the above: - you don't want the HTML version - you'll need to make the context privileged Mark - 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: Tomcat 7 Embedded with multiple IP addresses and connector types?
On 17/06/2011 21:38, djohn...@desknetinc.com wrote: > I'm just starting to work with the new Tomcat class in Tomcat7, but > immediately ran into an apparent limitation of only having a single port. > What options exist for those who need to embed Tomcat 7, but also > configure multiple ports, IP addresses and connector types (HTTP and/or > AJP)? The same options as exist for standard Tomcat. Take a look at the unit tests for examples. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 7 Embedded: Manager
On 17/06/2011 21:14, Dark Before Dawn wrote: > Hi guys, > I am trying to deploy a WAR-File programmaticaly via ANT or manually. > Therefore I would like to have a Manager Servlet which supports > deploying/undeploying. > > My first try was something like this: > > Context ctx = server.addContext("/manager", baseDirectory); > > HTMLManagerServlet mgmt = new HTMLManagerServlet(); > > mgmt.setWrapper(Tomcat.addServlet(ctx, "manager", mgmt)); > > I just get a 404 Error when visiting localhost:8080/manger and console > output says: > > org.apache.catalina.realm.JAASRealm setContainer > INFO: Set JAAS app name Tomcat > > I am also not sure where to set the manger name and password? > Cheers and thanks in advance You need to configure a Realm. Take a look in the Tomcat 7 unit tests for examples. There are a couple of other issues with the above: - you don't want the HTML version - you'll need to make the context privileged Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 7 Embedded with multiple IP addresses and connector types?
I'm just starting to work with the new Tomcat class in Tomcat7, but immediately ran into an apparent limitation of only having a single port. What options exist for those who need to embed Tomcat 7, but also configure multiple ports, IP addresses and connector types (HTTP and/or AJP)? --- David S. Johnson DeskNet Inc. http://www.desknetinc.com
Tomcat 7 Embedded: Manager
Hi guys, I am trying to deploy a WAR-File programmaticaly via ANT or manually. Therefore I would like to have a Manager Servlet which supports deploying/undeploying. My first try was something like this: Context ctx = server.addContext("/manager", baseDirectory); HTMLManagerServlet mgmt = new HTMLManagerServlet(); mgmt.setWrapper(Tomcat.addServlet(ctx, "manager", mgmt)); I just get a 404 Error when visiting localhost:8080/manger and console output says: org.apache.catalina.realm.JAASRealm setContainer INFO: Set JAAS app name Tomcat I am also not sure where to set the manger name and password? Cheers and thanks in advance Darky - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [ANN] Apache Tomcat 7.0.16 released
On 17/06/2011 18:52, Jesse Farinacci wrote: > Greetings, > > On Fri, Jun 17, 2011 at 8:32 AM, Mark Thomas wrote: >> The Apache Tomcat team announces the immediate availability of Apache >> Tomcat 7.0.16. > > Congratulations! And, thanks to the team for great work. Would someone > please push the new release to Maven? Already done. Should sync to Apache Maven Central in a day or so. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [ANN] Apache Tomcat 7.0.16 released
Greetings, On Fri, Jun 17, 2011 at 8:32 AM, Mark Thomas wrote: > The Apache Tomcat team announces the immediate availability of Apache > Tomcat 7.0.16. Congratulations! And, thanks to the team for great work. Would someone please push the new release to Maven? Thanks, -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: crlFile and SunX509 algorithm in Tomcat 7.0.16
I have done some more analysis of the problem and the exception started to be thrown in version 7.0.11. Something changed between 7.0.10 and 7.0.11 that affected handling of CRL for SunX509 algorithm. In version 7.0.10, although the code in JSSESocketFactory.java to throw the exception is the same as the 7.0.11 version, the exception is not thrown. I imagine that in 7.0.10, the application never calls JSSESocketFactory's getParameter or that somehow the algo that is passed to this method is replaced with PKIX. Would someone know what changed between version 7.0.10 and version 7.0.11? Martin On Thu, Jun 16, 2011 at 8:59 AM, Caldarale, Charles R < chuck.caldar...@unisys.com> wrote: > > From: Martin Dubuc [mailto:martind1...@gmail.com] > > Subject: crlFile and SunX509 algorithm in Tomcat 7.0.16 > > > Up to Tomcat 7.0.10, I used the crlFile configuration along > > with the SunX509 algorithm in SSL HTTP connector configuration > > > java.io.IOException: CRLs not supported for type: SunX509 > > > I am using JDK 6 update 26. > > Haven't looked at the JRE code yet, but I wonder if the new owners in their > zeal might have changed the internal class to OracleX509? (Just > speculation, and hopefully not correct.) > > - 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 > >
check uiseHttpOnly programmatically
Hi, is there any way to check programmatically in a Servlet whether the context attribute "useHttpOnly" is set for cookies? Thanks, Michael - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
[ANN] Apache Tomcat 7.0.16 released
The Apache Tomcat team announces the immediate availability of Apache Tomcat 7.0.16. Apache Tomcat 7.0.16 includes bug fixes and the following new features compared to version 7.0.14: - NIO implementation of the AJP connector - Enable Servlet 3 asynchronous processing support when using clustering - Add parallel deployment support to the Manager's Ant tasks Please refer to the change log for the list of changes: http://tomcat.apache.org/tomcat-7.0-doc/changelog.html Note that this version has 4 zip binaries: a generic one and three bundled with Tomcat native binaries for Windows operating systems running on different CPU architectures. Downloads: http://tomcat.apache.org/download-70.cgi Migration guide from Apache Tomcat 5.5.x and 6.0.x: http://tomcat.apache.org/migration.html Thank you, -- The Apache Tomcat Team - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: error in clustering: NullPointerException at java.io.ObjectOutputStream$BlockDataOutputStream.getUTFLength
2011/6/17 Ronald Klop : > Regarding 'wine'. (...) > Darn, I look closer now and see the 'unless="skip.installer"' in dist.xml. Wine is required to build the exe installer. This step can be turned off, as you have found. > Thanks, I'm very close to debugging Tomcat myself. Is it easy to edit Tomcat > in a Eclipse project? Yes. There are sample projects (In TC6: cp "eclipse.project" ".project" and cp "eclipse.classpath" ".classpath"; in TC7 the files are in res/ide-support). To debug: 1. Build Tomcat (the "deploy" target in Ant) 2. Run catalina.bat|.sh to start it in debug mode: catalina jpda start 3. Start "remote" debugger from within Eclipse. http://wiki.apache.org/tomcat/FAQ/Developing#Debugging Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: error in clustering: NullPointerException at java.io.ObjectOutputStream$BlockDataOutputStream.getUTFLength
Op donderdag, 16 juni 2011 18:55 schreef Christopher Schultz : -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ronald, On 6/16/2011 11:40 AM, Ronald Klop wrote: > I created a release package. First had to find a computer with Windows, > because it needs wine (I didn't want to learn wine on FreeBSD today), > but ok it builds now. Wait, what? Why do you need Wine? > Now I'll wait for my precious bug fix to get committed to 6. :-) I've voted for the fix. ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk36NZ0ACgkQ9CaO5/Lv0PAZ/ACeMUI4mDW6Y7t0Xu3+2OMPJmSH BgAAn359rasGTifpr81xlrnzfdDtOzZg =jBjN -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Chris, thanks for the vote. Regarding 'wine'. I followed all steps from BUILDING.txt. The last one is below. Maybe I don't need the 'release' step, but it makes deployment in my network easy, because we arranged things around the .tar.gz files from the Tomcat site. Darn, I look closer now and see the 'unless="skip.installer"' in dist.xml. Thanks, I'm very close to debugging Tomcat myself. Is it easy to edit Tomcat in a Eclipse project? Or what do you guys use? Ronald. $ ant -f dist.xml release Buildfile: /data/software/tomcat/tc6.0.x/trunk/dist.xml clean: [delete] Deleting directory /data/software/tomcat/tc6.0.x/trunk/output/deployer [delete] Deleting directory /data/software/tomcat/tc6.0.x/trunk/output/dist dist-prepare: [mkdir] Created dir: /data/software/tomcat/tc6.0.x/trunk/output/dist [mkdir] Created dir: /data/software/tomcat/tc6.0.x/trunk/output/dist/bin [mkdir] Created dir: /data/software/tomcat/tc6.0.x/trunk/output/dist/conf [mkdir] Created dir: /data/software/tomcat/tc6.0.x/trunk/output/dist/lib [mkdir] Created dir: /data/software/tomcat/tc6.0.x/trunk/output/dist/logs [mkdir] Created dir: /data/software/tomcat/tc6.0.x/trunk/output/dist/temp [mkdir] Created dir: /data/software/tomcat/tc6.0.x/trunk/output/dist/webapps [mkdir] Created dir: /data/software/tomcat/tc6.0.x/trunk/output/dist/work dist-static: [copy] Copying 4 files to /data/software/tomcat/tc6.0.x/trunk/output/dist [copy] Copying 22 files to /data/software/tomcat/tc6.0.x/trunk/output/dist/bin [copy] Copying 15 files to /data/software/tomcat/tc6.0.x/trunk/output/dist/lib [copy] Copying 7 files to /data/software/tomcat/tc6.0.x/trunk/output/dist/conf [copy] Copying 442 files to /data/software/tomcat/tc6.0.x/trunk/output/dist/webapps [touch] Creating /data/software/tomcat/tc6.0.x/trunk/output/dist/temp/safeToDelete.tmp [copy] Copying 1 file to /data/software/tomcat/tc6.0.x/trunk/output/dist/bin [copy] Copying 1 file to /data/software/tomcat/tc6.0.x/trunk/output/dist/bin [copy] Copying 1 file to /data/software/tomcat/tc6.0.x/trunk/output/dist/bin/x64 [copy] Copying 1 file to /data/software/tomcat/tc6.0.x/trunk/output/dist/bin/i64 [copy] Copying 1 file to /data/software/tomcat/tc6.0.x/trunk/output/dist/bin [copy] Copying 1 file to /data/software/tomcat/tc6.0.x/trunk/output/dist/bin/x64 [copy] Copying 1 file to /data/software/tomcat/tc6.0.x/trunk/output/dist/bin/i64 dist-deployer: [copy] Copying 7 files to /data/software/tomcat/tc6.0.x/trunk/output/deployer/lib [jar] Building jar: /data/software/tomcat/tc6.0.x/trunk/output/deployer/lib/catalina-deployer.jar [copy] Copying 1 file to /data/software/tomcat/tc6.0.x/trunk/output/deployer [copy] Copying 2 files to /data/software/tomcat/tc6.0.x/trunk/output/deployer [copy] Copying 1 file to /data/software/tomcat/tc6.0.x/trunk/output/deployer installer: [echo] Builds a Windows installer based on Nullsoft Installer [copy] Copying 41 files to /data/software/tomcat/tc6.0.x/trunk/output/dist [copy] Copying 1 file to /data/software/tomcat/tc6.0.x/trunk/output/dist [copy] Copying 1 file to /data/software/tomcat/tc6.0.x/trunk/output/dist [copy] Copying 1 file to /data/software/tomcat/tc6.0.x/trunk/output/dist [copy] Copying 1 file to /data/software/tomcat/tc6.0.x/trunk/output/dist BUILD FAILED /data/software/tomcat/tc6.0.x/trunk/dist.xml:330: Execute failed: java.io.IOException: Cannot run program "wine" (in directory "/data/software/tomcat/tc6.0.x/trunk/output/dist"): java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:475) at java.lang.Runtime.exec(Runtime.java:610) at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862) at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481) at org.apache.tools.ant.taskdefs.Execute.e
Re: Tomcat 6.0 Clustering and non-sticky session loadbalancer
You may want to go through this if you want an alternative to store/share sessions: http://www.reinwaldwarapen.com/2011/01/storing-and-sharing-sessions-among.html On 6/17/2011 2:12 PM, Pontus wrote: Hello, The Tomcat 6.0 Clustering/Session Replication HOW-TO states "Make sure that your loadbalancer is configured for sticky session mode". However if I configure my Tomcat cluster to have session replication, why would sticky sessions be required ? I can see cases where sticky sessions are for performance a better option, I might have some DB cache not connected to the session or some non-serialized data. However provided that I store all session data in the session object and have all data serializable is sticky session mode in the LB really a requirement and if so why ? Best regards Pontus Ullgren - 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: Tomcat 6.0 Clustering and non-sticky session loadbalancer
On 17/06/2011 09:42, Pontus wrote: > Hello, > > The Tomcat 6.0 Clustering/Session Replication HOW-TO states "Make sure > that your loadbalancer is configured for sticky session mode". > > However if I configure my Tomcat cluster to have session replication, why > would sticky sessions be required ? If you use the Backup manager, you must use sticky sessions since the session is only backed up to a single node (selected at random for each session) in the cluster. If you use the delta manager, sticky sessions are advisable for several reasons: - Parallel requests. If a browser issues multiple requests in parallel and these are handled by different nodes one request might not see that session changes triggered by a different request and that might be an issue. - Performance. Without sticky sessions, you need to use use synchronous session replication to ensure all the other nodes in the cluster have the updates before the next request is issued. That takes time. - Debugging. Trying to figure out what went wrong is usually hard enough without each request going to a different node. Mark > I can see cases where sticky sessions are for performance a better option, > I might have some DB cache not connected to the session or some > non-serialized data. However provided that I store all session data in the > session object and have all data serializable is sticky session mode in > the LB really a requirement and if so why ? > > Best regards > Pontus Ullgren > > > - > 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
Tomcat 6.0 Clustering and non-sticky session loadbalancer
Hello, The Tomcat 6.0 Clustering/Session Replication HOW-TO states "Make sure that your loadbalancer is configured for sticky session mode". However if I configure my Tomcat cluster to have session replication, why would sticky sessions be required ? I can see cases where sticky sessions are for performance a better option, I might have some DB cache not connected to the session or some non-serialized data. However provided that I store all session data in the session object and have all data serializable is sticky session mode in the LB really a requirement and if so why ? Best regards Pontus Ullgren - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Java VM 1.6.0_26 crashes Tomcat 6.0.32 when HTTP compression set to on
We are running the 64-bit version of Java VM 1.6_06 together with Apache Tomcat 6.0.32 on a 64-bit Windows Server 2003. After we installed the latest security updates this Wednesday to Windows the Java VM running Tomcat started to crash (it has now happened three times. After some investigation it seems to be the zip.dll in Java causing the problem (check the log below), so I now turned of HTTP compression in Tomcat. These are the parameters we used for compression for the Connector (it's running under port 443 on SSL). compression="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascri pt,text/xhtml" Any advice or anyone familiar with this problem, I haven’t found anything useful in the Java bug database (I submitted a bug report for this problem) or in any discussion forum. Thanks in advance, André # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x6d8534a2, pid=1532, tid=5188 # # JRE version: 6.0_26-b03 # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode windows-amd64 compressed oops) # Problematic frame: # C [zip.dll+0x34a2] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # --- T H R E A D --- Current thread (0x84b73800): JavaThread "http-443-109" daemon [_thread_in_native, id=5188, stack(0x8ea5,0x8eb5)] siginfo: ExceptionCode=0xc005, reading address 0x9f93c000 Registers: RAX=0x9f929e60, RBX=0x9c697000, RCX=0x000121a0, RDX=0x RSP=0x8eb4e6a0, RBP=0x0001, RSI=0x0001, RDI=0x R8 =0x0001219e, R9 =0xfb44, R10=0x9c697000, R11=0xa275 R12=0x219c, R13=0x0002, R14=0x0003, R15=0x81f75900 RIP=0x6d8534a2, EFLAGS=0x00010282 Top of Stack: (sp=0x8eb4e6a0) 0x8eb4e6a0: 84e4d000 65621c8d 0x8eb4e6b0: 0003 029a 0x8eb4e6c0: 0003 029a 0x8eb4e6d0: 0001 9e677a90 0x8eb4e6e0: 0001 0x8eb4e6f0: 9c697000 6d852983 0x8eb4e700: 9b57c7b0 0200 0x8eb4e710: 705fef90 07ff7fc2daab 0x8eb4e720: 9b57c7b0 0200 0x8eb4e730: 6d85a850 9c697000 0x8eb4e740: 0x8eb4e750: 6d8539b6 0x8eb4e760: 705fef90 0200 0x8eb4e770: 0200 07ff7fc2db50 0x8eb4e780: 705fef90 9e677a90 0x8eb4e790: 8eb4e870 Instructions: (pc=0x6d8534a2) 0x6d853482: 4d 03 00 00 3b c7 0f 84 6e 03 00 00 41 3b c6 72 0x6d853492: 4f 48 8b 43 48 44 8b 83 8c 00 00 00 41 8d 48 02 0x6d8534a2: 0f b6 14 01 8b 43 68 8b 4b 78 d3 e0 33 d0 48 8b 0x6d8534b2: 43 60 23 53 74 8b ca 89 4b 68 44 0f b7 24 50 8b Register to memory mapping: RAX=0x9f929e60 is an unknown value RBX=0x9c697000 is an unknown value RCX=0x000121a0 is an unknown value RDX=0x is an unknown value RSP=0x8eb4e6a0 is pointing into the stack for thread: 0x84b73800 RBP=0x0001 is an unknown value RSI=0x0001 is an unknown value RDI=0x is an unknown value R8 =0x0001219e is an unknown value R9 =0xfb44 is an unknown value R10=0x9c697000 is an unknown value R11=0xa275 is an unknown value R12=0x219c is an unknown value R13=0x0002 is an unknown value R14=0x0003 is an unknown value R15=0x81f75900 is an unknown value Stack: [0x8ea5,0x8eb5], sp=0x8eb4e6a0, free space=1017k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [zip.dll+0x34a2] Java_java_util_zip_ZipEntry_initFields+0x1282 Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) J java.util.zip.Deflater.deflateBytes(J[BII)I J org.apache.coyote.http11.filters.GzipOutputFilter.flush()V J org.apache.coyote.http11.Http11AprProcessor.action(Lorg/apache/coyote/Acti onCode;Ljava/lang/Object;)V J org.apache.catalina.connector.OutputBuffer.doFlush(Z)V J org.apache.catalina.connector.CoyoteWriter.flush()V J java.io.BufferedWriter.flush()V J org.apache.xml.serializer.ToXMLStream.endDocument()V j com.planmill.translets.resourceplanner.transform(Lorg/apache/xalan/xsltc/D OM;Lorg/apache/xml/dtm/DTMAxisItera