0

i have checked similar posts and have googled but could not find an eligible answer to this. When ever i import a jsf project from some other system (where its working fine) OR delete the tomcat server in eclipse and add new server back again...there are lots of tag libs and imports that go "unresolved". Such applications are often not created by me and i dont exactly know which libraries are to be added to configure and fix project in eclipse. I want to ask, is there any general way to find out all the required libraries for any imported jsf project and then add them.

Thanks in advance.

learner
  • 757
  • 2
  • 14
  • 35

1 Answers1

1

Download the javax.faces.jar file and drop it in project's /WEB-INF/lib folder.

That's all.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • ...javax.faces.jar is "One Single File" or its collection of "jars"? – learner May 16 '12 at 16:05
  • Since Mojarra 2.0.9/2.1.5 it's a single file `javax.faces.jar`. Before that, it used to be two files `jsf-api.jar` and `jsf-impl.jar`. Note that the filename may have a version suffix, but the point should be clear enough. – BalusC May 16 '12 at 16:06
  • i copied these two jars..the application still have errors like The import javax.servlet.ServletException cannot be resolved, The import javax.servlet.http cannot be resolved, HttpServletRequest cannot be resolved to a type and other 40 plus alike error msgs.........:( – learner May 16 '12 at 16:11
  • The `javax.servlet` package is not from JSF API. JSF uses `javax.faces` package. It's from the Servlet API which is supposed to be already provided by your servletcontainer. To solve `javax.servlet` import problems, please read http://stackoverflow.com/questions/4076601/how-do-i-import-the-javax-servlet-api-in-my-eclipse-project In a nutshell: you need to integrate the servletcontainer in Eclipse and associate the dynamic web project with it. – BalusC May 16 '12 at 16:12
  • ...i read that post even prior to this post of mine...but those steps are not solving my problem...what could possibly be hindering the tomcat 6.0 to make javax.servlet package available...its frustrating me – learner May 16 '12 at 16:19
  • Then you haven't followed the steps closely enough, or maybe you have seriously messed up other things in your local environment which I don't have insight to. – BalusC May 16 '12 at 16:20