aspose file tools*
The moose likes Struts and the fly likes getting details from database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "getting details from database" Watch "getting details from database" New topic
Author

getting details from database

kirankumar dondapati
Greenhorn

Joined: May 25, 2007
Posts: 4
how to get values from database and display them to the user using struts frame work? please write the code
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

Hi,


please write the code


I dont think here anyone will take the assignments

What have you written till now or thought of writing? Let us know that first.

Even if not in Struts, are you aware of retrieving the data from the database and display it? If your answer is NO to this question, please read about JDBC and the way you can interact with database and how you can get the values from the database. As this is the basic for any database related operations in your application.

Then you can think of displaying it in JSP and through Struts.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367
First of all you should not connect to database direct from Struts actions. This should be done in the model layer. The model layer can be built outside the struts framework so the best place to ask this type of question is in the JDBC forum, or check the Hibernate ORM framework.

When I googled "database connection in struts" I got a lot of hits. Haven't read them but please try google for this first

Sorry Posted this at the same time.

// Mathias
[ May 25, 2007: Message edited by: Mathias Nilsson ]

SCJP1.4
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

Hey Mathias,

This happened with me also once. That too exact replica of the answer

Stay Cool
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getting details from database