You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Paulo Silveira <Pa...@commworld.de> on 2002/02/10 02:13:08 UTC

Turbine pipeline, how is th screens linked to velocity templates and actions

Hello

I am discovering many things of turbine, and a lot of things are helping
me a lot.
I just used Torque and Velocity for sometime. But now I would like to
try the whole TDK.

Where can I find out more about the turbine pipeline? Because I was no
able to guess how it works perfectly, I have a lot of .vms, and I also
have the actions, screens and layouts, but I do not know where the
screens are tied with the velocity templates...

If anyone has an example to attach to the already done newapp, it would
be very good. Any hello world page, with an action, screen and template.


Thanks a lot

-----Original Message-----
From: dlr@finemaltcoding.com [mailto:dlr@finemaltcoding.com]
Sent: Sonntag, 10. Februar 2002 01:28
To: Turbine Users List
Subject: Re: status report


"Dave Everson" <dj...@mygolftrac.com> writes:

> Can you please provide more instruction on how to configure
> turbine-torque with turbine-2?  Going off the minimal documentation
> provided, I keep getting the following error:
>
> [Fri Feb 08 23:59:19 CST 2002] -- ERROR -- torque could not be
> initialized!
> 	Exception:  java.lang.ClassCastException:
org.apache.torque.Torque
> 	Stack Trace follows:
> 	java.lang.ClassCastException: org.apache.torque.Torque
> 	at org.apache.turbine.Turbine.loadSubsystems(Turbine.java:861)
> 	at org.apache.turbine.Turbine.init(Turbine.java:243)
> 	at
> org.apache.turbine.util.TurbineConfig.init(TurbineConfig.java:175)
> 	at
> com.smartdatasolutions.common.Framework.startup(Framework.java:23)
> 	at
> com.smartdatasolutions.handler.Rcm.initFramework(Rcm.java:190)
> 	at com.smartdatasolutions.handler.Rcm.process(Rcm.java:44)
> 	at com.smartdatasolutions.handler.Rcm.main(Rcm.java:210)
>
> What maybe causing this error?  My applications that worked before no
> longer work.  I can't figure it out and with no documentation, I don't

> have a clue as to where check next.

Looking at Turbine.java line 861 would be a good start.

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Actions is JSP

Posted by Ian Lim <ma...@yahoo.com.sg>.
Hi Mark

Velocity Tag Library source is currently being maintained in
Velocity CVS - Look for it under contrib\temporary\veltag
directory. Alternatively, you can visit this link

http://jakarta.apache.org/velocity/veltag.html

A few points specific to Turbine:
1) I didn't manage to get Pull Service to work out
of box, so the Pull part of the model is not working for me.

2) Use this to get the familiar $link tool
<jsp:useBean id="link" class="org.apache.turbine.services.jsp.util.JspLink"
scope="request"/>

3) $content tool is not working.

Regards
Ian Lim

----- Original Message -----
From: "Mark Orciuch" <ma...@ngsltd.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Wednesday, February 13, 2002 03:35 AM
Subject: RE: Actions is JSP


> Ian,
>
> Just out of curiosity, how did you manage to use Velocity Tag Library with
> JSP? I realize that I'm responding with a question, but looks like I can
> learn something from your experience (and perhaps others can as well). We
> are heavily invested in JSP and cannot afford to migrate to Velocity at
this
> time. Many thanks in advance.
>
> BTW: We are using turbine-2.2b1-20011124 in case the solution is version
> specific.
>
> Best regards,
>
> Mark C. Orciuch
> Next Generation Solutions, Ltd.
> e-Mail: mark_orciuch@ngsltd.com
> web: http://www.ngsltd.com
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Actions is JSP

Posted by Mark Orciuch <ma...@ngsltd.com>.
Ian,

Just out of curiosity, how did you manage to use Velocity Tag Library with
JSP? I realize that I'm responding with a question, but looks like I can
learn something from your experience (and perhaps others can as well). We
are heavily invested in JSP and cannot afford to migrate to Velocity at this
time. Many thanks in advance.

BTW: We are using turbine-2.2b1-20011124 in case the solution is version
specific.

Best regards,

Mark C. Orciuch
Next Generation Solutions, Ltd.
e-Mail: mark_orciuch@ngsltd.com
web: http://www.ngsltd.com


-----Original Message-----
From: Ian Lim [mailto:mallim_java@yahoo.com.sg]
Sent: Saturday, February 09, 2002 11:13 PM
To: Turbine Users List
Subject: Actions is JSP


