I begun this Spring MVC Step-By-Step Tutorial part 1 at 1.8 it says
“If you are using an IDE, you will want to configure your project’s build path by adding the jars from the ‘lib’ directory. You will also want to add servlet-api.jar from your servlet container’s ‘lib’ directory (‘${appserver.lib}’). Adding these to your build path should successfully resolve all the import statements in the ‘HelloController.java’ file.”
I add jars in the ‘lib’ folder but the issues does not solves. I could not figure out how to configure the build path. Can any one help. Thanks
Right-click on your project root and select
Build Path->Configure Build Path.... Select theLibraries-tab and clickAdd JARs.... Navigate to your projects’lib-folder and select the .jar -files, then clickOk.Edit:
From the comment below:
If you have multiple projects that use the same jar-archive or archives, you can define a User library for your Eclipse-installation: Select
Window->Preferences, thenJava->Build Path->User Libraries. ClickNew, give a name to your user library and clickOk. Select the User library you just added, and clickAdd JARs..., navigate to the jar you want to add to the library and clickOk. Note that single User library can contain multiple jars (such as all needed Spring-jars, like core, webmvc, tx…), so you can keep repeating theAdd JARs...-step.When you want to use the defined user library in your project, go to the
Libraries-tab in your projects’ Build Path, and clickAdd Library, then selectUser Libraryand clickNext. Now you can pick the library from your user libraries you’ve defined.