|
Classpath
To explain how Run-Jetty-Run load jars
Featured IntroductionWe are going to talk about the Classpath details in Run-Jetty-Run. There are two classpaths we need to discuss it here. Jetty Container ClasspathUsed for our bootstrap . It's seldom changed in general development case.
Web App classpathIn a general wab app , it's the classes/jars in WEB-INF/classes and WEB-INF/lib
Web App Classpath DetailsHow to check what classpath RJR is loading ?It will load the all the Classpath in your Java Build Path , it locate at project context menu -> properties -> Java Build Path. You could also check/edit the classpath in Webapp Classpath Tab of RJR RunConfiguration.
How to add new classpaths to web context ?There's two way to change web context classpath
Or
Note: It's better to change the project classpath instead of changing classpath of RJR Configuration. How to exclude some unused jars
Jetty Classpath Details
(It's the view since the 1.2.1 and a bit different in past,we use container to handle the Classpath to avoid the absolute path.)
Note: Usually you don't need to add any container Classpath here , all the framework/lib like Spring/Hibernate/Struts , it's web app stuff and should be placed in WebApp classpath, not containers.
More#1 Actually it's not loading the source folder . if you do have resources or java classes in source , but you got a ClassNotFound or 404 , please check if your target output folder exist the mapping class or resource, sometime clean the project may make it work.(It's usually a defect for Eclipse builder.) If it's not working as expect , please post a bug. |