Reputation: 121
Using, Struts 2 + JSP
I have an index.jsp page which I'd like to display some data from database.
I would like to have my web sever automatically fetch the data from database and send the result to struts's value stack. So I can refer to them in my index.jsp page.
I am wondering how to trigger an struts action without sending a request?
I know I can use ajax to achieve this result, but I'd like to avoid making two calls to my web sever.
Upvotes: 1
Views: 559
Reputation: 121
I found the solution to use
<s:action >
tag.
Here is an example
Struts 2 Action tags, retrieving properties
Upvotes: 1