This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
when this jsp is accessed first time, it will run JspInit() thus incrementing x by 1.Then, <%= x++ %> would increment x by 1. By now x=2. Now if you access the same instance 2nd time, JspInit() wouldnot be called. just <%= x++ %> would increment x by 1. So the final value of x will be 3.