struts2-ssl-plugin的重定向错误

时间:2010-06-19 19:27:57

标签: tomcat ssl redirect struts2

我正在尝试让我的Web应用程序的登录部分使用SSL。

我正在使用带有struts2和struts2-ssl-plugin的Tomcat(独立,没有apache),并且设法至少获得必要的端口和连接器,但是当我尝试打开登录页面时,插件重定向在端口80和443之间来回。

我的源代码的唯一更改是将@Secured添加到登录操作类

这是我的struts.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
    <constant name="struts2.sslplugin.httpPort" value="80" />
    <constant name="struts2.sslplugin.httpsPort" value="443" />

    <package name="hitPrint" namespace="/" extends="ssl-default">
        <interceptors>
            <interceptor-stack name="SecureStack">
                <interceptor-ref name="secure" />
                <interceptor-ref name="defaultStack" />
            </interceptor-stack>
        </interceptors>

        <!--
            Regular Actions
          -->

        <action name="Login_*" method="{1}" class="hitPrint.web.login.Login">
            <result name="input">/hit_print/Login.jsp</result>
            <result name="success" type="redirectAction">Overview</result>
        </action>

            <!-- and more -->

        <!--
            Chains - Aliases for other actions, e.g. default methods
        -->

        <action name="Login">
            <result type="chain">Login_input</result>
        </action>

            <!-- and more -->

        <action name="">
            <result type="chain">Login_input</result>
        </action>

        <!--
         Others - Static ressources and more
          -->

        <action name="Druck_Logo">
            <result>/hit_print/Druck_Logo.jpg</result>
        </action>
    </package>
</struts>

我希望这是足够的信息。正如我所说,连接器在server.xml中启用,端口为80和443。

0 个答案:

没有答案
相关问题