turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From EP...@upstate.com
Subject RE: RunData object not in web post/get?
Date Wed, 16 Jul 2003 21:23:25 GMT
 Henning,

Your points, as usual, are well thoughout and lucid!  I realized that the
only kind of link I would want to make would be a relative link..  And
thought about all the other points you made, and decided to take the path of
least resistence and skip using $link on the report..  

You saved me a stack of challenges!

Eric

-----Original Message-----
From: Henning P. Schmiedehausen
To: turbine-user@jakarta.apache.org
Sent: 7/16/03 12:38 PM
Subject: Re: RunData object not in web post/get?

EPugh@upstate.com writes:

> OK,

>I think what you said makes a lot of sense.  Pull tools to me are
dangerous
>because they are difficult to test..  However, in my case, I want to
use the
>same .vm file to create some HTML in both an action (incase the html
doesn't
>exist yet) and on a nightly basis via a scheduled job.  therefore,
since my
>.vm file uses $link, I need the pull tool in the context.

I think what you overlook, that normally $link creates session
specific links.  You won't notice this if you run with cookies as
session trackers, but if you run with ;jsessionid=<xxx> attached to
your URIs, this will get pretty clear (which is the main reason why I
do all my developing work with cookies off). You won't want these on
your auto-generated pages...

If you want to create report pages offline (without a user logged in
and without running in a servlet session), you need a different
tool. One that uses the default Turbine settings for links. One could
write a simple Global Tool for this, as it keeps no session or user
specific data.

Trying to access the toolbox which is session specific (session tools
/ authorized tools) or even request specific (request tools) is very
dangerous. If you have no request context and no session context, what
will the internal state of the tools be?

You must use either global tools (which you can get in a context from
the TurbinePull.getGlobalContext()) or roll your own, artificial
context (as you do Velocity Rendering, there is no problem doing
this).

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky

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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message