English 中文(简体)
Sitemesh + Struts2 + Velocity: Decorators cannot access the context s objects
原标题:

I have a struts2 web app using velocity. I am integrating Sitemesh to the project.

The decorators are called properly but for some reasons, the objects placed in the context via the toolbox configuration (velocaity related) are not being loaded.

Has anyone faced this issue?

Thanks a lot

问题回答

Issue solved.

In the web.xml configuratiration file, I omitted to specify the init-param for the VelocityDecoratorServlet so that it would load the app s velocity tools specified in the toolbox.xml

sitemesh-velocity com.opensymphony.module.sitemesh.velocity.VelocityDecoratorServlet org.apache.velocity.toolbox /WEB-INF/toolbox.xml





相关问题
NHibernate L2 Cache configuration in Fluent NHibernate

Is ti possible to configure the L2 cache provider in code via FHN? Adding a line to the following config is what I m after: return Fluently.Configure() .Database(MsSqlConfiguration....

velocity framework on google app engine

i am trying to use velocity framework on google app engine. i wrote a small program with a main method and tried running it locally. i get the following exception : Exception in thread "main" org....

Apache Velocity $ vs $!{}

For apache velocity, is there a difference between accessing variables with $ vs. $!{}. If so, what is it?

Velocity (VM) template: how to disable for a block of jquery

I have Apache Velocity. I have some jQuery code. I think VM doesn t like when I do things like $img.css("float","left"). How can I completely disable VM parsing within a block of HTML/Javascript ? ...

Spring MVC: Resolving the view based on User-Agent

Spring Version: 2.5.6 I want to resolve the view to a specific velocity file based on the value of the User-Agent header. My current line of thinking is an implementation similar to the ...

Encoding problems with Apache Velocity include

I have a velocity/html file. I m trying to include/parse some simple HTML into a page. If I just copy the text directly on the the main file, it works fine: Miranda Kerr hasn’t been a Victoria’s ...

热门标签