Looks like you are confusing two different, but related, concepts. An engine service is, within Tapestry, much like a traditional servlet. It will receive a request, deciding what to do based on query parameters, and sending back a response.
A ServiceEncoder is different; it is used to convert a bundle of query parameters, meaningful to the engine service, and encodes that information into (generally speaking) path info, including file extensions. The ServiceEncoder also reverses, recognizing path info it may have encoded and converting it back into query parameters meaningful to the engine service. I'm not quite sure what happened with this snippet; most likely either it was not picked up, or it will eventually cause a runtime exception. Contributions to the ApplicationServices configuration point should implement the IEngineService interface, not the ServiceEncoder interface. On 7/3/05, Bjoern Krollner <[EMAIL PROTECTED]> wrote: > Hello everybody, > > I would like to use a custom ServiceEnoder in my application for > external pages. I am using Tapestry 4.0 and I tried to configure the > hivemodule.xml like described in the documentation but I did not have > had any success so far. Here is my hivemodule.xml: > > <module id="testapp" version="1.0.0" package="de.krollner.testapp"> > > <contribution > configuration-id="tapestry.services.ApplicationServices"> > <service name="externalpage" object="service:ExternalPage"/> > </contribution> > > <service-point id="externalpage" > interface="org.apache.tapestry.engine.ServiceEncoder"> > <invoke-factory> > <construct class="server.webclient.ExternalPageServiceEncoder"> > <read-attribute attribute="extension" property="extension"/> > <read-attribute attribute="serviceName" property="service"/> > </construct> > </invoke-factory> > </service-point> > > <contribution configuration-id="tapestry.url.ServiceEncoders"> > <direct-service-encoder id="direct" stateless-extension="direct" > stateful-extension="sdirect"/> > <page-service-encoder id="page" extension="page" service="page"/> > <page-service-encoder id="external" extension="html" > service="service:ExternalPage"/> > <asset-encoder id="asset" path="/assets/"/> > > <extension-encoder id="ext" extension="svc" after="*"/> > </contribution> > > </module> > > Did I do anything wrong? Thanks for your help. > > Best regards, > > Björn > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Independent J2EE / Open-Source Java Consultant Creator, Jakarta Tapestry Creator, Jakarta HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
