Struts 2 decorator question

I'm building a website with struts 2. I got a decorator for the layout of my website and I fill the content according an action. I also want to use a column with some tools like login, latest messages, etc. I'm pretty new to struts and i don't have a good idea what the design for this would look like. My best guess is some sort of second action. But I don't have a clue how to add 2 actions to my decorator. Is my design approach a good one and if so how should this be implemented?


Struts 2 uses 1 action per page. Nested actions are possible. An other option is to use ordinarily includes.

You could make every action extend a BaseAction where the decorator could pull data from.

For example, if FooAction extends BaseAction, you can access the FooAction data from foo.jsp and the BaseAction data from main.jsp (your decorator). To list the latest messages in main.jsp, add a getLatestMessages() method to BaseAction.

Of course, ALL of your actions must extend BaseAction for this to work.

Need Your Help

dllmain function and exported function runs as threads or as a separate processes?

visual-c++ dll dllexport entry-point

this is more of conceptual question and it may be rather basic , i am not really finding good resources to learn about dll ,

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.