• Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding jar files to an old JSF project  RSS feed

 
Christopher Sharp
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the first time in 4 years I'm trying to resurrect an old JSF project. It was created without an IDE using a console in Linux. I've since installed Eclipse Indigo release 2, which I'm using on a Windows Vista computer, and works correctly with simple Java projects.

I'm now trying to get this old JSF project working with Eclipse before I change it, but I'm having problems with some jar files. The old code imported the class org.apache.myfaces.custom.fileupload.UploadedFile. The associated jar file is commons-fileupload-1.1.jar. There are three other jar files that may be required, but after 4 years I can't remember. They are commons-el.1.0.jar, commons-io.1.2.jar and commons-logging-1.1.1.jar.

I copied the first file to WebContent/WEB-INF/lib/ then configured the build path to include it, but the class using UploadedFile does not recognize it. I did the same with the other three files, but that is still the case. What has to be done to get UploadedFile working?

The three other classes in the project do not use UploadedFile, and look OK so far. Incidentally, the old project used JSF 1.2, but I'm now using JSF 2.0, and wonder if that may be part of the problem.

Advice and help would be most appreciated.

csharp
 
Eric Graham
Greenhorn
Posts: 5
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Download the approperate files/jars to, say, MyDocuments. Then in Eclipse, right click your project in Project Explorer, click Build Path -> Config Build Path, Add External Jars. Should work. Update Eclipse, make sure you have all the proper jars (updated versions), veiw build path and make sure it imports into the project. That "should" be that...
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're making a good case for using Maven. Maven excels at gathering together old stuff and making it work long after it's no longer cutting-edge.

I don't think moving to JSF2 is that much of a problem, but I have reservations about the commons-el jar. Several years back, the Tomcat webapp container didn't have built-in EL support and you had to include your own. As of Tomcat 6, the Unifed EL is part of Tomcat itself and any app-supplied EL implementation would have to be removed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!