Tag: struts2

Struts 1.x vs Struts 2.x Main Differences

Let us see the component and functional differences between struts 1.x and struts 2.x  In struts 1.x front controller is ActionServlet In 2.x front controller is FilterDispatcher In struts 1.x we have RequestProcessor class In 2.x we have Interceptors…

Struts Execution Flow Diagram, How Struts Works

Let us see the execution flow of struts2 Execution flow of struts When a client request is given, a web container will receive request Web container loads web.xml and verifies whether the url-patterns are verified or not, if matches…

Struts2 Login Application Example

Let us see the simple login application using struts2, but friends am giving with out validations, we will see in depth validations very soon 🙂 success.jsp error.jsp index.jsp LogingEx.java web.xml …

Struts 2 Store User Input Details In Separate Java Bean

Let us see how to store user input details in the separate bean, actually up to now we stored user input values in Action class by writing setters and getter methods, but there is a chance to store in…

How To Use Resource Bundle In Struts2

In struts2, if we want to get labels and error messages from an external file then we need to use resource bundle.  The resource bundle in struts 2 is similar to struts 1 but the difference is,  in struts…

Aware Interfaces of struts 2

In struts2 we don’t have any http specific objects by default just like in servlets.  If at all we want any http related objects in our Action class then we need to implement our Action class from Aware Interfaces…

Example on ApplicationAware Interface of struts 2

So ApplicationAware interface, we need to implement our Action class from ApplicationAware interface when ever our Action class need to get context behavior, means we can share our data across all the files of the web application by putting…

Example on Struts 2 SessionAware Interface

Let us see concept behind this SessionAware interface in struts 2.x,  we need to implement our Action class from SessionAware interface in order to get HTTP Session behavior into our Action class. If we implement from SessionAware interface we…

XML Validations In Struts2 With Examples

Let us see the XML validations in struts2, we used to call this type of validations as declarative, what ever.  In struts2 if we want to apply the declarative validations then we need to use a set of per-defined…

Struts2 Validation Rules and Their Syntax

For every rule there is a class, all classes here are implements Validator interface required requiredstring stringlength int double date email url fieldexpression regex few other rules are there but light..!! For each rule given, there is an implementation…

How To Apply Multiple XML Validations On Same Field In Struts 2

Hi there, this is very important concept in real time, applying multiple validation rules on same field.  For example we have Email filed and we would like to apply 2 validations to this field like email, requiredstring. [ hey…

Struts2 XML Validations Example, Declarative Validations In Struts

In struts 2 we have 3 types of validations Programmatic validations Declarative validations Using Annotations i already explained how we can do programmatic validations,  now will see how to do declarative validations,…

Struts 2 datetimepicker Example

Let us see how to work with this datetimepicker in struts 2, actually no need to add any external jar files to work with this,  some of us may think we need to add some Ajax related jars bla…

Struts 2 Tabbedpanel Example

Let us see how to work with this struts 2 Tabbedpanel. jars required commons-logging-1.0.4.jar freemarker-2.3.8.jar ognl-2.6.11.jar struts2-core-2.0.11.jar xwork-2.0.4.jar Example files required index.jsp success.jsp web.xml struts.xml LogingEx.java Directory Structure index.jsp <META HTTP-EQUIV=”Refresh” CONTENT=”0;URL=resultAction.action”> success.jsp <%@ taglib prefix=”s” uri=”/struts-tags” %>  …

Struts 2 File Upload & Save Example

Let us see how to work with file uploads in struts 2 frame work, things to remember while working with this type of application See in index.jsp i have taken <s:file  name=”uploadFile” i mean my file tag name is…

Struts2 Insert,Update,Delete,Operations Through JDBC [ Real Time Application ]

Let us see  on how to work with Insert,Update,Delete operations through struts 2 with JDBC connect, a real time application.  Even we will see the same application using Struts 2 and Hibernate. Actually i have not covered example on ServletRequestAware,…

Struts2 Custom Interceptor Example, Struts2 Interceptors

Let us see how to create user defined interceptors in struts2, we already know this fact that struts2 by default provided lot of interceptors. In fact we no need to create any custom interceptors 🙂 , but this is…

Struts 2 Hibernate Integration Example [ Struts 2 + Hibernate Integration]

Let us see how to integrate struts 2 application with Hibernate, a real time application. Make sure you are well aware of the following topics before you read this article. Static – Core HQL – Hibernate Taking separate bean…

If you enjoyed this blog, please consider sharing it...!!!
Most Recent Posts from Top Categories
Spring Boot Hibernate Spring
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2025 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.