How to determine if a parameter has been “posted” or “geted” from Java?

前端 未结 7 1731
离开以前
离开以前 2021-01-02 04:32

In ASP, there\'s request.form and request.queryString attributes, but in Java. It seems like we have only one collection, which can be accessed via

7条回答
  •  醉酒成梦
    2021-01-02 04:46

    I know it doesn't solve your problem, but if I remember correctly, when using Struts, the ActionForm will be populated if your variables are sent in the query string or in the post body.

    I found the source code for the RequestUtils class, maybe the method "populate" is what you need:

    http://svn.apache.org/repos/asf/struts/struts1/trunk/core/src/main/java/org/apache/struts/util/RequestUtils.java

提交回复
热议问题