GeeCON Prague 2014*
The moose likes Struts and the fly likes how to display db data in form load using struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to display db data in form load using struts" Watch "how to display db data in form load using struts" New topic
Author

how to display db data in form load using struts

palak mohapatra
Greenhorn

Joined: Jun 10, 2010
Posts: 4
hi,
Can you send me some sample code for displaying db data in form load using struts.Like when page will load some db data should be pre populated in the form using struts.like filling dropdown etc.My requirement is filing the form with prepopulated data using struts action.Please help me its very urgent.Thanks in advance.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What version of Struts?

Welcome to JavaRanch!
palak mohapatra
Greenhorn

Joined: Jun 10, 2010
Posts: 4
David Newton wrote:What version of Struts?

Welcome to JavaRanch!


struts 1.2 version.
Thanks for contact me. please send me the answer with one example.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The Struts 1.2 FAQ has an entry on pre-populating a form; I'd suggest taking a look at that, and the example application it refers to, first.
palak mohapatra
Greenhorn

Joined: Jun 10, 2010
Posts: 4
I am using struts 1.2.
Could you please send me one sample application for prepopulate db data in a form using page load.Using struts freamework.Its very urgent.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

JavaRanch is NotACodeMill. Please ShowSomeEffort. I pointed you at the FAQ for pre-populating forms. Accessing a database isn't Struts-specific. What are you actually having problems with?

And I know you're using Struts 1.2 (although I don't know why)--that's why the FAQ entry is for Struts 1.2.
palak mohapatra
Greenhorn

Joined: Jun 10, 2010
Posts: 4
David Newton wrote:JavaRanch is NotACodeMill. Please ShowSomeEffort. I pointed you at the FAQ for pre-populating forms. Accessing a database isn't Struts-specific. What are you actually having problems with?

And I know you're using Struts 1.2 (although I don't know why)--that's why the FAQ entry is for Struts 1.2.


Thank you for view it. My problem is ,How to retrieve the database data and display it at the time of page load. actually i am new on that so please give me suggestion to solve it. because it's urgent. In jsp page what i've to write and in jsp page their is no action so iusing action class how i'll do.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

So this isn't related to Struts at *all*? I have no idea what you're asking, or what specifically you're having a problem with. I don't know what else to tell you--there are *countless* examples of accessing databases and displaying the results on a JSP page, both with and without Struts. If you have a specific question relating to Struts, this is the place to ask it. If your question is regarding JSP or JDBC, please ask those questions in their respective forums.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to display db data in form load using struts