"Autoloading" actions - dynamic sidbar/news
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Chip_Paul
Posted On:   Sunday, August 25, 2002 04:48 PM

The page I'm working on features a right side bar with dynamicly updated news items (a Blogger-type page). The page is laid out with normal use of the template library. By remapping /index.jsp to an action in the struts and web config files, the action gets called so that news.jsp has a collection of beans to display. My problem is, that if I leave /index.jsp, the other pages that include news.jsp through the template don't get the action called. I then tried using /news.do as the content for the template, but get an error. scope="request" validate="false"> template use    More>>

The page I'm working on features a right side bar with dynamicly updated news items (a Blogger-type page). The page is laid out with normal use of the template library.

By remapping /index.jsp to an action in the struts and web config files, the action gets called so that news.jsp has a collection of beans to display.

My problem is, that if I leave /index.jsp, the other pages that include news.jsp through the template don't get the action called. I then tried using /news.do as the content for the template, but get an error.



			

scope="request"
validate="false">




template use

			









However, the JSPWriter has already begun rendering before the call to /news.do takes place, so the forward to site_news.jsp causes an exception to be thrown:


javax.servlet.jsp.JspException: Cannot forward after response has been committed


This seems like something that should be pretyt straightforward, but I can't find a reference anywhere on how to do it correctly.    <<Less
About | Sitemap | Contact