Pages Navigation Menu

Coding is much easier than you think

Struts 2 Tutorial for beginners


Introduction to Struts 2 Framework

In this course we will learn how to use Struts 2 to create an MVC based Java web application.

Struts 2 is a framework for developing MVC based web applications in Java. When building a complex web application it is often difficult to keep business and view logic separate from each other. In this course we will learn how to create a Java based web application using the Struts 2 MVC framework to cleanly separate our views from business logic.

We will cover important features of Struts 2 like creating Actions and mapping them to Results. We will also learn how to use OGNL to access data from Java objects inside of our Views and even see how to create AJAX style views. If you are interesting in learning Struts 2, this course is a great start point to get you started by building your first Struts 2 application.

Struts 2 Complete Tutorial


Struts 2 Quick Start


Non – Form UI Tags


Struts 2 Configurations


Struts 2 Model driven


Struts 2 File Manipulation Tutorial


Struts 2 UI Tags



Struts 2 Control Tags


Struts 2 Data Tags


Interceptors in Struts 2


Struts 2 + Display tag


Struts 2 Theme


Ajax implementation in Struts 2


Struts 2 + AngularJs


Struts 2 + jTable Plugin


Struts 2 Integrate with Other Frameworks


Struts 2 FAQ


Struts 2 Errors


Struts 2 Reference


About Mohaideen Jamil

Am currently working as a Struts 2 Developer in a reputed IT Organisations. I can help you with teaching Core java and Struts 2. Follow me on Facebook or Google Plus. If you like my tutorials, consider making a donation to this charity, thanks.

  • Rahul GOti

    Thank you for Helping such kind of Tutorial

  • Sonali Varshney

    Very good site to understand the concepts

  • Jagannath

    To create grid I am using struts2-jquery-grid-plugin-3.7.0.jar but after adding to lib my project is not working. Also copied jar files like this–> struts2-jquery-grid-plugin-3.2.1.jar, struts2-jquery-plugin-3.2.1.jar,struts2-json-plugin- .then also not working. How can I work with grid???

  • vangalalohith

    hi jamil bhai, this is lohith. i am unable to get the method delete with Name using struts2…so,, help me in this with your code as soon as possible


    Hi I need a autorefreshing barchart code which will fetch values from database using struts2 and hibernate.

  • Fakhrudeen Ali Ahamed

    Really nice site

  • rahul

    can we write extends=struts-default instead of json-default when accessing json data?if yes,then please send me crud operation using that…thank u….

    • Mohaideen Jamil

      NO.. FYI, json-default internally extends struts-default

  • aneefrehuman

    how to work on batch job/scheduler in struts2 framework. Can u give some ideas about bacth job

  • salah jriri

    hello , i have a question , i loaded a form using ajax , in struts 2 but without using any action , just a simple (.load) , in that form that i loaded i have a combobox and it should display some values , i tried to use the “href” that i used to load the form as a struts action to display the content of the comobobox , but it dosn’t work . so my question is , how can i load a form using ajax and at the same time having the combobox or other values in it ???? btw i’m using hibernate as well

  • Ali

    Hello jamil,
    I asked about Tiles in Struts 2,
    Still waiting for your reply.
    kindly please reply me .

    • Mohaideen Jamil

      Hi Ali,

      Please give me a day time.


    • Mohaideen Jamil
      • Ali

        Thank you very much brother.
        I have read your display tag, its really superb
        And one thing Can you please upload how to export pdf/excel.

        • Ali

          Hi Jamil,
          I have asked how to generate pdf or excel from struts2, reply please.

          And also upload how to use Hibernate in Struts2 .

  • chirag

    jamil i have created enum in struts2 and this enum i want to show in select tag in jsp
    so pls can u provide example for that

  • Ali

    Mohaideen jamil.
    You are doing a great job.
    If you don’t mind will you please post about tiles and how to use in Struts2.

  • vinod

    Ajax example with struts2 is not working ,can u help me out. i m using netbeans7.4 and dojo tag.. but nothing is going on

    • Mohaideen Jamil

      Hi Vinod, This program works fine, may you have missed some configuration, I will upload the war file and will let you know.



      • Jagannath

        how can I create menu and submenu dynamically using struts2? like this–>

  • Ruchi Gupta

    Hi Jamil,

    You are doing a great job.
    Could you please upload a example of internationalization?

    • Mohaideen Jamil

      Hi Ruchi Gupta,

      I will update them shortly and intimate you.

  • shruthi


    • Mohaideen Jamil


  • Harshni

    Hi Jamil,
    I must admit that your tutorial is really helpful. Keep the good work. :)

  • yogeshwar

    best site for learning Struts 2 . Thanks

  • Manish Kumar

    Hi Jamil,
    I am getting “WARNING: No configuration found for the specified action: ‘myaction.action’ in namespace: ‘/’.
    I am unable to resolve this. Please suggest..

  • Aravind


    Thanks for this tutorial. can you upload the struts 2 integration with hibernate example.


    • Jamil

      Hi Aravind,
      Will update them shortly

  • Mahes

    its a very good tutorial , i never did program on struts 1 or 2 so really helpful. one thing i would like to comment is that i tried few other tuts as well bt none work without a bit modification but this one was really working at no change.
    thanks again :)

    • kamal bhardwaj

      can you post an example of adding, deleting, updating data records from a form to table in Spring MVC?, such examples are rarely available online, i m learning java, spring mvc…