Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 61B7FDD22 for ; Sun, 30 Sep 2012 16:22:49 +0000 (UTC) Received: (qmail 24135 invoked by uid 500); 30 Sep 2012 16:22:47 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 24085 invoked by uid 500); 30 Sep 2012 16:22:47 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 24077 invoked by uid 99); 30 Sep 2012 16:22:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Sep 2012 16:22:47 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [62.128.201.175] (HELO asmtp4.iomartmail.com) (62.128.201.175) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Sep 2012 16:22:37 +0000 Received: from asmtp4.iomartmail.com (localhost.localdomain [127.0.0.1]) by asmtp4.iomartmail.com (8.13.8/8.13.8) with ESMTP id q8UGMGrQ027486 for ; Sun, 30 Sep 2012 17:22:16 +0100 Received: from steveTHINK (85-211-1-169.dynamic.dsl.as9105.com [85.211.1.169] (may be forged)) (authenticated bits=0) by asmtp4.iomartmail.com (8.13.8/8.13.8) with ESMTP id q8UGME7x027362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 30 Sep 2012 17:22:15 +0100 From: "Steve Higham" To: Subject: How to pretty print HTML from Struts Date: Sun, 30 Sep 2012 17:22:13 +0100 Message-ID: <000601cd9f27$c15b00c0$44110240$@sjlt.co.uk> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01CD9F30.2321D9C0" X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac2fJ7Ku1iQlAP9hQ1eDv2DyidZlMw== Content-Language: en-gb X-Antivirus: avast! (VPS 120930-0, 30/09/2012), Outbound message X-Antivirus-Status: Clean ------=_NextPart_000_0007_01CD9F30.2321D9C0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit My Struts Views are made up of JSP and Tiles and the resulting HTML is untidy to say the least. This causes problems when I try to compare it with HTML mock-ups. To solve this I'm trying to use the JTidy library to pretty print the HTML output to the browser. I'm using the JTidyFilter configured as follows: - StrutsFilter /* JTidyFilter /* This seems to be failing because the Struts Filter Dispatchers only pass the request down the Filter Chain if it is not a Struts Request (e.g. *.action). Therefore this config will try to pretty-print *.css, *.js, *.img etc. but completely ignores the outputs of my actions. Does anyone know a sensible way of pretty printing the Struts HTML output to the browser? Many Thanks, Steve Steve Higham ------=_NextPart_000_0007_01CD9F30.2321D9C0--