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

Where do beans go for Jetspeed  RSS feed

 
Chris Garrison
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to write a porlet for Jetspeed. (im not sure why they made jetspeed so complicated - my little vent :roll: )
I'm using a jsp which resides in:
webapps\jetspeed\WEB-INF\templates\jsp\portlets\html\thecode.jsp
I have no idea why a path so wacky is required but anyway....
Heres my declaration in the jsp:
<jsp:useBean id="theBean" scope="application" class="UFSBean"/>
I've put the bean in several different places but I keep getting errors. I've put it in the directory above, I've also put it under web-inf/classes.
Where does the bean go?
[ September 02, 2003: Message edited by: Chris Garrison11 ]
 
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
I have no experience with Jetspeed per se, but if it follows the Servlet Spec, your class hierarchy needs to be rooted at /WEB-INF/classes.
Note that your beans, as well as other classes, need to be in a package other than the default or the container may not be able to load it.
hth,
bear
 
Chris Garrison
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed!
The beans must go in a package inside webinf/classes
1.)In my tests I had to declare the package in the bean -- e.g:
package beans;
public class XXXXBean{
private String cooky = null;
private int counter = 0;

public String getCooky(){
return cooky;
.....
2.) put this bean class in a package called "beans" -- e.g.:
web-inf/classes/beans
3.) in your jsp use this format (specify the bean with package)
jsp:useBean id="theBean" scope="application" class="beans.XXXBean"
Thanks for the help
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!