>From: "Alexandre Poitras" <[EMAIL PROTECTED]> 
>
> Yeah definitely seems like a bug to me. 
>

It might be.  I guess I never thought about an http response code.  Clay reads 
in these template files using the URL object and parses the html.  It catches 
the exception and logs that it could not find the file.  I'm not sure what 
exception I could throw that would result in a page not found.  I'll have to 
take a better look at the ExternalContext to see if I can send a error with an 
HTTP code.

The trick with the full html views is that the first and only child of the view 
root is the Clay component.  The custom view handler simple adds the clay 
component to the view root and tells it to start building the sub tree.  The 
subtree just happens to be the full page that might contain nested clay 
components.  The suffix of the jsfid indicates what handler is used to extract 
the metadata used to build the component tree (html or xml).  So, at the point 
the exception is raised, the handler doesn't care if it's loading metadata for 
the top level clay component, nested in a jsp or nested within several template 
layers.


Gary

 
> On 4/19/06, Richard Wallace wrote: 
> > If it was a subview I would agree. But this is the root view which is 
> > why I'm surprised by the behaviour. 
> > 
> > Rich 
> > 
> > Alexandre Poitras wrote: 
> > > Well if it isn't the root view and just an included subview, I would 
> > > expect this behavior but Gary would be the best person to answer this 
> > > question. 
> > > 
> > > On 4/19/06, Richard Wallace wrote: 
> > > 
> > >> When trying to access a file that doesn't exist, Clay is throwing a 
> > >> RuntimeException that is causing my 500 error page to be displayed 
> > >> rather than a 404 error page. Here's the offending exception: 
> > >> 
> > >> java.lang.RuntimeException: Unable to find file /for_parents.html. 
> > >> at 
> > >> 
> org.apache.shale.clay.config.beans.ComponentConfigBean.getConfigDefinitions(Comp
>  
> onentConfigBean.java:230) 
> > >> at 
> > >> 
> org.apache.shale.clay.config.beans.TemplateConfigBean.getElement(TemplateConfigB
>  
> ean.java:72) 
> > >> at 
> > >> org.apache.shale.clay.component.Clay.getRootElement(Clay.java:244) 
> > >> at org.apache.shale.clay.component.Clay.encodeBegin(Clay.java:283) 
> > >> at 
> > >> 
> org.apache.shale.clay.faces.ClayViewHandler.recursiveRender(ClayViewHandler.java
>  
> :402) 
> > >> at 
> > >> 
> org.apache.shale.clay.faces.ClayViewHandler.renderView(ClayViewHandler.java:345)
>  
> > >> at 
> > >> 
> org.apache.shale.view.faces.ViewViewHandler.renderView(ViewViewHandler.java:146)
>  
> > >> at 
> > >> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
> > >>  
> > >> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107) 
> > >> at 
> > >> 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
>  
> erChain.java:252) 
> > >> ... 
> > >> 
> > >> 
> > >> I'm using a nightly from 20060313 so forgive me if this is fixed in the 
> > >> latest code. If not, can I file a bug? 
> > >> 
> > >> Thanks, 
> > >> Rich 
> > >> 
> > >> --------------------------------------------------------------------- 
> > >> To unsubscribe, e-mail: [EMAIL PROTECTED] 
> > >> For additional commands, e-mail: [EMAIL PROTECTED] 
> > >> 
> > >> 
> > >> 
> > > 
> > > 
> > > -- 
> > > Alexandre Poitras 
> > > Québec, Canada 
> > > 
> > > --------------------------------------------------------------------- 
> > > 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] 
> > 
> > 
> 
> 
> -- 
> Alexandre Poitras 
> Québec, Canada 
> 
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: [EMAIL PROTECTED] 
> For additional commands, e-mail: [EMAIL PROTECTED] 
> 

Reply via email to