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.

Results 1 to 5 of 5

Thread: How to tranfer contents from Database onto the web using Java

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    19
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default 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?


  2. #2
    Super Moderator Sean4u's Avatar
    Join Date
    Jul 2011
    Location
    Tavistock, UK
    Posts
    637
    Thanks
    5
    Thanked 103 Times in 93 Posts

    Default Re: How to tranfer contents from Database onto the web using Java

    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.

  3. #3
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,657
    Thanks
    25
    Thanked 325 Times in 302 Posts

    Default 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.
    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/

  4. #4
    Junior Member
    Join Date
    Aug 2011
    Posts
    19
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default 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 View Post
    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.

  5. #5
    Super Moderator Sean4u's Avatar
    Join Date
    Jul 2011
    Location
    Tavistock, UK
    Posts
    637
    Thanks
    5
    Thanked 103 Times in 93 Posts

    Default 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?

Similar Threads

  1. Replies: 1
    Last Post: August 3rd, 2011, 02:28 PM
  2. Re-Initialize array without loosing contents..
    By Mr.777 in forum Java Theory & Questions
    Replies: 7
    Last Post: June 17th, 2011, 05:47 AM
  3. Reading contents of another window
    By jimmys in forum Java Theory & Questions
    Replies: 8
    Last Post: October 4th, 2010, 11:40 PM
  4. How to create a sorted set from the contents of an array
    By davie in forum Collections and Generics
    Replies: 1
    Last Post: March 11th, 2010, 02:44 PM
  5. Convert contents of JTextArea / JEditorPane to PDF
    By rangarajank in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: September 30th, 2009, 02:38 PM

Tags for this Thread