<action name="getVersion" class="com.jwt.version.action.VersionAction"
method="getVersionAction">
<result type="stream" name="success">
<param name="contentType">text/html</param>
<param name="inputName">inputStream</param>
</result>
<result type="stream" name="error">
<param name="contentType">text/html</param>
<param name="inputName">inputStream</param>
</result>
</action>
public class VersionAction extends ActionSupport {
private InputStream inputStream;
public InputStream getInputStream() {
return inputStream;
}
public void setInputStream(InputStream inputStream) {
this.inputStream = inputStream;
}
public String getVersionAction() throws Exception {
if(version<getVersion()){
inputStream = new StringBufferInputStream("update");
return ERROR;
}else{
inputStream = new StringBufferInputStream("success");
return SUCCESS;
}
}
}