Invoking classes from a jsp that have no package
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ramon_Valdez
Posted On:   Friday, March 9, 2007 07:08 PM

I´m using JDK 1.5 and Tomcat 5.5.20 to try to invoke classes with no packages (in the default folder "WEB-INF/classes") from a jsp but I get the error:

The import ConnectionPool cannot be resolved
ConnectionPool cannot be resolved to a type

My code to import the class in the jsp is:

<%@page import="ConnectionPool"%>

The error is thrown when I attempt to use my public constructo r from ConnectionPool.

It was working fine with older versions of tomcat and in jdk 1.4 what could be wrong?

Re: Invoking classes from a jsp that have no package

Posted By:   Anonymous  
Posted On:   Friday, March 9, 2007 09:59 PM

Found this about upgrading form tomcat 4 to 5:


If your app uses packageless classes -- that is, you use bare ClassName and not some.package.ClassName -- you must package them. This is required by the servlet spec 2.4, and Tomcat enforces it
About | Sitemap | Contact