Is this a legacy JSP? Modern JSPs should not contain Java code.
In any case, of course there can be no passing of the data from the JSP to the target of the form submission. Remembeer that the sole purpose of the JSP is to generate an HTML page to send to the browser. Once that happens, the JSP is long gone.
You'll either need to use hidden inputs in the form to carry the data, or store the data in the session for later retrieval.