将 SSL 与部署在 IBM-WASCE 上的应用程序结合使用
我有一个使用 JSP 和 Servlet 并部署在 IBM-WASCE 2.1 上的应用程序。 我希望应用程序使用 SSL 进行登录。根据文档,我将以下行添加到 web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<!-- Usual servlet mapping code -->
<security-constraint>
<web-resource-collection>
<web-resource-name>Login</web-resource-name>
<url-pattern>/login.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
但是我收到一个错误,指出,
Web 应用程序的 web.xml default/foo/1.0/car 包含安全性 Geronimo 部署计划之外的元素 未提供或不包含 元素 需要配置安全性 相应地。
如何从这里继续?要向文件 geronimo-web.xml 添加哪些元素?
I have an application which uses JSPs and Servlets and deployed on IBM-WASCE 2.1.
I want the application to use SSL for login purposes. Based upon the documentation, I added the following lines to web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<!-- Usual servlet mapping code -->
<security-constraint>
<web-resource-collection>
<web-resource-name>Login</web-resource-name>
<url-pattern>/login.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
However I get an error which states,
web.xml for web app
default/foo/1.0/car includes security
elements but Geronimo deployment plan
is not provided or does not contain
element
necessary to configure security
accordingly.
How to proceed from here? What elements to add to the file geronimo-web.xml?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
[已解决]
必须在文件 geronimo-web.xml 中进行以下修改。
[Solved]
The following modifications had to be done in the file geronimo-web.xml.