File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Get database values on page load
 
Similar Threads
reading DB at runtime (hibernate)
Finding number of a rows in a resultset...
maximum no of values listbox can hold
JSF Edit Page
Search Components on Client Screen