This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript 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: 66142
141
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:
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!