Thursday, January 20, 2011

c:set scope

The default scope is page. The options here is page, request, session, application.

<c:set var=”temp” value=”123”/> 

If your jsp page include another page, the included page cannot see the variable “temp” because it is different page context. To make the included page able to access that variable, the scope should be set to “request”

<c:set var=”temp” value=”123” scope=”request”/> 

No comments:

Post a Comment