Thursday, August 4, 2011

Webcity

My web site is hosted by WebCity, an Australian domain registrar and web host, whose motto is "Self Service Savings". And when they say self service they mean self service. They offer a very comprehensive self help library, supplemented by a range of good video tutorials, but the whole site is somewhat cryptic, if you don't know your way around, and they don't really like being contacted.

However, they are also true to their word on savings. Certainly they saved me money on my original domain registrar and on my traditional ISP. The ISP offered free web space, but charged a ridiculous annual fee to domain holders. This didn't include domain registration, which I paid for separately. I guess it covered the one off three minute task of letting the domain registrar know my physical web address, but apart from that, I have no idea how they justified it.

Webcity also offer a MySQL server, and when I plucked courage to ask them about it they assured me that it was on the same server as my web code, and that the server name "localhost" should be used for connections. That sounded pretty good news. It might be an unusual set up, but it gives me a chance to try out my existing Applet code on a commercial server, before re-writing in a more rigorous or generalist way. I therefore set about creating a database on their server.

I mentioned that the Webcity web site is a bit cryptic. Most websites offer on their home page a bold login button, or clearly labeled user id and password fields. Not so this one. You have to know to type "yourdomain/cPanel" into the address field of your browser, and then you will be offered user id and password fields to fill in.

The cPanel, as the name suggests, is a bit like the Control Panel in Windows, with an array of icons allowing you to tweak this and that. They are arranged into groups such as mail files, logs etc. Well down the page is a group called Databases. The first item called MySQL databases offers a GUI to create databases and users. Another item, called phpMyAdmin, offers a GUI to create a table and define fields in one tab, and in another tab it offers an SQL window to type or paste one's own queries. I cut and pasted the one I had used to create the dbAMJ database on my own server. It ran fine, and I added a few lines in the format I intend to use. That was fine, and I deleted a couple as well.

I then modified my applet code to include the following URL for the database:

String url = "jdbc:mysql://localhost:3306/int22853_dbAMJ";

I modified the username and password for Webcity, compiled and uploaded the code files and uploaded the MySQL JDBC driver. I included in the code modifications a few extra diagnostic messages. The applet is designed to display these in a text field.

The applet loaded, and it displayed a message to confirm that the JDBC driver had been loaded. It then displayed an extra message to confirm that it had moved to the next line of code. But nothing came back from the connection "Try" loop. There was no success message and no fail or error message. It was as if it just did not run.

It did this from the website hosted by Webcity, and it did exactly the same on the site hosted on my own IIS server. So after a break of two years, I think I need to post a question in the Java forum.

No comments: