What will happen when I use the same bean id for different JavaBeans in a <jsp:forward> scenario?
Created May 4, 2012
In the <jsp:forward> scenario, you are compiling separate JSPs, so using the same id is allowed as you do not have an issue of local script variable names colliding.
However, whether you get the same or different JavaBean instance depends on the scope you set. If you use request, session, or application as your scope, it will find the instance you used on the first page. If you are doing this but attempting to use a different class, you will get a ClassCastException.