| Author |
Retrieving data from database.
|
johnathan keats
Greenhorn
Joined: Nov 19, 2009
Posts: 7
|
|
Hi guys and gals,
I'm a Java Developer who is new to all this databasing business. I know MySQL and I know Java, but I don't know how to bring the 2 together.
I have set up an external Oracle 11g datasource on my Eclipse Workspace. I have previous production code which is based off of Struts, Hibernate and JSON and I could theoratically just copy and paste it over, but I am not sure which classes are relevant. The front end of the old production is based on Javascript whilst the middle/back is in Java. I don't have any of the javascript code but I am told that it follows a regular Struts model.
The previous code doesn't have any comments, but I can identify:
-DAO classes (2, actually. One of them is an interface which isn't implemented in the java code. Uses Hibernate)
-Data Service controller class (uses javax.servlet and MVC)
-JSON Data Service (implements a base Data Service class, not related to the Data Service controller it seems)
-Action classes (which look like data structures, some uses javax.persistence, some uses javax.servlet and org.apache.struts.action)
-Action Form classes (again, look like data structures)
-Beans
Now I know the basic struts framework of App ---> DAO ---> DataSource ---> Beans ---> App
But all these external technologies (JSON, servlet, struts.action, hibernate, etc.) confuses me. I know through research as to what they do, but I am unsure as to how to implement it in my project.
Can someone please tell me out of those 6 groups of classes, where they would go? i.e. App --> ?? --> ?? --> ..... --> datasource [and back]
As well as any further reading materials on how to retrieve data from a datasource in Eclipse, i.e. where ORM would go in the above diagram, etc. would be awesome.
Lastly, do I need to change anything in my web.xml or any other config file?
Thanks in advance!
|
John Keats is a poet, NOT my real name!
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32599
|
|
Java™ Tutorials. Use ctrl-F and "JDBC" and you will find a nice introductory tutorial
|
 |
johnathan keats
Greenhorn
Joined: Nov 19, 2009
Posts: 7
|
|
Campbell Ritchie wrote:Java™ Tutorials. Use ctrl-F and "JDBC" and you will find a nice introductory tutorial 
Thank you for the link
Is there anything more Struts-specific?
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32599
|
|
1: You're welcome
2: Don't know. Sorry
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: Retrieving data from database.
|
|
|