{
// Write the STATE_KEY out. Unfortunately, this will
// be wasteful for pure server-side state managers where nothing
// is actually written into the output, but this cannot
// programatically be discovered
stateWriter.writingState();
}else
{
//we're in a JSP, let the JSPStatemanager know that we need to actually write the state
context.getAttributes().put(JspStateManagerImpl.JSP_IS_WRITING_STATE_ATTR, true);
}