JAVA-SpringMVC redirection and forwarding achieve

Request forwarding and redirection of the difference between:

  Request and forwards the request to redirect all web development resources to jump the way.

  The request is forwarded to jump inside the server

    Address bar does not change

    Only one request response

    Data can be transferred by request field

  Redirect requests the browser automatically initiate a request for a jump destination

    The address bar will change

    Two request response

    Objects can not be delivered by request domain

SpringMVC achieve forwarding and redirection

  1. springMVC can still use the traditional manner and redirected forward

    

  2. SpringMVC also provides a quick way to implement forwarding and redirection

    In view of the long return, you can specify the following ways:

    

    

  3. You can specify the use of resources to achieve forwarding allows users to access protection under the WEB-INF

    

 

Guess you like

Origin www.cnblogs.com/xiaoluohao/p/11354145.html