• Post Reply Bookmark Topic Watch Topic
  • New Topic

calling problem  RSS feed

 
michael yue
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a bean and the bean would call another class. The problem is the class is up one level from the current directory. Example, my bean is in web-inf/classes/User while the class i want to call is in web-inf/classes.
Is there anyway I can call the class. Thanks
 
aitor alzola
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
Just do the import statement and call the class.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like the real problem is that no package is defined for the class that is "up one directory"... Put a package statement in the class in question and place it in an appropriate directory hierarchy in the /WEB-INF/classes folder. Most app servers require that your class be in a package so that it can be correctly found/instantiated by the app server's classloader.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!