How do I make Eclipse automatically include jars I place in my WEB-INF/lib folder into my project?

When I was doing JSP/Servlet programming, whenever I dropped 3rd party libraries into the WEB-INF/lib folder, they were automatically included in the project classpath. In GWT, this is not the case. Anyone know why? I loved how easy this was in JSP and I'd like these jars to be included automatically the same way.

Answer:1

If you are using the Google Plugin for Eclipse then my understanding is that a Google Web Application Project is just not the same animal than a Dynamic Web Project and thus behave differently. So if your project depends on libraries not provided by the GWT and App Engine SDKs, you'll need to put them in war/WEB-INF/lib and to add them explicitly to your Java build path.

Answer:2

In Eclipse Galileo, right click the web project and select build path then select the Java EE Module Dependencies and add the jars.

Answer:3

There is a plug-in technique that may help you if you want a directory where new jars are automatically updated in your build path, see this other post:

Eclipse buildpath automatically taking all JARs of a internal directory

The reason it works like this for your JSP's is because that is how the Dynamic Web Project was made to behave.

"If you remove a library path entry but not the JAR file, the library entry will be re-added to the path automatically." from http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.wst.webtools.doc.user/topics/ccwebprj.html

Answer:4

what is the difference between facade design and abstraction in java? i simply feel that it is as simple as interface in java and serve the same purpose. I saw more about people saying that it is a ...

I have a List, and I want to loop through that List and remove some record base on some condition. Here is what I do public void foo(List<Bar> recordList){ for(Bar bar : recordList){ ...

I have a class that extends Application, called MyApplicaton, that I use to store global variables, i.e., variables I want to be able to access anywhere throughout my android app. In activites, I get ...

We have a web application that allows users to upload photos which will then be displayed in a specified page after upload. The upload module places the images inside the exploded war directory, e.g. ...