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

Get database values on page load

Juan Porras Antonio
Greenhorn

Joined: Feb 16, 2010
Posts: 11
Good night from Spain.

I'm a newbie in struts2 and I have this doubt:

I need to load dabatase values on page load to fill a displaytag table. I can get this values from action (doing submit) but I need fill this table in index.jsp.

Is there any way to do this?.

I'm spanish, please, sorry for my poor english.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31076
    
233

Juan,
Welcome to JavaRanch!

IF you have the values in the actin, you can store them in an attirbute in the request. That way they are available when you paint the JSP.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Juan Porras Antonio
Greenhorn

Joined: Feb 16, 2010
Posts: 11
Yes, it works¬°¬°.

I have a problem with display tag now in paginator mode. When I click to sort list, submit and back to index.jsp, then, page load, action load and table is not sorted.

I'm a newbie, sorry for asking bother questions.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Get database values on page load