Bookmark Topic Watch Topic
  • New Topic

no compiler found for the jsp code in eclipse galilio ide

 
kunal green
Greenhorn
Posts: 26
Tomcat Server
  • Mark post as helpful
  • send pies
  • Report post to moderator
my jsp file is
-----------------------------------------------------------
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%@ page import="HelloClass" %>
<jsp:useBean id="kk" scope="session" class="HelloClass"/>
kunal
<%out.println("message to be shown");
kk.setA(8);
out.println(kk.getA());
%>
</body>
</html>

bean clsass is:
-------------------------------

public class HelloClass
{
int a;
public HelloClass()
{

}

public int getA()
{
a++;
return a;
}

public void setA(int a)
{
this.a=a;
}
}

on running it on ecplise i m getting the folloing error
HTTP Status 500 -

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

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

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:128)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:418)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:461)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:442)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
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)


note The full stack trace of the root cause is available in the Tomcat logs.


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

Apache Tomcat/5.0.13

please help me out
please
its really urgent for me stuck on this error for 2 days
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Report post to moderator
The error message contains specific advice on what to do to resolve the issue; what was the result of you doing that?
 
cow clarke
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Report post to moderator


Don't you think there is something wrong in the import statement. Here <%@ page import="HelloClass" %> shoud be some pakage.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
kunal,

Please do not discuss the same question in multiple forums. Let's continue this discussion in your duplicated thread here http://www.coderanch.com/t/86667/Tomcat/Unable-compile-class-JSP-No. Closing this one.
 
    Bookmark Topic Watch Topic
  • New Topic