Hi Richard,

Can you try :
 - request.getResourceRef().getHostPort(),
 - or request.getRootRef().getHostPort().

("request" is the Restlet request object).

best regards,
Thierry Boileau

On 9/28/07, Richard Bronkhorst <[EMAIL PROTECTED]> wrote:
>
> Hi all
>
> I am working on a library providing a restlet resource to 'plug into'
> other restlet projects. This library does some communication with a
> server when the servlet first starts, so before any requests come in.
> For this i need to know the port that the application is running on.
>
> So, for instance, i have a tomcat server running on port 8080, and a
> restlet running on top of that using ServerServlet. Is there a way for
> the application to  find out on which port it is running before any
> requests come in?
>
> Richard
>
> --
> Richard Bronkhorst
> Software Developer
>
> Noterik BV
> P.O. Box 15189
> 1001 MD Amsterdam
> The Netherlands
>
> T: +31 (0)20 5929 966
> F: +31 (0)20 5929 969
>
> www.noterik.com / www.noterik.nl / www.streamedit.com
>

Reply via email to