[Reprint] Struts simple analysis

xiaoxiao2021-03-06  25

Original address:

Http://www.matrix.org.cn/blog/wenic705/rchives/000889.html

------------------------------

Speaking Struts for a friend, wrote for a long time, go to this. The Action Call suffix is ​​specified rather than a * .doweb.xml has the following definition.

Action

org.apache.struts.Action.ActionServlet

config /Web-inf/struts-config.xml

action / do / * This definition is different.

But usually this:

action *. do defined into

action *. sdfsdf can also line. There is also * .do is not a file, just a Suffix. Web general process is

View ----------------> Servlet ---------> Service -------> Dao ---------> Database Then return from the architecture, and Struts only has a servlet. It is all of its requests through the ActionServlet. The Action is called through the Java mapping mechanism. If the action exceset is executed (), if the Extends DispatchAction must specify parameter =, execute it Specify Method. After processing, you skip to the next page via an actionmapping.findforward ("path"). Since talked, you still say something. Struts configuration file struts-config.xml is generally divided into Form, Global, Action, pluginform refers to the definition of ActionForm, which is simple. Global has Global-Forwards, Global-Exceptions defines global definitions. Action can have a simple Direct jump, there is also complex Point

转载请注明原文地址:https://www.9cbs.com/read-66034.html

New Post(0)