• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to footer
  • Core Java
  • Design Patterns
  • JSP
  • Servlets
  • Building Tools
  • jQuery
  • Spring
  • Hibernate
  • Mongo DB
  • More
    • HTML
    • SCJP
    • AJAX
    • UML
    • Struts
    • J2EE
    • Testing
    • Angular JS

J2EE Reference

  • Home
  • About Us
    • Java Learning Centers
  • Contact Us

Struts framework

January 4, 2011 By j2eereference Leave a Comment

Struts is an open source MVC architecture created to make it easier for developers to build web applications based on Java Servlet and Java Server pages . In a J2EE based application, MVC architecture is used for separating business layer functionality  from Presentation layer functionality represented by JSPs (the view) using an intermediate servlet based controller.

The incoming HTTP requests are routed to a central controller, which in turn interprets and delegates the request to the appropriate request handlers.

 Struts also provides the following modules like   

Struts Validator for form validation.

Tiles for assembling composite views.

Internationalization

Exception Handling

Logging

Struts Components

1) Web.xml :

<servlet>

<servlet-name>action</servlet-name>

<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>action</servlet-name>

<url-pattern>*.do</url-pattern>

</servlet-mapping>

Make sure that  all the  requests URI format will be like  

2) Action Class :

3) struts-config.xml:

4) Model in Struts:

This represents the business logic layer. Struts doesn’t offer anything to create the model layer of the web application.

5) View in Struts :

The view components in struts could be  Java Server pages, HTML etc.

 

Filed Under: Struts

Reader Interactions

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

FOLLOW US ONLINE

  • View J2eereference-166104970118637’s profile on Facebook
  • View j2eereference’s profile on Twitter
  • View j2eereference’s profile on LinkedIn

Subscribe by email

Recent posts

  • Java Buzzwords
  • Anonymous Inner Class in Java
  • Network Programming – java.net Package
  • Java Regular Expressions
  • Method Local Inner Class in Java
  • URL Processing in Java
  • Iterator Design Pattern Implementation using Java
  • Strategy Design Pattern Implementation using Java
  • Decorator Design Pattern
  • Adapter Design Pattern Implementation using Java
  • JSF Composite Components
  • JSF UI Components
  • What is JavaServer Faces (JSF)?
  • GOF Design Patterns
  • History and Need for Design Patterns

Footer

Core Java
Design Patterns
JSP
Servlets
HTML
Building Tools
AJAX
SCJP
jQuery
Testing
Spring
UML
Struts
Java Centers
Java Training
Home
About Us
Contact Us
Copyright © j2eereference.com. All right reserved.