If you look carefully at the message, you'll notice that the input I
want to use is a tapestry template - so within the service itself I'm
calling cycle.renderPage, which is certainly using the predefined
template file.

I suppose that not being more explicit on this point is what has caused
this question to take so much discussion to answer.  Howard's approach
will certainly do the trick, though I guess it'll take a bit of
finagling if I want to decide which template file is rendered based upon
which service I'm running it under.

That's certainly a good place to start looking.  

Thanks for all your help.

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kent Tong
Sent: Thursday, January 05, 2006 1:06 AM
To: [email protected]
Subject: Re: Rewriting URLs: is something missing?

Rusty Phillips <rphillips <at> edats.com> writes:

> Ultimately, my goal here is to be able to be able to make a file
named,
> for instance:
> 
> MyTemplate.xml
> 
> Which is perhaps a tapestry template that specifies an xml-fo document
> when you render it, and be able to render that as:
> 
> http://localhost:8080/app/MyTemplate.pdf
> 
> rather than having a file named "MyTemplate.html" and having to refer
to
> the page as:
> 
> http://localhost:8080/app/service=xmlconverter&page=MyTemplate

You can define a service encoder to map xxx.pdf back to
/service=xmlconverter&page=xxx. Tapestry will NOT try to
find xxx.html because you're using your own xmlconverter
service. It is up to that service to decide what to do
with that page=xxx parameter. For example, it may convert
xxx.xml to PDF and send it back to the client.

--
Author of a book for learning Tapestry (www.agileskills2.org/EWDT)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to