I have a JSF 1.2 based Servlet. Am doing session invalidation if a user stays idle for some time. I have to show a Jquery dialog box to user 1 minute before session invalidation happens and ask if the user wants to continue or logout.
I have the code for Jquery dialog box in a xhtml page (session.xhtml). I have nearly 15-20 pages in my web application. A user can remain idle in any of those 15-20 pages. So, I need to include session.xhtml page in all of my xhtml pages. Am doing this by using below piece of code in all of my pages.
<ui:insert>
<ui:include src="/session.xhtml" />
</ui:insert>
I have 2 problems here.
a) As the number of page grows in my web application, I need to keep on adding above code to each page
b) Code maintainability : Down the line, if some one else has to develop some pages in my web application, he may not remember to include the above code
So, the question is, is there any way in which I can put this page (say some where in web.xml or some xml files) by which by default this session.xhtml will be available to all pages in my web application?