Jerome Louvel | 1 Aug 2007 09:29

Re: pseudo-protocols (was Re: How I would like to see Spring integrated)

Hi Marc,

A quick reply: you can find a working WAR client in the Servlet extension:
http://www.restlet.org/documentation/1.0/ext/com/noelios/restlet/ext/servlet/ServletWarClient.html

There is also a standalone version which hasn't been tested too much yet in NRE:
http://www.restlet.org/documentation/1.0/nre/com/noelios/restlet/local/WarClientHelper.html

However, the WAR: scheme doesn't do what you are looking for (internal call), it just gives access to resources local to the Restlet Application in the same way as a Servlet WAR package.

We also have a RFE that sounds close to what you are looking for:
http://restlet.tigris.org/issues/show_bug.cgi?id=157

What needs to be taken into account for this feature is the support for virtual hosting, the usage of "localhost" in this case would be limiting IMO.

Best regards,
Jerome


2007/7/30, Marc Portier <mpo <at> outerthought.org>:


Jerome Louvel wrote:
> Hi Joe,
>
> There is a plan to add WAR packaging support for NRE in version 1.1 M2.
> It will let the Restlet component (manager) automatically make the
> decision for classpath authority for you. Your URIs will look like
> "war://app/scripts/init.groovy" instead. See details at:
> http://restlet.tigris.org/issues/show_bug.cgi?id=76
>
>

Jerome,

I followed the link to that RFE but couldn't find more explanation of
this war:// pseudo-protocol

actually, I do find this paragrpah there, which makes me assume more
"pseudo-protocols" are in play already?

(quote taken from the RFE)
> Split LocalClient into LocalClient, ContextClient (based on an Application
> reference?) and FileClient.
>
> Add "allowModifications" or "readOnly" property on Application, use it to
> configure the DirectoryHandler/ContextClient.


I'm using "pseudo-protocol" here as the term Apache Cocoon is using for
'new' URI-schemes that map to resources internal to the running Cocoon
system (these are cocoon:// cocoon:/ and context:/ )

FWIW: These allow to call upon the current server again without a need
to actually go over the wire or even serialize the intermediate
representations. ( i.e. an alternative to needing http://localhost/ if
you like)
Since this approach helps in modularizing apps I'm compelled to learn if
restlet has similar features.


Dunno if my current background is making me read hints here that are
just not there, but if you have a pointer to more in depth explanation
or samples on what this "war://" or the other mentioned stuff is about
then I'll be happily checking that out and drawing my own coclusions

regards,
-marc=



Gmane