Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 81266 invoked from network); 7 Oct 2004 00:20:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 7 Oct 2004 00:20:21 -0000 Received: (qmail 91660 invoked by uid 500); 7 Oct 2004 00:19:50 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 91528 invoked by uid 500); 7 Oct 2004 00:19:48 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 91511 invoked by uid 99); 7 Oct 2004 00:19:48 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [207.155.248.71] (HELO devonshire.xo.com) (207.155.248.71) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 06 Oct 2004 17:19:45 -0700 Received: from [192.168.1.2] (ma-plymouthsouth1c-a-240.albyny.adelphia.net [24.49.170.240]) by devonshire.xo.com id UAA29718; Wed, 6 Oct 2004 20:19:44 -0400 (EDT) [ConcentricHost SMTP Relay 1.17] Errors-To: Subject: RE: Capturing HTML using Tomcat 4 From: Ben Souther Reply-To: bsouther@fwdco.com To: Tomcat Users List In-Reply-To: <01d001c4abfb$83be8a20$6f00000a@BALTHAZAR> References: <01d001c4abfb$83be8a20$6f00000a@BALTHAZAR> Content-Type: text/plain Organization: F.W. Davison & Co, Inc. Message-Id: <1097107983.26568.2.camel@lumpy> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 06 Oct 2004 20:16:28 -0400 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > Could a filter do the job? Yes, it most certainly could. If your interested, I wrote one and packaged into a war file. http://ben.souther.us/capture.war It should be enough to get you started. On Wed, 2004-10-06 at 19:23, Mike Curwen wrote: > Could a filter do the job? > > response wrapping always seems scarey to me, but it should be possible to > wrap all the requests for a given URL space (so for example, anything that > might conveniently fall under the /agreement/* URL space), and after your > call to doChain, you can extract and persist a copy of the HTML response. > > No touching the existing pages, you only need to map the correct URLs (and > there can be multiple ones, of course). > > > > -----Original Message----- > > From: David Wall [mailto:d.wall@computer.org] > > Sent: Wednesday, October 06, 2004 6:03 PM > > To: 'Tomcat Users List' > > Subject: Re: Capturing HTML using Tomcat 4 > > > > > > That's not as "nice" only because most of the pages to be > > captured are JSPs, and converting the JSP to a servlet for > > this purpose would defeat much of the beauty of JSPs. I saw > > a listing for using a "capture JSP tag" at > > http://www.jguru.com/faq/view.jsp?EID=304022 that seems kind > > of interesting. Of course, if this works well, it would only > > work on JSPs in which the tag could be placed. > > > > David > > > > ----- Original Message ----- > > From: "Robert Harper" > > To: "'Tomcat Users List'" ; > > "'David Wall'" > > Sent: Wednesday, October 06, 2004 3:20 PM > > Subject: RE: Capturing HTML using Tomcat 4 > > > > > > > One way is to write a servlet that builds the html and before you > > > finish > > with > > > the response, save the text into a table and then send the response. > > > > > > Robert S. Harper > > > 801.265.8800 ex. 255 > > > > -----Original Message----- > > > > From: David Wall [mailto:d.wall@computer.org] > > > > Sent: Wednesday, October 06, 2004 4:10 PM > > > > To: tomcat-user@jakarta.apache.org > > > > Subject: Capturing HTML using Tomcat 4 > > > > > > > > I've been looking through archives and such for examples of how to > > capture > > > > the HTML output from a given JSP programmatically so I > > can archive > > > > or do other things with that HTML. For example, we might > > do this to > > > > record > > the > > > > text of an agreement that was displayed to a user, in which a JSP > > generated > > > > the agreement HTML page. The pages may be generated from either > > > > HTTP > > GET or > > > > POST. > > > > > > > > It would be nice to perhaps just have a servlet "include" the > > > > response > > from > > > > a JSP, passing along the GET/POST request to that JSP, > > but then have > > > > the servlet capture the JSP's response in a string for > > > > processing/storage. O'Reilly has a caching servlet that may help, > > > > but I was wondering if > > anybody > > > > had come out with an elegant way to do this. > > > > > > > > Thanks, > > > > David > > > > > > > > > > > > > > -------------------------------------------------------------------- > > > > - > > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > > > For additional commands, e-mail: > > tomcat-user-help@jakarta.apache.org > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org