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.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Welcome to Tomcat</display-name>
<description>
Welcome to Tomcat
</description>
<!-- JSPC servlet mappings start -->
<servlet>
<servlet-name>org.apache.jsp.index_jsp</servlet-name>
<servlet-class>org.apache.jsp.index_jsp</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>org.apache.jsp.index_jsp</servlet-name>
<url-pattern>/index.jsp</url-pattern>
</servlet-mapping>
<!-- JSPC servlet mappings end -->
<!-- JSPC servlet mappings start -->
<servlet>
<servlet-name>Company</servlet-name>
<servlet-class>Company</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Company</servlet-name>
<url-pattern>/Company.java</url-pattern>
</servlet-mapping>
<!-- JSPC servlet mappings end -->
</web-app>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]