• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP calls EJB in jboss

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I call EJB from client with JavaApp( not JSP) I must have some
interface e.g: HomeInterface , a Interface which extends EJBObject.
And I run my program successful.
But JSP Page which call EJB is on server(run JBOSS with Jetty).
Where do I put class interface in JBOSS for my JSP Page use it?
Thank you very much!
 
Author
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can put it where you put all your other classes. Typically:
1 - in WEB-INF/classes
2 - in a jar in WEB-INF/lib
 
Imposter
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I zip my web-folder into file with extension war(class file I copied into folder classes of WEB-INF).Then I copy this file
into folder server/default/deploy in JBoss(Jetty integrated)But Error message appear when I run my jsp page as follow:

HTTP ERROR: 500 Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file [javac] C:\DOCUME~1\C018D8~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080__cuong\MyJSP_jsp.java:16: cannot resolve symbol [javac] symbol : class UserHome [javac] location: class org.apache.jsp.MyJSP_jsp [javac] UserHome userHome; [javac] ^ [javac] C:\DOCUME~1\C018D8~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080__cuong\MyJSP_jsp.java:17: cannot resolve symbol [javac] symbol : class UserSbHome [javac] location: class org.apache.jsp.MyJSP_jsp [javac] UserSbHome usersbHome; [javac] ^ [javac] C:\DOCUME~1\C018D8~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080__cuong\MyJSP_jsp.java:62: cannot resolve symbol [javac] symbol : class UserSbHome [javac] location: class org.apache.jsp.MyJSP_jsp [javac] usersbHome = (UserSbHome)context.lookup("UserSb"); [javac] ^ [javac] C:\DOCUME~1\C018D8~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080__cuong\MyJSP_jsp.java:63: cannot resolve symbol [javac] symbol : class UserHome [javac] location: class org.apache.jsp.MyJSP_jsp [javac] userHome = (UserHome)context.lookup("UserBean"); [javac] ^ [javac] C:\DOCUME~1\C018D8~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080__cuong\MyJSP_jsp.java:89: cannot resolve symbol [javac] symbol : class User [javac] location: class org.apache.jsp.MyJSP_jsp [javac] User[] usrs = userSb.findAll(); [javac] ^ [javac] C:\DOCUME~1\C018D8~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080__cuong\MyJSP_jsp.java:89: cannot resolve symbol [javac] symbol : variable userSb [javac] location: class org.apache.jsp.MyJSP_jsp [javac] User[] usrs = userSb.findAll(); [javac] ^ [javac] C:\DOCUME~1\C018D8~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080__cuong\MyJSP_jsp.java:97: cannot resolve symbol [javac] symbol : class FinderException [javac] location: class org.apache.jsp.MyJSP_jsp [javac] catch(FinderException e) [javac] ^ [javac] 7 errors
Thank you for all your help!
[ August 07, 2003: Message edited by: Nguyen Sa ]
 
norman richards
Author
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two dumb things to check:
1 - did you import the classes "<%@ page import="com.whatever.User" %>
2 - Did you put the jar file with them in the WEB-INF/lib directory? Does the jar file really contain the classes you need? Manually verify this.

If you just can't get it to load, go to the JMX console and look for
the jboss.web section. Inside of there, look for an MBean for your context. It will look something like this:
JBossWebApplicationContext=3,Jetty=0,context=/yourApp
Click on the MBean and look at the "classPath" attribute. What do you see? Is your class in a jar in the classpath for the webapp?
reply
    Bookmark Topic Watch Topic
  • New Topic