I have installed Tomcat via the easyapache utility in the WHM. The Tomcat got installed okay. Following are the versions:
apache-tomcat-5.5.25
jdk1.6.0_02
I have enabled Servlet support for an Account. JSPs are working fine under the public_html folder. However, the moment I place the SAME JSP inside any folder (in the public_html folder) I get the following error:
org.apache.jasper.JasperException: /test2.jsp(2,0) The value for the useBean class attribute validation.FieldValidations is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1175)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1117)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2222)
org.apache.jasper.compiler.Node$Root.accept(Node.java:457)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
org.apache.jasper.compiler.Generator.generate(Generator.java:3322)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.
The Test.jsp which I'm tying to run is:
<%@page language = "java" import="java.io.*,java.util.*,java.sql.*,java.net.InetAddress,javax.servlet.http.Cookie" %>
<jsp:useBean id = "validate" scope="page" class="validation.FieldValidations" />
<jsp:useBean id="ConnectionBean" scope="session" class="poolcon.ConnectionPool" />
<jsp:useBean id="orderidbean" scope="page" class="RngPack.RandomApp" />
<%
validate.setValueForAlfaNumeric("DUMMY_123'");
String s_name=validate.getValueForSchar();
out.println("AAAAAAA"+s_name);
%>
<html>
Hello test
</html>
Now, I know that the Bean is NOT accessible to my JSP within any folder. And yes the package "validation" is present under /account/public_html/WEB-INF/classses. I further confirmed this with the help of the following code:
<html>
<head><title>Loading a class</title></head>
<body>
<%
String myClass = "validation.FieldValidations" ;
try{
Class.forName( myClass );
out.println("Class " + myClass + " found on the classpath") ;
}catch(ClassNotFoundException e) {
out.println("<font color=\"red\">Class " + myClass + " not found on the classpath</font>") ;
}
%>
</body>
</html>
If I run this JSP inside any folder within the public_html it shows that the relevant class is not present in the CLASSPATH. If I run this JSP in public_html of the account, then the Class is found. I'm running the exactly the same versions of Tomcat and JDK on the development machine and everything works fine.
I shall be really grateful if someone could help me with this. Is this because I have installed Tomcat via easyapache?????
apache-tomcat-5.5.25
jdk1.6.0_02
I have enabled Servlet support for an Account. JSPs are working fine under the public_html folder. However, the moment I place the SAME JSP inside any folder (in the public_html folder) I get the following error:
org.apache.jasper.JasperException: /test2.jsp(2,0) The value for the useBean class attribute validation.FieldValidations is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1175)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1117)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2222)
org.apache.jasper.compiler.Node$Root.accept(Node.java:457)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
org.apache.jasper.compiler.Generator.generate(Generator.java:3322)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.
The Test.jsp which I'm tying to run is:
<%@page language = "java" import="java.io.*,java.util.*,java.sql.*,java.net.InetAddress,javax.servlet.http.Cookie" %>
<jsp:useBean id = "validate" scope="page" class="validation.FieldValidations" />
<jsp:useBean id="ConnectionBean" scope="session" class="poolcon.ConnectionPool" />
<jsp:useBean id="orderidbean" scope="page" class="RngPack.RandomApp" />
<%
validate.setValueForAlfaNumeric("DUMMY_123'");
String s_name=validate.getValueForSchar();
out.println("AAAAAAA"+s_name);
%>
<html>
Hello test
</html>
Now, I know that the Bean is NOT accessible to my JSP within any folder. And yes the package "validation" is present under /account/public_html/WEB-INF/classses. I further confirmed this with the help of the following code:
<html>
<head><title>Loading a class</title></head>
<body>
<%
String myClass = "validation.FieldValidations" ;
try{
Class.forName( myClass );
out.println("Class " + myClass + " found on the classpath") ;
}catch(ClassNotFoundException e) {
out.println("<font color=\"red\">Class " + myClass + " not found on the classpath</font>") ;
}
%>
</body>
</html>
If I run this JSP inside any folder within the public_html it shows that the relevant class is not present in the CLASSPATH. If I run this JSP in public_html of the account, then the Class is found. I'm running the exactly the same versions of Tomcat and JDK on the development machine and everything works fine.
I shall be really grateful if someone could help me with this. Is this because I have installed Tomcat via easyapache?????