I install JBOSS and Tomcat like this:
D:\JBoss-2.2.2
D:\jakarta-tomcat-3.2.3
and make JBOSS's example : interest successfully,
I put interest.jar to D:\JBoss-2.2.2\deploy,
starting JBOSS, test with InterestClient, PASS!!!
then I copy the InterestClient's code
try
{
// Get a naming context
InitialContext jndiContext = new InitialContext();
System.out.println("Got context");
// Get a reference to the Interest Bean
Object ref = jndiContext.lookup("interest/Interest");
System.out.println("Got reference");
// Get a reference from this to the Bean's Home interface
InterestHome home = (InterestHome)
PortableRemoteObject.narrow(ref, InterestHome.class);
// Create an Interest object from the Home interface
Interest interest = home.create();
// call the calculateCompoundInterest() method to do the calculation
System.out.println("Interest on 1000 units, at 10% per period, compounded over 2 periods is:");
System.out.println(interest.calculateCompoundInterest(1000, 0.10, 2));
}
catch(Exception e)
{
System.out.println(e.toString());
}
to Tomcat's servlet example: HelloWorldExample.Java
pass the compile
when I try URL
http://127.0.0.1:8080/examples/servlet/HelloWorldExample
Tomcat console show exception:
javax.naming.CommunicationException: Can't find SerialContextProvider
Any idea? thanks
See http://www.jboss.org/documentation/HTML/ch13.html#howtotomcat
for information on how to get Tomcat and JBoss to talk together.