Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

importing class in a jsp using Tomcat

843840Aug 31 2007 — edited Sep 1 2007
Hello All,

Using Tomcat:

I have class here:

examples/WEB-INF/classes/ package/myclass.class

I have a .jsp here:

examples/JSPFolder/myjspfile.jsp

I want to import the class into the jsp.

I have tried the following combinations of importy lines based on previous posts on these boards and each have failed with same error:
Unable to load class for JSP

<%@ page import="myclass" %>
<%@ page import="myclass.*" %>
<%@ page import="package.myclass" %>
<%@ page import="package.myclass.*" %>
<%@ page import="WEB-INF/classes/package/myclass%>

I have seen a number of posts for this same problem, and have tried those solutions as well, but none work. I am sure that this is simply a problem of finding the right directory, as I can successfully run the .jsp file iwhen I remove the import line.

Can someone please help?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 29 2007
Added on Aug 31 2007
3 comments
197 views