dcsimg

How can I access the same JavaBean instance from different JSP files?

John Zukowski

Assuming the JSP files are on the same server and using the same ServletContext, just use application scope for the bean component.

<jsp:useBean id="localName" class="Counter" scope="application" />