Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using mySQL with Applets

 
Jackie Jarboe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After using PHP I was surprised at how difficult it is to get an Applet to store data on the host machine. I found some CGI programs and used them to
keep the data. Would an mySQL database be a reasonable way to store data collected by an Applet? Or is there a better way to use Java and MySQL for web applications?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Applets are nothing like php. If you want the rough Java equivalent of php, look into JSP.

That's like saying "after driving a car, I was amazed to find how hard is to get around on a lawnmower".
 
Jackie Jarboe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would still like to know if it would be possible to store data, from an online quiz I did with applets, in a student database that is SQL. Are you saying that it would be about as easy as driving a lawn mower to work? Now, we are not saying here whether its a push mower or a riding lawn mower, but maybe that doesn't matter.

I knew this wasn't the easiest thing to do with Applets. It was awkward to try to go from one page to the next. But I was really surprised that you can directly store info on the server holding the program. I can understand not being able to store info on the client's computer.

So would JSP work along with SQL?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jackie Jarboe:
I would still like to know if it would be possible to store data, from an online quiz I did with applets
To get this question answered I'm going to move this to the Applets forum. I don't know of any reason that an applet can't make JDBC calls, but having never written one in my life there may be restrictions that I know nothing about.

So would JSP work along with SQL?

Yes. Many a database-driven web application is front-ended using JSP. If you are going to be going down that road, be sure to post questions in the JSP forum as there are some miportant considerations regarding web application structure that should be taken into account from the start.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jackie Jarboe:
I would still like to know if it would be possible to store data, from an online quiz I did with applets, in a student database that is SQL.


It's possible if the database is on the same server where the applet is hosted, but using JDBC from within an applet is generally not recommended for security reasons.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like it's JSP that you're after.

If you are familiar with php, I'm not sure why you went down the applet road to begin with.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic