Hi,
I've a
jsp that get the sum from a database. and i want to show this on every webpage the user opens in header. Here totally there are 8 pages, right from the time the index page is opened, let it be any page the user opens, the header should be fixed. My current code is as below.
Index.jsp
and my
Servlet is as below
Here everything is working fine. But the problem comes up with when i have multiple pages
I need the same above mentioned header in all the files. If i use a separate file and use a <jsp:include file/>, the entire page gets reloaded as a new page and shows the contents of new page.
Below example will give a better understanding.
I've 2 pages Index, counts these are JSPs.
There is some content in both index page, and the counts page is responsible for displaying counts (in the header) and it done in js using onload method.
When i run my program. The Index page is shown with its content and there would be a redirect to the counts.jsp and the content of counts.jsp is shown as a seperate jsp file, and the contents of index will be missing.
please let me know how can i do it. I want the result to be displayed in the header section itself without missing the body content.
A simple comparison would be with the frames that we use earlier. When we have a frame in header, what ever operations are done will be done there itself, it won't affect the entire age.
Thanks