一、public string scope()throws Exceptionsession
{app
ActionContext ctx = ActionContext.getContext();get
ctx.getApplication().put("app","應用範圍");//往ServietContext裏放入appstring
ctx.getSession().put("ses","session範圍");//往Session裏放入sesio
ctx.put("req","request範圍");//往request裏放入reqclass
return"sxope";request
}scope
JSP:di
<body>vi
${applicationScope.app}<br>
${aessionScope.ses}<br>
${requestScope.req}<br>
</body>