aspose file tools*
The moose likes JSF and the fly likes JSF basic question. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF basic question." Watch "JSF basic question." New topic
Author

JSF basic question.

Sagar Kale
Ranch Hand

Joined: May 02, 2008
Posts: 188
I have tried my first jsf helloworld.

I have included jsf-api.jar and jsf-impl.jar in WEB-INF/lib folder, but it is not working

It is not working, it says

SEVERE: Error configuring application listener of class |CONFIG_LISTEN_CLASS|
java.lang.ClassNotFoundException: |CONFIG_LISTEN_CLASS|
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1338)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1187)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3640)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4127)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15662
    
  15

I think you typed in an abstract example of the web.xml file. It's looking for a class named " |CONFIG_LISTEN_CLASS| " and that's obviously not a real classname.


Customer surveys are for companies who didn't pay proper attention to begin with.
Sagar Kale
Ranch Hand

Joined: May 02, 2008
Posts: 188
This is my web.xml

Sagar Kale
Ranch Hand

Joined: May 02, 2008
Posts: 188
This problem is related to jars I guess. I downloaded jsf_1.2_12 jars and used in tomcat, it gives me problem, but same application if I remove jars from /WEB-INF/lib (empty) and deploy application onf Glassfish, it works.
Sagar Kale
Ranch Hand

Joined: May 02, 2008
Posts: 188
Does anyone knows what are dependency jars required for for jsf 1.2 to run on Tomcat 6.0.20

I have included following in WEB-INF/lib

jsf-api.jar
jsf-impl.jar
jstl.jar
standard.jar

This works on Glashfish but not on Tomcat 6.0.20. I want to run it on Tomcat.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15662
    
  15

You do not need to include the JSTL jar in JSF. In fact, it's better not to mix JSTL and JSF at all.

I forget what standard.jar is good for, but I don't think it's mandatory for JSF.

I'm surprised that you didn't have problems with GlassFish. It's supposed to have built-in JSF support, since it's the probing ground for JEE, and JSF is part of JEE. So when you include jsf-impl.jar, there's a possible collision with GlassFish's own jstl-impl.

Tomcat, on the other hand, does not have built-in jsf-impl, so you need it in your WAR. All JSF apps need the jsf-api.jar, though.
Sagar Kale
Ranch Hand

Joined: May 02, 2008
Posts: 188
When I deployed on Glassfish, I did not inlclude any jar, /WEB-INF/lib folder was empty. And it works on Glassfish. On tomcat I inlcluded jars but it is not working.
Sagar Kale
Ranch Hand

Joined: May 02, 2008
Posts: 188
Worked on Tomcat too, thanks Tim for your help.
 
jQuery in Action, 2nd edition
 
subject: JSF basic question.
 
Similar Threads
Got java.lang.ClassFormatError: while trying to acces my App
war on tomcat giving error
Problem with Tomcat Deployment with Eclipse 3.2
Error loading WebappClassLoader
war file deployment problem