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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]