Hi

I'm trying out to use Turbine with JSP as the view portion.
I have to admit it is a bit clumsy to use JSP but with the
help of Velocity Tag Library, some of the things do get easier.

I notice that the how-to documentations didn't outline how would the Action
behave
when using Turbine with JSP. I managed to be able to get to the following
points:
1) Can specify <%=link.setPage("blah blah blah").setAction("TryoutAction")%>
in a form. At the same time, the form contains
<input type="submit" value="Submit" name="eventSubmit_doAdd">

2) Class TryoutAction which extends from Action class is able to be invoked.
The
doPerform( RunData data ) is always being call. And the doAdd method is not
being called at all.

My question is how would Turbine call up doAdd method when using with JSP ?

If my friend able to convince her lecturer to accept Velocity,
I would not bother with all this :P. But until then...

Regards
Ian Lim


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Actions is JSP

Posted by Ian Lim <ma...@yahoo.com.sg>.
Hi

I'm trying out to use Turbine with JSP as the view portion.
I have to admit it is a bit clumsy to use JSP but with the
help of Velocity Tag Library, some of the things do get easier.

I notice that the how-to documentations didn't outline how would the Action
behave
when using Turbine with JSP. I managed to be able to get to the following
points:
1) Can specify <%=link.setPage("blah blah blah").setAction("TryoutAction")%>
in a form. At the same time, the form contains
<input type="submit" value="Submit" name="eventSubmit_doAdd">

2) Class TryoutAction which extends from Action class is able to be invoked.
The
doPerform( RunData data ) is always being call. And the doAdd method is not
being called at all.

My question is how would Turbine call up doAdd method when using with JSP ?

If my friend able to convince her lecturer to accept Velocity,
I would not bother with all this :P. But until then...

Regards
Ian Lim


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Turbine pipeline, how is th screens linked to velocity templates and actions

Posted by Daniel Rall <dl...@finemaltcoding.com>.
"Paulo Silveira" <Pa...@commworld.de> writes:

> Where can I find out more about the turbine pipeline?

If you're talking about the pipeline in T3, right now the source code
and IRC (irc.whichever.com:6667) is your best bet (and the source code
is being added to still).

Dan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Turbine pipeline, some questions (long)

Posted by Jason van Zyl <jv...@zenplex.com>.
On 2/10/02 3:28 PM, "Paulo Silveira" <Pa...@commworld.de> wrote:

> Hello
> 
> This turbine 3 seems really promising, you are dealing with ALL problems
> that we have with web applications.
> Ok, here it go
> 
> Everytime that I enter in a web page, and I am using a Turbine webapp,
> it goes directly through the Turbine class.
> The doGet is invoked, then is starts some logs and checks. After this,
> the Pipeline is started. The pipeline is just a queue of classes
> (valves) that should have the invoke(RunData) method invoked.
> 
> The default turbine 3 case is: (can anyone help me and say if everything
> makes sense?)
> 

You have to remember that the pipeline you are analyzing is a mimic of the
classic pipeline and not necessarily ideal. That pipeline is an attempt to
represent the way turbine2 works, what falls out as standard in turbine3
remains to be seen.

I will take all your questions and attempt to answer them while I'm writing
documentation this week.

You also have to remember that anything that's there is also not cast in
stone and may still change.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Turbine pipeline, some questions (long)

Posted by Paulo Silveira <Pa...@commworld.de>.
Hello

This turbine 3 seems really promising, you are dealing with ALL problems
that we have with web applications.
Ok, here it go

Everytime that I enter in a web page, and I am using a Turbine webapp,
it goes directly through the Turbine class.
The doGet is invoked, then is starts some logs and checks. After this,
the Pipeline is started. The pipeline is just a queue of classes
(valves) that should have the invoke(RunData) method invoked.

The default turbine 3 case is: (can anyone help me and say if everything
makes sense?)

  <valve className="org.apache.turbine.pipeline.DetermineActionValve" />


Just takes the request, take a look at the posted parameter "action" and
sets the RunData action to it
QUESTION-> why dont we skip this valve and when getting the action from
the RunData we don simply use data.getParameters().getString( "action"
). This valve seems just a setter for the RunData, it could be done
inside the RunData constructor.

  <valve className="org.apache.turbine.pipeline.DetermineTargetValve" />

