• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP struts - database  RSS feed

namrata suri
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have written a code in which based on a user's selection, he either inserts data into a db or data is simply displayed from the db.
I had originally written everything in jsps using sql taglibs but was advised to use struts so that the presentation layer was different from the functional. I could implement that for the insert functionality but for the display part, I am having trouble understanding how to achieve it using struts.

So, when the user selects 'display' option, I included a form that autosubmits. So, i made a mapping in struts-config.xml for an action class. Now in the action class, I execute the sql queries and get a result set. How do I pass this to a jsp so that the values are printed.

Amit Vinod Dali
Ranch Hand
Posts: 42
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!