MVC architecture receives jsp page pass value

1. How to submit a request on a jsp page

 1. Send ajax method:

    get submit: parameters can use the request path?a=1&b=2&c=3... way

           Post submission: The parameter can be a new object, and then use the object's properties to pass the parameter.

 2. Send a hyperlink <a href=""></a> to submit to the background.

   3.js to make links: such as window.location.href = ""; to send a request.

   4. Form form submission method

  a: normal form form submission

  b: ajaxForm form submission

       Parameters usually use the name value as the parameter name

2. The general way of receiving parameters in the background:

  Background receiving method 1: You can use the corresponding parameter name (Integer/String a, Integer/String b, Integer/String c... ) to receive

              Method 2: You can use the object to receive (Object o), but note that a/b/c must be the properties of the o object

                   Method 3: Too many parameters can also be placed in the scope of the jsp page and obtained in the background, but it is not recommended to use in general.

(Note: Different request methods and receiving parameter methods are used for different needs.) I hope it will be helpful to you. I welcome the comments from IT personnel, thank you

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325174287&siteId=291194637