> Do not use ServerData you don't need it and it doesn't exist in Turbine
3.0.
> With the information you can now get the servlet service you don't need to
> make a template link. You're actually just going around in a circle there
> making a ServerData object because the template link just pulls out the
info
> you just fed into the ServerData constructor. When the getContextPath()
> method is fixed to return the proper information you can just construct
the
> correct URL yourself.
All my screens use $link so when I want to render a screen in my scheduled
jobs, I need to instantiate TemplateLink and add it to the context... I
could go ahead and write my own $link type pull tool to use the new static
methods on Turbine.. but I don't understand why placing this info in a
ServerData and passing that to TemplateLink is bad... it has to get that
info from someplace, and right now it is set up to get it from a RunData or
a ServerData.. it seems easier to create a ServerData in a scheduled job
than a RunData...
>
> What you're doing here is a prime example of what happens when there is a
> lack of information and no API. I've never seen anyone do this before, not
> to say that it's wrong but I certainly would never expect usage like this.
> In short it shouldn't be necessary when you can properly retrieve all the
> info from the servlet service.
I guess I'm missing what I am doing that is so odd... could you elaborate?
> You you be able to construct the URL in the following manner
>
> String url = new StringBuffer().
> append(TurbineServlet.getServerScheme()).
> append("://").
> append(TurbineServlet.getServerName()).
> append(":").
> append(TurbineServlet.getServerPort()).
> append(TurbineServlet.getContextPath()).
> append(pathToYourResource).
> toString();
I sure could.. but isn't that what TemplateLink is supposed to do? I am not
opposed to rewriting the $link tool to do this in a different way, but why
is it in there if it is wrong?
thanks for your help!!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]