public class InitListener implements ServletContextListener, HttpSessionListener, HttpSessionAttributeListener {
public InitListener() {
}
public void contextInitialized(ServletContextEvent sce) {
OgnlRuntime.setSecurityManager(null);
}
}
public InitListener() {
}
public void contextInitialized(ServletContextEvent sce) {
OgnlRuntime.setSecurityManager(null);
}
}
2. 修改web.xml,加入此listener
<listener>
<listener-class>tw.nicky.listener.InitListener</listener-class>
</listener>
<listener-class>tw.nicky.listener.InitListener</listener-class>
</listener>
3. 支援:Tiles、後端驗證、@InputConfig、@SkipValidation
4. 不支援:Struts2 FileUpload
沒有留言:
張貼留言