pree sree

Ranch Hand
+ Follow
since Jul 27, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by pree sree

I got 'the connection' .Thanks everyone for the help given and a special thanks to David!
Class.forName("org.gjt.mm.mysql.Driver") ;-------A
String database = "jdbc:mysql://localhost:test";
Connection con = DriverManager.getConnection(database,"",""); ----------B

I am sorry but i am getting the following error at line B even when i used "com.mysql.jdbc.Driver" in line A

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at conn.getConnection(conn.java:30) ----------B
at conn.update(conn.java:69)
at conn.main(conn.java:96)
Exception in thread "main" java.lang.NullPointerException
at conn.update(conn.java:75)
at conn.main(conn.java:96)

i really appreciate ur help.
[ April 01, 2006: Message edited by: pree sree ]
I have my mysql database in C:\Program Files\MySQL\MySQL Server 5.0\data

how can i put it in my webapp directory?
[ April 01, 2006: Message edited by: pree sree ]
I have connected to my database in access.I am able to retrieve(select * from table) is working.

ResultSet rs = null;
Statement stmt= null;
Connection connection = getConnection();
stmt = connection.createStatement();
rs = stmt.executeQuery("select * from table");



when i do update or insert, I am not getting any error messages but
execute(query) returns false and executeUpdate returns 1 ??


ResultSet rs = null;
Statement stmt= null;
Connection connection = getConnection();
stmt = connection.createStatement();
rs = stmt.execute("insert" or "update" or "delete");

Please help me.
MySQL Driver is at - C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\struts-blank\WEB-INF\lib\mysql-connector-java-3.1.12-bin.jar .

When i am running my java class in eclipse i am getting

java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

I don't know what has gone wrong.

This is the connection part from my code.

Class.forName("org.gjt.mm.mysql.Driver");
String database = "jdbc:mysql:C:/Program Files/MySQL/MySQL Server 5.0/data/test";
Connection con = DriverManager.getConnection(database,"","");

Please help me.
[ March 31, 2006: Message edited by: pree sree ]
i have not changed anything.there is no <jsp-config> tag in my web.xml.Since this is part of my exam prep the web-app issue is not there.

[ March 09, 2005: Message edited by: pree sree ]
[ March 09, 2005: Message edited by: pree sree ]
i am using jakarta-tomcat-5.0.16 and j2sdk1.4.2_04.expression language was working properly.without any reason expression language is not running.what could be wrong?
19 years ago
i am using jakarta-tomcat-5.0.16 and j2sdk1.4.2_04.expression language was working properly.without any reason expression language is not running.what could be wrong?
SSL
I am sorry, I was out of station. I too am preparing for my SCWCD.and this topic is covered in the exam.Please help me.
SSL
I am referring Pro JSP 3rd edition.I am trying to create a https port ,but not working.
I created a certificate keystore as:
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA

and specified a password value of changeit(followed the text).

Then i removed the comments around SSL HTTP/1.1 Connector(server.xml).

I am not getting https://localhost:8443

Please help
[ February 11, 2005: Message edited by: pree sree ]
Thanks for the help
19 years ago
hi,
i am new to web programming, and i am preparing for my scwcd.i am confused regarding the scope types.i.e, when u set the scope=application and scope=session what is the difference and how r these 2 scenarios used in a web application? and also when does the server create a new instance of the servlet?(does it create an object for every request?)(do please suggest some tutorials to clarify these ?s)
19 years ago
1)are the threads in the monitor's waiting pool given more preference than the others?
2)bycalling yield() if u r not giving up the lock how can other threads execute?
yield() puts back the running thread to ready state and wait() puts the thread in the waiting pool of the monitor.both are allowing other threads to execute.then why 2 methods to do the same thing?
is the thread being blocked same as wait()?
[ September 13, 2002: Message edited by: pree sree ]