Greetings, all,

I'm a bit confused about what happens when Restlet Client instances are embedded
within Servlets.

I've built a small standalone HTTP client using Restlet that makes simple HTTP
requests of an HTTP server called (let's say) Foo. This client  works fine when
you run it independently from the command line.

A student of mine is now trying to use the Restlet client code within a servlet
for a webapp called (let's say) Bar, and the Restlet Client instance now returns
a 403 error when it makes an HTTP request to Foo. He extracted his code, ran it
as an independent application, and everything once again worked fine. 

I know there is a Servlet adapter in Restlet, but I figured this was for
"server" side integration of Restlet with web servers---i.e. allowing you to do
Restlet style Resource/Representation processing. 

In my case, we're not trying to do that: what we're trying to do is embed a
Client inside a Servlet and make calls to an external server. 

Does anyone have any ideas about why embedding a Restlet Client inside a Servlet
wouldn't work, and what I should do about it? 

If there isn't any obvious reason why I'm having this problem, I can put
together a small test case to illustrate the issue. 

Thanks very much for your help.

Philip

Reply via email to