Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts1 newby question

 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 213
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic