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?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
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?
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.Can anyone provide me
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.
NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:
When asking for help, please follow these guidelines to receive better and more prompt help:
1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
2. Give full details of errors and provide us with as much information about the situation as possible.
3. Give us an example of what the output should look like when done correctly.
Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/
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.
What and where is the database? Is the database online, or on your computer? How do the questions get into the database?