put a package name in Company.java and then do an import statement in the top of your JSP to
import my -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, December 27, 2003 4:42 AM To: [EMAIL PROTECTED] Subject: Pls sir, Reply me - immediately Hi sir, Actually, i have developed the 3 file. First one, CreateForm.jsp file and second one is Company.java and another is RetrieveData.jsp. Actually concept is just give the company name,street,city,state,zip and display it. So I have compiled Company.java file and put the class file in c:/tomcat5.0/webapps/Root/WEB-INF/classes. JSP file put in c:/tomcat5.0/webapps/Root/. finally I have run http://127.0.0.1:8080/CreateForm.jsp ( Enter ) Fill the form and submit the form during that time got on 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 An error occurred at line: 2 in the jsp file: /RetrieveData.jsp Generated servlet error: [javac] Compiling 1 source file C:\jakarta-tomcat-5.0.12 \work\Catalina\localhost\_\org\apache\jsp\RetrieveData_jsp.java:6: '.' expected import Company; ^ C:\jakarta-tomcat-5.0.12 \work\Catalina\localhost\_\org\apache\jsp\RetrieveData_jsp.java:42: cannot resolve symbol symbol : class Company location: class org.apache.jsp.RetrieveData_jsp Company company = null; ^ An error occurred at line: 2 in the jsp file: /RetrieveData.jsp Generated servlet error: C:\jakarta-tomcat-5.0.12 \work\Catalina\localhost\_\org\apache\jsp\RetrieveData_jsp.java:44: cannot resolve symbol symbol : class Company location: class org.apache.jsp.RetrieveData_jsp company = (Company) pageContext.getAttribute("company", PageContext.REQUEST_SCOPE); ^ An error occurred at line: 2 in the jsp file: /RetrieveData.jsp Generated servlet error: C:\jakarta-tomcat-5.0.12 \work\Catalina\localhost\_\org\apache\jsp\RetrieveData_jsp.java:47: cannot resolve symbol symbol : class Company location: class org.apache.jsp.RetrieveData_jsp company = (Company) java.beans.Beans.instantiate(this.getClass ().getClassLoader(), "Company"); ^ 4 errors 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:413) org.apache.jasper.compiler.Compiler.compile(Compiler.java:453) org.apache.jasper.compiler.Compiler.compile(Compiler.java:437) 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.12 So kindly tell me How to solved this problem sir, I have attached the my own file and web.xml file with your references. yours faithfully, kumaran. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
