RE: Multiple applications with serverservlet and v2.0

2011-04-14 Thread Chris Davis
ok no worries I just found the component javadoc

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


Multiple applications with serverservlet and v2.0

2011-04-13 Thread Chris Davis
Quick question is it possible to have multiple restlet applications with 
restlet  2.0 (e.g.1.1.9) when using the servlet extension and config in a 
web.xml file?

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


Re: Using multiple Applications

2010-06-03 Thread Bruno Harbulot
On 01/06/10 21:51, jupiterroom wrote:
 Hi.

 I have an application and have implemented createInboundRoot to root the the
 resources I want to use.  Now I have something I consider to be a new
 application and what to keep the routing seperate with a different
 implementation of createInboundRoot.  I am using this bit of code:

 component.getDefaultHost().attach(appFoo);
 component.getDefaultHost().attach(appBar);

 However only appFoo routing seems to work.  Am I doing something wrong?  Can
 I have multiple applications?

If you use 'attach' without a path, it uses an empty URI pattern (twice, 
so effectively one replaces the other). You should try attach with a 
different URI pattern for the other application:
http://www.restlet.org/documentation/2.0/jse/api/org/restlet/routing/VirtualHost.html#attach(java.lang.String,%20org.restlet.Restlet)

Best wishes,

Bruno.

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


Multiple applications

2009-04-08 Thread Fabio Mancinelli
Dear all,

is it possible to define multiple applications in a web.xml, each one attached 
to a servlet rooted at a different base URI?

Apparently it's not possible because the application class is defined as a 
context parameter not linked to a servlet, but maybe I am missing something.

Thank you for your help.
Fabio

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


Re: Multiple applications

2009-04-08 Thread Alexander J. Perez Tchernov
You probably want to declare your application - url mapping in some
configuration files outside of the code.

If you're talking about web.xml file only, it seems you can't.

1) But you can use custom  component (restlet.xml)
 
http://www.restlet.org/documentation/1.1/ext/com/noelios/restlet/ext/servlet/ServerServlet.html
http://www.restlet.org/documentation/1.1/api/org/restlet/Component.html

2) or you can specify these mapping in init / context parameters for
your custom application, and make application be a Router, that will
do  in createRoot () initialization

for ( param : init param list)
  this.attach(param.url, param.application).



On Wed, Apr 8, 2009 at 11:06 AM, Fabio Mancinelli
fabio.mancine...@gmail.com wrote:
 Dear all,

 is it possible to define multiple applications in a web.xml, each one 
 attached to a servlet rooted at a different base URI?

 Apparently it's not possible because the application class is defined as a 
 context parameter not linked to a servlet, but maybe I am missing something.

 Thank you for your help.
 Fabio

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




-- 
Best regards,
 ~ Xasima Xirohata ~

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


RE: Re: Multiple applications

2009-04-08 Thread Fabio Mancinelli
 You probably want to declare your application - url mapping in some
 configuration files outside of the code.
 
 If you're talking about web.xml file only, it seems you can't.
 
Actually I was talking about web.xml file only.
Thank you for your hints about solving the problem.

Regards,
Fabio

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