Struts 2 + Jquery + JSON (login verification) 16:47:39 | category: Java Web | font size subscription there are many articles about Struts2 and JSON on the internet, Google and Baidu, read a lot, there are a variety of practices. In most articles, a plug-in called jsonplugin is added, which can be downloaded from Google Code. I have tested it before and used it, but it is really troublesome. Let the Struts2 package inherit a parent package named "json-default. Most of the online articles are about how to send JSON data back to the browser (Ajax) from the Struts Action ), however, I want a process opposite to them (that is, sending data from Ajax to the Action on the server side and parsing it), but I cannot find a proper answer. Three nights of exploration, unsuccessful. Today, I finally found my thoughts. Among them, whether sent from the browser side (JS, Ajax, Jquery, etc.) to the server side, or sent back to the client from the server side (Struts Action, Servlet, etc.), you must identify one point: all sent strings must be in JSON format. Under www.2cto.com, we will first rewrite the loginform In the login module. jsp file. For the original code, see the Struts 2.1.6 simplified instance series tutorial (2): Implementation of the user login module. The modified code is as follows: <% @ page language = "java" contentType = "text/html; charset = UTF-8 "pageEncoding =" UTF-8 "%> <% @ taglib prefix =" s "uri ="/struts-tags "%> <! DOCTYPE html PUBLIC "-// W3C // dtd html 4.01 Transitional // EN" http://www.w3.org/TR/html4/loose.dtd "> www.2cto.com