Database connection to jsp page

I have a data entry form in HTML and done validation in javascript.
From that form the values entered by the user, is displayed on JSP page by method.
<%=request.getParameter(" ")%
MY problem is:
i want that the values shown by the jsp page, is submitted or saved into database automatically, when i click submit button on the page.
How can i do this.
I have to use jdbc driver to make a connection for the database.
plzz help me, as it is very urgent.
my jsp page is as follow:
<%@ page language="java" import="java.sql.*" %>
<html>
<head>
<title></title>
<body>
<%
try {
//Load the jdbc driver
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//Create a connection object
Connection con=DriverManager.getConnection("jdbcdbc:jspsql","java","java");
System.out.println("got connection");
// Create a statement object and call its executeUpdate method to insert a record
Statement s=con.createStatement();
String sql = "INSERT INTO Gl_Mast VALUES ('1','ABHI','120','520')";
s.executeUpdate(sql);
// Step 4. Use the same Statement object to obtain a ResultSet object
sql = "SELECT GL_CODE, GL_DESCR FROM Gl_Mast";
ResultSet rs = s.executeQuery(sql);
while (rs.next()) {
out.println(rs.getString(1) + " " + rs.getString(2) + "<br>");
rs.close();
s.close();
con.close();
catch (ClassNotFoundException e1) {
// JDBC driver class not found, print error message to the console
System.out.println(e1.toString());
catch (SQLException e2) {
// Exception when executing java.sql related commands, print error message to the console
System.out.println(e2.toString());
catch (Exception e3) {
// other unexpected exception, print error message to the console
System.out.println(e3.toString());
%>
<form name="display" ACTION="" >
<table width="100%" border="3">
<tr>
<TD COLSPAN=5><center><h3><b><i>GL MASTER INFORMATION</i></b></h3></center></TD>
</TR>
<tr>
<th>Code No.</th>
<th>Description</th>
<th>Dr. Amount</th>
<th>Cr. Amount</th>
<th>Type</th>
</tr>
<tr>
<td> <%=request.getParameter("code")%></td>
<td> <%=request.getParameter("Description")%></td>
<td> <%=request.getParameter("DrAmount")%></td>
<td> <%=request.getParameter("CrAmount")%> </td>
<td> <%=request.getParameter("type")%></td>
</tr>
</table>
<p>
<INPUT TYPE="submit" VALUE="SAVE" >
<INPUT TYPE="button" VALUE="BACK" onClick="history.go(-1)">
</body>
</html>
thanx..
abhijit

X POST

Similar Messages

  • How to establish a MYSQL Database connection in JSP page.

    Hi People,
    Tell me how to establish mysql database connection in JSP page.
    Needed details on:
    1) what are all the mysql drivers need to be included.
    2) what is the syntax for establish a database connection

    hi,
    http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.htmlsee down for mysql config with tomcat

  • Sharing Portal database connection with JSP page

    Hi out there,
    I implemented a JSP page as a selection form to be integrated into Oracle Portal. This JSP page contains a 'dynamic' form which needs to send queries to the database also integrated in the Portal.
    For this I am currently using a JDBC connection but I would prefer to use the internal db connection of the Portal System.
    Explanation: The user has to log in to the Portal and after that can call the JSP form. To poulate some comboboxes within this form I need some data from the database and the user does have READING privileges on that database.
    Can anybody tell me how to use the user's login and password (or the established connection) to fetch the needed data from the database OTHER than with a jdbc connection?
    Thanx in advance!
    Cheers,
    Thomas

    sorry. not going to happen. you're running in a completely different environment when running Java on Portal. Portal is running in the database; your Java is running on the application server. your Java code must use JDBC to access any database resources, even if Portal related.
    it is essential that you implement a connection pool on the application server to optimize your database traffic. check out bitmechanic for a very good open source option.
    good luck,
    rich

  • When and How to close database connection in JSP?

    Hi there,
    I am using MySQL and JDBC 3.0, in my system, When and How to close database connection in JSP?
    Thanks in advance.
    Lonely Wolf
    <%@ page session="true" language="java" %>
    <jsp:include page="checkauthorization.jsp" />
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <%--
    Execute query, with wildcard characters added to the
    parameter values used in the search criteria
    --%>
    <sql:query var="availablecomputerList" dataSource="jdbc/Bookingcomputer" scope="request">
    SELECT * FROM computer where status=0
    order by s_code
    </sql:query>
    <html>
    <head>
    <title>Search Result</title>
    </head>
    <body bgcolor="white">
    <center>
    <form action="checkin.jsp" method="post">
    <input type="submit" value="Back to Check-in Page">
    </form>
    <c:choose>
    <c:when test="${availablecomputerList.rowCount == 0}">
    Sorry, no available computer found.
    </c:when>
    <c:otherwise>
    The following available computers were found:
    <table border="1">
    <th>Computer</th>
    <th>Description</th>
    <th>Status</th>
    <c:forEach items="${availablecomputerList.rows}" var="row">
    <tr>
    <td><c:out value="${row.s_code}" /></td>
    <td><c:out value="${row.description}" /></td>
    <td><c:out value="${row.status}" /></td>
    </tr>
    </c:forEach>
    </table>
    </c:otherwise>
    </c:choose>
    </center>
    </body>
    </html>

    when should you close the connection? when you're done with it.
    how should you close the connection? like this: conn.close();
    that said, doing this in a JSP page is bad form and not recommended
    JSP's typically don't contain ANY business or data logic

  • JDBC-ODBC connectivity from JSP page

    hi
    i am trying to connect a jsp page with database using jdbc-odbc driver. i have created a dsn with the name 'test' that connects to a database 'test' in SQL server. the following lines has been added to the web.xml file placed in the \WEB-INF folder
    <context-param>
    <param-name>
    javax.servlet.jsp.jstl.sql.dataSource
    </param-name>
    <param-value>
    jdbc:odbc:text, sun.jdbc.odbc.JdbcOdbcDriver
    </context-param>
    i have also placed the rt.jar file in the \WEB-INF\lib folder. but, when i run the jsp page and ty to make any database interaction, an expection occurs
    java.lang.ClassNotFoundException : sun.jdbc.odbc.JdbcOdbcDriver
    please help

    I think you need to download the JDBC/ODBC driver jar file into your project. For example, if you need a JDBC driver for the Oracle database, you search google for 'oracle jdbc driver'. Its driver is something like classes14.jar. I suggest you create and test your database connection pool in a servlet so you will have an easier time debugging any issues in getting it to work.
    Also, as the previous post points out, JSP is for displaying data and submitting user input back to the servlet. Put all your business logic in the servlet, put any data you get from the database in request scope by the servlet, dispatch to the JSP page so it can be displayed. This is a crude example. For a better design read up on MVC (Model View Controller) design.

  • Problem in Oracle Database Connectivity in JSP

    I am having big problem such as Oracle Database connectivity problem
    Following code i am used for database connection. but it throw an exception call class not found exception.
    Pls any one can help me. With a sample code for Oracle Database connection in JSP
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    String url="jdbc:oracle:thin:@172.25.44.54:1521:bbo";
    con = DriverManager.getConnection(url,"user", "user123");
    Thank you

    Well i've never used oracle or their drivers before but i'm presuming that you'd go to oracle.com or something and look for downloads. Otherwise you could goodle for Oracle JDBC drivers. Then just follow the instructions.
    Again i've never used JSP but if you have a manifest file somewhere you'll need to put a class-path: entry in their referecning the jar file with the driver so that it is availble at run-time.
    Wes

  • Xsql setup problem. 'Cannot acquire a database connection to process page.'

    This is probably a really basic problem, but I am getting the following error when I try to use the xsql demos.
    Oracle XDK Java 9.2.0.2.0 Production
    XSQL-007: Cannot acquire a database connection to process page.
    Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=150999297)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
    I really don't know what I am doing wrong, so any help would be appreciated.
    My jserv.properties file:
    wrapper.classpath=s:\xdk_java\lib\xsu12.jar
    wrapper.classpath=s:\xdk_java\lib\oraclexsql.jar
    wrapper.classpath=s:\orant\jdbc\lib\classes12.zip
    wrapper.classpath=s:\xdk_java\lib\xmlparserv2.jar
    wrapper.classpath=s:\orant\xdk\admin
    Thankyou
    Adrian

    hehehhe
    I had the connection wrong in the XSQLConfig.xml file.
    It's all working nicely now.
    Ade

  • Error while connecting to the database from a JSP Page

    Hi,
    I am using a simple JSP page which is based on the sample JSP pages from OTN.
    When I try to connect to my database using the following code:
    InitialContext ic = new InitialContext();
    OracleDataSource ds = (OracleDataSource)ic.lookup("jdbc/OTN9iDS");
    m_connection = ds.getConnection();
    I get the following error:
    Naming exception Error while connecting to the database : javax.naming.NameNotFoundException: jdbc/OTN9iDS not found in JDBCTest-JDBCTestProject-webapp
    Does anybody know wht this is happening?
    Any help would be appreciated
    FRank

    Hi Frank,
    Are you using standalone OC4J or 9iAS ? If you are using standalone OC4J then you need to add a proper data source entry in %OC4J_HOME%j2ee\home\config\data-sources.xml file.
    If you are using 9iAS the you can log in to the Enterprise Manager console and add the data source entry by using wizard provided by 9iAS.
    Ensure the case of the JNDI lookup string, since, it is case sensitive.
    Hope this helps.
    Abhijeet

  • Sql database connection in jsp

    Hi,
    I am new to java.
    I know how to connect the database in the java using the javacodings [jdbc] but i am don't know how to connect the database using the jsp.
    Is it easy. If so, can any one help me in this regards.
    Any sample codes or white paper available.
    thanks in advance,
    Regards,
    sa

    Hi,
    Here's a simple application i write to test JSTL.
    Using JSTL is easier.
    Create a directory named tests in your webapps tomcat directoty.
    In this, create a web-inf dir and inside a lib dir.
    Copy JSTL.JAR ans STANDARD.JAR in tests/web-inf/lib/ which are lib for JSTL (found on apache foundation web site, jakarta implementation).
    Copy you jdbc driver in jakarta-tomcat/common/lib dir.
    Here is a file to input some data from an HTML form:
    Create saisie.jsp and record.jsp in you tests apps dir.
    saisie.jsp:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <html>
    <head>
    <title>Simple Example</title>
    </head>
    <body>
        <h1> Saisie de donn�es  </h1>
        <form name="saisie" action="record.jsp" method="get">
            Code :<input type="text" name="code"/>
            Text :<input type="text" name="text"/>
            <input type="submit" name="submit"/>
        </form>
    </body>
    </html>and record.jsp:
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ page isELIgnored ="false" %>
    <html>
    <head>
    <title>Simple Example</title>
    </head>
    <body>
    <sql:query var="result"  maxRows="100">
         select * from ess
    </sql:query>
    <table>
         <!-- Affichage de l'ent�te avec le nom des colonnes -->
         <tr>
         <c:forEach var="name" items="${result.columnNames}">
              <th>${name}</th>
         </c:forEach>
         </tr>
         <!-- Affichage des donn�es avec 'rowsByIndex' -->
         <c:forEach var="ligne" items="${result.rowsByIndex}">
         <tr>
              <c:forEach var="valeur" items="${ligne}">
                   <td>${valeur}</td>
              </c:forEach>
         </tr>
         </c:forEach>
    </table>
    <c:set var="code_id" value="${param.code}"/>
    <sql:update>
        INSERT INTO ESS (ID,TEXT) VALUES (?,?)
        <sql:param>${param.code} </sql:param>
        <sql:param>${param.text}</sql:param>
    </sql:update>
    </body>
    </html>Here's web.xml file to create in tests/web-inf dir:
    <?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>
        <description>Learning JSTL (or whatever you like</description>
        <context-param>
              <param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>
              <param-value>jdbc:postgresql://127.0.0.1/gihe,org.postgresql.Driver,gihe,****<param-value>
         </context-param> 
    </web-app>web.xml contains the datasource definition, the jdbc driver, the url, user and password.
    saisie.jsp is a standard html file.
    record.jsp use web.xml datasource to connect to the database and use JSTL tag to insert some data.
    more explanations on java sun site.

  • Database connectivity in JSP

    Hi all,
    i am new to JSP and first time trying this code.i am trying to make a connection with the database,there is some problem in SQL.it show me SQLException.
    Here is code connec.jsp:
    <%@ page import="java.sql.*" %>
    <% String name = request.getParameter("name");
    String age = request.getParameter("age");
    %>
    <%
    Connection conn = null;
    Statement stmt = null;
         PreparedStatement pstmt = null;
    ResultSet rs = null;
         try {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              conn = DriverManager.getConnection ("jdbc:odbc:unsoda_project","project_unsoda","project");
         }catch (Exception e) {
              out.println(e);
    %>
    <!-- To read values from the database -->
    <TABLE>
    <%
         try {
              stmt = conn.createStatement();
              rs = stmt.executeQuery("Select codes from code_filter where codes > 1020");
              while(rs.next()) {
    %>
    <TR><TD><!%rs.getInt()%></TD>
    </TR>
    <%
         }catch (Exception e) {
              out.println(e);
    %>     
    </TABLE>
    %>
    When i tried to see the output through web browser it show me Exception:
    /*java.sql.SQLException: [Microsoft][ODBC driver for Oracle][Oracle]ORA-00913: too many values */
    Now pls. tell me how do i do this connectivity and can diaplay the output of the query into the combo box.
    Thank you,
    sonika

    which of your catch blocks is throwing the exception. From the looks of the message, the ODBC driver is having and argument with the oracle driver based on your query. It says it is wrong. You shouldn't get the error about parameters if your driver doesn't connect, so I don't think that's the problem, I think it is your query.

  • Database Connection Problem, JSP, Tomcat5.5.9, Oracle9i

    hi,
    Am trying to make database connection using Oracle9i thin driver, what am doing is:
    I put classes12.zip and classes12_dms.jar in the classpath and also added these libraries in netbeans library folder.
    I make jsp page like this --------
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="java.util.*, java.sql.*"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Testing Page</title>
    </head>
    <body>
    <%
    String url = "jdbc:oracle:thin:@SERVERNAME:1521:DBNAME";
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection(url,"scott","tiger");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("select * from person order by name");
    %>
    <h1>Testing Page</h1><hr>
    <table border="1">
    <tbody>
    <tr>
    <th>Name</th>
    <th>Email</th>
    </tr>
    <% while(rs.next()) {%>
    <tr>
    <td><%= rs.getString(1)%></td>
    <td><%= rs.getString(2)%></td>
    </tr>
    <%
    rs.close();
    stmt.close();
    conn.close();
    } catch(ClassNotFoundException CNFEx) {
    out.println("<b>Error !</b><br>" + CNFEx.getMessage());
    } catch(Exception Ex) {
    out.println("<b>Error !</b><br>" + Ex.getMessage());
    %>
    </tbody>
    </table>
    </body>
    </html>
    when I run this page i got this error messages ----
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
    org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:138)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    root cause
    java.lang.NoClassDefFoundError
    oracle.jdbc.driver.OracleConnection.createDMSSensors(OracleConnection.java:506)
    oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:330)
    oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:485)
    oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:337)
    java.sql.DriverManager.getConnection(Unknown Source)
    java.sql.DriverManager.getConnection(Unknown Source)
    org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:79)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    any kind of help is appericiable.
    thanks.....

    I'd start by checking for a more recent driver version on Oracle's web site.
    Or: googling for "createDMSSensors" (the "root cause" in the stack trace) has as the first hit: Re: Java Help Please! HttpServlet doFilter() Exception

  • Embedding SWF file with SAP Netweaver BI Connection to JSP page

    All,
    Is it possible to embed a SWF file with SAP Netweaver BI connection that is already published in BW system to a JSP page?
    Thanks...

    Hallo,
    embedding the published web-template via iframe into the jsp should work:
    <iframe id="test" src="/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?DASHBOARD=TECHNICAL_NAME_DASHBOARD" width="600" height="800" />
    Regards,
    Roman

  • How to display contents from a database to a jsp page

    hi im using hibernate , i want to display the conetents from a databse to jsp page which is having a form
    i want to get the data on the form fields after changing the values i want to write it back to the database
    im using struts and hibernate
    im struck with this plz help me

    j2ee_struts_hibernate wrote:
    hi im using hibernate , You probably shouldn't be using Hibernate.
    i want to display the conetents from a databse to jsp page which is having a form "contents", "database"
    i want to get the data on the form fields after changing the values i want to write it back to the databaseWhat don't you understand? (Sounds like you don't understand anything.)
    im using struts and hibernate How well do you know Struts? Hibernate? JSP? Java?
    im struck with this plz help meAsk a specific question and we'll see what we can do.
    Write a JSP with the form in it; submit to Struts; Struts interacts with the database. That's the flow.
    %

  • Reg dynamically displaying records from database into a jsp page

    I am working in a project which is using struts and hibernate.In a class I gave code for retrieving data from a table and I put it in a list.
    List retrieveList;
    public List getRetrieveList() {
    String SQL_QUERY ="from student s";
    Query query = session.createQuery(SQL_QUERY);
    retrieveList = query.list();
    return retrieveList;
    public void setRetrieveList(List retrieveList) {
    this.retrieveList = retrieveList;
    And this list value I want to be displayed in a jsp page.What I have given is :
    <jsp:useBean id="records" class="StudentImpl" scope="session" />
    <bean:define id="list" name="records" property="retrieveList" />
    <table align="center" bordercolor="black" cellpadding="10" cellspacing="10">
    <logic:iterate id="data" name="list" type="pojo.student" indexId="index">
    <tr>
    <td><html:multibox property="checked" value=""></html:multibox></td>
    <td><bean:write name="data" property="studentname" /></td>
    <td><bean:write name="data" property="age" /></td>
    </tr>
    </logic:iterate>
    </table>
    When I run my jsp page its showing an error
    org.apache.jasper.JasperException: [Ljava.lang.Object; cannot be cast to pojo.Student
    can anyone resolve this problem?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    ya i got through criteria query.
    Transaction tx = session.beginTransaction();
              try{
                   Criteria query = session.createCriteria(Student.class);
                   list = (ArrayList)query.list();
                   tx.commit();
                   setRetrieveList(list);
                   session.close();
              catch(Exception e){
                   System.out.println(e);
              }

  • Error due to accessing database connection using jsp

    Hi,
    I have an error, during accessing a datbase using jsp:useBean from jsp.Urgent i need this one
    my source code is
    DbBean.java
    package SQLBean;
    import java.sql.*;
    import java.io.*;
    public class DbBean implements java.io.Serializable{
    private String dbDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
    private Connection dbCon;
    public DbBean(){
    super();
    public boolean connect() throws ClassNotFoundException,SQLException{
    Class.forName(dbDriver);
    dbCon = DriverManager.getConnection("jdbc dbc:mybean","","");
    return true;
    public void close() throws SQLException{
    dbCon.close();
    public ResultSet execSQL(String sql) throws SQLException{
    Statement s = dbCon.createStatement();
    ResultSet r = s.executeQuery(sql);
    return (r == null) ? null : r;
    public int updateSQL(String sql) throws SQLException{
    Statement s = dbCon.createStatement();
    int r = s.executeUpdate(sql);
    return (r == 0) ? 0 : r;
    database.jsp
    <HTML>
    <HEAD><TITLE>DataBase Search</TITLE></HEAD>
    <BODY>
    <%@ page language="Java" import="java.sql.*" %>
    <jsp:useBean id="db" scope="application" class="SQLBean.DbBean" />
    <jsp:setProperty name="db" property="*" />
    <center>
    <h2> Results from </h2>
    <hr>
    <br><br>
    <table>
    <%
    db.connect();
    ResultSet rs = db.execSQL("select * from employ");
    int i = db.updateSQL("UPDATE employ set fname = 'hello world' where empno='000010'");
    out.println(i);
    %>
    <%
    while(rs.next()) {
    %>
    <%= rs.getString("empno") %>
    <BR>
    <%
    %>
    <BR>
    <%
    db.close();
    %>
    Done
    </table>
    </body>
    </HTML>
    The error like this
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    error: Invalid class file format in C:\Program Files\Apache Tomcat 4.0\webapps\muthu\WEB-INF\classes\SQLBean\DbBean.class. The major.minor version '49.0' is too recent for this tool to understand.
    An error occurred at line: 7 in the jsp file: /database.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\localhost\muthu\database$jsp.java:65: Class SQLBean.DbBean not found.
    SQLBean.DbBean db = null;
    ^
    An error occurred at line: 7 in the jsp file: /database.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\localhost\muthu\database$jsp.java:68: Class SQLBean.DbBean not found.
    db= (SQLBean.DbBean)
    ^
    An error occurred at line: 7 in the jsp file: /database.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\localhost\muthu\database$jsp.java:73: Class SQLBean.DbBean not found.
    db = (SQLBean.DbBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "SQLBean.DbBean");
    ^
    4 errors, 1 warning
    Anybody help me?
    Thanx in advance

    Your code is ok . The problem is in java version witch you use to compile the DbBean class . I think you are using java 1.5 try to change to 1.4 compile and run again should help .

Maybe you are looking for