Migrating Applications to Struts2
In a new InfoQ article series, Ian Roughley looks at the task of moving applications from Struts to Struts2. The series seeks to introduce the concepts and new features available in Struts2 in order to arm developers with the knowledge needed to migrate their applications. The first article includes a walk through of the request life-cycle in Struts2, configuration, and the action differences between the old and new versions of the framework.
Read Converting to Struts2 - Part I
...Before we start the migration process, a little background to Struts2 is needed. The first part of this article will introduce Struts2, along with some of the core architectural differences that will help to conceptually put everything together. The second part will cover migrating the back-end - an in-depth look at the differences between actions; action related framework features; and action configuration. The final part of this article will address the user interface. We'll cover the architecture; talk about UI components, themes and tags; and put a new face on our application.It is not my intent to cover every migration scenario available, but rather to introduce the concepts and new features available in Struts2 by starting from a common starting point. Armed with this knowledge, migrating an application of any size should be a piece of cake!...
I dont like the idea of Action helper interface
by
karan malhi
If you don't like the idea of string literals in your code, there is a helper interface Action available that provides the common results of "success", "none", "error", "input" and "login" as constants.
If I dont like the idea of string literals, then I would create my own helper interface. In fact, I dont like the idea of getting a helper interface just for some constants, which I may not even use. This is a domain specific thing and its place is in a domain specific model , rather than a framework.
Re: I dont like the idea of Action helper interface
by
Ian Roughley
Re: One typo?
by
Ian Roughley
Re: I dont like the idea of Action helper interface
by
karan malhi
Re: I dont like the idea of Action helper interface
by
Pete the Wheat
Re: I dont like the idea of Action helper interface
by
Nathan Hughes
Re: I dont like the idea of Action helper interface
by
Mikel Masquefa
My reason is very simple: many applications are developed by teams from countries who speak languages different from English and that don't want use english's words to determine webflow concepts.
For example, instead of using the word 'success' I could want to use the word 'exito', spanish, or 'sucesso', portuguesse.
Inject things into actions
by
Thai Dang Vu
Re: Inject things into actions
by
Ian Roughley
How to Send form data to DAO Layer.
by
Rajagopal Y
I Just started workign with Struts2.
Here is my doubt.
Assume that i am developing a loing application where user enters username and password, i have the setter/getter methods in my action for username& password.
Form action i have to invoke the Service/DAO method, which takes a Value Object as paramater, which contains username& password.
Here is few Questions:
=> Why can't we have a seperate bean for form properties and map it to the action class.
=> If the properties are defined in Action class, what is the right place to create the Value object (in my example with username& password).
Any Suggestions....
some doubts
by
K Sathya Narayanan
i have a jsp named "displayEmployeeRecords.jsp"
which should display the list of employee details like name , empid , salary
i have implemeted this in struts1.2.
i have implemented the action class and other xml files .
i have a Arraylist object which contains a list of EmployeeModel object
1)if Arraylist is empty then the action class should be called
to populate the ArrayList
else the ArrayList should be iterated to display its content
2)tell me how to display this using struts2.0
i have done this in struts 1.2 but i dont know how to call a Action class
in Struts1.2-> /EmployeeData.do -> will call the Action class
in Strut22.0->?
in struts 1.2 -> logic:iterate to iterate the ArrayList and display the data
in strut2.0->?
Re: I dont like the idea of Action helper interface
by
Edward Song
Educational Content
Concurrency in Clojure
Stuart Halloway May 17, 2013
Confessions of an Agile Addict
Ole Friis Østergaard May 16, 2013
Web Development: You're Doing It Wrong
Stefan Tilkov May 16, 2013
Programming The Feynman Way
Ben Evans May 15, 2013





Hello stranger!
You need to Register an InfoQ account or Login to post comments. But there's so much more behind being registered.Get the most out of the InfoQ experience.
Tell us what you think