• Post Reply Bookmark Topic Watch Topic
  • New Topic

Refering EJB in jar from JSP in war

 
Poornachandran R
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai all,
I have create an EAR containing both JAR and WAR. This JAR contains an EJB component and the WAR contains a JSP which uses the EJB component. But I am getting compilation errors from that JSP saying the Home and Remote are not resolved. ie "Cannot resolve symbol". If i set the classpath in "startweblogic.cmd" for the JAR, it works fine. How to do without setting the classpath ?
Thanks a lot
Poorna
 
HanMing Low
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You can either include the EJB's home and remote classes in your war or generate an application client jar and include the jar in your war.
I don't think it is a good idea to include the jar on your server classpath as it'll be very difficult to debug when you experience any name conflict.
Hope this helps.
Cheers.

Han Ming
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!