Presentation Level framework for web-applications based on Apache Struts.
This framework extends basic Struts elements like actions and form beans with the notion of pages, that can be assembled from individual page components, and presentation elements, that can be used for rendering dynamic content.
To start using this presentation level framework you should
install CB2PlugIn
class as Struts plug-in for every
Struts module, in which you would like to use it. It can be done
like this in the struts-config.xml
file:
... <plug-in className="com.boylesoftware.cb2.presentation.servlet.CB2PlugIn"> <set-property property="pages-config" value="/WEB-INF/pages-config.xml"/> </plug-in> ...
Note the pages-config.xml
file, which is the central
presentation level configuration file. See CB2PlugIn
class
description for more plug-in properties that you can configure.
The plug-in maintains one single instance of CB2Application
for the whole web-application and it also installs
CB2RequestProcessor
, or your own class derived from it, as the
request processor for the Struts module.
This presentation level framework cannot coexist with some other Struts extentions like Tiles. Fortunately, it provides all the functionality of Tiles and far beyond it.
Part of this framework is also a JSP custom tag library defined by
cb2.tld
file. The library introduces
<cb2:insert>
tag, which allows inserting page attribtues
and page components into other page components.