Webwork中的JSP支持非常简单:缺省的webwork-default.xml将Dispatcher Result作为默认的result(参见Result Types).这意味着任何JSP 1.2+ 容器可以直接支持Webwork.
因为JSP支持通过默认的result Dispatcher Result触发,在配置xwork.xml时你不需要显式声明type属性:
<action name="test" class="com.acme.TestAction"> <result name="success">test-success.jsp</result> </action>
在 test-success.jsp 中:
<%@ taglib prefix="ww" uri="webwork" %> <html> <head> <title>Hello</title> </head> <body> Hello, <ww:property value="name"/> </body> </html>
这里 name 是你的action中的一个属性.这样就可以了!