How can i call a variable from one jsp file to another? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

How can i call a variable from one jsp file to another?

I want to call a variable which stores random number to another jsp file. Problem is when i include the source file, to the jsp file inwhich i want the varible to call, It generates new number. but i want the previous generated number.

29th Jan 2017, 6:16 PM
Shivam Verma
Shivam Verma - avatar
1 Respuesta
+ 1
Option 1: Use session variables. Those will remain in memory on the server for the life of the session. Option 2: Database Option 3: Write to file and include the file in the subsequent jsp files. I have used all 3 in php.
2nd Feb 2017, 3:09 AM
Kevin Gilkey-Graham
Kevin Gilkey-Graham - avatar