hello,
how can i access a variable or object defined in a java class to my jsp in same project?

You can import the class and be able to access it inside the jsp

<%@ page import="package1.myClass1,package2.myClass2,....,packageN.myClassN" %>

For example if you have

package test;
Class My {
String name = "Test";
}

Then you can import by

<%@ page import="test.My" %>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.