How to tranfer contents from Database onto the web using Java
I have some data in the database and I want to publish it on the web at a given url.I want to do it using Java.Can anyone provide me a simple way of doing this?
Re: How to tranfer contents from Database onto the web using Java
Quote:
Can anyone provide me
Do you want 'provide' or 'suggest'? If you want the contents visible on the web but don't want to provide edit access to the data via the web, your very simplest option would be to use Java to generate static web pages and upload those to your web server. After that, you're into Java-based web servers and I'm not sure any of them would count as 'simple'. It very much depends on what you want to do with the data.
Re: How to tranfer contents from Database onto the web using Java
You will obviously need to post to a website that is your making.
If your host allows remote access, you can create a text document or something and do an FTP call in java to put the document on your website. Alternatively, if your host allows databases and remote access, you can do database queries to your online database.
If your host doesn't allow remote access, your best bet would be to create an applet which you would embed to your website (possibly on a hidden url and password protect it) and upload the data by locating it on the harddrive. This is not quite as straightforward as one would hope however, since you will need to sign the applet or use a property file to allow the applet to access the user's local drive (since applets are not allowed to do that by default). Since the applet would be on your server, you would be accessing the online files locally and the user's local drive files remotely (technically speaking).
Nothing of this type is too simple, but if you provide a little more info on what you are trying to do, someone may know your preferred route.
Re: How to tranfer contents from Database onto the web using Java
Actually the database contains questions for conducting surveys.I need to upload these Questions on the web along with the options that the users will select for registering their answers (obviously I need to provide them with selection boxes like a checkbox) and the host do provides remote excess as the users can sit at any comp and login to take the survey.
Quote:
Originally Posted by
aussiemcgr
You will obviously need to post to a website that is your making.
If your host allows remote access, you can create a text document or something and do an FTP call in java to put the document on your website. Alternatively, if your host allows databases and remote access, you can do database queries to your online database.
If your host doesn't allow remote access, your best bet would be to create an applet which you would embed to your website (possibly on a hidden url and password protect it) and upload the data by locating it on the harddrive. This is not quite as straightforward as one would hope however, since you will need to sign the applet or use a property file to allow the applet to access the user's local drive (since applets are not allowed to do that by default). Since the applet would be on your server, you would be accessing the online files locally and the user's local drive files remotely (technically speaking).
Nothing of this type is too simple, but if you provide a little more info on what you are trying to do, someone may know your preferred route.
Re: How to tranfer contents from Database onto the web using Java
What and where is the database? Is the database online, or on your computer? How do the questions get into the database?