我正在本地测试WebSphere以用于开发目的,现在我想转移到新PC.但我不记得我是如何摆脱标题中的错误.我知道自从引入MQ 7.1如何禁用安全性以来,有大量关于此错误的帖子.我记得上次我做了runmqsc.exe QM_name - > ALTER CHLAUTH(DISABLED).但它不再工作了?!我还需要改变什么,以便任何人都可以连接到队列?
> DIS QMGR CHLAUTH
> 2 : DIS QMGR CHLAUTH AMQ8408: Display Queue Manager details.
> QMNAME(QueueManager1) CHLAUTH(DISABLED)
Run Code Online (Sandbox Code Playgroud)
谢谢.
我正在学习Java EE(从SE迁移),我对Java EE环境中的异步执行感到困惑.
基本上我理解创建Thread或Timer不完全推荐.到目前为止我发现的另一种方法是使用JMS将消息传递给EJB Message Bean,它将以异步方式执行.
有哪些其他方法可以实现此行为?使用JMS的原因看起来对于简单任务来说太多开销.
我有适用于 tomcat web 服务器的 web 应用程序。我想将它迁移到 IBM websphere AS,但我遇到了安全问题。整个应用程序安全性在 web.xml 文件中定义如下:
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>Dynamic pages</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<description>access.</description>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>
<login-config id="LoginConfig_1">
<auth-method>FORM</auth-method>
<realm-name>SecureRealm</realm-name>
<form-login-config id="FormLoginConfig_1">
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/loginFail.jsp</form-error-page>
</form-login-config>
</login-config>
<security-role>
<description>User of the application.</description>
<role-name>user</role-name>
</security-role>
Run Code Online (Sandbox Code Playgroud)
Websphere 忽略所有这些安全性,并允许我从 Web 应用程序访问任何页面而无需显示登录页面。如果我手动转到 login.jsp 并将正确的密码输入到应用程序中,但它会失败,getUserPrincipal()因为它返回 null(没有登录)。如果我把错误的密码转发到 loginFail.jsp,也一样。
服务器日志中也没有错误。
我在做什么错或与 tomcat 不同?
感谢帮助。
我正在检查Web Servlet的新注释,但是我不明白如何init-param从易于修改的位置传递初始参数()。是的,我找到了注解@WebInitParam,但这意味着您必须将值写入代码中,我想这没有抓住web.xml中易于更改的要点。
那这里怎么办?@WebServlet在这种情况下不使用?