Dear Sir,
I am setting the value in my
java file(UserAuthentication.java
session.setAttribute("cmpValue",new Integer(myInt));.
I am using pagging concept.
Session is mentitained from login to Logout.
Sir i am facing the problem that when i going to calulate Total cmp
by using pagination concept it is calculated for Total cmp value perfectly
for the first time in all page.If again i view the page and select the page
then Total cmp is doubled and also triple for next and next.Onless i am not logout, the session value will not set to zero for each view request.
When i logout then login the session value start with 0 and it will increment cmp value and calculate it in paging concept.
But if again i viewed and using paging concept the it will add previous session value let say 3200+new value in all paging 3200=6400.
Here i should display 3200 in my output.bUT I AM GETTING 6400.
Kindly sir advise me for the needful.
I WISH YOU VERY HAPPY NEW YEAR TO ALL MY JAVARANCH SUPPORT TEAM.
Thanks and Regards
Sumanta Panda
if( session.getAttribute("cmpValue")!=null && session.getAttribute("cmvValue")!=null)
{
int cmp_temp=Integer.parseInt((
String)inVec.elementAt(3));
cmp=cmp+cmp_temp;
}
Integer totalcmp=(Integer)session.getAttribute("cmpValue");
totalcmpdata= totalcmp.intValue()+cmp;
session.setAttribute("cmpValue",new Integer (totalcmpdata));