Posted By:
Manish_Sharma
Posted On:
Friday, April 12, 2002 04:47 AM
I have this JSP page calling a JavaBean: <%@ page import="LibWeb.asms.Employee"%> using java beans from jsp Welcome to the company, <%=staff.getName()%>,please visit VisualBuilder.com to get more out of life! and i have this error while execution of JSP Error: 500 Location: /LibWeb/asms/first.jsp Internal Servlet Error: org.apache.jasper.JasperException: Unable to compile class for JSP/apl07/libweb/jakarta-tomcat-3.2.1/work/localhost_8080%2FLibWeb/_0002fasms_0002ffirst_0002ejspfirst_jsp_0.java:15: Class LibWeb.asms.Employee not found in import. impo
More>>
I have this JSP page calling a JavaBean:
<%@ page import="LibWeb.asms.Employee"%>
using java beans from jsp
Welcome to the company,
<%=staff.getName()%>,please visit VisualBuilder.com to get more out of life!
and i have this error while execution of JSP
Error: 500
Location: /LibWeb/asms/first.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for JSP/apl07/libweb/jakarta-tomcat-3.2.1/work/localhost_8080%2FLibWeb/_0002fasms_0002ffirst_0002ejspfirst_jsp_0.java:15: Class LibWeb.asms.Employee not found in import.
import LibWeb.asms.Employee;
^
1 error
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at javax.servlet.ServletException.(Compiled Code)
at org.apache.jasper.JasperException.(Compiled Code)
at org.apache.jasper.compiler.Compiler.compile(Compiled Code)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(Compiled Code)
at org.apache.jasper.servlet.JasperLoader.loadJSP(Compiled Code)
at org.apache.jasper.servlet.JspServlet.loadJSP(Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled Code)
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code)
at org.apache.tomcat.core.Handler.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
at org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
at org.apache.tomcat.core.ContextManager.service(Compiled Code)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compiled Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)
whats wrong?
my bean code:
package asms;
class Employee{
private String String_name;
public String getName()
{
return String_name;
}
public void setName(String name)
{
String_name = name;
}
public static void main(String args[]){
System.out.println("Manish");
}
}
on compiling the java file Employee.java we get the class file which gets executed but when we try to run the jsp file from the browser then we get the error as shown above.....i think we r not able to specify the path in the import statement..
Please help us out...
Do we have to compile the jsp file also...? if so how ...
Wht is the correct way to set the import path to be specified in the import stmt in the jsp?