Ok it seems to work now: The problem was I didn't realize that the
org.restlet.jar library (1.1M4) that I had referenced in my project did
_not_ contain the agent.properties / accept.properties. There are only
the class files in it and so of course the properties couldn't be loaded
I guess. So I followed your advice, copied the 2 files into my
project-classpath and voila! - responses default now to HTML in Firefox2
Thanks again!
Ralf
Thierry Boileau schrieb:
Hello Ralf,
could you tell us what is the content of the "accept" header? Is this
exactly the one specified in the "accept.properties"?
If not, you will have to provide your own file.
Proceed as follow:
- in a directory of your convenience, add your own "accept.properties"
file in the following sub-path: org/restlet/service/accept.properties
- add in your classpath the directory.
Could you keep us informed?
Best regards,
Thierry Boileau
Yes I already use the extension-Tunnel (its a nice feature by the way)
and yes, if i explicitly write .htm or .html at the end of the uri it
works. What I want though is that the user gets html even if he
doesn't use any extension.
There are many use cases imaginable, where a user will not know about
extensions and just try an URI (e.g. /SOS/OFFERINGS/WeatherMS)
He should then - per default - get Hypermedia which is human-readable
and points to other representation/resources.
Anyway right now this is not a very urgent problem for me, its just
something thats been bugging me and I thought I'd share ;-)
P.S.
I'm using Restlet 1.1M4
Stephan Koops schrieb:
Hi Ralf,
I only see that feature, but do not used it yet. Thierry, could you
help?
Ralf, you could try the extension tunnel. If you add ".html" to the
URI it automaticly sets the acept header to "text/html".
best regards
Stephan
Ralf Bommersbach schrieb:
Ok I set getTunnelService.setUserAgentTunnel(true) in the
constructor of my Application-subclass but no change, still defaults
to xml... :-(
Do I have to edit the agent/accept.properties?
My Firefox2 user-agent reads:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de;
rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
best regards
Ralf