Problem in connecting database in jsp.

I have oracle 7.3.4.0.1 I am trying to make a connection with oracle database. Following is the test.jsp file
<html>
<body bgcolor= white >
<%@ page language="java" import= "java.io.*"%>
<%@page import="javax.servlet.*"%>
<@page import="javax.servlet.http.*"%>
<@page import="java.util.*"%>
<@page import oracle.jdbc.driver.*"%>
<@page import java.math.*"%>
<%!Class.forName("oracle.jdbc.driver.OracleDriver").newInstance()%>
<%@page import="java.sql.*"%>
<%!Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@servername:1521:sid", "user", "password");;
Statement theStatement = conn.createStatement();
String s1 = SELECT name FROM arschema WHERE rownum<10;
// Query the Database
ResultSet theResults = theStatement.executeQuery(s1);
theResults.next();
%>
<table><tr><td><%=theResults.getString( name )%></td></tr>
</table>
<%
conn.close();
theStatement.close();
out.close();
%>
</body>
</html>
When I am viewing my jsp file in web browser, i am getting following error,
org.apache.jasper.JasperException: Unable to compile class for JSP/usr/local/apache/jakarta-tomcat-3.2.3/work/localhost_8080%2Fexamples/_0002ftest_0002ejsptest_jsp_0.java:21: Type expected.
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance()
^
1 error
on unix box i am getting following error at console
2001-10-18 16:23:12 - Ctx( /examples ): JasperException: R( /examples + /test.
jsp + null) Unable to compile class for JSP/usr/local/apache/jakarta-tomcat-3.2.
3/work/localhost_8080%2Fexamples/_0002ftest_0002ejsptest_jsp_0.java:21: Type exp
ected.
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance()
^
1 error
Please help
Thanks
Alka Srivastav

I have made necessary modification in the code. Please take a look at it.
<html>
<body bgcolor= white >
<%@ page language="java" import= "java.io.*"%>
<%@page import="javax.servlet.*"%>
<@page import="javax.servlet.http.*"%>
<@page import="java.util.*"%>
<@page import oracle.jdbc.driver.*"%>
<@page import java.math.*"%>
<%!Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();%>
<%@page import="java.sql.*"%>
<%!Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@remdev1.kmct
elecom.com:1521:eftiap", "aradmin", "test1ora");
Statement theStatement = conn.createStatement();
String s1 = SELECT name FROM arschema WHERE rownum<10;
// Query the Database
ResultSet theResults = theStatement.executeQuery(s1);
theResults.next();
%>
<table><tr><td><%=theResults.getString( name )%></td></tr>
</table>
<%
conn.close();
theStatement.close();
out.close();
%>
</body>
</html>
Still getting following error. Where am I wrong.
2001-10-19 09:49:35 - Ctx( /examples ): JasperException: R( /examples + /test.
jsp + null) Unable to compile class for JSP/usr/local/apache/jakarta-tomcat-3.2.
3/work/localhost_8080%2Fexamples/_0002ftest_0002ejsptest_jsp_0.java:21: Type exp
ected.
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
^
1 error
Please help.
Thanks

