struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <davelnew...@gmail.com>
Subject Re: How to pretty print HTML from Struts
Date Sun, 30 Sep 2012 17:05:18 GMT
Ugh. IMO relying on textual representation of a DOM is fragile and broken,
especially if you're unable to ignore whitespace-is there a reason you're
doing it like this?

Dave

(pardon brevity, typos, and top-quoting; on cell)
On Sep 30, 2012 12:22 PM, "Steve Higham" <steve@sjlt.co.uk> wrote:

> 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: -
>
>
>
>      <filter-mapping>
>
>        <filter-name>StrutsFilter</filter-name>
>
>        <url-pattern>/*</url-pattern>
>
>      </filter-mapping>
>
>
>
>      <filter-mapping>
>
>        <filter-name>JTidyFilter</filter-name>
>
>        <url-pattern>/*</url-pattern>
>
>      </filter-mapping>
>
>
>
> 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
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message