












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is an Introductory course of Java Web Programming focusing on writing maintainable extensible code, methods of debugging, logging and profiling. The Java Technology used is J2EE an Enterprise Application Development tool. This lecture includes: Struts, Model, View, Controller, Tag, Library, Internationalization, Error, Handling, MVC, Flexible, Extensible
Typology: Slides
1 / 20
This page cannot be seen from the preview
Don't miss anything!













Lecture 16 – STURTS BASICS
What is and Why Struts? Struts architecture Controller: Focus of this presentation Model View Struts tag library (moved to StrutsTags presentation) Internationalization Validation and error handling View selection Issue with Struts
Struts is an open source Web application framework developed as Apache Jakarta project http://jakarta.apache.org/struts/
Model-View-Controller (MVC) framework Used for constructing web applications using Servlets and JSPs Struts application is a genuine Web application that should be able to run on any Sevlet container including all J 2 EE compliant App servers Pattern oriented Singleton, composition view, delegate Easy to use and learn Includes JSP custom tag libraries (Sturts own)
Fashion their JSP/Servlet web applications using the MVC design pattern Leverage ready-to-usable framework objects through xml configuration files Leverage built-in design patterns in the framework Leverage extra features such as input validation, internationalization
Integrates well with Java EE (J 2 EE) Good taglib support Works with existing web apps Easy to retain form state Unified error handling programmatically and declaratively Integration with Tiles framework Clear delineation of responsibility makes long term maintenance easier (more modular)
The forwarding can be determined by consulting a set of mappings in configuration file, which provides a loose coupling between the View and Model
Configuration file contains action mappings URL to Action mappings Controller uses these mappings to turn HTTP requests into application actions Determines forwarding/navigation Mapping must specify A request path Action to act upon the request
source: Chuck Cavaness docsity.com
Struts framework provides a built-in base servlet org.apache.struts.action.ActionServlet Servlet mapping has to be configured in web.xml Struts related configuration is done through struts- config.xml Action Mapping defines the mapping between request URI of incoming requests to specific Action class