cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <>
Subject Re: Get port of ServletEngine
Date Wed, 28 Nov 2007 12:35:20 GMT
Thomas Soddemann schrieb:
> Hi again,
> this is more of an issue related to the infrastructural setup rather
> than a cocoon one.
> I cannot think of any standard way of retrieving that bit of
> information other than to have it available as a configuration option
> (e.g. via JNDI).
> Since the web application container could be connected to an HTTPD via
> AJP or URL rewriting may be used before the request is received by the
> application container, or ... there is now way of getting to know,
> which url to use as a base for the current servlet.
> The only thing, you may want to have look at, is the
> javax.servelt.ServletContext. There is a getRealPath() method which
> may be what you are looking for in your context.
Thanks for help. It really seems that I need to find another solution
for this.


> Cheers,
> Thomas
> Felix Knecht wrote:
>> Yes, I need it before a request is made.
>> Use case is:
>> I have a worker zipping files (in a cocoon application A). Another
>> application (B) send a jms message to the worker (A), which files shall
>> put into a zip file. The zip file is stored into filesystem (A) and
>> shall be made available for download via http. Application B receives
>> and acknowledge jms message containing the URI to this zip file. Thus I
>> need to create the URI for app B withing app A. Getting the host name
>> isn't a problem, but as app A can be put anywhere in any servlet engine
>> running on any port I need to figure out this port to be able to create
>> the URI which is sent back to app B.
>> In short:
>> Broadcast a jms message to create a zip file and receive a jms message
>> containing the (http) URI where the zip file is downloadable.
>> Felix
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message