0

I have an int variable declared something like this <% int promptId = 0; %> in first jsp and I want to use exactly the same variable in other page, included in first jsp with jsp:include, and I don't know how to do it to be possible to modify that variable in second page and all modification what it will come to be recognized in all pages.

Everything what I've tried was unsuccessful and it gives me this error:

promptId cannot be resolved to a variable

Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
Vlad V
  • 31
  • 1
  • 3
  • Maybe it will be helpful http://stackoverflow.com/questions/14580120/whats-the-difference-between-including-files-with-jsp-include-directive-jsp-in – glw Mar 09 '17 at 22:41
  • A simple solution would be to use a bean class. – Shadab Faiz Mar 11 '17 at 06:55

0 Answers0