有人使用struts2-osgi-demo-bundle工作吗?

时间:2011-09-09 04:39:22

标签: struts2 osgi

1 个答案:

答案 0 :(得分:1)

主要错误是: 引起:找不到Action类[helloWorldAction] - action - bundle://2.0:1 / struts.xml:9:64 at

演示包中的

struts.xml包含动作类的wron定义:

<action name="hello-velocity" class="helloWorldAction">
    <result type="velocity">/content/osgi/hello.vm</result>
</action>
<action name="hello-freemarker" class="helloWorldAction">
    <result type="freemarker">/content/osgi/hello.ftl</result>
</action>

尝试将struts.xml的片段更改为

<action name="hello-velocity" class="actions.osgi.HelloWorldAction">
    <result type="velocity">/content/osgi/hello.vm</result>
</action>
<action name="hello-freemarker" class="actions.osgi.HelloWorldAction">
    <result type="freemarker">/content/osgi/hello.ftl</result>
</action>