我已经定义了 type=steam,但它在下面的注释中抛出了错误。
@Result(name="success",type="stream" ,params={"contentType","text/html","inputName","inputStream"}).
struts.xml
<package name="default" extends="struts-default">
<action name="getJSON" class="com.Action" method="list">
<result type="stream">
<param name="contentType">text/html</param>
<param name="inputName">inputStream</param>
</result>
</action>
</package>
如何在注解中定义动作名称和方法?
我已经有一个注释,所以我添加了结果..
@Results({@Result(name=com.action.Part.INPUT, value="/search.jsp",
type= ServletDispatcherResult.class, params={"location", "/search.jsp" }),
@Result(name = ActionSupport.SUCCESS,type="stream",params= {"contentType","text/html","inputName","inputStream"})})