• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting DataSourcein jsp(struts)

 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai All,

commonly we will get DBConnection in action class using getDataSource(request) right? .but i want to get this connection in my struts jsp file..
is it possible?

because when i click the element(employee) of menu..i have to display all the employee(in employee.jsp) which are in database..in this case you should not go any actionclass...(only you have to use javaclass)..is their any idea?

please anyone can explain me..how to solve this problem?

thanks & regards,
seetharaman
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think you quite understand what's going on here. Let's say we have a web page that displays a list of employees so we can select one and display his details (sound familiar?). We request the page with the list of employees, a Struts action is invoked, populates a list from a database and a JSP displays it. At the point that we actually see the list, it's just HTML in a web browser. There's no persistent connection between our browser and the web server or database that we can use to populate the employee's details. We need to make another request from the web server so we can either load another page (conventional web apps) or request an XML document and manipulate the current page (AJAX).
[ April 04, 2008: Message edited by: Joe Ess ]
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Ess

regards,
seetharaman
 
reply
    Bookmark Topic Watch Topic
  • New Topic