Thank you for the replies. Ms Access is not a relational databaase. It's just DBMS. I didn't know that PostGreSQL is a open source RDBMS system. All the sqls, table creation etc.. works similar to Oracle or any other RDBMS? I'm working on windows 2000 machine.
--- Antony Paul <[EMAIL PROTECTED]> wrote: > I dont whether MS Access is considered as RDBMS. For > serious > development it is not recommended. Using ODBC have > several problems. I > will recommend PostgreSQL. Now it runs very well on > Windows. But > requires Windows 2000 or higher. You can find it at > http://www.postgresql.org/ftp/binary/v8.0.1/win32/. > I am using it and have no problems. I am posting > my configuration > that I used to set up DBCP. > > server.xml > ----------------------------------- > <GlobalNamingResources> > > <!-- Test entry for demonstration purposes --> > <Environment name="simpleValue" > type="java.lang.Integer" value="30"/> > > <!-- Editable user database that can also be > used by > UserDatabaseRealm to authenticate users --> > <Resource name="UserDatabase" auth="Container" > > type="org.apache.catalina.UserDatabase" > description="User database that can be > updated and saved" > > factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > pathname="conf/tomcat-users.xml" /> > > <Resource name="jdbc/db1" auth="Container" > type="javax.sql.DataSource" > > factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" > driverClassName="org.postgresql.Driver" > > url="jdbc:postgresql://192.168.4.248/antony" > maxActive="20" maxIdle="10" maxWait="-1" > > username="benchmark" > password="benchmark" > /> > > </GlobalNamingResources> > > > TOMCAT_HOME/conf/context.xml > --------------------------------------------------- > <ResourceLink global="jdbc/db1" name="jdbc/db1" > type="javax.sql.DataSource"/> > > TOMCAT_HOME/webapps/web/WEB-INF/web.xml > ----------------------------------------------------------------------------- > <resource-ref> > <res-ref-name>jdbc/db1</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > > > > Did you defined your newly created context web in > server.xml or at > TOMCAT_HOME\conf\Catalina\localhost\some name.xml > > hope it will help. > > rgds > Antony Paul > > > > On Mon, 21 Feb 2005 22:25:59 -0800 (PST), U K Laxmi > <[EMAIL PROTECTED]> wrote: > > Yes i read and did as per the document. When it > didn't > > work, i followed the suggetions given to many > users in > > the mailing lists in the internet and now i guess > i > > messed up. Actually in the error, it says, no > suitable > > driver found. > > > > I'm using Ms Access as it's free. Do we have any > free > > driver available in the form of jar to use in > place of > > JDBC-ODBC bridge driver? Or it's not required if > > configuration is correct. Pls let me know. I've > pasted > > all relevant code in my first mail itself. If time > > permits, any of you can try & give me the > solution. > > It'll be a great help. > > > > I've integrated tomcat 5.5.7 with apache 2. Does > this > > has any impact on the above. > > > > --- Antony Paul <[EMAIL PROTECTED]> wrote: > > > > > If you followed the tomcat docs you will have no > > > problem in DBCP > > > getting to work. Going for Globalnamingresources > is > > > needed if you need > > > to access it will all applications. Try to > configure > > > it as per the doc > > > in following URL. > > > > > > > > > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html > > > > > > follow MySQL config. And no need to put > commons*.jar > > > in commons/lib as > > > TC by default comes with it. > > > > > > rgds > > > Antony Paul > > > > > > > > > On Mon, 21 Feb 2005 21:52:13 -0800 (PST), U K > Laxmi > > > <[EMAIL PROTECTED]> wrote: > > > > I tried without GlobalNamingResources. No > luck. > > > When > > > > googled, i found that if we include > > > > GlobalNamingResource tag, then it will be > > > available in > > > > all web context. > > > > > > > > After spending enough time on that, now i > coded > > > all > > > > database related stuff in JSP in the way we do > in > > > > stand alone application. I mean - > > > > > > > > Coding like this in jspo itself. > > > > > > > > ---- code -- > > > > <%@ page contentType="text/html" > > > import="java.sql.*"%> > > > > > > > > <html> > > > > > > > > <head><title>simmPlan - simple material > planning > > > > system</title> > > > > <script language="JavaScript" > > > > src="/js/default.js"></script> > > > > > > > > <% > > > > > > > > String userid = > request.getParameter("userid"); > > > > String passwd = > request.getParameter("passwd"); > > > > System.out.println("Password: " + passwd); > > > > String pwd = "", str = ""; > > > > int level = -1, ind = -1; > > > > > > > > try { > > > > Connection conn = null; > > > > > > > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); > > > > > > > > > > > > > > conn=DriverManager.getConnection("jdbc:odbc:driver={Microsoft > > > > Access Driver > > > > (*.mdb)};DBQ=C:/tomcat/webapps/db1/db1.mdb"); > > > > Statement stmt = > > > > conn.createStatement(); > > > > > > > > String query = "SELECT * FROM > user > > > > where name = '" + userid + "'"; > > > > > > > > ResultSet st = > > > > stmt.executeQuery(query); > > > > if (st.next()) { > > > > pwd = > > > st.getString("password"); > > > > > > > > level > = > > > st.getInt("level"); > > > > System.err.println("Query > > > > result="+userid+"/"+pwd+"/"+level); > > > > } > > > > else { > > > > ind = > -2; > === message truncated === __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]