File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Pojo Action in struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Pojo Action in struts 2" Watch "Pojo Action in struts 2" New topic
Author

Pojo Action in struts 2

Prashant Saraf
Ranch Hand

Joined: Sep 25, 2006
Posts: 50

Hi,
Can we make a pojo as action. if yes then how? can someone give an example of it.

Regards
Prashant
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8262

There's no big secret. Just declare it in struts.xml like you would any other action:

SomePOJO has to have a no-argument constructor so it can be instantiated by reflection and someMethod should return a String.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Pojo Action in struts 2
 
Similar Threads
Using Shell script to call struts Action
Design struts 2
Struts2 annotation validation
Struts 1.0.1 using Wsad
program flow problem