Help coderanch get a
new server
by contributing to the fundraiser

induz sat

+ Follow
since Aug 06, 2013
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by induz sat

I came across ucanAccess open source driver to get connection to MS access database.

I added all 5 jar files on my project's Library on Netbeans and the .accdb is getting connected. i use the following for the connection :

and it works

Thanks for suggestions. Yes I am using java 1.8 and 32 bit MS2007.

I can get connected with mySQL database with jdbc though.

But still waned to know if something to be installed for JDBC-ODBC connections to work with .accdb.

Thanks again

I created a local database UserInfo,accdb using MS Access 2007 on my c drive and trying to connect in Netbeans 7.4.
I configured DataSource ODBC using adminTool from Control panel.

I get this error:

I am following this tutorial:

what I am doing wrong?

Do I have to run a server for .accdb ? The database is on my local c drive.
What should be the query for checking userName and Password from registredUser table to be valid and matching with the Parameters[ 'user' and 'pw' ] from Login.jsp.
I am getting error and query is not working...please help

Thanks for the clarifications about 2 tables and PKs.
userId in Table 1[registeredUser] is the PK, that would be the same in the userInfo table. I could have stored all the records in a table[ registredUser] but for my learning I want to have 2 tables.

Now the big Q is when the user is being registered through Registration and UserRegistration servlet, how could I keep the PK FK relationship among both tables.

Column name, userId, is the same in both the Tables. userId in registredUser is PK; but I am not sure about its FK realtionship in userInfo

Hope to get some heads-up.

I have 2 tables in a Socialnetwork schema.
[1] registredUser- userId, userName, Password, age, sex,city- userId is PK and Auto Increment
[2] userinfo- userId, userName Password- userId is Pkey and Auto Incremnt

When a user login on a login.jsp, he submits username and Pasword.

These two parameters of login.jsp are checked in registeredUser Table. If matched, he could log in.

If he is unable to log in he has to register in registration.jsp supplying username, password, Age, sex and city parametsrs. These records are added to the RegistredUser table.

How can I add username and password in the userInfo table when the user has successful log in so that next time the check has to be in userinfo table only, not in registred table?

I want to have multiple JDBC-connections (to mySQL databse) in my servlet.

For each servlet I use:

After establishing JDBC connection to SocialNetwork DataBase, I use insert, and update queries to add/update the records on my userInfo db.

i want the same JDBC connection to use in another servlet[userLogin] in the same application/package.

Is there a way I can create another connection servler/class and import it and use it in all other Httpservlets responsible for registering a new user , checking records, updating records the same SocialNetwork Db but different tables??

The 'UserLogin' servlet checks two records userName and Password in 'registredUser' table when the user logs-in through a login.jsp page with userName and password.

I am getting input parameters onto the UserLogin servlet from Login.jsp as below

How should i go about checking name and password in terms of sql queries- right now I am trying to use

to make it clear I have 2 tables[ registredUser and UserInfo.
RegistredUser has these colums- UserId, userName, Password, Age and city. user Id is PK and AI.

UserInfo has userId, userName and Password. User Id is PK and AI in this table too.

How can i establish a relation between userID in two different tables and check/authenticate the userName and password??

The tomcat starts but I get this on my server console in Indigo.
10 years ago
I had Juno SR 2 running with Tomcat7 and mySQL5.6.
I was getting some startup errors and other errors related to TomCat whenever I started Tomcat. So I delete the Tomcat server runtime Environment and also the directory.
• I have downloaded for 64 bit version for window7- 64-bit Windows zip (pgp, md5)

Also my directories for JDK/JRE have been moved from original locations.

Now Tomcat in a different folder and JDK plus JRE in different folder under C: root.

How can I start from scratch again and set JAVA_HOME and CLASSPATH and other environment variables.

What this error on server console indicates??

10 years ago

curly closing brace in line 6

was a typo. Corrected.

Could you please suggest a working link/example example of PreparedStatement generic class and its methods.

Thanks a lot...I can check a record in the same db in the same project through a Login.jsp and LoginServlet. Do I have to close the jdbc connection for another doPost method to connect??

Thanks again

10 years ago
I have UserRegistration servlet that fetches parameters from register.jsp and add records to RegisteredUser db through JDBC on Tomcat.

what is wrong in the code as when i run the jsp it shows all the elements of HTML form. but when i type in something in TextBox and submit it, Tomcat says "you are not connected to the internet". I can visit yahoo though from the same webbrowser. Also it does not add any records in RegisteredUser table.

10 years ago
Thanks for describing about fetching all record vs what is required from the Db.

I have added the suggestions to the servlet and its working now with ResultSet.

Please helpe me to figure out what framework to use for making a simple social networking project.

So far I can get connected using simple JDBC to add a user and authenticate the credential using user's password and ID in a mySQL table.

Should I use Hibernate or just JDBC.

I am trying to authenticate user log in

My Db has a table named UserInfo with 3 columns :- serail [ PK and AutoI], userName and UserPW

when I run this I get "HTTP Status 404 "

what is wrong and how to fix it.

I'd have to use The ResultSet interface

I am getting"" HTTP method GET is not supported by this URL"". Also, I get the same erorr with POST.
what is wrong here??

Also, please move this thread to the right place.

10 years ago
My index.jsp for Login is:

I retrieve the login attributes in a Http servlet named as

How can I authenticate the log in parameters- userName and userPW in the userInfo table.
The userInfo table has three columns- serial#, username, userPW.
Serial# is the unique PK and Auto-Incremental.
I am using JDBC for connection
10 years ago