On 8/14/01 7:44 AM, "Scott Eade" <[EMAIL PROTECTED]> wrote:
> From: "Scott Eade" <[EMAIL PROTECTED]>
>> From: "Scott Eade" <[EMAIL PROTECTED]>
>>> From: "Jason van Zyl" <[EMAIL PROTECTED]>
>>>> In 2.1 use the TurbineServletService to gain access to server information
>>>> from code that has no access to RunData. Take a peek at the TurbineServlet
>>>> static helper to get what you need.
>>>>
>>>> jvz.
>>>>
>>>> Jason van Zyl
>>>>
>>>
>>> I'm attempting to use TurbineServlet to initialise a ServerData instance
>>> as follows:
>>>
>>> ServerData sd = new ServerData(TurbineServlet.getServerName(),
>>>
>>> Integer.parseInt(TurbineServlet.getServerPort()),
>>> TurbineServlet.getServerScheme(),
>>> "", // scriptName?
>>> TurbineServlet.getContextPath());
>>>
>>> [ I need the ServerData to pass to the TemplateLink constructor in my
>>> ScheduledJob (TemplateLink tl = new TemplateLink(sd);) - i.e. the
>>> Context is not available. ]
>>>
>>> The trouble is that TurbineServlet.getServerPort() is returning null
>>> rather than the expected "8080". Any idea what is going wrong here?
>>>
>>> Also, what is scriptName for? Will it be okay to pass ""?
>>>
>>> Thanks,
>>>
>>> Scott
>>
>> Actually, all of the TurbineServlet methods invoked above return null.
>>
>> Is there something wrong with the way I am attempting to use TurbineServlet?
>>
>> Thanks,
>>
>> Scott
>
> Am I having a conversation with myself here? :-)
>
> Is this going to be the same problem as highlighted in the following archived
> message?
Yes, same problem. This is not going to be a problem in 3.0, but I don't
have any time right now to debug 2.1.
> http://www.mail-archive.com/[email protected]/msg02323.html
>
> Scott
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
jvz.
Jason van Zyl
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]