struts2怎么自定义拦截器
写一个struts2+spring的项目 想要自定义一个拦截器验证是否登录了账号
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<package name="pwb-default" extends="struts-default">
<interceptors>
<interceptor name="login" class="interceptor.LoginInterceptor"/>
<interceptor-stack name="loginStack">
<interceptor-ref name="login"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
</interceptor-stack>
</interceptors>
<global-results>
<result name="login">/main/login.html</result>
</global-results>
<default-interceptor-ref name="loginStack"/>
</package>
</struts>