Showing posts with label J2SE. Show all posts
Showing posts with label J2SE. Show all posts

Sunday, May 26, 2013

Call EJB 3.0 session bean from JSP

  • <%@page import="com.simple.ejb.SimpleCalcRemote"%><html>   
  •     <%  
  •     javax.naming.InitialContext ic = new javax.naming.InitialContext();  
  •     SimpleCalcRemote sb = (SimpleCalcRemote)ic.lookup("simplecalc");  
  •     String result = sb.sayHello("myname");  
  •     out.println(result);  
  •     %> 
  • [SOLVED] ERROR Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource


    To fix it copy the file here (e.g. ~/glassfish-v2ur2/domains/domain1/lib/ext/mysql-connector-java-5.1.5-bin.jar ), restart the domain and try again.

    DOWNLOAD