Ok, let me try a simpler question. Does anyone have an example of a simple one page webapp using clay and the HTML view? It would be handy to have that available in the source repo so that users can try and consume different aspects of Shale a little at a time and come to grips with features one at a time rather than have to look at gigantic web.xml and faces-config.xml files. It's rather confusing, especially given the current lack of documentation.

Thanks,
Rich

Richard Wallace wrote:
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?).

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 <view></view>. The faces-config.xml is empty as well.

I've got a simple default.html page with just a single <a> element with a jsfid="commandLink".

When I deploy the webapp the logs are as follows:
Jan 19, 2006 11:27:50 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive shale-test.war
Jan 19, 2006 11:27:51 AM org.apache.shale.clay.config.ClayConfigureListener contextInitialized
INFO: Begin loading config files.
Jan 19, 2006 11:27:51 AM org.apache.shale.clay.config.beans.ComponentConfigBean$WatchDog refresh INFO: Loading file "file:/opt/apache-tomcat-5.5.12/webapps/shale-test/WEB-INF/lib/shale-clay-SNAPSHOT.jar!/META-INF/clay-config.xml". Jan 19, 2006 11:27:51 AM org.apache.shale.clay.config.ClayXmlParser configureRules
INFO: Loading digester rules.
Jan 19, 2006 11:27:51 AM org.apache.shale.clay.config.beans.ComponentConfigBean$WatchDog refresh
INFO: Loading file "/localhost/shale-test/WEB-INF/clay-config.xml".
Jan 19, 2006 11:27:51 AM org.apache.shale.clay.config.beans.ComponentConfigBean resolveInheritance
INFO: Begin resolving inheritance @:-<
Jan 19, 2006 11:27:51 AM org.apache.shale.clay.config.beans.ComponentConfigBean resolveInheritance
INFO: Finding parents ?:-[
Jan 19, 2006 11:27:51 AM org.apache.shale.clay.config.beans.ComponentConfigBean resolveInheritance
INFO: Checking for circular inheritance %:-{
Jan 19, 2006 11:27:51 AM org.apache.shale.clay.config.beans.ComponentConfigBean resolveInheritance
INFO: Realizing heritage $:-<
Jan 19, 2006 11:27:51 AM org.apache.shale.clay.config.beans.ComponentConfigBean resolveInheritance
INFO: Inheritance resolved @:-)
Jan 19, 2006 11:27:51 AM org.apache.shale.clay.config.ClayConfigureListener contextInitialized
INFO: Done loading config file(s).
Jan 19, 2006 11:27:51 AM org.apache.myfaces.config.FacesConfigurator feedStandardConfig INFO: Reading standard config org/apache/myfaces/resource/standard-faces-config.xml Jan 19, 2006 11:27:51 AM org.apache.myfaces.config.FacesConfigurator feedClassloaderConfigurations INFO: Reading config jar:file:/opt/apache-tomcat-5.5.12/webapps/shale-test/WEB-INF/lib/shale-clay-SNAPSHOT.jar!/META-INF/faces-config.xml Jan 19, 2006 11:27:51 AM org.apache.myfaces.config.FacesConfigurator feedClassloaderConfigurations INFO: Reading config jar:file:/opt/apache-tomcat-5.5.12/webapps/shale-test/WEB-INF/lib/shale-core-SNAPSHOT.jar!/META-INF/faces-config.xml Jan 19, 2006 11:27:51 AM org.apache.myfaces.config.FacesConfigurator feedWebAppConfig
INFO: Reading config /WEB-INF/faces-config.xml
Jan 19, 2006 11:27:51 AM org.apache.shale.clay.faces.ClayViewHandler <init>
INFO: Loading Clay View Handler
Jan 19, 2006 11:27:51 AM org.apache.myfaces.webapp.StartupServletContextListener initFaces INFO: ServletContext '/opt/apache-tomcat-5.5.12/webapps/shale-test/' initialized. Jan 19, 2006 11:27:51 AM org.apache.shale.faces.ShaleApplicationFilter init
INFO: Initializing Shale Application Filter

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?

Thanks,
Rich

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to