On Sat, 2004-01-17 at 19:18, Jeremias Maerki wrote:
> Discussion on this can be found here:
> http://marc.theaimsgroup.com/?t=103831532500006&r=1&w=2
> http://marc.theaimsgroup.com/?t=101723026900002&r=1&w=2
> There were pros and cons about the move from examples into the main
> source tree. I think the triggering point was that the servlet sees real
> use and doesn't really qualify as an "example". I agree that with
> today's build it may not be so obvious what is necessary to build the
> WAR file (the various parts are distributed in the source tree). But the
> WAR file gets built automatically today.

Doh! I did a 'locate fop.war' and there it is! Of course, my oldish
snapshot from HEAD doesn't work, so there was no output from
running it, but it does build and deploy into Tomcat.

> Proposal: I like your ideas. I also think that we have to preserve the
> simplicity of the servlet as an educational example for people who want
> to play with it. So what about resurrecting the examples/servlet but
> keeping it real simple? Just the basics. And the servlet in the main
> source tree stays where it is but gets your new features.

I would expect an example servlet to be quite simple with descriptive
comments and suggestions for variations. The purpose here would be to
provide a prototypical webapp that could be used to populate a small
project in the user's development space.

I did find it difficult to settle on a set of features that I would 
include in a single 'FopServlet' program. This is simplified if
FopServlet is primarily real working code. I would be comfortable
with an org.apache.fop.servlet.FopServlet that included some more
advanced features:

1) Deflate and Inflate the byte stream used to store the PDF file
   (is Content-length: required for any reason other than placating
   Acrobat and that rich hermit who lives outside Redmond WA ?) 
2) Cache Templates objects for faster Transformations when XSLT
   files are to be re-used. The 'Java and XSLT' O'Reilly book
   has some interesting suggestions in this area.
3) Using URL's for the fo= and xml=,xsl= parameters so we can use
   network resources as well as local files.
4) Detect IE and redirect users to a URL that has the proper '.pdf'
   filetypes in basename and end of request URL.
5) The servlet could be used as part of an automated testing process.
   The fop.war file could be deployed in Tomcat as part of an HttpUnit
   test and then many of our tests could be run using HttpUnit.

Examples could be simpler than this as they have the specific purpose of
illustrating a practical use case.

> German speaking Swiss people would say you get "de F÷ifer und's Weggli"
> (freely translated to english: the 5 cent piece and the donut. Meaning:
> You get twice as happy. Want to know what a "Weggli" is? Go to
> http://www.jowa.ch/1776/1846/1847/1865/1867.asp). :-)

My German has atrophied over the past 31 years. I left Ramstein, Germany
in July 1973 and except for one undregrad course, have only spoken
German once or twice since. [I stopped overnight in Lahr about 1978.]

As a Canadian I understand 'donut' (see http://www.timhortons.com/) but 
I always think of brotchen as a German pastry. 


Reply via email to