I’m trying to learn Spring 3. I have a class where I’m trying to do these two imports:
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
Eclipse is telling me that neither import can be resolved, but I have org.spring
framework.web.servlet-sources-3.1.0.M1.jar in my classpath, and I have verified for a fact, by way of running it through jar -tf, that both of the above classes are in this jar. Can anyone explain to me what the problem is?
-sources.jars usually just contain the original .java source files, not the compiled .class files. Find the version of the same jar without-sourcesin it’s name and add that to your classpath.