ALL >> Computer-Programming >> View Article
Struts Framework To Develop Mvc Based Webapplication In Java
Introduction :
The struts 2 framework is mainly used to develop MVC-based web application.
MVC (Model View Controller) : It is a software design pattern for developing web applications.It is made up of the following three parts:
- Model : The lowest level of the pattern which is responsible for maintaining data
-View : This is responsible for displaying all or a portion of the data to the user.
- Controller : Software Code that controls the interactions between the Model and View.
Struts2 Framework :
Struts2 is popular web application framework based on the MVC design pattern. Struts2 is not just the next version of Struts1, java training center bangalore but it is a complete rewrite of the Struts architecture.The struts framework was initially created by Craig McClanahan and donated to Apache Foundation in May, 2000 and Struts 1.0 was released in June 2001.
About Struts :
The current stable release of Struts is Struts 2.3.16.1 in March 2, 2014.The Struts 2 framework is used to develop MVC (Model View Controller) based web applications. Struts 2 is the combination ...
... of webwork framework of opensymphony and struts1.
Struts 2 Features Tutorial :
Struts 2 provides many features that were not present in struts1. The features of struts2 framework are as follows:
1. Configurable MVC components
2. POJO based actions
3. AJAX support
4. Integration support java course in bangalore
5. Various Result Types
6. Various Tag support
7. Theme and Template support
Struts Components :
[i] The Controller
Controller receives all incoming requests. Its primary function is the mapping of a request to an action class selecting the proper application module. It's provided by the framework.
[ii] The struts-config.xml File
This file contains all of the routing and configuration information for the Struts application. This XML file needs to be in the WEB-INF directory of the application.
[iii] Action Classes
It's the developer's responsibility to create these classes. They act as bridges between user-invoked URIs and business services. Actions process a request and return java /j2ee classes bangalore an ActionForward object that identifies the next component to invoke. They are part of the Controller layer, not the Model layer.
[iv] View Resources
View resources consist of Java Server Pages, HTML pages, JavaScript and Stylesheet files, Resource bundles, JavaBeans, and Struts JSP tags.
[v] ActionForms
These greatly simplify user form validation by capturing user data from the HTTP request. They act as a "firewall" between forms (Web pages) and the application (actions). These components allow the validation of user input before proceeding to an Action. If the input is invalid, a page with an error can be displayed.
[vi] Model Components
The Struts Framework has Advanced java training in bangalore no built-in support for the Model layer. Struts supports any model components:
- JavaBeans
- EJB
- CORBA
- JDO
- any other
Difference between struts1 and struts2:
[i] In struts 1.x front controller is ActionServlet. In 2.x front controller is FilterDispatcher
[ii] In struts 1.x we have RequestProcessor class. In 2.x we have Interceptors instead RequestProcessor
[iii]In struts 1.x we have multiple tag libraries like, html, logic, bean..etc . In 2.x we do not have multiple libraries, instead we have single library which includes all tags.
[iv] In struts 1.x the configuration file name can be [any name].xml In 2.x the configuration file must be struts.xml only and this must be in classes folder
[v] In struts 1.x we have form beans and Action classes separately . Best core java training in bangalore In 2.x form bean, Action classes are combindly given as Action class only, of course we can take separately if we want .
[vi] In struts 1.x properties file must be configured in struts-config.xml. But in 2.x we need to configure our resource bundle(s) in struts.properties file.
[vii] In struts 1.x we have programmatic and declarative validations only. In 2.x we have annotations support too along with programmatic and declarative validations.
This is the short description about the struts framework to know more about the java for getting a job as java developer join Infocampus Software Training Institute for Core and Advanced Java .
Author : Infocampus is best java training center bangalore . It provides java course in lesser fees with the 4 days free demo classes . Advanced java training is provided by the 10+ years experienced trainers . Learn Struts framework , servlet , packages , serialisation , multithreading in Core and Advanced java classes . Syllabus for java / j2ee classes is according to getting a job easily. Join infocampus for best java training with the complete practical session and real time project.
To book the seat for free demo class call at 9738001024 or to get the syllabus of java course enquire at : http://www.infocampus.co.in/java-training-bangalore.html
Add Comment
Computer Programming Articles
1. Innovating Blockchain Strategies With Mev Bot TechnologyAuthor: aanaethan
2. How To Choose The Right Coding Institute In Bhopal
Author: Shankar Singh
3. Streamline Your Finances With The Best Bookkeeping Software In Zambia
Author: Doris Rose
4. Maximizing Ebay Success With Maropost/neto Partnerships
Author: rachelvander
5. The Rise Of Ai In Modern Gaming
Author: Saira
6. Enhancing Business Efficiency With Entrust Network: Singapore’s Premier It Solutions Partner
Author: Entrust Network Services
7. Ai And Ml Training: Empowering Your Career With Infograins Tcs
Author: Infograins tcs
8. How To Evaluate Coding Institutes In Bhopal?
Author: Shankar Singh
9. Revolutionizing Delivery Services With Application Development
Author: basheer ansari shaik
10. How Google Cloud Platform Aids Businesses And Keeps Its Data Safe?
Author: Stuart
11. Custom Web Development Solutions In Surat For Growing Businesses
Author: sassy infotech
12. Video Streaming App Development: 12 Key Features, Architecture And Cost
Author: Byteahead
13. Understanding Google Analytics Events
Author: Byteahead
14. Types Of Learning Management Systems
Author: Byteahead
15. How To Choose The Best Coding Institute In Bhopal?
Author: Shankar Singh