I have a jsp that uses a 'counter' (Integer) object to keep track of the various pieces of the page that are displayed.
There are three major sections of the page, each implemented using a separate jsp that is jsp:included.
So it basically looks like this:
JSP #1
<html> <body> <jsp:include page="include1.jsp" /> <jsp:include page="include2.jsp" /> <jsp:include page="include3.jsp" /> </body> </html>
I need the çounter to be passed in to the first jsp:include, updated (addition only, if that matters) and have the updated value handed in to the next jsp:include, and then have the newly updated value haded in to the next jsp:include.
So counter starts at 0. include1.jsp updates this variable to 3. include2.jsp starts with the value 3 and updates to 5. include3.jsp starts with the value 5 and updates to 9.
I have this whole setup working well with all the other necessary data that needs to be handed in to the jsp:includes, but I can not for the life of me figure out how to have the /same/ object be used in all places so that it will be updated by the various jsp:includes.
Is this even possible?
Any other way to achieve the functionality I'm looking for? (use a counter across all jsp:includes)
Any and all help will be greatly appreciated.