It looks like you forgot to import your CollectionAppService into your JSP:
<%@ page import="your.package.CollectionAppService" %>
But there is a big problem, you do not have to put Java code in your JSP. Instead, you should port your code to a class and call it from a servlet or similar.
The main article for this:
Do not forget that learning is good, but also learning the right way.
After you read your question again, I see this Stacktrace line:
File not found: / Users / sukhpal / Data / Workspaces / J2EE Workspace / CollectionApp / build / classes / com / mut / service / common / Constants.class
I assume that your problem is the Constant class (and your CollectionApp ) inside project B. You are using absolute references to the path from another project that contains these classes, and maybe you are not loading it.
Imagine this situation: you have a web project (project A), and you have several classes that are already doing hard and enjoyable work in another project (project B), which you reuse in most of the projects you work on . In your development environment, you have a link from project A to project B, but then you load project A into your production environment. Thus, when project A wants to call a class from project B, it will never find it, and an exception will be thrown.
The best solution:
- Create a jar from project B.
- In project A, delete all references to project B.
- Add the jar to project A and install it in the build path.
- Load your project A into production.
source share