Greetings,
I'm trying to compile a very simple example of a
custom JavaBeans class to be used on a JSP page; The
class compiles correctly and goes to my web
application classes directory
(webapps/example/WEB-INF/classes). Here is the bean
code (very simple):
/*
* UserBean.java
*
* Created on May 4, 2004, 5:33 AM
*/
public class UserBean {
private String _name;
private String _age;
private String _weight;
public UserBean() {
// Empty on purpose
}
public void setName(String name_) { _name = name_;
}
public void setAge(String age_) { _age = age_; }
public void setWeight(String weight_) { _weight =
weight_; }
public String getName() { return _name; }
public String getAge() { return _age; };
public String getWeight() { return _weight; }
}
I try to import it on my JSP page like this:
<[EMAIL PROTECTED] contentType="text/html"%>
<[EMAIL PROTECTED] session="true"%>
<[EMAIL PROTECTED] errorPage="error/index.jsp" %>
<[EMAIL PROTECTED] import="java.util.Vector"%>
<[EMAIL PROTECTED] import="UserBean"%>
But when i try to load the page I get the following
error:
StandardWrapperValve[indice]: Servlet.service() for
servlet indice threw 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.
at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128)
at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:348)
at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:455)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
If i took out that command my page gets compiled
correctly, even if I use expression and other JSP
tricks.
I'm using:
RedHat 9, 2.4.20-28.9
Java(TM) 2 Runtime Environment, Standard Edition
(build 1.4.0_01-b03)
Sun jwsdp-1.3
Any ideas?
Thanks in advance,
JV.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]