dev@jsftemplating.java.net

Re: JSFTemplating: JSFTemplating on Tomcat

From: Ken Paulsen <Ken.Paulsen_at_Sun.COM>
Date: Fri, 31 Aug 2007 13:36:25 -0700

Hi Leonid,

Thanks for the feedback! The changes in the build.properties are what
I'd expect... I'm glad you got that figured out.

I decided to try to download Tomcat 5.5 and try this out as well to see
if I could see what you're seeing. I did get an error (although it was a
different exception -- but I suspect different version of tomcat or
other factors contributed to that). I was able to get around this error
by including the el-api.jar and el-impl.jar files in the web app. I got
these jar files from:

https://maven-repository.dev.java.net/nonav/repository/el-impl/jars/
https://maven-repository.dev.java.net/nonav/repository/javax.el/jars/

So to summarize, for Tomcat 5.5, I needed these extra jar files (vs.
GlassFish or other Java EE 5 containers):

jsf-api.jar
jsf-impl.jar
el-api-1.0.jar
el-impl-1.0.jar

I think that's it. Let me know if you've got it working.

Thanks!

Ken

Leonid Lamburt wrote:
> Ken, thanks for the reply.
>
> My environment is as follows: Windows XP and Tomcat 5.5.
>
> I was able to build the demo (following your instructions) with a few
> minor changes:
>
> in build.properties for jsftemplating I had to set the following
> references:
> servlet-api.jar
> jsf-api.jar
> el-api.jar (I copied this one from tomcat6 download into common/lib on
> my tomcat5 as it didn't build wtihout it).
>
> After that, I was able to build both jsftemplating and demo.
>
> However, when I tried to run demo.war under my tomcat5 it didn't work.
>
> I've got the stack trace below. I'll try to install tomcat6 and
> rebuild the demo after that.
>
> Thanks again.
>
> LL
>
>
> 2007-08-31 15:51:30,983 ERROR http-8080-Processor24
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/demo
> ].[FacesServlet] - Servlet.service() for servlet FacesServlet threw
> exception
>
> java.lang.NullPointerException
> at
> com.sun.jsftemplating.component.factory.ComponentFactoryBase.setOption(ComponentFactoryBase.java:129)
>
> at
> com.sun.jsftemplating.component.factory.ComponentFactoryBase.setOptions(ComponentFactoryBase.java:104)
>
> at
> com.sun.jsftemplating.component.factory.basic.StaticTextFactory.create(StaticTextFactory.java:61)
>
> at
> com.sun.jsftemplating.component.ComponentUtil.createChildComponent(ComponentUtil.java:397)
>
> at
> com.sun.jsftemplating.layout.descriptors.LayoutComponent.getChild(LayoutComponent.java:277)
>
> at
> com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:515)
>
> at
> com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:530)
>
> at
> com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:530)
>
> at
> com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:530)
>
> at
> com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:530)
>
> at
> com.sun.jsftemplating.layout.LayoutViewHandler.createView(LayoutViewHandler.java:231)
>
> at
> com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:203)
>
> at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
> at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
> at
> com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:80
>
> )
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
>
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
>
> :663)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>
> at java.lang.Thread.run(Unknown Source)
>
> _________________________________________________________________
> It’s the Windows Live™ Hotmail® you love — on your phone!
> http://www.windowsmobile.com/hotmailmobile?ocid=MobileHMTagline_2