aspose file tools*
The moose likes JSP and the fly likes JSF on tomcat 5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSF on tomcat 5" Watch "JSF on tomcat 5" New topic
Author

JSF on tomcat 5

Bob Green
Ranch Hand

Joined: Feb 29, 2004
Posts: 93
I am having a problem trying to run JSF on tomcat 5 during the startup
and here is what
I get:
[INFO] StandardHostDeployer -- Installing web application at context path
/myJSFApp from URL file:C:\jakarta-tomcat-5.0.16\webapps\myJSFApp
[ERROR] Context -- Error listenerStart
[ERR0R] Context -- Context setup failed due to previous error
myJSFApp
|-> WEB-INF
| |-> classes
| | |-> jsfApp
| | |-> (contains java classes)
| |-> lib
| | |-> (all the jar files)
| |-> web.xml
|-> adder.jsp
Any ideas?
Thanks!
BL
Bill Dudney
Author
Ranch Hand

Joined: Sep 05, 2003
Posts: 234
Hi Bob,
I have it running on 5.0.18. Any other detail about the listenerStart error?


TTFN,<br /> <br />-bd-<br /> <br /><a href="http://www.amazon.com/exec/obidos/ASIN/0471449156/qid=1064343733/sr=2-1/ref=sr_2_1/002-8375300-3666449" target="_blank" rel="nofollow">Jakarta Pitfalls</a> | <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0471146153/qid=1064343733/sr=1-2/ref=sr_1_2/002-8375300-3666449?v=glance&s=books" target="_blank" rel="nofollow">J2EE AntiPatterns</a> | <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0471462071/qid=1064343733/sr=1-3/ref=sr_1_3/002-8375300-3666449?v=glance&s=books" target="_blank" rel="nofollow">Mastering JavaServer Faces</a> | <a href="http://bill.dudney.net/roller/page/bill" target="_blank" rel="nofollow">Blog</a> | <a href="http://www.jroller.com/page/BillDudney" target="_blank" rel="nofollow">Eclipse Blog</a> | <a href="http://www.sourcebeat.com/TitleAction.do?id=2" target="_blank" rel="nofollow">Eclipse 3 Live</a>
Bob Green
Ranch Hand

Joined: Feb 29, 2004
Posts: 93
Hi Bill,
The only error I got when I tried to start up Tomcat is the ones I showed
in my previous post.
[ERROR] -- Context listenerStart
I don't have any idea where to go to fix this problem.
Thanks!
BL
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Could u restart the Tomcat, every time a web app is installed... Tomcat is prone to new installation of web apps, not even for JSF app...


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Bill Dudney
Author
Ranch Hand

Joined: Sep 05, 2003
Posts: 234
Hi Bob,
Try the 1.0 final release and see if that works. If not ping back...
Hope this helps!
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Bill Dudney:
Hi Bob,
Try the 1.0 final release and see if that works. If not ping back...
Hope this helps!

I am having the exact same problem. And I have tried the 1.0 final release. In a minute I will post the code I am trying to test...


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Ok, here goes the initial code I am trying to test.
web.xml

LoginBean.java

faces-config.xml

login.jsp

Note that this will not do anything yet. I just figured I would get this much up and running, then add my actions.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I thought it might be helpful that running the app on Resin produces the following error when starting the Resin httpd.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

FYI - tomcat 4 does not throw that error. However, it might as well have, because the webapp still does not function.
Bob Green
Ranch Hand

Joined: Feb 29, 2004
Posts: 93
I have finally figured out my problem! I am missing the following class
javax/faces/el/MethodBinding, can someone pls. let me know where I can
find this class. I have jsf-api jar but it is not there and this jar
comes from Java WSDP 1.3.
BTW, thank you so much for all the helps I received. It is great!
Thanks!
RL
Here's is the log file
2004-03-04 08:50:07 StandardContext[/myJSFApp]Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigListener
java.lang.NoClassDefFoundError: javax/faces/el/MethodBinding
at com.sun.faces.config.ConfigListener.isContextInitialized(ConfigListener.java:357)
at com.sun.faces.config.ConfigListener.contextInitialized(ConfigListener.java:124)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3775)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4257)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:316)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:859)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:723)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:393)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:816)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2343)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Bill Dudney
Author
Ranch Hand

Joined: Sep 05, 2003
Posts: 234
Hi Bob,
You need the JSTL jar. If you are running on Tomcat 5.0.x then you can use the one found in JWSDP, if you are trying to go to Tomcat 4.1.x then you need the JSTL 1.0 jar file.
Good Sleuthing!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF on tomcat 5