The moose likes Struts and the fly likes Where to define the common functionality methods for Struts Controller Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Struts
Reply Bookmark "Where to define the common functionality methods for Struts Controller" Watch "Where to define the common functionality methods for Struts Controller" New topic
Author

Where to define the common functionality methods for Struts Controller

Surabhi Sharma
Greenhorn

Joined: Feb 07, 2012
Posts: 2
Hi All

I have a common functionality which needs to used by two different controllers. This is not a static utility method requirement. Question is where should this common code to be added in a separate common package for the entire project or in that modules common package or in a separate utility class where other static methods are present.
Please suggest what is ideal way to implement it as per MVC design pattern?
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 3221

Surabhi, welcome to the Ranch! I'm moving this to the Struts forum, where you'll get better responses.


luck, db
There are no new questions, but there may be new answers.
Kiran Yadav
Ranch Hand

Joined: Nov 02, 2011
Posts: 33

Hi Surabhi,

It is always good idea to use common functionality to in that modules common package, so as to use this package as jar not as common project.

This will help during compiling the code and avoid extra load on dependent project during the building in development environment.
Surabhi Sharma
Greenhorn

Joined: Feb 07, 2012
Posts: 2
Thanks everyone for the response.
 
IntelliJ Java IDE
 
subject: Where to define the common functionality methods for Struts Controller
 
Threads others viewed
method not found
DataBase Utility class consisting of static methods
Question on Utility Methods on Base class instead on Separate Utility class
When do I need to be concerned with threading?
difference between an instance variable and static variable?
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com