我有一个登录页面,我想在https中显示。在验证用户之后,我想将他传输回http。
所以我在web.xml中声明
<security-constraint>
<web-resource-collection>
<web-resource-name>Login and Restricted Space URLs</web-resource-name>
<url-pattern>/general/enter.jsf</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Rest of the Application</web-resource-name>
<url-pattern>/general/home.jsf</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>我看到登录页面在https中。
但在我看来:
public String doLogin() throws Exception {
...
User user = service.getUserByNameAndCompany(name, company);
......
return "/general/home.jsf";
}bean将用户重定向到
https ://mycomputer:8443/MYProject/general/home.jsf .8443
我希望它能回来
http: //mycomputer:8080/MYProject/general/http.http
我该怎么做呢?
发布于 2010-07-01 12:05:56
JSF导航将重定向到同一个应用程序中的页面(这意味着您只能在https: //mycomputer:8080/MYProject中导航)。
您可以做的是导航到像/general/redirect.jsf这样的页面,然后使用标题或javascript重定向到您想要的url。
https://stackoverflow.com/questions/3157412
复制相似问题