Hi Jacob,

thanks for response,

I know the origin of exception so it was a bit confusing for me when I found
the reason I was a bit confused

The reason is this nice property in web.xml:

*<context-param>
>        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>        <param-value>.jsf</param-value>
>    </context-param>*
When I removed it the application works fine.
Need to read more about...

Anyway - its misconfiguration on my side so no problem on myfaces/jetty
part.

Thanks,
Anton

2010/12/14 Jakob Korherr <[email protected]>

> Hi,
>
> This exeption most likely occurs if you access a JSP-view directly and
> not via the FacesServlet. So what URL are you using to access the
> page?
>
> Does it end with *.jsp or *.jsf? *.jsf would be the right choice!
>
> Regards,
> Jakob
>
> 2010/12/13 Anton Gavazuk <[email protected]>:
> > Hi
> > trying to run very basic application on Jetty 7.2.2.v20101205 with
> > myfaces-api-1.2.9
> > and getting exception related to the context
> >
> > java.lang.NullPointerException: context
> >        at
> javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:927)
> >        at
> javax.faces.component.UIComponentBase.getRendersChildren(UIComponentBase.java:366)
> >        at
> javax.faces.component.UIComponent.encodeAll(UIComponent.java:248)
> >        at
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.actuallyRenderView(JspViewHandlerImpl.java:427)
> >        at
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:383)
> >        at
> org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
> >        at
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
> >        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:187)
> >        at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534)
> >
> >
> > Component tree for requested view
> >
> >
> > <UIViewRoot locale="en" renderKitId="HTML_BASIC" rendered="true"
> > transient="false" viewId="/flot/chart.jsf"/>
> >
> >
> >
> > faces config doesnt have any entries
> >
> > the web.xml content:
> > <servlet>
> >        <servlet-name>Faces Servlet</servlet-name>
> >        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> >        <load-on-startup>1</load-on-startup>
> >    </servlet>
> >    <context-param>
> >        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
> >        <param-value>.jsf</param-value>
> >    </context-param>
> >    <context-param>
> >        <param-name>javax.faces.CONFIG_FILES</param-name>
> >        <param-value>/WEB-INF/faces/faces-config.xml</param-value>
> >    </context-param>
> >    <context-param>
> >        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> >        <param-value>server</param-value>
> >    </context-param>
> >    <servlet-mapping>
> >        <servlet-name>Faces Servlet</servlet-name>
> >        <url-pattern>*.faces</url-pattern>
> >    </servlet-mapping>
> >    <servlet-mapping>
> >        <servlet-name>Faces Servlet</servlet-name>
> >        <url-pattern>*.jsf</url-pattern>
> >    </servlet-mapping>
> >
> >
> > What could be wrong? Is it a problem related to the Jetty?
> >
>
>
>
> --
> Jakob Korherr
>
> blog: http://www.jakobk.com
> twitter: http://twitter.com/jakobkorherr
> work: http://www.irian.at
>

Reply via email to