This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi all, I am coding a JSP page in which iam declaring some variables and initialising to some initial values. In the course of the page these variables value are changed depending on business logic, everything is ok for the first time, but when i call the jsp for the second time it is not initialising to the initial values which i have set at the time of decleration, instead it is keeping the values of the previous call. When i change those variables in bussiness logic it is changing but when my bussiness logic does not touch these variables i want my variables to have the initial values which i have set during the decleration, this is not happenning. Why on each call of the jsp, the decleration part is not executing, if it does not execute how do i accomplish my objective. Thanks in Advance,
------------------ Regards, V. Kishan Kumar
Regards,<BR>V. Kishan Kumar
Joined: Sep 26, 2000
Please somebody come forward to reply to my query. Thanks In Advance ------------------ Regards, V. Kishan Kumar
If your variable declarations are inside a <% %> section in your JSP, they will be initilaized on each request. If you wish them to remain between requests you should either put the values in the session, put the values in the servlet context, or declare them in a <%! %> section.