简体   繁体   中英

jsp include tag vs struts include action?

struts include action include the context-relative URI specified by the parameter attribute. and jsp include tag also does that. So,whats the difference between normal jsp include tag ie and struts include action?

Right from the documentation :

This can be used to integrate Struts with other business logic components that are implemented as servlets (or JSP pages), but still take advantage of the Struts controller servlet's functionality (such as processing of form beans)

Struts is a front controller, that handles form bean population, locale detection, exception handling, form validation, authorization, etc. This might be useful to do before including the URI (or after, for exception handling).

But if you start a Struts application from scratch, you shouldn't have to use it. It's useful when you already have a servlet and want to include it inside a STruts application without rewriting it using Struts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM