Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Beans  RSS feed

 
shuzo monsoon
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone! I have created some classes in java which I want to use within JSP pages but whenever i actually use the <useBean> method the class is never found. I have placed the class itself in the WEB-INF/classes folder under my own directory and specify this in the bean name, i.e. "class=Catalogue.Connection" but the name is not recognised. Could anyone tell me if I am placing my classes in the right place? or if perhaps there is another way to include them in the JSP files?
Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WEB-INF/classes is the correct place to root the package hierarchy. Therefore the class file for your Catalogue.Connection bean (btw, it's more conventional to not uppercase package names) should be:
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!