Results 1 to 15 of 15
Like Tree1Likes
  • 1 Post By Norm

Thread: Please help in creating java applicaton

  1. #1
    kkji is offline Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    0

    Default Please help in creating java applicaton

    Please help in creating java applicaton with Hints or links

    Problem:

    There is a db consisting of student academic records having (last,middle,first),rollno,address(3 lines,city,PIN).

    Write down the dtd for this and write an application fragment to create an xml document from the student db.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,544
    Rep Power
    23

    Default Re: Please help in creating java applicaton

    The first thing you should do is design the logic and the GUI for your program.
    Then start the .java source file with some comments describing the logic and what the program is to do.

  3. #3
    kkji is offline Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    0

    Default Re: Please help in creating java applicaton

    Logic , which I have at present in my mind is
    1) Create dtd
    2) Make a java program which in his sytem.out.println or out.println using that dtd
    3)fetch the values from database and put like xml format in your output statements.

    Is this ok? Please advice.

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,685
    Rep Power
    8

    Default Re: Please help in creating java applicaton

    Quote Originally Posted by kkji View Post
    Is this ok? Please advice.
    What happened when you tried it?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    kkji is offline Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    0

    Default Re: Please help in creating java applicaton

    I did not try it.

    As far I know we can make db to xml directly ( in ms sql server)

    So, do we any short cut way to do this by just importing some package?

  6. #6
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,685
    Rep Power
    8

    Default Re: Please help in creating java applicaton

    Quote Originally Posted by kkji View Post
    So, do we any short cut way to do this by just importing some package?
    No. Simply importing a package does not do anything on its own.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  7. #7
    kkji is offline Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    0

    Default Re: Please help in creating java applicaton

    I got you. I have to write logic also :-)

    But is my understanding correct.

    Do we have any package which can do it in short cut way?

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,544
    Rep Power
    23

    Default Re: Please help in creating java applicaton

    List out the steps you want to do in a detailed list of steps, and perhaps someone will know of a package that will do that step.

  9. #9
    kkji is offline Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    0

    Default Re: Please help in creating java applicaton

    My dtd code:
    <!ELEMENT student_record (student+)>
    <!-- Here "+" means 1 or more time -->
    <!ELEMENT student ( name,rollno,address)+>
    <!ELEMENT name (last,middle,first)>
    <!ELEMENT last (#PCDATA)>
    <!ELEMENT middle (#PCDATA)>
    <!ELEMENT first (#PCDATA)>
    <!ELEMENT rollno (#PCDATA)>
    <!ELEMENT address (line1,line2,line3,city,pin)>
    <!ELEMENT line1 (#PCDATA)>
    <!ELEMENT line2 (#PCDATA)>
    <!ELEMENT line3 (#PCDATA)>
    <!ELEMENT city (#PCDATA)>
    <!ELEMENT pin (#PCDATA)>

  10. #10
    kkji is offline Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    0

    Default Re: Please help in creating java applicaton

    XML file which I created using above dtd
    <?xml version="1.0"?>
    <!DOCTYPE student_record SYSTEM "Student.dtd">
    <student_record>
    <student>
    <name>
    <last>
    Ga
    </last>
    <middle>
    Kr
    </middle>
    <first>
    Ke
    </first>
    </name>
    <rollno>
    766
    </rollno>
    <address>
    <line1> 123 </line1>
    <line2> pq </line2>
    <line3> Nb </line3>
    <city>Alma</city>
    <pin> 28776 </pin>
    </address>
    </student>
    <student>
    <name>
    <last>
    ji
    </last>
    <middle>
    ku
    </middle>
    <first>
    raje
    </first>
    </name>
    <rollno>
    709
    </rollno>
    <address>
    <line1> 573 </line1>
    <line2> rtes </line2>
    <line3> ti </line3>
    <city>arh</city>
    <pin> 29887 </pin>
    </address>
    </student>
    </student_record>
    Last edited by kkji; 09-26-2011 at 06:48 PM.

  11. #11
    kkji is offline Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    0

    Default Re: Please help in creating java applicaton

    Can Experts see whether I am going in right direction or not.
    My target is as follows Now:
    - Will create the db as per my xml which I created as per dtd
    - Using jdbc will fetch the values of db in xml format.

  12. #12
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,544
    Rep Power
    23

    Default Re: Please help in creating java applicaton

    So far there is no java programming involved.
    KevinWorkman likes this.

  13. #13
    kkji is offline Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    0

    Default Re: Please help in creating java applicaton

    But now it will come , after your confirmation.

  14. #14
    kkji is offline Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    0

    Default Re: Please help in creating java applicaton

    Hi experts,

    I am not able to create <?xml version="1.0" encoding="UTF-8"?> this first line of xml in jsp.

    But after running jsp program I am seeing this line "<?xml version="1.0" encoding="UTF-8"?>" in view source of code not in jsp page body.

  15. #15
    kkji is offline Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    0

    Default Re: Please help in creating java applicaton

    solved the issue by using text/xml as content-type.

Similar Threads

  1. Replies: 9
    Last Post: 07-29-2011, 02:18 PM
  2. how to start and stop other java applicaton
    By Jhovarie in forum Threads and Synchronization
    Replies: 1
    Last Post: 02-23-2011, 08:51 AM
  3. Creating sessions in java
    By Kelly in forum New To Java
    Replies: 7
    Last Post: 07-05-2010, 01:46 PM
  4. applicaton for nokia S60 devices(Translator), need help
    By Basit781 in forum CLDC and MIDP
    Replies: 0
    Last Post: 05-18-2010, 03:42 PM
  5. creating image using java
    By mmahesh_mca in forum New To Java
    Replies: 1
    Last Post: 04-26-2008, 11:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •