Tom Bevan

Greenhorn
+ Follow
since Jun 30, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Tom Bevan

Hi,
Excuse me if this sounds dumb, still learning this stuff...
I have happily been working on a web app connected to a mysql databse on my pc using Tomcat for a while. Now I've come to put it on a web server, I seem to be having connection problems to the database.
As I see it, this could be down to two things;
1) The driver is different to the one I used....
2) My code did not use user name and password in the connection, i.e,

I thought that as I wanted anyone to be able to access the database over the web, I would leave them off on the live server version too. But am I wrong, and do I need user and password parameters? And will this mean creating a login screen?
Can anyone help me with this?
Thanks muchly in advance,
Tom.
Please Ignore, Problem Solved!


Tom
21 years ago
JSP
Hello, please forgive me if this is a bit of an obvious one, but I am pretty new to this.
I am trying to obtain a single number from a calculation based on the information contained in 5 jsp generated text or jsp files. Then I'm gonna compare this number to a value in my database, to select a particular response.
So, I have five files with a value in them - just variation on 5, 10 or 20.
I can get these 5 numbers to print out using this method:

However, I want to add them up....and I've tried a few things, but no luck so far.
Here's my code - would really appreciate some help.
Thanks muchly in advance,
Tom

P.S - I also thought of using jsp files, and using jsp:includes, but this doesn't seem to work either. Any suggestions?
21 years ago
JSP
Hi Deepak,
Brilliant, works fine now, thank you very much!!!
(Didn't know you vould do that.....cool!)
Humble thanks!
21 years ago
JSP
Well, currently I don't need the password and name bit, it works ok on Tomcat without, it's only on my home computer at the moment.
It is the display of the result set that I'm having trouble with, but thank you anyway.
21 years ago
JSP
Hello,
Please bear with me if this is a simple problem, still getting my head round this stuff.
I have created a connection and successfully managed to query a MySQL db, using an HTML form with radio buttons.
However, the while loop gives me all of the results, (even if they are hidden - just moving down the record set), and I just want the one associated with the radio button.
On modification, I could not get the process.jsp to display anything other than the first correct answer.
So I'm stuck between all the resultsSet, or just the first part of it. Ideally, each radio button will select the correct record - but how?
Can anyone see where I am going wrong?


Here's some code - version 1 and 2.
Version 1:


... And this is Version 2:

21 years ago
JSP
Hello,
Pleased to say my driver is now loading and my connection is up and running!
Erm..I was confusing my Path and Classpath. Ooops.

Thanks again for all your help.
Cheers,
Tom
Hello,
Many thanks for looking at this for me, I will see if I can sort it out.
(I am using Tomcat though..honest!)
I'll let you know how I get on.
Thanks again,
Tom.
Hello,
This is my first question, sorry if this is a bit obvious, but I am baffled. Find classpath stuff a little scary!
Have followed as many suggestions and tutorials as I can find but I still can't seem to connect to the mySQL database I have created using Connector/J.
Tried to follow the Cattle Drive JDBC tutorial 1, but same error message appears when I try to run the Test java file.
1. I have installed MySQL (C:\mysql), created a databse (bibliography), and created a little table (AUTHOR). I am able to see the table in the console: sql>select * from author
2. I have downloaded the latest version of Connector/J (mysql-connector-java-3.0.8-stable.zip), and unzipped the zip file into my C:\ directory.
3. I copied the mysql-connector-java-3.0.8-stable-bin.jar to the C:\j2sdk1.4.1_01\jre\lib\ext folder, and placed it in the jakarta tomcat 4.1.24\common\lib directory.
Should I alter my classpath as well?
My classpath currently looks like this:
%path%;C:\j2sdk1.4.1_01\bin;;C:\apache-ant-1.5.3-1\bin;C:\MYSQL\BIN;

4. I have succesfully compiled a Java program usingTextPad, (Test.java):

5. When I run this java file, I get this message:
"...could not load JDBC driver:java.lang.ClassNotFounfExcepption: mysql.jdbc.Driver"
What am I doing wrong?
Tom Bevan

[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ July 02, 2003: Message edited by: Dirk Schreckmann ]