• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using a custom class within a JSP page

 
Alex Guy Hollis
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Alex Guy Hollis
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ah hah! the default class is evil!

Thanks Ben, Merry Christmas too (if its not considered too late)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic