Reputation: 125
I have configured Jetty at my Project (Eclipse Neon).
I've created index.jsp
under WebContent
folder, and my Java class is under WebContent/WEB-INF/classes/foo
. The class name is FooClass.java
.
At index.jsp
, I've set this:
<jsp:useBean id="R1" class="foo.FooClass"/>
Eclipse is alerting me on the useBean tag saying foo.FooClass
is an undefined type. What have I done wrong?
Upvotes: 0
Views: 3057
Reputation: 20003
Unless WebContent/WEB-INF/classes
is listed on the project's Java Build Path as a Class Folder or a Source Folder, and not just an output folder that you've added the class file to yourself, it won't be found by anything the project attempts to compile or validate.
Upvotes: 2