Similar Messages

  • Problem to connect database from Developer 6i

    I have downloaded Developer 6i from oracle.com
    before that, I have already downloaded 9i database default_home directory is c:\orant.
    while i was installing develper 6i it was installed with forms_home, c:\orant\forms.
    I was using the forms builder to design forms but while i was trying to connect to database it is saying that "Unable to Connect to Destination"
    i was using scott/tiger.
    this time i have tried scott/tiger@rkmurari...(rkmurari is SID and Database name).
    Can anybody help me in solving this problem..
    Thank you very much..

    I have a problem to connect database from developer 6i

  • Problem in connect database using applet

    hi
    please
    i want open database in page html with use Applet
    i use this code but database not work in the my page
    if this code have problem
    please correct this code to open database in page html
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection(
    "jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb);DBQ=C:\\hwzyfa.mdb ");
    sta = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    res = sta.executeQuery("select * from aha");
    this is my code
    package orcle;
    import java.sql.*;
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    <applet code="test.class" width=200 height=200>
    </applet>
    public class Applora extends Applet implements ActionListener
    Connection con = null;
    Statement stmt = null;
    ResultSet rs = null;
    String str=null;
    TextArea ta;
    public void init()
    ta= new TextArea(10,30);
    add(ta);
    Button b1 = new Button(">>");
    add(b1);
    b1.addActionListener(this);
    ta.setText("Initialization...\n");
    public void start() {java.applet.AudioClip a=  Applet.newAudioClip(Applora.class.getResource("a.mid"));
       a.play();
    public void actionPerformed(ActionEvent ae)
    ta.appendText("Inside actionPerformed\n");
    try
    ta.appendText("Inside try block\n");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    ta.appendText("Class loaded\n");
    /********** upto this point it works fine **************/
    con=DriverManager.getConnection("jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb);DBQ=C:\\hwzyfa.mdb ");
    ta.appendText("Connection created\n");
    stmt=con.createStatement();
    ta.appendText("Statement created\n");
    rs=stmt.executeQuery("select * from aha");
    ta.appendText("Resultset created\n");
    while(rs.next())
    str=str+rs.getString(2)+" "+"\n";
    //str=str+rs.getString(2)+" "+"\n";
    ta.appendText(str);
    con.close();
    stmt.close();
    rs.close();
    }catch(ClassNotFoundException cnfe){System.out.println("Class Not found "+cnfe.getMessage());}
    catch(SQLException sqle){System.out.println("SQL Exception "+sqle.getMessage());ta.setText(sqle.getMessage());}
    catch(Exception e){ta.setText(e.getMessage());e.getMessage();}
    }

    i want access to database in page html with use AppletFirst of all, that doesn't make any sence, if it's a single user application make it a java
    application.
    If it's a multu user application make it a client server where the web server connects to
    the database when the client requests a connection.
    When the applet connects to the database any client running the applet needs a
    connection to your database server, the client needs the jdbc drivers and the client's
    jre needs to find them (set classpath with runtime parameters or set the classes in
    javadir lib). After that the client needs to change thiere java.policy or you need to sign
    the applet.
    Needless to say that's a lot of trouble. And if you go through all that trouble the client
    can de-compile your applet and see the connection to the database server and the
    server name. Now the client can destroy your database or worse see date it is not
    supposed to see.
    Since you are a brainless ... who needed to post this question 6 times did not respond to any of my post in your other threads I can just say good luck with your problem.

  • WEbsphere 5.1.2 JsF problem to connect Database by ODBC

    hi
    i have created a jsf project,it's simple,but now i want to do a connect to my database with bridge ODBC-JDBC.
    i create a class:
    import java.sql.*;
    import sun.jdbc.odbc.*;
    public class Connect {
         private Statement stmt;
         private String url;
         private ResultSet rs;
         private Connection con;
         Connect(){
                           try
                                         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                                          url = "jdbc:odbc:scrutinio";
                                          con = DriverManager.getConnection (url,"dba","sql");
                                          stmt = con.createStatement();
                                     catch (ClassNotFoundException e)
                                          e.printStackTrace();
                                     } catch (SQLException e) {
                                          e.printStackTrace();
              public Statement getStatement()
                   return stmt;
    }now in my backbean i call getStatement()(i try a login web ):
    import java.sql.*;
    import sun.*;
    public class BackLogin {
         private String Nome;
         private String Password;
         private Statement stmt;
         private ResultSet rs;
        public void setNome(String Nome){
             this.Nome=Nome;
         public void setPSW(String PSW){
                 this.Password=PSW;
         public String getNome(){
                 return Nome;
            public String getPSW(){
                     return Password;
         public String id_Login(){
           Connect cn=new Connect();
              stmt=cn.getStatement();
              try {
                   rs=stmt.executeQuery("SELECT CODICE,password FROM SECURITY_UTENTI");
                while(rs.next()){
                     if((rs.getString(1).equalsIgnoreCase(Nome))&&(rs.getString(2).equalsIgnoreCase(Password)))
                    return "success";
              } catch (SQLException e) {
                   e.printStackTrace();
              return "failure";
    }but the console return:
    [03/03/05 13.45.00:281 CET] 560ebb9c WebGroup I SRVE0180I: [ArgoNet1.0] [ArgoNet1.0] [Servlet.LOG]: /login.jsp: init
    [03/03/05 13.45.07:531 CET] 5271fb9c SystemErr R java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
    please can we help me?

    thanks ,but o know yet this,so i have included lib standard of sun(programms,java,lib....),
    but my work is ok or i must change strategy?

  • Problem in connecting Database by using SQL Developer

    Hi,
    I recently installed SQL Developer after installing Oracle 10g and am trying to connect existing database. could anybody help me to connect and what credential should i required to connect.
    Thanks in advance
    LN Reddy

    I am new to oracle myself, so I apologize if this information is not helpful. But I have a number of connections to a local database on my laptop. The way that I connected is using the 'Basic' tab with the following settings:
    Hostname: localhost
    Port: 1521
    SID: orcl
    And of course the username above.
    I hope that might be helpful.

  • Beginner on JDBC. problem to connect database postgreSQL

    hi there everyone,
    new to JDBC.
    not sure, what's wrong with that.
    I am using XP, postgreSQL 7.3.3 - the database is fine ( i can create a table via cygwin).
    - i have downloaded the pgSQL jdbc driver also set the classpath.
    thanks in advanc
    ===================================
    import java.sql.*;
    public class Example {
    public static void main(String args[])
              String userName="user1";
         String password="whatever";
    try
    String url = "jdbc:postgresql:myDB";
                   Class.forName("org.postgresql.Driver");
    Connection myConnection= DriverManager.getConnection(url,userName,password);
    } catch ( java.lang.Exception ex){ ex.printStackTrace();}
    ===========================================================
    Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
         at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:167)
         at org.postgresql.Driver.connect(Driver.java:122)
         at java.sql.DriverManager.getConnection(DriverManager.java:512)
         at java.sql.DriverManager.getConnection(DriverManager.java:172)
         at Example.main(Example.java:17)

    Thanks colbell
    =========================
    I have got them or newer verion.
    crypt 1.0-1
    cygipc 1.13-2
    cygwin 1.3.16-1
    gcc 3.2-3
    libncurses6 5.2-8
    libreadline5 4.2a-1
    readline 4.2a-1
    zlib 1.1.3-6
    Sun JDK 1.3
    Ant 1.5
    ===================
    i should have this perl 5.8.0-1 but when i install it directly from the net, it only has perl 5.6.2.-1 and it's doc 5.8.0-1.
    i think i have installed the ant correctly but is there any way that i could test it??
    what is the different between
    String url = "jdbc:postgresql:myDB"; and
      jdbc:postgresql:localhost:5432/myDB
    Just check the port number that you're actually
    using.
    how and where can i find it out??? or u mean the usually postgreSQL's port number??
    Also make sure that you have installed cygipc and that
    it is running. Take a look through
    <cygwin>\usr\doc\Cygwin\postgresql-7.3.2.READMEi have installed cygipc - any ways i could test it?
    thanks in advance

  • Problem while access database by JSTL through JSP.

    I am trying to connect database by using JSTL through jsp.I am getting an exception.Please advise.
    Error:
    org.apache.jasper.JasperException: XML parsing error on file /WEB-INF/jsp/c.tld: (line 2, col 8): Document is invalid: no grammar found.
         at org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:140)
         at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:200)
         at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:140)
         at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:309)
         at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:336)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:750)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:77)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:157)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:111)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:183)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:445)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    JSP:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
    <sql:setDataSource scope="application"
    driver="sun.jdbc.odbc.JdbcOdbcDriver"
    url="jdbc:oracle:thin:@3.173.130.12:1521:cup"
    user="sUerName"
    password="sPassword"
    />
    <sql:query var="Result">
    select * from imtinv.imi_error_message
    </sql:query>
    <html>
    <head>
    <title>
    Error Message Details
    </title>
    </head>
    <body bgcolor="white">
    This is the information stored in the Error Message Table in Depot Automation Systems
    <table>
    <c:forEach items="$(Result.rows)" var="row">
    <c:forEach items="$(rows)" var="column">
    <tr>
    <td align=right>
    <b><c:out value="$(column.key)" />:</b>
    </td>
    <td>
    <c:out value="$(column.value)" />:</b>
    </td>
    </tr>
    </c:forEach>
    </c:forEach>
    </table>
    </body>
    </html>
    Web.xml:
    <taglib>
    <taglib-uri>
    http://java.sun.com/jstl/xml
    </taglib-uri>
    <taglib-location>
    /WEB-INF/jsp/x.tld
    </taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>
    http://java.sun.com/jstl/fmt
    </taglib-uri>
    <taglib-location>
    /WEB-INF/jsp/fmt.tld
    </taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>
    http://java.sun.com/jstl/sql
    </taglib-uri>
    <taglib-location>
    /WEB-INF/jsp/sql.tld
    </taglib-location>
    </taglib>
    c.tld:
    <?xml version="1.0" encoding="UTF-8" ?>
    <taglib xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd"
    version="2.0">
    <description>JSTL 1.1 core library</description>
    <display-name>JSTL core</display-name>
    <tlib-version>1.1</tlib-version>
    <short-name>c</short-name>
    <uri>http://java.sun.com/jsp/jstl/core</uri>
    <validator>
    <description>
    Provides core validation features for JSTL tags.
    </description>
    <validator-class>
    org.apache.taglibs.standard.tlv.JstlCoreTLV
    </validator-class>
    </validator>
    <tag>
    <description>
    Catches any Throwable that occurs in its body and optionally
    exposes it.
    </description>
    <name>catch</name>
    <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <description>
    Name of the exported scoped variable for the
    exception thrown from a nested action. The type of the
    scoped variable is the type of the exception thrown.
    </description>
    <name>var</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <description>
    Simple conditional tag that establishes a context for
    mutually exclusive conditional operations, marked by
    <when> and <otherwise>
    </description>
    <name>choose</name>
    <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
    <body-content>JSP</body-content>
    </tag>
    <tag>
    <description>
    Simple conditional tag, which evalutes its body if the
    supplied condition is true and optionally exposes a Boolean
    scripting variable representing the evaluation of this condition
    </description>
    <name>if</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.core.IfTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <description>
    The test condition that determines whether or
    not the body content should be processed.
    </description>
    <name>test</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    <type>boolean</type>
    </attribute>
    <attribute>
    <description>
    Name of the exported scoped variable for the
    resulting value of the test condition. The type
    of the scoped variable is Boolean.
    </description>
    <name>var</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Scope for var.
    </description>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <description>
    Retrieves an absolute or relative URL and exposes its contents
    to either the page, a String in 'var', or a Reader in 'varReader'.
    </description>
    <name>import</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.core.ImportTag</tag-class>
    <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>
    <body-content>JSP</body-content>
    <attribute>
    <description>
    The URL of the resource to import.
    </description>
    <name>url</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Name of the exported scoped variable for the
    resource's content. The type of the scoped
    variable is String.
    </description>
    <name>var</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Scope for var.
    </description>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Name of the exported scoped variable for the
    resource's content. The type of the scoped
    variable is Reader.
    </description>
    <name>varReader</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Name of the context when accessing a relative
    URL resource that belongs to a foreign
    context.
    </description>
    <name>context</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Character encoding of the content at the input
    resource.
    </description>
    <name>charEncoding</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <description>
    The basic iteration tag, accepting many different
    collection types and supporting subsetting and other
    functionality
    </description>
    <name>forEach</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.core.ForEachTag</tag-class>
    <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>
    <body-content>JSP</body-content>
    <attribute>
    <description>
    Collection of items to iterate over.
    </description>
    <name>items</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <type>java.lang.Object</type>
    </attribute>
    <attribute>
    <description>
    If items specified:
    Iteration begins at the item located at the
    specified index. First item of the collection has
    index 0.
    If items not specified:
    Iteration begins with index set at the value
    specified.
    </description>
    <name>begin</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <type>int</type>
    </attribute>
    <attribute>
    <description>
    If items specified:
    Iteration ends at the item located at the
    specified index (inclusive).
    If items not specified:
    Iteration ends when index reaches the value
    specified.
    </description>
    <name>end</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <type>int</type>
    </attribute>
    <attribute>
    <description>
    Iteration will only process every step items of
    the collection, starting with the first one.
    </description>
    <name>step</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <type>int</type>
    </attribute>
    <attribute>
    <description>
    Name of the exported scoped variable for the
    current item of the iteration. This scoped
    variable has nested visibility. Its type depends
    on the object of the underlying collection.
    </description>
    <name>var</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Name of the exported scoped variable for the
    status of the iteration. Object exported is of type
    javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested
    visibility.
    </description>
    <name>varStatus</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <description>
    Iterates over tokens, separated by the supplied delimeters
    </description>
    <name>forTokens</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.core.ForTokensTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <description>
    String of tokens to iterate over.
    </description>
    <name>items</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    <type>java.lang.String</type>
    </attribute>
    <attribute>
    <description>
    The set of delimiters (the characters that
    separate the tokens in the string).
    </description>
    <name>delims</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    <type>java.lang.String</type>
    </attribute>
    <attribute>
    <description>
    Iteration begins at the token located at the
    specified index. First token has index 0.
    </description>
    <name>begin</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <type>int</type>
    </attribute>
    <attribute>
    <description>
    Iteration ends at the token located at the
    specified index (inclusive).
    </description>
    <name>end</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <type>int</type>
    </attribute>
    <attribute>
    <description>
    Iteration will only process every step tokens
    of the string, starting with the first one.
    </description>
    <name>step</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <type>int</type>
    </attribute>
    <attribute>
    <description>
    Name of the exported scoped variable for the
    current item of the iteration. This scoped
    variable has nested visibility.
    </description>
    <name>var</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Name of the exported scoped variable for the
    status of the iteration. Object exported is of
    type
    javax.servlet.jsp.jstl.core.LoopTag
    Status. This scoped variable has nested
    visibility.
    </description>
    <name>varStatus</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <description>
    Like <%= ... >, but for expressions.
    </description>
    <name>out</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <description>
    Expression to be evaluated.
    </description>
    <name>value</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Default value if the resulting value is null.
    </description>
    <name>default</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Determines whether characters <,>,&,'," in the
    resulting string should be converted to their
    corresponding character entity codes. Default value is
    true.
    </description>
    <name>escapeXml</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <description>
    Subtag of <choose> that follows <when> tags
    and runs only if all of the prior conditions evaluated to
    'false'
    </description>
    <name>otherwise</name>
    <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
    <body-content>JSP</body-content>
    </tag>
    <tag>
    <description>
    Adds a parameter to a containing 'import' tag's URL.
    </description>
    <name>param</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.core.ParamTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <description>
    Name of the query string parameter.
    </description>
    <name>name</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Value of the parameter.
    </description>
    <name>value</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <description>
    Redirects to a new URL.
    </description>
    <name>redirect</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.core.RedirectTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <description>
    The URL of the resource to redirect to.
    </description>
    <name>url</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Name of the context when redirecting to a relative URL
    resource that belongs to a foreign context.
    </description>
    <name>context</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <description>
    Removes a scoped variable (from a particular scope, if specified).
    </description>
    <name>remove</name>
    <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class>
    <body-content>empty</body-content>
    <attribute>
    <description>
    Name of the scoped variable to be removed.
    </description>
    <name>var</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Scope for var.
    </description>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <description>
    Sets the result of an expression evaluation in a 'scope'
    </description>
    <name>set</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.core.SetTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <description>
    Name of the exported scoped variable to hold the value
    specified in the action. The type of the scoped variable is
    whatever type the value expression evaluates to.
    </description>
    <name>var</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Expression to be evaluated.
    </description>
    <name>value</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Target object whose property will be set. Must evaluate to
    a JavaBeans object with setter property property, or to a
    java.util.Map object.
    </description>
    <name>target</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Name of the property to be set in the target object.
    </description>
    <name>property</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Scope for var.
    </description>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <description>
    Creates a URL with optional query parameters.
    </description>
    <name>url</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <description>
    Name of the exported scoped variable for the
    processed url. The type of the scoped variable is
    String.
    </description>
    <name>var</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Scope for var.
    </description>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    URL to be processed.
    </description>
    <name>value</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <description>
    Name of the context when specifying a relative URL
    resource that belongs to a foreign context.
    </description>
    <name>context</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <description>
    Subtag of <choose> that includes its body if its
    condition evalutes to 'true'
    </description>
    <name>when</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.core.WhenTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <description>
    The test condition that determines whether or not the
    body content should be processed.
    </description>
    <name>test</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    <type>boolean</type>
    </attribute>
    </tag>
    </taglib>
    Thanks and Regards,
    Velrajan T.

    For installing JSTL, all you need are the jar files in the web-inf/lib directory.
    - No entries in web.xml
    - no tld files lying around
    - no problems!
    I think you may have a versioning problem here.
    What version of Tomcat are you using?
    With JSP1.2 (eg Tomcat 4), you should be using JSTL1.0. <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    With JSP2.0 (eg Tomcat 5), you should use JSTL1.1. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    Note the difference in the URIs. - the second one includes a /jsp
    Currently you are using the URI for JSTL1.0, but you look to have the tld from JSTL1.1. If you are using a JSP1.2 container, I don't think it could read this tld file, hence the error.
    Try installing the correct version of JSTL, properly (ie as they tell you in the readme file) and it should all work.
    Cheers,
    evnafets

  • Problem in connectivity with database

    Hi anyone,
    I have installed Oracle-8i database and Developer-6i in Windows-95. I am facing the following problem in connectivity:
    In the connection dialogue box, I enter user/passwd as scott/tiger and host string as odbc:polite. I am getting an error message "OCA-30002 ubofscr function not supported".
    In schema builder, table1 is the default name of a new table created. On renaming the table name, I am getting the error message:
    "OBE-15467: Name already in use. Please choose another name"
    whereas no such table name exists in the database.
    If table1 is accepted as the new table name, I am encountering another error message:
    "OBE-15361: Error in creating primary/unique constraint for table1. [POL-5228] message file is not loaded".

    Please use CODE tags when posting code. You are losing some of the plus signs of string concatenation to the forum's formatting beast.
    Preferred solution: Don't use Access as a database. The JDBC-ODBC bridge is always troublesome.
    If you must use Access...
    Well the message is easy enough to understand: it can't find the database db1.mdb.
    You say you put db1.mdb in the web directory. Obviously the computer is not looking there (silly computer for not looking where you put the file)
    So it is up to you to be smart and tell the computer exactly where to go.
    Using application.getRealPath("/db1.mdb") in place of "db1.mdb" will probably work in a JSP.
    String databaseURL = accessDBURLPrefix  + application.getRealPath("/db1.mdb") +  accessDBURLSuffix;cheers,
    evnafets

  • Problem in connecting to Access Database.

    Hi,
         I am new to this Java/JSP Concepts. I am using IBM Websphere Studio(Application Developer 5.1.2). I am facing a problem to connect to the Access database. I have written a java file to connect to the Access Database. When i compile my java code and run it. It was working fine and i am able to insert into the Access database.The java file is working fine without errors. But when i create an object in the jsp and called the methods through that object i am getting "java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver", "java.sql.SQLException: No suitable driver", "java.lang.NullPointerExceptionexceptions" exceptions.
    Please help me in solving the problem.
         My Java code is :
    package myPack;
    import javax.sql.*;
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    public class DB_Connect {
         private Connection con;
         private Driver driver;
         //private String connectStr ="jdbc:odbc:MS Access Database;DBQ=C:\\Movie_Club.mdb";
         public void initialiseDrivers(){
              try{
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   System.out.println("driver found");
              catch (ClassNotFoundException e){
                   e.printStackTrace();
                   System.out.println("driver not found");
              try{
                   con = DriverManager.getConnection("jdbc:odbc:MS Access Database;DBQ=C:\\Movie_Club.mdb","","");
                   System.out.println("database found");
    //"jdbc:odbc:MS Access Database;DBQ=C:\\156761\\Movie_Club.mdb");
    //"jdbc:odbc:MC","",""); I have tried with both of them they are working.
              catch (SQLException ce){
                   ce.printStackTrace();
                   System.out.println("database not found");
         public int insertDB(String empno, String empname, String action, String adventure, String animation, String comedy, String horror, String romantic, String thriller, String sci_fic) throws SQLException {
              int i=0;
              Statement stmt = null;
              try {
                   if(!con.equals(null))
              stmt = con.createStatement();
              i = stmt.executeUpdate("insert into Movie_Flavour values("+empno+","+empname+","+action+","+adventure+","+animation+","+comedy+","+horror+","+romantic+","+thriller+","+sci_fic+")");
              stmt.close();
              con.close();
                   else
                   System.out.println("con not made");
              catch (java.sql.SQLException exception) {
              exception.printStackTrace();
              return i;
         public ResultSet getDetails(){
              Statement stmt = null;
              ResultSet rs = null;
              try{
                   stmt = con.createStatement();
                   rs = stmt.executeQuery("select * from Movie_Flavour where empno = 1");
              catch(Exception e){
                   e.printStackTrace();
              return rs;
         public static void main(String[] args) {
              int i=0;
              DB_Connect db = new DB_Connect();
              try{
                   db.initialiseDrivers();
                   i = db.insertDB("1","2","3","4","5","6","7","8","9","10");
                   System.out.println(i);
              catch(Exception e){
                   e.printStackTrace();
    and my JSP code is:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
    <%@ page import="myPack.DB_Connect" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="javax.sql.*" %>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM WebSphere Studio">
    <TITLE>User_Input</TITLE>
    </HEAD>
    <BODY>
    <%
         DB_Connect db = new DB_Connect();
         try
              db.initialiseDrivers();
              db.insertDB("1","1","1","1","1","1","1","1","1","1");
         catch(Exception e)
              e.printStackTrace();
    %>
    </BODY>
    </HTML>
    Websphere shows the following messages in the console.
    [3/1/06 16:35:27:986 IST] 57687dab WebGroup I SRVE0180I: [RTSC_MCWeb] [RTSC_MCWeb] [Servlet.LOG]: /User_Input.jsp: init
    [3/1/06 16:35:28:002 IST] 57687dab SystemErr R java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
    [3/1/06 16:35:28:002 IST] 57687dab SystemErr R      at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:390)
    [3/1/06 16:35:28:002 IST] 57687dab SystemErr R      at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:300)
    [3/1/06 16:35:28:002 IST] 57687dab SystemErr R      at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
    [3/1/06 16:35:28:002 IST] 57687dab SystemErr R      at java.lang.Class.forName1(Native Method)
    [3/1/06 16:35:28:049 IST] 57687dab SystemErr R      at java.lang.Class.forName(Class.java(Compiled Code))
    [3/1/06 16:35:28:049 IST] 57687dab SystemErr R      at myPack.DB_Connect.initialiseDrivers(DB_Connect.java:28)
    [3/1/06 16:35:28:049 IST] 57687dab SystemErr R      at org.apache.jsp._User_5F_Input._jspService(_User_5F_Input.java:126)
    [3/1/06 16:35:28:049 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [3/1/06 16:35:28:049 IST] 57687dab SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [3/1/06 16:35:28:049 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
    [3/1/06 16:35:28:049 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:669)
    [3/1/06 16:35:28:049 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767)
    [3/1/06 16:35:28:049 IST] 57687dab SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [3/1/06 16:35:28:049 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [3/1/06 16:35:28:049 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [3/1/06 16:35:28:064 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [3/1/06 16:35:28:064 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [3/1/06 16:35:28:064 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [3/1/06 16:35:28:064 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [3/1/06 16:35:28:064 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [3/1/06 16:35:28:064 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
    [3/1/06 16:35:28:064 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
    [3/1/06 16:35:28:064 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)[3/1/06 16:35:28:111 IST] 57687dab SystemOut O driver not found
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R java.sql.SQLException: No suitable driver
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at java.sql.DriverManager.getConnection(DriverManager.java:558)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at java.sql.DriverManager.getConnection(DriverManager.java:188)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at myPack.DB_Connect.initialiseDrivers(DB_Connect.java:38)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at org.apache.jsp._User_5F_Input._jspService(_User_5F_Input.java:126)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:669)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
    [3/1/06 16:35:28:111 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    [3/1/06 16:35:28:127 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
    [3/1/06 16:35:28:127 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
    [3/1/06 16:35:28:127 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    [3/1/06 16:35:28:127 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    [3/1/06 16:35:28:127 IST] 57687dab SystemErr R      at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
    [3/1/06 16:35:28:127 IST] 57687dab SystemErr R      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    [3/1/06 16:35:28:127 IST] 57687dab SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
    [3/1/06 16:35:28:127 IST] 57687dab SystemOut O database not found
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R java.lang.NullPointerException
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at myPack.DB_Connect.insertDB(DB_Connect.java:54)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at org.apache.jsp._User_5F_Input._jspService(_User_5F_Input.java:127)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:669)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    [3/1/06 16:35:28:143 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
    [3/1/06 16:35:28:158 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
    [3/1/06 16:35:28:158 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    [3/1/06 16:35:28:158 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
    [3/1/06 16:35:28:158 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
    [3/1/06 16:35:28:158 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    [3/1/06 16:35:28:158 IST] 57687dab SystemErr R      at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    [3/1/06 16:35:28:158 IST] 57687dab SystemErr R      at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
    [3/1/06 16:35:28:158 IST] 57687dab SystemErr R      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    [3/1/06 16:35:28:158 IST] 57687dab SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)

    Check if the OdbcDriver is in the classpath

  • Problem in connecting JSP with Oracle 9i.

    Hi,
    I am having problem in connecting JSP with Oracle 9i.
    I am using windows XP and my JDK version is 1.4. For executing JSP I am using
    "jakarta-tomcat-5.5.4-preconfigured". My database name is global.
    I have set java_home, j2ee_home, oracle_home, path, classpath as follows:
    j2ee_home=c:\sun\appserver
    java_home=c:\sun\appserver\jdk
    oracle_home=C:\oracle\ora92
    path=C:\Sun\AppServer\bin;C:\Sun\AppServer\jdk\bin;C:\oracle\ora92\bin
    classpath=C:\Sun\AppServer\lib\j2ee.jar;C:\oracle\ora92\jdbc\lib\ojdbc14.jar;C:\oracle\ora92\jdbc\lib\nls_charse
    t12.zip
    My code is as follows:
    <%@ page language="java" %>
    <%@ page import ="java.sql.*"%>
    <%
    try
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    Connection conn = DriverManager.getConnection ("jdbc:oracle:oci8:@global", "scott", "tiger");
    catch(SQLException e)
    out.println(""+e);
    out.println("Connected");
    %>
    I tried other program:
    <%@ page language="java" %>
    <%@ page import ="java.sql.*"%>
    <%
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:global","scott","tiger");
    out.println("Connected");
    %>
    I am getting following error:
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 5 in the jsp file: /jsp/oracle.jsp
    Generated servlet error:
    oracle.jdbc.OracleDriver cannot be resolved or is not a type
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:389)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Thanking you in advance,
    Anurag

    maneesh108 wrote:
    hi this is maneesh1) Read the thread it has been answered.
    2) The thread is very old. Don't resurrect old threads.
    I'm locking this zombie thread.
    Kaj

  • I have problems to connect with Database Server in MDM SP5

    Hi,
    I am upgrading to SP and get problems to connect to the database server. I am able to start and stop the MDM server, but if I tru to create a new repsoitory or unarchive a repository I get this errormessage. "Unable to connect with Datase Server". In ealier versions og MDM i did not give any username or password whwn I made a new repositirt. Do you need to that no?
    I see in the mds.ini file that there is defined a user "Sql Server DBA Username=master ". I sthis the user we shall use or is there another user?
    Regars John-Kjell Hoset

    Hi John,
    I too faced the same problem and get rid of it by installing
    SQL Server 2000 Driver for JDBC Service Pack 3
    which you can download from
    http://www.microsoft.com/downloads/details.aspx?FamilyId=07287B11-0502-461A-B138-2AA54BFDC03A&displaylang=en
    and i installed Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) Release A
    which you can download from
    http://www.microsoft.com/downloads/details.aspx?FamilyID=413744D1-A0BC-479F-BAFA-E4B278EB9147&displaylang=en
    Install with setup SAPWD="YourPassword"
    I connected MDM Console wiht DBMS with Login credentials as
         UserName        sa
         Password         YourPassword
    Hope this help to solve your problem.
    Regards,
    Santosh.

  • Problem in connecting to database from webdynpro for java

    Hi
    I have a problem in connecting to database from webdynpro application
    I am using oracle 10 express edition as database and was able to connect to database from a java application.But  was unable to connect from a webdynpro for java.
    <b>I guess webdynpro for java uses open sql instead of vendor sql(I looked in the visual admin ,DB is using open sql) so unable to connect to database.Am i right.?</b>
    Do i need to make any settings in the visual admin to make it work?
    How to solve this problem.Please give me pointers
    Thanks
    Bala

    Hi,
    For connecting to Oracle, either you can use the normal JDBC connectivty code directly which is given below :
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@Oracle_server_ip:Oracle port:SID of the Database","user_name","password");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("your query");
    In case you want to fetch data through ejbs, these are the steps to be followed :
    1) Open the J2EE perspective
    2) Create an EJB Module project
    3) Right click on ejbModule, create a new EJB (select your EJB type)
    4) While creating the ejb itself, you can add business methods by clicking ‘Next’ in the UI. Another option is after creating the ejb, write the method in the bean, then select the method from ejb-jar.xml -> <bean name> ->method. Right click and select ‘propogate to local & remote’.
    5) Double click on ejb-j2ee-engine.xml. select your bean and specify a Jndi name for eg: “MyJndi”.
    6) Right click on the EJB project and add ‘classes12.zip’ file (provided by Oracle) to it’s build path. (under libraries tab). Also check the same file under ‘Order & Export’.
    7) Create an Enterprise Application project.
    8) Right click on the EJB module project and select add to EAR project, then select the created EAR project.
    9) Right click on the EJB project, select ‘Build EJB Archive’
    10) Right click on the EAR project, select ‘Build Application Archive’
    11) Open the WebDynpro perspective, open a new project, right click on the project ->properties. Do the following configurations :-
    • Java Build path - select the EJB project from ‘projects’ , check the selected project under ‘Order & Export’
    • Project references – select the EAR project
    • WebDynpro references – select ‘sharing references’ tab, click add & make an entry as : <vendor>/<EAR project name without .ear extension>
    You can find the vendor name under ‘application-j2ee-engine.xml’ file of the EAR project. By default it is ‘sap.com’. So if my EAR project’s name is ABC, my entry would look like ‘sap.com/ABC’
    12) Now the configurations are over and the EJB can be invoked by writing the client code inside the webdynpro component. Like:
    InitialContext context = new InitialContext();
    Object obj = context.lookup("MyJndi");
    MyEJBHome home = MyEJBHome)PortableRemoteObject.narrow(obj,MyEJBHome.class);
    MyEJB mybean = home.create();
    int a = 0;
    a= mybean.add(10,15);
    wdContext.currentContextElement().setSum(a);
    where ‘MyEJB’ is my EJB name and ‘MyJndi’ is my JNDI name
    To connect to Oracle , you can write the usual Java code (given below) as a business methos of the ejb (similar to add() method in the example). And access it like mybean.<businessMethodName>().
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@Oracle_server_ip:Oracle port:SID of the Database","user_name","password");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("your query");
    Extracted from Re: Webdynpro and Oracle
    http://help.sap.com/saphelp_webas630/helpdata/en/b0/6e62f30cbe9e44977c78dbdc7a6b27/frameset.htm
    May be of use to understand the VA Conf /people/varadharajan.krishnasamy/blog/2007/02/27/configuring-jdbc-connector-service-to-perform-database-lookups
    Regards
    Ayyapparaj

  • Hi guys Pls tell me a way to connect db4 database with jsp and which driver

    hi guys
    Pls tell me a way to connect db4 database with jsp and
    also tell me which driver i have to use
    also tell me how to connect with excel sheets

    take a look at the follwing links. There, you'll find all what you need :
    DB4:
    http://www.oracle.com/database/berkeley-db/je/index.html
    http://www.oracle.com/technology/products/berkeley-db/je/index.html
    http://www.oracle.com/database/berkeley-db/db/index.html
    http://www.oracle.com/database/docs/berkeley-db-je-datasheet.pdf
    Excel:
    http://64.18.163.122/rgagnon/javadetails/java-0516.html
    Hope That Helps

  • Problem in connecting to database using oracle jdbc thin driver

    hi
    i am trying to connect to a database using oracle thin driver.
    i am getting following error:
    java.sql.sqlexception:Io exception: the network adapter could not establish the connection
    Io exception: the network adapter could not establish the connection
    the connection string has the property of using a dedicated server
    for this reason i have put USE_DEDICATED_SERVER=ON in sqlnet.ora file...
    we did not face this problem while connecting to other databases which do not have the property of dedicated server in their connection string in tnsnames.ora file.
    please suggest a solution for this.
    thanks and regards,
    asif

    If you are using the thin driver, sqlnet.ora does not come into play. None of Oracle networking does. That is one of the great things about using the thin driver, no need to have the client installed.
    That error is due to incorrect connection info you are supplying or the machine you are connection from can't ping the machine it is trying to connect to.

  • Problem to connect Developer Suite forms 9 with Oracle 9i Database

    Hi,
    I have a problem to connect Developer Suite Release 2 forms 9 with Oracle 9i database release 1. I have done net8 easy configuration but no success. Can any one help me to solve this problem.
    Thanks in Advance
    Nasir Ali Mughal

    We cannot help if you don't give us the error number that you get.
    Also something that you might want to do is to search this error number on OTN.

Maybe you are looking for

  • TS1702 problems with flash based products not running on the ipad 2

    I have problems viewing certain web pages in safari, getting the message that the laatest version of flash player is not loaded, does anyone have any ideas on how to resolve this?

  • CTS+ - Import failing in JAVA system - could not connect to SDM URL

    Hi, Currently I am setting up CTS+ for our landsscape. NW2004s Sp15 on SOlution Manager -dual stack. I am able to create the transport from source system. when I click on Import STMS , giving the following error class java.rmi.RemoteException:The use

  • Vendor notification

    Dears I have ceated a Q2 notification and return the goods to the vendor now how Finance department comes to know for further action like payment and other things Pls explain me the business scenario regards Faisal Edited by: Muhamed Faisal on Jul 14

  • Getting Google Map search results to appear on Iphone

    What I want is the to see the following google map link with all the included searches to show up on my iphone the same way it does on a computer. On my iphone if I click on the link, it takes me to google map but I lose all the associated searches.

  • FLATFILE lOADS IN 3.5 VERSION

    HI BWER'S ANYONE HAVING DOUMENTS ON HOW TO FLAT FILE LOAD IN 3.5 VERSION AND HOW CREATE A TRANSFER ROUTINE  IN 3.5 VERSION ANYONE HAVING FLATFILE LOAD IN 3.5 VERSION PLEASE SEND ME AT [email protected] THANKS BHIMA