In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "the construction and usage of Struts framework". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the construction and usage of Struts framework".
Struts framework definition: Struts is a popular and mature Web application framework based on MVC design patterns.
Model1 = JSP + JavaBean
Model2 = JSP + Servlet + JavaBean
Action in Struts is that Controller,Struts2 is the upgrade of webwork and absorbs the advantages of both, not a new framework.
Struts2:servlet2.4 jsp2.0 java5 (comments)
Steps to build a struts2:
Jar-> create web project-> complete configuration-> create action and test
Core profile: web.xml struts.xml struts.properties
Struts2 is no longer coupled to Servlet API, no need to pass in HttpServletRequest and HttpServletResponse
Struts2 provides three ways to access Servlet API
ActionContext
Implement the Aware interface
ServletActionContext
Dynamic method call
1. Specify the method attribute 2. Exclamation point mode 3. Wildcard mode-> solves the problem of too much action
How to use multiple configuration files: how include is included
# default Action-solve unmatched Action
The suffix name struts.action.extension receives the parameter 1. Use the properties of Action to receive 2. Use DomainModel to receive 3. Implementation of ModelDriven interface thank you for reading, the above is the content of "Building and usage of Struts Framework". After the study of this article, I believe you have a deeper understanding of the construction and usage of Struts framework, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.