MyFaces 1.2.8 导致 Tomcat 6 在部署时崩溃
我有一个使用 MyFaces 1.2.8、Facelets 1.1.14 构建的 JSF 应用程序,并通过 Eclipse Ganymede 中的插件使用 Tomcat 6 构建它。
我刚刚安装了上述库的最新版本,在构建时,应用程序部署正常,服务器启动,我立即得到:
javax.servlet.ServletException: javax.crypto.BadPaddingException: Given final block not properly padded
谷歌搜索这个指向我 这个 页面,其结果是使用此禁用 MyFaces 和 Facelets 的错误处理
<context-param>
<param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>false</param-value>
</context-param>
<error-page>
<exception-type>javax.servlet.ServletException</exception-type>
<location>/error.jsp</location>
</error-page>
,最重要的是使用此:
org.apache.myfaces.USE_ENCRYPTION
设置为 false。我不想这样做,但没有其他有用的信息。还有其他人知道这个问题是否有解决方法?我最近才从莫哈拉迁移过来,我不想再回去了。
我们认为降级 MyFaces 有用吗?我要尝试一下。
谢谢IA。
I've got a JSF app built with MyFaces 1.2.8, Facelets 1.1.14 and building it with Tomcat 6 through it's plugin in Eclipse Ganymede.
I've just installed the latest versions of the above libs and on build, the app deploys ok and the server goes to start and immediately I get this:
javax.servlet.ServletException: javax.crypto.BadPaddingException: Given final block not properly padded
Googling this one points me towards this page the result of which is to disable the error handling of MyFaces and Facelets using this
<context-param>
<param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>false</param-value>
</context-param>
<error-page>
<exception-type>javax.servlet.ServletException</exception-type>
<location>/error.jsp</location>
</error-page>
and most importantly use this:
org.apache.myfaces.USE_ENCRYPTION
set to false. I don't want to do this but there's no other useful info. Does anyone else know whether there's a workaround for this problem? I've only recently migrated from mojarra and I don't want to have to go back.
Would downgrading MyFaces work do we think? I'm going to try it.
Thanks IA.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一番考察后,我自己的建议是在这种情况下停止使用 MyFaces,安装正确的 Mojarra 运行时来支持您正在做的项目,确保您正确安装了所有 jar(我没有),仔细检查您的Facelets 配置并阅读手册。这是使用不同的 JSF 实现的一种解决方法,但它确实有效。
After scouting around, my own suggestion is to desist from using MyFaces in this situation, install the right Mojarra runtime to support the project you're doing, ensure you have all the jars installed correctly (which I didn't), double check your facelets configuration and read the manuals. It's a bit of a workaround using a different JSF implementation but it worked.