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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -