Abraham
Abraham

Reputation: 189

Import java class to Jsp in Maven project

I have a project in IDE, so I made a new project in Maven. I copy all the files and classes, and I fill the pom.xml.

This is OK, but the problem is in JSP,eclipse dont find the imported clases.

<%@page import="modelos.Mascota"%>

This import for example cant be resolved. What I'm doing wrong?

All my java classes are in:

\src\main\resources

And jsp files in:

src\main\webapp

Upvotes: 0

Views: 1097

Answers (2)

Ernesto Campohermoso
Ernesto Campohermoso

Reputation: 7391

Your .java files must be in

\src\main\java

Upvotes: 2

Mahamudul Hasan
Mahamudul Hasan

Reputation: 2823

check your dependencies for the class whether it is exist or not

modelos.Mascota

Upvotes: 0

Related Questions