From: Richard Wallace <[EMAIL PROTECTED]> > > Hello, > > I'm trying to get a simple clay example up and running so that I can use > the full html view (which is similar to facelets, correct?). >
They are similar but the differences is that Clay is based on a JSF component and can be used in JSP, HTML, XML or a mix. Clay also allows meta-data inheritance like tiles so that you can define a single component or composition of components that can be extended. Both support tapestry like views. Clay also has a notion of full XML views which is similar to the tiles page definition. It also has symbol replacement which is similar to tiles. > I looked at the use cases and copied the web.xml, faces-config.xml and > clay-config.xml and stripped out anything that I didn't need, like > Spring and dialog stuff (I'll play with that later). So, what I'm left > with is a pretty standard looking web.xml with the > ShaleApplicationFilter added, a context param for > org.apache.shale.clay.COMMON_CONFIG_FILES, and a servlet filter for the > FacesServletFilter to be mapped to *.html files. > > The clay-config.xml file is empty except for the root element > . The faces-config.xml is empty as well. > > I've got a simple default.html page with just a single element with > a jsfid="commandLink". > > > When I try and access http://localhost:8080/shale-test/default.jsf (I > changed the mapping for the servlet to be to .jsf instead of .faces), > the following shows up in the logs and I see a big 404: > > Jan 19, 2006 11:29:26 AM org.apache.shale.view.faces.ViewViewHandler > setupViewController > WARNING: No ViewController for viewId /default.jsp found under name default > > Clearly it's trying to access a .jsp instead of my .html. What do I > need to do to fix it? Do I need to set the view-handler in the > faces-config.xml to a Shale-Clay view handler? > Shale is comprised of layers that you can choose to use or not include but all require the core library. Besides some shared code, the core includes shared services that are common. The Shale Application filter is the most visible but there are other utilities that are registered as managed beans by just inclusion of the shale core java archive. The Shale Application filter is a controller that allows Shale to add additional life cycle events to the vanilla JSF life cycle without actually depending on a specific JSF implementation (RI, MyFaces). The JSF lifecycle is one of the few parts of JSF that is not an extension point loosely coupled so that it is swappable in the XML configuration file. I'll direct you to the shale usecase example instead of duplicating in this response but this is the minimum stack to use Clay. Added jars: * JSF archives (myfaces or RI) * Common-chains.jar * shale-core.jar * shale-clay.jar Web.xml * Common Chains Loads a couple clay preprocess commands * Clay common full XML configuration resources. * (Optional) Clay common full XML configuration resources. * Shale Application Controller Filter Mapping * Common Chains Configuration Startup Listener * Faces Servlet Mappings The warning you are seeing has to do with the core ViewController in Shale. The view controller is a managed bean that receives callback events for the additional life cycle events. There is an association of the view id with the view controller. The view controller is a managed bean that is registered with a naming convention (another pluggable part). In Struts 1.x terms this would be like associating a path with a action and form bean at the same time. The warning message is generated to inform that the controller filter couldn't find a managed bean matching the naming criteria. > Thanks, > Rich > Gary > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >