Hi, I have a jsp home.jsp, which includes another jsp, header.jsp (<%@ include file="NEWheader.jsp" %> . My included JSP contains code which needs to be executed in order to display some data on that included page.Now I am converting both of my JSP's to Struts(creating all the related classes as well). Now when my main jsp is loaded (home.jsp) an action is called. But how should I call another action to display information on my included JSP.
This include jsp is included in all my jsp pages. Please Help
ya that's what i have done. Its working fine. Actually my incuded JSP was also displaying lots of data, including hyperlinks. Neways, I have used tiles for now. Is their ne other way as well to achieve this in struts?
Joined: Feb 15, 2005
Tiles is probably your best option. Sometimes, if there's only a little data in the included jsp, such as the title of the page, it's convenient just to keep it as an included JSP and pass the information as a parameter with the include. But with a lot of data, tiles is definitely the best option.
Joined: Aug 27, 2003
One more thing. Though we are going with tiles. I have a question on the same. I have placed my <body> element in my main template jsp(which will contain all other jsp's header, footer, menu and content). Now how to call js methods on body onload as each 'content' jsp will have his own onload method.