PDA

View Full Version : Database driven Java Program


kramx7
09-01-2006, 09:14 AM
i want to create an application in java. and i want to use a database.
somewhat like a network program where the database is in one server.
i only know basic java program. Can applets be programmed to use database?
what database will work best for java?
can anyone give me some nice tutorial site on java which uses database.

Hope someone would help me.
Thanks...

QiSoftware
09-01-2006, 03:56 PM
Java servlets or JSP can access server side databases. Java applets cannot access server side databases. They are client side programs and most databases are server side.

A Java applet written as a main program maybe able to access a local database, however I have not tried this combination.

Finally, I do not know of any good tutorial sites but I would try Google.

Q...

kramx7
09-04-2006, 12:25 AM
Thanks for that information QiSoftware.

Im just wondering about JSP. I know a little bit on PHP.
In php, i used form elements to get the get data from the user like textfield,checkbox.

In JSP, do i still use the form elements in getting datas from the user?
or the buttons and textfields used in JSP are those built GUI components (JButton, JTextField)?
Can someone give me a link on a nice JSP tutorial.
Thanks..

Phill
09-04-2006, 01:20 PM
I think you would be best going down to your local library and getting out a book or three on JSP and / or J2EE.

What you're asking is too complicated to be answered by a simple tutorial!

Aradon
09-04-2006, 06:58 PM
Thanks for that information QiSoftware.

Im just wondering about JSP. I know a little bit on PHP.
In php, i used form elements to get the get data from the user like textfield,checkbox.

In JSP, do i still use the form elements in getting datas from the user?
or the buttons and textfields used in JSP are those built GUI components (JButton, JTextField)?
Can someone give me a link on a nice JSP tutorial.
Thanks..

You don't need to go to the library. The tutorialson JSP will help, just use google.

You still get elements from the form and then depending on how you do it (whether you handle the post through the jsp or through a servlet) depends on how it's handled.

JSP is more powerful then PHP for various reasons (that include the java library), but php is more...intuative.

kramx7
09-07-2006, 09:26 AM
You don't need to go to the library. The tutorialson JSP will help, just use google.

You still get elements from the form and then depending on how you do it (whether you handle the post through the jsp or through a servlet) depends on how it's handled.

JSP is more powerful then PHP for various reasons (that include the java library), but php is more...intuative.

Thanks for the help guyz, I think i have to buy a book on Java.

I have another question, can I still used the JButons or JTextfield when i'm going to program in JSP or servlets? I'm just concern on the user events of the GUI components. Because i don't like to used javascript.

I hope someone would still help, answer me .
Thanks.

Aradon
09-07-2006, 03:26 PM
Thanks for the help guyz, I think i have to buy a book on Java.

I have another question, can I still used the JButons or JTextfield when i'm going to program in JSP or servlets? I'm just concern on the user events of the GUI components. Because i don't like to used javascript.

I hope someone would still help, answer me .
Thanks.

No, since the JSP page is server side there are no client side buttons such as the JButton or JTextField. Basically you're using html and jsp. The servlet is like your backbone that allows for safe database management as well as various other useful things.

Even if you were using php you'd still have to use forms with html. You could get around validating through javascript if you wanted to, it's just eaiser to do it with javascript rather then sending out to the server for validation.