If I'm going to run Restlets inside Tomcat or any Servlet container........

2008-02-28 Thread TA
New to Restlets and have a question. Apologies if it's come up before, I couldn't find it in the archives Do I need to create a Component instance and attach the Application to it if I'm going to run Restlests inside a Servlet container? I looked at the example

Re: If I'm going to run Restlets inside Tomcat or any Servlet container........

2008-02-28 Thread Thierry Boileau
Hello Ted, The way I understand the architecture is that you only need to create a Component and have a main() is if you are going to run stand alone. Is this correct? Yes, you're right. There is no need of main() when running in servlet container. However, if you find such methods in code

Re: If I'm going to run Restlets inside Tomcat or any Servlet container........

2008-02-28 Thread Rob Heittman
You want Component's plumbing for any server code, in a servlet container or not. A default Component will be transparently supplied by the ServerServlet. You'll also want to use the Application as a place to set up the handling of your RESTful requests. Restlet 1.1 (trunk) has handy

Re: If I'm going to run Restlets inside Tomcat or any Servlet container........

2008-02-28 Thread TA
Thank you both for the info. Rob Heittman rob.heittman at solertium.com writes: You want Component's plumbing for any server code, in a servlet container or not. A default Component will be transparently supplied by the ServerServlet. You'll also want to use the Application as a place to

Re: setting the location header

2008-02-28 Thread Jim Alateras
Thierry, Thanks once again. The supplied code snippet worked with a slight modification Reference reference = new Reference(http://localhost/exchange;); reference.setBaseRef(http://localhost;); Request request = new Request(Method.POST, reference); cheers /jima Thierry Boileau wrote:

servlet mapping question

2008-02-28 Thread TA
New user and I'm playing around with the firstStepsApplication using it in a tomcat web container. I'm trying to play with the routing. Instead of Router router = new Router(getContext()); router.attachDefault(HelloWorldResource.class); I'm trying to do

Re: servlet mapping question

2008-02-28 Thread Stephan Koops
Helo TA, try to request /testServlet/testServlet/*, because you give the testServlet double: one times in the web.xml and one times while attaching to the router. I think, you should remove the testServlet from the attach method. best regards Stephan TA schrieb: New user and I'm playing

Re: setting the location header

2008-02-28 Thread Thierry Boileau
great! regards, Thierry Boileau On Thu, Feb 28, 2008 at 7:53 PM, Jim Alateras [EMAIL PROTECTED] wrote: Thierry, Thanks once again. The supplied code snippet worked with a slight modification Reference reference = new Reference(http://localhost/exchange;);

Re:re servlet mapping question

2008-02-28 Thread TA
Hi Stephan, Thanks for the reply. I tried it with /testServlet/testServlet/ and that did not work. I'm not sure I follow your suggestion - if I remove the url mapping from the defaultAttach call, all URLs will map to the servlet/restlet and I don't want that because I have other servlets

Re: re servlet mapping question

2008-02-28 Thread Rhett Sutphin
Hi Ted, On Feb 28, 2008, at 5:11 PM, TA wrote: I'm not sure I follow your suggestion - if I remove the url mapping from the defaultAttach call, all URLs will map to the servlet/restlet and I don't want that because I have other servlets running the web container. What Stephan was pointing

First steps with Restlets in Equinox OSGi

2008-02-28 Thread Frank Gerhardt
Hi, the Restlet jars are nicely bundled as bundles ;-) but I could not find a way to run the first steps example without deploying a webapp. I'm looking for a pure OSGi+servlets, no webapp, solution. Equinox provides an extension point where I can register the ServerServlet. But Equinox

Ran into difficulty getting servlet connector working.

2008-02-28 Thread Eben
Hello, I have been writing an application using the Restlet API (and a very pleasant API I might add) and ran into a problem. Initially I was using the 1.0 release and everything was working fine. Eventually I found myself in the situation where I needed to either parse the request body into a

riap: isConfidential()?

2008-02-28 Thread Rob Heittman
Interesting question came up in one of our implementations today. We check isConfidential() in a Filter and redirect people to https in certain circumstances where the response should not be transmitted in the clear. Some requests are transported over the riap: pseudoprotocol. It seems to me

Re: Ran into difficulty getting servlet connector working.

2008-02-28 Thread Rob Heittman
I believe this was a bug in ServerServlet in the 1.1M1 snapshot that has since been corrected. I usually work out of trunk and it doesn't affect me any more. This thread describes it and has a patch: http://www.mail-archive.com/discuss@restlet.tigris.org/msg03451.html There should be a new

Re: Restlet and Velocity template location.

2008-02-28 Thread cleverpig
Thanks Vincent,that's pretty way for restlet-1.1snapshot.I used this way in restlet or resource: TemplateRepresentation templateRepr= new TemplateRepresentation( /people.vm, MediaType.TEXT_HTML); ... templateRepr.setDataModel(dataModel);