File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Using a custom class within a JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Using a custom class within a JSP page " Watch "Using a custom class within a JSP page " New topic
Author

Using a custom class within a JSP page

Alex Guy Hollis
Greenhorn

Joined: Dec 21, 2007
Posts: 6
Hello,

This is very likely to be an issue with my IDE rather than JSP but I'm not sure.

I have read up on JSP and I'm having my first crack at it. It's all been going well up until I created a bean class (some people may protest that it is not a bean) which when the primary key is changed it pops off to the database and reloads it's data.
When I came use it in my JSP page I kept things quite simple passing it a known number.


however it reports that "The import DivisionBean cannot be resolved". I realise that this means exactly what it says on the tin but I am unsure of where to put the class file so that it can be found.

I'm using eclipse and although the IDE knows what I'm refering to it cannot reference it.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You'll need to package your beans.

See:
http://faq.javaranch.com/java/BeansNotFound
And:
http://faq.javaranch.com/java/PackageYourBeans
to find out why.
[ December 27, 2007: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Alex Guy Hollis
Greenhorn

Joined: Dec 21, 2007
Posts: 6
ah hah! the default class is evil!

Thanks Ben, Merry Christmas too (if its not considered too late)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using a custom class within a JSP page
 
Similar Threads
JSP:Include question
using jsp:useBean
Error 500 from struts-el tags
jsp + javabean path
jsp/ejb connection complications, please help