aspose file tools*
The moose likes JSP and the fly likes  Unable to compile class for JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark " Unable to compile class for JSP" Watch " Unable to compile class for JSP" New topic
Author

Unable to compile class for JSP

Ajoy Sharma
Greenhorn

Joined: Feb 24, 2004
Posts: 9
Hi
iam using J2EETM 1.4 Application Server for dploying and compiling my JSP with beans. Any boduy can help me solve this probelm.
its given error::::
exception
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, followed by a Tomcat restart.
If using an alternate Java compiler, please check its installation and access path.
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:348)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:424)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:448)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:551)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200)

note The full stack trace of the root cause is available in the J2EETM 1.4 Application Server logs.
MY SOURE CODE FOR JSP AND BEAN ARE HERE:
JSP::::
<%-- hello3.jsp --%>
<%@ page import="HelloBean" %>
<jsp:useBean id="hello" class="HelloBean"/>
<jsp:setProperty name="hello" property="*" />
<HTML>
<HEAD><TITLE>Hello</TITLE></HEAD>
<BODY>
<H1>
Hello, <jsp:getProperty name="hello" property="name" />
</H1>
</BODY>
</HTML>

CODE FOR BEAN::
import java.io.*;
import java.util.*;
public class HelloBean {
private String name = "World";

public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
plz help to solve this Problem
john smith
Ranch Hand

Joined: Mar 04, 2004
Posts: 75

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, followed by a Tomcat restart.
If using an alternate Java compiler, please check its installation and access path.

You've tried this and it still doesn't compile?
 
Don't get me started about those stupid light bulbs.
 
subject: Unable to compile class for JSP