Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

[noob] trying to follow jsf example, having problems  RSS feed

 
Breno Salgado
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im trying to follow an ajax\jsf example from JavaJazzUp magazine, but Im 'getting cannot find the tag library descriptor for..' rightaway




I dont know much about this tag or jsf, could any of you guys explain me whats wrong??
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you get this error, then it simply means that the JAR file(s) of the mentioned tag library aren't been placed in the classpath. You need to install the tag library before declaring/using it.
 
Tim Holloway
Bartender
Posts: 18548
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go back and check the article and see if it doesn't have any setup and installation instructions.

The html and core taglibs are part of basic JSF. If you're using Tomcat, you have to include them (either the Sun RI or the Apache MyFaces JSF api/implementation jars will do - just don't mix them). For JEE-compliant servers such as the latest JBoss, the implementation jars are part of the server, so all you need is the API jars.

The Tomahawk and SandBox jars can be downloaded from http://myfaces.apache.org

With the exception of the server-supplied jars (if any), you install all of the above into the WEB-INF/lib directory of your WAR. It's possible that the downloaded example already contains them, but it depends on how they bundled it all up.
 
Breno Salgado
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
damn, I really need more studying, Im getting lost all the time with jars and such..

the article says

Apache MyFaces has a sub-project named "SandBox" which provides a set of components. Sandbox is a new addition to the Tomahawk project. This helps us to easily integrate Ajax enabled components in MyFaces. To let the sandbox components work, we have to add "tomahawk-sandbox-1.1.6-SNAPSHOT.jar" file in lib folder of your application along with complete set of jar files for JSF(MyFaces) environment to run application


before I wasnt trying with the jars, but now after it, its still not working, I dont know what Im doing wrong

I tried coppying both myfaces-api-1.2.6.jar and tomahawk-1.1.7-SNAPSHOT.jar into lib then adding to the projects ClassPath
I tried importing all the files in the tomahawk lib folder + all the files in the MyFaces-core-1.2.6 lib folder, still nothing, its like Im running blind here, cause Im probably doing nothing right here
 
Tim Holloway
Bartender
Posts: 18548
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess I need to understand whether your problem is with an IDE, with running the app, or with both.

IDE errors you can more or less ignore. At the moment, Eclipse isn't doing a very good job on XML files anyway.

Don't add the jars to the appserver classpath if they're in the WEB-INF/lib directory. You'll risk having classloader conflicts.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!