actually i tried to store the data in DB by using reading data from html forms and then by using the java beans store the data in DB but i foound a error while after clicking the submit button.
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: 9 in the jsp file: /product.jsp
info.inetsolv.ProductJB cannot be resolved to a type
6: Double dprice=Double.parseDouble(vprice);
7: %>
8: <%
9: info.inetsolv.ProductJB prod=new info.inetsolv.ProductJB();
10: prod.setPid(ipid);
11: prod.setPname(pname);
12: prod.setPrice(dprice);


An error occurred at line: 9 in the jsp file: /product.jsp
info.inetsolv.ProductJB cannot be resolved to a type
6: Double dprice=Double.parseDouble(vprice);
7: %>
8: <%
9: info.inetsolv.ProductJB prod=new info.inetsolv.ProductJB();
10: prod.setPid(ipid);
11: prod.setPname(pname);
12: prod.setPrice(dprice);


An error occurred at line: 11 in the jsp file: /product.jsp
pname cannot be resolved
8: <%
9: info.inetsolv.ProductJB prod=new info.inetsolv.ProductJB();
10: prod.setPid(ipid);
11: prod.setPname(pname);
12: prod.setPrice(dprice);
13: prod.storeProduct();
14: %>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateCla ss(JDTCompiler.java:439)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:334)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:312)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:299)
org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.20


these are my jsp file and java bean

prod.jsp
<%
String vpid=request.getParameter("pid");
String vpname=request.getParameter("pname");
String vprice=request.getParameter("price");
int ipid=Integer.parseInt(vpid);
Double dprice=Double.parseDouble(vprice);
%>
<%
info.inetsolv.ProductJB prod=new info.inetsolv.ProductJB();
prod.setPid(ipid);
prod.setPname(pname);
prod.setPrice(dprice);
prod.storeProduct();
%>
data stored in db<br>
<a href="product.html">click here to add new product</a>


ProductJB.java

package info.inetsolv;
import java.sql.*;
public class ProductJB{
int pid;
String pname;
double price;
public void setPid(int pid){
this.pid=pid;
}
public int getPid(){
return pid;
}
public void setPname(String pname){
this.pname=pname;
}
public String getPname(){
return pname;
}
public void setPrice(String price){
this.price=price;
}
public double getPrice(){
return price;
}
public void storeProduct() throws SQLException{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection con=DriverManager.getConnection("jdbc:oracle:thin: @localhost:1522:xe","system","manager");
String query="insert into product values(?,?,?)";
PreparedStatement pstmt=con.prepareStatement(query);
pstmt.setInt(1,pid);
pstmt.setString(2,pname);
pstmt.setDouble(3,price);
pstmt.executeUpdate();
System.out.println("data is stored successfully");
}
}


please help me resolve this.............:-)