Results 1 to 4 of 4
  1. #1
    trickyhonesty is offline Member
    Join Date
    Oct 2014
    Posts
    5
    Rep Power
    0

    Default an application web java to insert data into a database oracle from xml files

    hello;

    i want to create an application wich can handle xml files ( display xml files's data on a html page) + insert those data into an oracle database.
    i'm new to that, it a project for my internship. wich API is the most appropriate for that ( Jdom or Xstream or other), wich framework i can use ( there is only 3 IHM : connexion, upload file, display data, confirmation insertion data)?
    how long it takes to make such this application ( for someone new to java like me)?

    thanks in advance for all ur replies and advices

  2. #2
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,991
    Rep Power
    8

    Default Re: an application web java to insert data into a database oracle from xml files

    I am going to analyze the first sentence for you, the rest is up to you:

    i want to create an application
    We're talking Swing, AWT, SWT, JavaFX, Web-based, server side...?

    wich can handle xml files
    Ah, you would need an XML parser for that. If you choose the Java built-in libraries, you'll end up using DOM or SAX. There are hundreds of other XML parsing libraries out there, so pick one you are comfortable with. (Open Source XML Parsers in Java). My guess: you'll most likely end up using the built-in XML parsers. Lots of good examples to be found for those. (Starts here: Trail: Java API for XML Processing (JAXP) (The Java‚„Ę Tutorials)). Are you going to upload those files to the server? Here's a page that will keep you busy for a day or two: java - How to upload files to server using JSP/Servlet? - Stack Overflow. This automatically implies you need to learn servlets.

    display xml files's data on a html page
    There we go, a web application. So you need to learn HTML, probably some CSS as well. You would also need a language to create the dynamic pages. JSP, JSF, Spring MVC with templates are some of your options. Probably JSP is the easiest in your situation (Again, loads of examples available). Then you would need a webserver component who can execute all that code that generates the page. Tomcat, Jetty, JBoss, Wildfly, Glassfish, JOnAS, Geronimo, TomEE. Again, try one out, and see if you like it.

    insert those data into an oracle database.
    And there is a database. So you have to learn JDBC. Grab the Oracle driver from the Oracle pages (JDBC/UCP Download Page). The interwebz is full of examples on how to connect to Oracle. JDBC is learned here: Lesson: JDBC Basics (The Java‚„Ę Tutorials > JDBC(TM) Database Access)

    Now you nailed all the components, it's time to learn how to run your application. You have to learn how to create JARs, WARs, maybe an EAR, and deploy those on the server. Getting the server configuration right can be a bit tricky, so be prepared to dig around countless XML files too... (Well, at least WildFly has only ONE config file thee days.)

    I probably left stuff out, but as you can see, such a simple first sentence can explode in your face if you study exactly what the requirements are. Lesson learned: if you write down a "single line requirement application"™, study EACH and EVERY word of your sentence and see what it means. For example, if you have the word "web" in there, that will all of a sudden add lots of complexity around your little project.

    I won't say anything about the time it takes. That all depends on how much time you can invest, how good a learner you are, what the restrictions are, your age, background, experience, ...
    Last edited by SurfMan; 10-27-2014 at 10:35 PM.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2ô © 2013

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: an application web java to insert data into a database oracle from xml files

    I wonder how this can be an internship and then you're still at the "new to Java" stage - you're in that stage in the first year of your education, not when you're at the part of your education where you can start to prove you know something by putting it into practice in the real world. If you come out of school not knowing how to program Java, not knowing how to work with files and not knowing how to do simple SQL things with a database - something has gone horribly wrong.

    The only answer I can come up with is that you are supposed to learn this stuff on the job - in which case you're here way too soon and are now being intimidated by Surfman's very truthful and nearly complete post long before you are supposed to.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    trickyhonesty is offline Member
    Join Date
    Oct 2014
    Posts
    5
    Rep Power
    0

    Default Re: an application web java to insert data into a database oracle from xml files

    hello,

    i'm a beginner on that for sure , but not from 0, i know html and css ( no problem on that)
    i created my IHMs, i also know some xml i created my xslt file for the transformation xml-> html, i know some java ( jsp/ servlet).
    what i need to know is what framework i can use ( easy to learn and wich can add something to the final result)
    and wich parser i can use if i wanna do the things on the appropriate way?

    Ps :i'm using jdeveloper

Similar Threads

  1. java insert data into database problem
    By chyeeqi in forum NetBeans
    Replies: 3
    Last Post: 03-29-2010, 01:36 AM
  2. Replies: 3
    Last Post: 03-19-2010, 12:59 AM
  3. Replies: 3
    Last Post: 02-28-2009, 09:17 AM
  4. How to insert java Object in oracle database
    By Thilkumar82 in forum Advanced Java
    Replies: 9
    Last Post: 08-13-2008, 11:33 AM
  5. Probeleme with insert into database oracle
    By bachtoutou in forum New To Java
    Replies: 0
    Last Post: 05-24-2008, 11:56 AM

Posting Permissions

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