【问题标题】:Sitemesh + Struts2 + Velocity: Decorators cannot access the context's objectsSitemesh + Struts2 + Velocity:装饰器无法访问上下文的对象
【发布时间】:2010-12-24 06:55:25
【问题描述】:

我有一个使用速度的 struts2 网络应用程序。我正在将 Sitemesh 集成到项目中。

装饰器被正确调用,但由于某些原因,通过工具箱配置(与速度相关)放置在上下文中的对象没有被加载。

有人遇到过这个问题吗?

非常感谢

【问题讨论】:

    标签: struts2 velocity sitemesh


    【解决方案1】:

    问题已解决。

    在 web.xml 配置文件中,我省略了为 VelocityDecoratorServlet 指定 init-param 以便它加载在 toolbox.xml 中指定的应用程序的速度工具

    站点网格速度 com.opensymphony.module.sitemesh.velocity.VelocityDecoratorServlet org.apache.velocity.toolbox /WEB-INF/toolbox.xml

    【讨论】:

      猜你喜欢
      • 2013-08-02
      • 1970-01-01
      • 2012-01-29
      • 2020-06-08
      • 1970-01-01
      • 2010-11-23
      • 2011-02-20
      • 2023-03-25
      • 1970-01-01
      相关资源
      最近更新 更多