Websphere上JSF 1.2中的HTTP身份验证
我正在Webshere7.0上使用JSF1.2+Tomahawk 1.1.13 My web.xml:Websphere上JSF 1.2中的HTTP身份验证,jsf,jsf-1.2,Jsf,Jsf 1.2,我正在Webshere7.0上使用JSF1.2+Tomahawk 1.1.13 My web.xml: <welcome-file-list> <welcome-file>/search.faces</welcome-file> </welcome-file-list> <security-constraint> <display-name>Websphere Security Constraint<
<welcome-file-list>
<welcome-file>/search.faces</welcome-file>
</welcome-file-list>
<security-constraint>
<display-name>Websphere Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Default</web-resource-name>
<description />
<url-pattern>/*</url-pattern>
</web-resource-collection>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/login.jsp</form-error-page>
</form-login-config>
</login-config>
/搜索人脸
Websphere安全约束
违约
/*
类型
/login.jsp
/login.jsp
my login.jsp:
<form method="post" action="j_security_check">
<jsp:include page="head.jsp" />
<t:panelGrid columns="2" border="1"
columnClasses="unfixedCol,fixedCol"
style="style=text-align:top; margin-top:20px; margin-bottom:20px;">
<t:panelGroup>
Login
</t:panelGroup>
<t:panelGroup>
<h:inputText id="j_username" autocomplete="off" size="20" />
</t:panelGroup>
<t:panelGroup>
Password
</t:panelGroup>
<t:panelGroup>
<h:inputSecret id="j_password" autocomplete="off" size="20" />
</t:panelGroup>
<f:facet name="footer">
<t:panelGroup colspan="4"
style="text-align:right; background-color:#d9e2f2;">
<h:commandButton type="submit" value="Submit" />
<h:commandButton type="reset" value="Reset" />
</t:panelGroup>
</f:facet>
</t:panelGrid>
<jsp:include page="foot.jsp" />
</form>
登录
暗语
当我访问acsess/localhost:9080/App/并输入正确的凭据时,一切似乎都正常,我登录了,但这会带来问题:
感谢您对我们的应用程序的帮助,我们定义如下: web.xml
<security-constraint>
<display-name>Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>*.jsf</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
</security-constraint>
希望这有帮助
<login-config>
<auth-method>FORM</auth-method>
<realm-name>OUR_AUTH_NAME_DEFINED_IN_login-config.xml</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/login.jsp?invalidUser=true</form-error-page>
</form-login-config>
</login-config>