It's not a secret anymore!
The moose likes Struts and the fly likes struts1 newby question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts1 newby question" Watch "struts1 newby question" New topic

struts1 newby question

Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 595
I am modifying some very old code where a JSP page would call a store procedure within a page.

So I Have JSP page 1 calls store procedure 1
Page 1 would also import JSP page 2, JSP page 2 would call store procedure 2. The store procedure input parameter would depend on data returned from store procedure 1.

I have created an action for store JSP page 1 which would call down into a DAO layer.

I want to do the same for JSP page 2.

But I am not to call the action for JSP page 2.

The JSP page 1 calls JSP Page 2 directly using the tag.

What I need to do is when JSP page 1 loads JSP page 2 it will call the action for page 2 first.

Not sure how to do this.

Thanks for any help any links.
Richard Golebiowski
Ranch Hand

Joined: May 05, 2010
Posts: 213

I'm not clear on why you want to do it with two different actions for each page. Why not just use the one action to get the data for both pages?
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 595
Thanks for the reply Richrad that is what I did one action for all the JSP included on the main JSP.

I wanted to go for one action per JSP so that the logic would be more tidy and each action would onlybe called when that page was loaded.
I agree. Here's the link:
subject: struts1 newby question
It's not a secret anymore!