aspose file tools*
The moose likes Tomcat and the fly likes problem using my class in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "problem using my class in JSP" Watch "problem using my class in JSP" New topic
Author

problem using my class in JSP

Orli Klinger
Greenhorn

Joined: Jun 02, 2004
Posts: 2
Hello everyone,

I'm having trouble using a class I defined in a JSP.
I placed my class in:
C:\Program Files\jakarta-tomcat-4.1.30\webapps\servlets\WEB-INF\classes
and I was able to compile it in Eclipse and use it in servlets.

In the JSP I write:


And I get this error message:


I am able to use classes like Date by the way...
What am I doing wrong?
Any help would be greatly appreciated.

Thanks.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
Sounds like the common problem that happens when you use a class not declared in a package and/or not imported correctly.
Put your class in a package and recompile - be sure to locate the class file under WEB-INF/classes using the package name.
In your JSP you must import the package or use the fully qualified class name.
Bill
Orli Klinger
Greenhorn

Joined: Jun 02, 2004
Posts: 2
Thank you!
It works now
All I had to do was put it in a package
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem using my class in JSP