Same as DtermineAction, for the target template

  <valve
className="org.apache.turbine.pipeline.DefaultSessionTimeoutValve" />

Just to see if the session is ok, and so...

  <valve className="org.apache.turbine.pipeline.DefaultLoginValve" />

Performs login action and logout action.

QUESTION -> Why should these actions be in a special valve? Shouldnt it
be run from the DefaultActionValve.

  <valve
className="org.apache.turbine.pipeline.DefaultSessionValidationValve" />


Calls the session validator action, it seems to be empty for now

  <valve className="org.apache.turbine.pipeline.DefaultACLCreationValve"
/>

Autenticates the user, using AccessController action

  <valve className="org.apache.turbine.pipeline.DefaultActionValve" />

If there is an action set in the RunData object, find the ACTION module,
then tries to find the action that has this name, then try to invoke its
execute method.

QUESTION -> where do I set to a Action Name to a class, I mean, how
turbine knows that for the action "LOGIN_USER", it should look the class
org.apache.turbine.modules...blah.blah.

  <valve className="org.apache.turbine.pipeline.RunModulesValve" />

QUESTION -> I dont understand what is this about!!!

  <valve className="org.apache.turbine.pipeline.DefaultTargetValve" />
or
  <valve className="org.apache.turbine.pipeline.DirectTargetValve" />

Find the target template, and merge it with the context. Well, it is a
render call, for example a velocity one.

QUESTION -> the same as the other one, where do I set that for the
target "user_logged_in", it should use "login.vm"?
QUESTION -> What is the difference by using directRender and Render. I
know that render just mix the context to the template, without printing
it to the output, but what are the difference between these approaches,
if not none? Why puting the renderer inside the context????

QUESTION -> the pull method can only be used inside turbine? I mean, I
know it is a concept, but the classes inside services.pull seems to be
turbine dependent.

One more thing, are these valves COMPLETELY independent? I mean, if I
remove one of the valves, everything should at least run (probably not
work, but run). I mean, if I just want the defaultaction and default
target, is it ok?

Some names of the valves are kinda misleading for me, for example,
DefaultTargetValve is a Default Valve for Targets, right? And not a
default_target Valve....

This pipeline idea for a webapp is SOOOOO coool, congratualtions

Thanks a LOT
Paulo


-----Original Message-----
From: Jason van Zyl [mailto:jvanzyl@zenplex.com]
Sent: Sonntag, 10. Februar 2002 14:25
To: Turbine Users List
Subject: Re: Turbine pipeline, how is th screens linked to
velocitytemplates and actions


On 2/9/02 8:13 PM, "Paulo Silveira" <Pa...@commworld.de> wrote:

> Hello
>
> I am discovering many things of turbine, and a lot of things are
> helping me a lot. I just used Torque and Velocity for sometime. But
> now I would like to try the whole TDK.
>
> Where can I find out more about the turbine pipeline?

This is strictly a t3 feature, you can find a little information here:

http://jakarta.apache.org/turbine/turbine-3/pipeline.html

These docs will be fleshed out during this week, there will probably be
a lot of movement next week. James, Daniel, Eric, Gonzalo and myself are
all looking at t3 features at the moment so we will probably make some
headway with the pipeline, new security model and the revamped rundata
and pull mechanism. There will be docs to explain all these thing :-)
The docs are sketchy right now but they won't be for long.

> Because I was no
> able to guess how it works perfectly, I have a lot of .vms, and I also

> have the actions, screens and layouts, but I do not know where the
> screens are tied with the velocity templates...

You definitely won't be able to guess how it works ;-) But we'll try to
rememdy the situation with some good documentation. I only barely just
started but I'll get something in their this week and there will be a
status report this coming Friday with a summary of what's going on.

> If anyone has an example to attach to the already done newapp, it
> would be very good. Any hello world page, with an action, screen and
> template.

The TDK has a small working sample app, and the testbed in turbine3 has
an example of how to use the pipeline.

