> There is a static helper, you shouldn't be using that code above. You
should
> be using things like:
>
> TurbineServlet.getServerName()
> TurbineServlet.getServerScheme()
> TurbineServlet.getServerPort()
>
Ha.. missed those... they basically do what I was doing... but I switched
over to using these helpers... same results... a bit more detail below...
> The servlet service in 2.x should be initialized automatically when the
> servlet starts. Like I've said before, if these values appear to be null
> than something is wrong with the service. I only use the servlet service
in
> the UI manager in the sample app and there are no unit tests so I can't
say
> for certainty that it works in all cases.
okay... I see the service getting initialized early in my console...
in my Index.java I have the following code... all 4 sout statements are null
until I uncomment
these first 3 lines...
//TurbineServices ts = (TurbineServices)TurbineServices.getInstance();
//TurbineServletService servlet =
(TurbineServletService)ts.getService("ServletService");
//servlet.init(data);
System.out.println("NAME: " + TurbineServlet.getServerName());
System.out.println("PORT: " + TurbineServlet.getServerPort());
System.out.println("SCHEME: " + TurbineServlet.getServerScheme());
System.out.println("CONTEXT: " + TurbineServlet.getContextPath());
Once this is executed (including those first 3 lines) my scheduled job runs
with those same sout lines outputing the right stuff....
also.. if i do..
$ui.image("yo")
in my Index.vm
I see
null://null:nullnull//resources/ui/skins/default/images/yo
rendered...
UNLESS.. I uncomment those first 3 lines again... so it seems like
servletservice is not getting initialized when turbine starts up... maybe
because at startup there is no rundata to use for the initialization... I
have started digging around in the source code that deals with all this, but
there is quite a bit there, so it will be a while before I understand it
enough to comment with any kind of authority...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]