aspose file tools*
The moose likes Struts and the fly likes apache2 and extends Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "apache2 and extends" Watch "apache2 and extends" New topic
Author

apache2 and extends

Glenn Timchishen
Greenhorn

Joined: Jun 20, 2004
Posts: 21
Hello,

In my research regarding struts2 I was lead to believe that struts2 did most of its work through implmenting interfaces (like springMVC) and not through extends. However when I look through examples on the web, all I see is, extends, extends, extends.

So whats the real story? Was my original research incorrect? Is struts2 still dependant on extending superclasses in order to get it's work done?

Please advise?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8964
    
    9

From the API doc for com.opensymphony.xwork2.Action:
All actions may implement this interface, which exposes the execute() method. However, as of XWork 1.1, this is not required and is only here to assist users. You are free to create POJOs that honor the same contract defined by this interface without actually implementing the interface.

It doesn't look like you need to implement or extend anything (haven't tried it).
I assume the examples you are finding extend ActionSupport?
That's a good base class to start because it covers a lot of the basic functionality for most actions (creating action/error messages, retrieving messages by key, validation and so on), which may account for its popularity.


[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: apache2 and extends