You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by kate_cl <vi...@yahoo.com> on 2009/03/03 05:24:36 UTC

Get Server Port

Hi,anyone know how to get server port if request is null?
-- 
View this message in context: http://www.nabble.com/Get-Server-Port-tp22302338p22302338.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Get Server Port

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
In that case, you either have to pass the information you need as
parameters to the task/thread, or make it possible to look it up in a
configuration file of some kind.

Nils-H

On Thu, Mar 5, 2009 at 9:09 AM, kate_cl <vi...@yahoo.com> wrote:
>
> Hi,the request is null when i'm running a schedule task. A thread will wake
> up at certain time and send email to user. I need to include the server url
> in this,including the server port and context path.
>
>
> Nils-Helge Garli wrote:
>>
>> When is the request null? And what do you need the server port for?
>>
>> Nils-H
>>
>> On Tue, Mar 3, 2009 at 5:24 AM, kate_cl <vi...@yahoo.com> wrote:
>>>
>>> Hi,anyone know how to get server port if request is null?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Get-Server-Port-tp22302338p22302338.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Get-Server-Port-tp22302338p22346941.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Get Server Port

Posted by kate_cl <vi...@yahoo.com>.
Hi,the request is null when i'm running a schedule task. A thread will wake
up at certain time and send email to user. I need to include the server url
in this,including the server port and context path.


Nils-Helge Garli wrote:
> 
> When is the request null? And what do you need the server port for?
> 
> Nils-H
> 
> On Tue, Mar 3, 2009 at 5:24 AM, kate_cl <vi...@yahoo.com> wrote:
>>
>> Hi,anyone know how to get server port if request is null?
>> --
>> View this message in context:
>> http://www.nabble.com/Get-Server-Port-tp22302338p22302338.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Get-Server-Port-tp22302338p22346941.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Get Server Port

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
When is the request null? And what do you need the server port for?

Nils-H

On Tue, Mar 3, 2009 at 5:24 AM, kate_cl <vi...@yahoo.com> wrote:
>
> Hi,anyone know how to get server port if request is null?
> --
> View this message in context: http://www.nabble.com/Get-Server-Port-tp22302338p22302338.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org