struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael <michael.guy...@gmail.com>
Subject Re: Velocity in Struts2
Date Tue, 17 Apr 2007 16:47:08 GMT
The problem was in my spring config. I was proxying the Action with the
TransactionProxyFactoryBean. When that was removed (juggling the Hibernate
Session management somewhere else) the Action was correctly set into the
Velocity context.

Thanks for the prompt reply, it forced to me to review my setup (which I
should have done in the first place)
--Michael

On 4/17/07, Musachy Barroso <musachy@gmail.com> wrote:
>
> I'm not sure what the problem is, but adding $action to example.vm in
> showcase, I see that it prints "
> org.apache.struts2.showcase.UITagExample@214131c" on the page, so the
> reference is there. Can you post more details, like the mapping for your
> action, the package declaration, etc?
>
> regards
> musachy
>
> On 4/17/07, Michael <michael.guymon@gmail.com> wrote:
> >
> > Hello,
> >
> > I have scratched my head and googled this for hours to no avail, so
> maybe
> > you folks can give me a hand.
> >
> > I am trying to migrate a Struts1 site to Struts2 (from maven,
> struts-core
> > 2.0.6).  So far everything is fine, except for Velocity (verison 1.4).
> The
> > Action is being called and returning successfully, the correct Velocity
> > template is being loaded and parsed, but the Action is no where to be
> > found
> > for the Velocity template. In http://cwiki.apache.org/WW/velocity.htmlit
> > states that the Action's properties will be present for the template
> > context, along with other help variables (i.e. $stack, $action, etc ).
> My
> > Velocity template has nothing, just $struts.valueStack in the request
> > attributes.
> >
> > Seems like there is a final step missing that processes the Action into
> > the
> > Velocity context?
> >
> > The entire site is already using Velocity, so migrating to Freemaker is
> > not
> > really an option at this time.
> >
> >
> > thanks,
> > Michael
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>

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