>
> Thanks a lot
>
> -----Original Message-----
> From: dlr@finemaltcoding.com [mailto:dlr@finemaltcoding.com]
> Sent: Sonntag, 10. Februar 2002 01:28
> To: Turbine Users List
> Subject: Re: status report
>
>
> "Dave Everson" <dj...@mygolftrac.com> writes:
>
>> Can you please provide more instruction on how to configure
>> turbine-torque with turbine-2?  Going off the minimal documentation
>> provided, I keep getting the following error:
>>
>> [Fri Feb 08 23:59:19 CST 2002] -- ERROR -- torque could not be
>> initialized!
>> Exception:  java.lang.ClassCastException:
> org.apache.torque.Torque
>> Stack Trace follows:
>> java.lang.ClassCastException: org.apache.torque.Torque
>> at org.apache.turbine.Turbine.loadSubsystems(Turbine.java:861)
>> at org.apache.turbine.Turbine.init(Turbine.java:243)
>> at
>> org.apache.turbine.util.TurbineConfig.init(TurbineConfig.java:175)
>> at
>> com.smartdatasolutions.common.Framework.startup(Framework.java:23)
>> at
>> com.smartdatasolutions.handler.Rcm.initFramework(Rcm.java:190)
>> at com.smartdatasolutions.handler.Rcm.process(Rcm.java:44)
>> at com.smartdatasolutions.handler.Rcm.main(Rcm.java:210)
>>
>> What maybe causing this error?  My applications that worked before no

>> longer work.  I can't figure it out and with no documentation, I
>> don't
>
>> have a clue as to where check next.
>
> Looking at Turbine.java line 861 would be a good start.
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>

--

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:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Turbine pipeline, how is th screens linked to velocity templates and actions

Posted by Jason van Zyl <jv...@zenplex.com>.
On 2/9/02 8:13 PM, "Paulo Silveira" <Pa...@commworld.de> wrote:

> Hello
> 
> I am discovering many things of turbine, and a lot of things are helping
> me a lot.
> I just used Torque and Velocity for sometime. But now I would like to
> try the whole TDK.
> 
> Where can I find out more about the turbine pipeline?

This is strictly a t3 feature, you can find a little information here:

http://jakarta.apache.org/turbine/turbine-3/pipeline.html

These docs will be fleshed out during this week, there will probably be a
lot of movement next week. James, Daniel, Eric, Gonzalo and myself are all
looking at t3 features at the moment so we will probably make some headway
with the pipeline, new security model and the revamped rundata and pull
mechanism. There will be docs to explain all these thing :-) The docs are
sketchy right now but they won't be for long.

> Because I was no
> able to guess how it works perfectly, I have a lot of .vms, and I also
> have the actions, screens and layouts, but I do not know where the
> screens are tied with the velocity templates...

You definitely won't be able to guess how it works ;-) But we'll try to
rememdy the situation with some good documentation. I only barely just
started but I'll get something in their this week and there will be a status
report this coming Friday with a summary of what's going on.
 
> If anyone has an example to attach to the already done newapp, it would
> be very good. Any hello world page, with an action, screen and template.

The TDK has a small working sample app, and the testbed in turbine3 has an
example of how to use the pipeline.
 
> 
> Thanks a lot
> 
> -----Original Message-----
> From: dlr@finemaltcoding.com [mailto:dlr@finemaltcoding.com]
> Sent: Sonntag, 10. Februar 2002 01:28
> To: Turbine Users List
> Subject: Re: status report
> 
> 
> "Dave Everson" <dj...@mygolftrac.com> writes:
> 
>> Can you please provide more instruction on how to configure
>> turbine-torque with turbine-2?  Going off the minimal documentation
>> provided, I keep getting the following error:
>> 
>> [Fri Feb 08 23:59:19 CST 2002] -- ERROR -- torque could not be
>> initialized!
>> Exception:  java.lang.ClassCastException:
> org.apache.torque.Torque
>> Stack Trace follows:
>> java.lang.ClassCastException: org.apache.torque.Torque
>> at org.apache.turbine.Turbine.loadSubsystems(Turbine.java:861)
>> at org.apache.turbine.Turbine.init(Turbine.java:243)
>> at
>> org.apache.turbine.util.TurbineConfig.init(TurbineConfig.java:175)
>> at
>> com.smartdatasolutions.common.Framework.startup(Framework.java:23)
>> at
>> com.smartdatasolutions.handler.Rcm.initFramework(Rcm.java:190)
>> at com.smartdatasolutions.handler.Rcm.process(Rcm.java:44)
>> at com.smartdatasolutions.handler.Rcm.main(Rcm.java:210)
>> 
>> What maybe causing this error?  My applications that worked before no
>> longer work.  I can't figure it out and with no documentation, I don't
> 
>> have a clue as to where check next.
> 
> Looking at Turbine.java line 861 would be a good start.
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

-- 

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>