Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with running web app using JSF  RSS feed

 
Varun Nayudu
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to learn JSF and am trying to learn by building a small application but it doesnt seem to work
My Application name is 'App3'
I am using Tomcat5.0 and have put the following jar files in the Tomcat/commons/lib folder
Jar Files:
* jsf-api.jar
* jsf-impl.jar
* jstl.jar
* standard.jar
* commons-beanutils.jar
* commons-collections.jar
* commons-digester.jar
* commons-logging.jar

web.xml


faces-config.xml


But when ever i type http://localhost:8181/App3/ in the url i get the following error

 
leo donahue
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm no expert, but I see a few things that don't look right to me.

In your web.xml, you indicate that the servlet name is FS, but you're trying to get there via a URL that is called App3.

In your faces-config.xml, are you trying to load the index.jsp page when the user visits: http://localhost:8181/App3 ?
That is not what a navigation rule is for. You need to add a <welcome-file-list> element to your web.xml in order for Tomcat to know which page to load first in your webapp. Navigation rules are based on "actions" in your page. Actions provide the mechanism for page navigation as a result of some outcome from a method binding expression such as:



For your faces-config file to work properly, you need to add your <managed-bean> element. The scope could be one of several choices, request, session or application. Read up on this.


There could be any number of Tomcat reasons why you might get a 404 error page. Why are you using Tomcat 5? That is really old. Also, I wouldn't add the jsf-api.jar and jsf-impl.jar files to a "common" directory in Tomcat. Usually, you add those to the lib directory under WEB-INF of your specific web app.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!