从 Tomcat 迁移到 WAS
几周前,我询问有关应用程序服务器的问题。碰巧我的老板要迁移到 WAS,而我的 Web 应用程序也需要迁移。问题是我对应用程序服务器知之甚少。
在我的应用程序中,我使用 web.xml 和 tomcat-users.xml 来定义角色和用户。我必须在 WAS 服务器中执行此操作,那么我需要做什么?我的意思是,我读到它在与 WAS 服务器绑定的 application.xml 中定义了一些安全角色,并且它们需要一些可以查看 ibm-application-bnd.xmi 的 id
似乎我还需要某种ibm-web-bnd.xmi 只是使用相同的用户重新配置我的 web.xml (这让我非常困惑)。
我是否需要创建这些文件(我没有 RAS,只有 Eclipse Galileo(是的,我有时也认为我在硬模式下玩),所以我无法自动执行此操作)或者我可以配置如果没有这些文件,application.xml 和 web.xml 是否正确?我自己或多或少地创建了这些文件,并最终创建了 WAS 已部署的 EAR(它说是正确的)。
对于用户验证来说,这听起来非常复杂,所以我现在不知道我是对还是错。 可能是错误的,因为 WAS 一直显示“com.ibm.websphere.security.PasswordCheckFailedException:未找到用户 wasadmin”。
有没有关于如何做到这一点的有见地的文档?
谢谢!
A few weeks ago I asked about Application Servers. It happens that my bosses are moving to WAS and my web application needs to move along. Problem is I have little idea of application servers.
In my application I used web.xml and tomcat-users.xml to define roles and users. I have to do this in the WAS server, so what do I need to do? I mean, I have read that it defines some security roles in the application.xml that binds with the WAS server, and that they need some ids that look through the ibm-application-bnd.xmi
It also seems that I need some kind of ibm-web-bnd.xmi to just reconfigure my web.xml with the same users (which gets me terribly confused).
Do I need to create these files (I don't have a RAS, just an Eclipse Galileo (yeah, I also sometime think I am playing in hard mode), so I have no way to do this automatically) or can I just configure the application.xml and the web.xml correctly without these files? I have managed myself to more or less create these files and finally create an EAR that the WAS has deployed (correctly, it says).
This sounds a hell of lot complex for just a user validation, so I don't now if I am right or wrong.
Probably wrong, since WAS keeps saying "com.ibm.websphere.security.PasswordCheckFailedException: No user wasadmin found".
Is there any insightful documentation of how to do this?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WAS 有一个基于网络的管理控制台,您只需点击几下鼠标即可配置此类内容。如果我没记错的话,它正在侦听 HTTP 端口 9090 左右,但这也是可配置的。我建议您阅读此红皮书来了解如何使用 WAS 管理控制台。
将
tomcat-users.xml
排除在范围之外。但是,请将security-constraint
和login-config
保留在web.xml
中。WAS has a webbased admin console wherein you configure this kind of things with a few mouseclicks. If I recall correctly, it's listening on HTTP port 9090 or so, but this is configureable as well. I suggest you to read this RedBook to learn how to use the WAS admin console.
Leave the
tomcat-users.xml
out of the scope. However keep thesecurity-constraint
andlogin-config
in theweb.xml
.