java - get null data if post to struts2 with: Content-Type is text/html or text/plain -
does know reason, controller action can not data if set content-type text/html or text/plain when post data action? (i using struts 2)
my action below:
public class apinewsaction extends actionsupport { private string rowid; public string getrowid() { return rowid; } public void setrowid(string rowid) { this.rowid = rowid; } public string onnews(){ system.out.println("rowid="+ rowid); } }
and configed struts.xml below:
<package name="api_news" extends="struts-default" namespace="/news-api"> <action name="news" class="news.action.apinewsaction" method="onnews"> <result name="input" type="json"></result> </action> </package>
anyone know?
thanks,
Comments
Post a Comment