Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Problems with passing integer variables in JSP
Problems with passing integer variables in JSP

int -> String

String str_val = Integer.toString(int_val);

String -> int

int int_val = Integer .parseInt(str_val);

------------------------------------- -------------

The page cannot store the value of the variable. Only the currently received value can be processed. Once it's processed, it's gone.

When calling from page c, you must first pass the variable from page c to page a, then pass it from a to c, and then pass it from c to b for processing. After the whole process is completed, it can be displayed on the jsp page.

If you want to continue using it, you must continue to pass it on.

Otherwise, you need to use setAttributes and put it into memory. I'm using getAttributes.

But this function is not to store variable values, but to record session information.