|Re: Getting Java (DynWeb) Build Path to work correctly [message #647987 is a reply to message #647402]
||Mon, 10 January 2011 17:14
| k d
Registered: January 2011
I just went through this process myself. While I may not be the best source on this, as I am still learning how to use Eclipse/Tomcat, if this is off base, I suspect the corrections will flow |
My application has 2 projects A and B. A has some higher level Java model classes, needing several jars. I set this up as a Java project, with a lib folder. To get proper compilation, I needed to specify the jars via the prefs|JBP|library "external jars" option, as the other options seemed inappropriate.
Project B has java and jsp classes, so I set this up as a DynamicWebProject. In the JavaBuildPath, I specified A as required. I then needed to specify project A's jars and source as exportable, so that B could use them.
I initially used this same external jars approach for project B's jars under WEB-INF/lib. However, at some point I noticed that these jars were already specified (in prefs | JBP|libraries WebApp libraries) so I removed the external jars references. So it appears that Eclipse will automatically find the WEB-INF/lib jars, at least in a DynamicWebProject.
Also these Export options seem to be for compilation only, Deploying has a separate process. When I build the .war file (File|export|web|War file), I needed to specify the prefs|DeployAssembly options: A needed src, and the jars in its lib file; B needed jsp path, and A jar
Powered by FUDForum
. Page generated in 0.01768 seconds