Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » java build path for Tomcat inside Eclipse?
java build path for Tomcat inside Eclipse? [message #175534] Wed, 26 July 2006 21:17 Go to next message
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 Go to previous message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
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
>
>
Previous Topic:Error creating JBoss 3.2.6 server runtime eclipse 3.2 (wtp 1.5)
Next Topic:Another problem with starting JSPs in 3.2
Goto Forum:
  


Current Time: Wed Sep 17 09:52:35 GMT 2014

Powered by FUDForum. Page generated in 0.01878 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software