java build path for Tomcat inside Eclipse? [message #175534] |
Wed, 26 July 2006 21:17 |
Eclipse User |
|
|
|
Originally posted by: jwoofy.hotmail.com
I experienced building and running POJO applications with Eclipse, and
decent at web applications but not using Eclipse. Now I'm moving to
Eclipse's web development. It's a slick environment.
When I run my JSP/Servlet application from Eclipse, it throws a
NoClassDefFoundError. The class is definitely in the Java Build Path and
the code compiles. I think that Tomcat can't find the class. Where should
it reside? When I use Eclipse to run the server, how do I tell it to move
the class files? Finally, when I link another project, how do those files
move to the directory for Tomcat?
Do I need to put .jars in some directory before I hit server run?
Thanks
|
|
|
Re: java build path for Tomcat inside Eclipse? [message #175576 is a reply to message #175534] |
Thu, 27 July 2006 13:40 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
For dependencies that need to go in your web project's WEB-INF/lib, and
you don't want to physically add the jar to the WEB-INF/lib, add it to
the project using J2EE Module Dependencies in the project properties.
This will add the dependency to the build path as well as include it in
the WEB-INF/lib when the web application is copied to the server. In
the case of adding another project as a dependency, that project's
classes will be placed in a jar with the same name of the project and
included in WEB-INF/lib.
If the dependency is also specified in the Java Build Path, remove it.
It will confuse the J2EE Module Dependencies page if also on the build
path (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=151732).
Cheers,
Larry
Jeff wrote:
> I experienced building and running POJO applications with Eclipse, and
> decent at web applications but not using Eclipse. Now I'm moving to
> Eclipse's web development. It's a slick environment.
>
> When I run my JSP/Servlet application from Eclipse, it throws a
> NoClassDefFoundError. The class is definitely in the Java Build Path and
> the code compiles. I think that Tomcat can't find the class. Where should
> it reside? When I use Eclipse to run the server, how do I tell it to move
> the class files? Finally, when I link another project, how do those files
> move to the directory for Tomcat?
>
> Do I need to put .jars in some directory before I hit server run?
>
> Thanks
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02547 seconds