• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

JSP struts - database

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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.

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
  • Simple Struts Example
  • Data Retention in JSPs using Struts
  •  
    Onion rings are vegetable donuts. Taste this tiny ad:
    Smokeless wood heat with a rocket mass heater
    https://woodheat.net
    reply
      Bookmark Topic Watch Topic
    • New Topic