Thanks Rob, Rhett.

2009/2/6 Rob Heittman <[email protected]>:
> Hi Dave!  (Shout out from fop-dev back in the day)
>
> If you are using the Accept: header in your client
Yes, thats the criterion I'm using.


> ... and using the Restlet
> Resource model on the server ... just write your responding code in your
> override of represent(Variant variant).
>
> if(variant.getMediaType().equals([the MediaType you speak])){
>   // do stuff;
> } else {
>   // return the error status;
> }

I'm guessing this is where I'd need to handle the 406?
Or use Rhetts idea and extend resource.

OK, It's doable. I need to study the API a bit more.


>
> I just spotted this example blog that does pretty much what you want:
> http://www.2048bits.com/2008/06/creating-simple-web-service-with.html

Thanks for that, looks good.

I couldn't find much in http://tomcat.apache.org/tomcat-6.0-doc/api/index.html
to help me get the header so I'll move this work over to restlets.

regards



-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1117494

Reply via email to