org.apache.jasper.JasperException:Unable to compile class for JSP
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   arun_ramachandran
Posted On:   Friday, September 3, 2004 02:51 AM

Account Insert JSP Page hi all.. i tried to create a EJB component(Entity Bean)and deploy in the J2EE APP SERVER.... the deployment process is a success... when i tried to run my client program written in JSP i get the following error: --------------------------- org.apache.jasper.JasperException:Unable to compile class for JSP No java compiler was found to compile the generated source for the JSP This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK to the common/lib directory of the TOMCAT server..... ---------------------------    More>>
Account Insert JSP Page


hi all..

i tried to create a EJB component(Entity Bean)and
deploy in the J2EE APP SERVER....

the deployment process is a success...

when i tried to run my client program written in

JSP i get the following

error:

---------------------------

org.apache.jasper.JasperException:Unable to compile
class for JSP


No java compiler was found to compile the generated
source for the JSP

This can usually be solved by copying

manually $JAVA_HOME/lib/tools.jar from the JDK

to the common/lib directory of the TOMCAT server.....

---------------------------


i have also tried the procedure given above

i.e.,by copying the tools.jar to the specified

location but still i am getting the same error ...


my client program is:

---------------------------

<%@page contentType="text/html;charset=UTF-8"%>

<%@page pageEncoding="UTF-8"%>

<%@page import="javax.ejb.*" %>

<%@page import="javax.naming.*" %>

<%@page import="javax.naming.InitialContext" %>

<%@page import="javax.rmi.PortableRemoteObject" %>

<%@page import="java.rmi.RemoteException" %>

<%@page import="Account" %>

<%@page import="AccountHome" %>





<%!

private Account account=null;


public void jspInit()

{


try

{

String name=request.getParameter("name");

String id=request.getParameter("id");


InitialContext initial=new InitialContext();

Object obj=initial.lookup
("java:comp/env/ejb/AccountJSP");

AccountHome accountHome=(AccountHome)PortableRemoteObject.narrow(obj,AccountHome.class);


account=accountHome.create(name,id);




} catch (RemoteException ex) {

System.out.println("RemoteException: Couldn't create Account bean."+ ex.getMessage());

} catch (CreateException ex) {

System.out.println("CreateException: Couldn't create Account bean."+ ex.getMessage());

} catch (NamingException ex) {

System.out.println("Unable to lookup
home: "+ "AccountHome "+ ex.getMessage());

} catch(Exception ex) {

System.out.println("Exception:"+ex.getMessage()); }

}


public void jspDestroy() {

account= null;

}


%>




























Enter Name:
Enter Id:





<%=account.getName() %>

<%=account.getId() %>







----------------------------------------------


please help me in solving it out at the earliest..

regards

arun ramachandran
   <<Less
About | Sitemap | Contact