All requests must be passed through the servlet (controller) in the MVC framework

xiaoxiao2021-03-06  52

All requests are required in the MVC framework must pass through the servlet (controller), even if Request is only redirected to another JSP page, the JSP page cannot be called directly, and then pass the servlet, then return to the corresponding ActionForward. Because some initialization operations are required in the servlet (such as reading ApplicationConfig and MessageResources)

We can use ForwardAction to make a simple redirection, so we don't have to write an action yourself. The configuration file is as follows:

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

New Post(0)