- 浏览: 47542 次
- 性别:
- 来自: 深圳
文章分类
出自:http://www.mail-archive.com/users@myfaces.apache.org/msg45187.html
I have an issue when STATE_SAVING_METHOD is set to client. If I undeploy and redeploy the application while the application is being used, I get a "javax.crypto.BadPaddingException: Given final block not properly padded". Presumably this is happening because MyFaces is attempting to recover invalid state from a session that is no longer valid. Is this a common problem? How do people normally get around this?
Yes, I've been having this problem too and have just got to the bottom
of it. It has been mentioned a few times on this list going back to early
2007 but I never saw a solution before.
The problem is a bug in the StateUtils class. Encryption of client-side
state saving is supposed to be off unless you enable it, but is in fact
ON unless you DISABLE it!
The problem is that if you don't specify a secret (because you think
you're not using encryption), MyFaces will generate one and place it
in application context; but this will change when you redeploy, and
the secret used in pages in users' browsers from before the redeploy
will then fail.
I've logged this as a bug in the ASF JIRA (it is issue
MYFACES-1786), but the workaround is either to explicitly
disable encryption, like this:
<context-param>
<param-name>org.apache.myfaces.USE_ENCRYPTION</param-name>
<param-value>false</param-value>
</context-param>
(note that "false" must be in lower case!) or to set a secret.
I have an issue when STATE_SAVING_METHOD is set to client. If I undeploy and redeploy the application while the application is being used, I get a "javax.crypto.BadPaddingException: Given final block not properly padded". Presumably this is happening because MyFaces is attempting to recover invalid state from a session that is no longer valid. Is this a common problem? How do people normally get around this?
Yes, I've been having this problem too and have just got to the bottom
of it. It has been mentioned a few times on this list going back to early
2007 but I never saw a solution before.
The problem is a bug in the StateUtils class. Encryption of client-side
state saving is supposed to be off unless you enable it, but is in fact
ON unless you DISABLE it!
The problem is that if you don't specify a secret (because you think
you're not using encryption), MyFaces will generate one and place it
in application context; but this will change when you redeploy, and
the secret used in pages in users' browsers from before the redeploy
will then fail.
I've logged this as a bug in the ASF JIRA (it is issue
MYFACES-1786), but the workaround is either to explicitly
disable encryption, like this:
<context-param>
<param-name>org.apache.myfaces.USE_ENCRYPTION</param-name>
<param-value>false</param-value>
</context-param>
(note that "false" must be in lower case!) or to set a secret.
发表评论
-
Bat 学习
2010-08-06 16:11 715本人转自:http://blog.csdn.net/it_ma ... -
Mysql忘记root密码的解决办法
2009-06-14 22:37 912出自 : http://www.cnblogs.com/sha ... -
Windows 服务
2009-02-28 00:01 1022出自 : http://www.allwiki.com/wik ... -
桌面图标文字背景无法透明解决办法(非通用)
2008-12-10 21:32 17721. 右击桌面空白处,依次单击“属性/桌面/自定义桌面/web ... -
CHM 无法打开解决方案
2008-12-10 13:12 1851出自:http://blog.csdn.net/r ... -
删除 Myeclipse 遗留的 workspace
2008-10-24 10:41 3820有时因需要而创建多个 workspace 并在它们之间切换,但 ... -
JS的正则表达式
2008-10-06 00:03 558出自 : http://www.iteye.com/topic ... -
Java staic block
2008-09-24 16:45 797出自: http://syniii.blog.sohu.com ... -
Reading Notes
2008-09-09 09:45 7171. Jsp 页面 动态和静态 include 指令的不同 ... -
HTML 符号大全
2008-08-28 23:54 704出自 : http://blog.csdn.net/icyco ... -
Windwos 验证轻松解决
2008-08-10 09:36 961出自:http://hi.baidu.com/%BA%DAca ... -
Some Likns
2008-07-25 12:51 787sourceforge 镜像:http://mirror.op ... -
MYSQL 字符集问题
2008-05-24 19:30 593出自:http://www.blogjava.net/ ... -
深入浅出URL编码
2008-05-24 16:04 915出自:http://blog.csdn.net/yzh ... -
堆栈和内存的关系(C++)
2008-05-17 15:57 1335出自:http://hi.baidu.com/an ... -
IE与FireFox的js和css几处不同点
2008-05-07 19:12 966出自:http://hi.baidu.com/zj ... -
CSS 实现圆角矩形边框
2008-05-07 00:16 2237出自:http://www.soidc.net/article ... -
Javascript 通过 URL 参数方式传值给 JSP 页面
2008-05-06 23:27 5853<%@ page language="java ... -
在 struts 引用中使用 tiles 模板时,JSP 文件引用外部文件需注意路径问题!
2008-05-06 14:11 2511先给出工程的目录结构: webproject | | ...
相关推荐
在IT行业中,尤其是在Java Web开发领域,`javax.servlet-api`和`javax.el`库是至关重要的组件。这些库主要用于实现Servlet规范和表达式语言(EL)功能,它们为开发人员提供了与服务器交互以及处理HTTP请求的能力。...
在Java编程语言中,`javax.annotation`包是一个重要的组件,它包含了用于标注代码的各种接口和注解。这些注解主要用于元数据的提供,帮助编译器、应用服务器或框架在运行时进行验证、生成代码、配置等操作。`javax....
【标题】"javax.servlet3.0 javax.servlet_jsp2.0源码"涉及的是Java Servlet和JSP(JavaServer Pages)技术的核心API,这两个组件是Java Web开发的基础。源码分析可以帮助我们深入理解它们的工作原理。 【描述】...
总结来说,`javax.enterprise.context.jar`对于Java EE开发,尤其是Javaweb和JSF项目,是不可或缺的一部分。它通过CDI提供了强大的依赖注入和上下文管理功能,简化了JavaBean的创建和管理,提升了代码的可读性和可...
在实际开发中,EJB通常与Web层(如Servlets和JSF)和持久层(如JPA或JDBC)结合使用,构建完整的Java EE应用程序。开发者需要遵循EJB的编程模型,定义bean的接口和实现,并在部署描述符中配置bean的行为和依赖。 总...
标题中的"tomcat5.5javax.el.jar"指的是Tomcat 5.5版本中与Java Expression Language (EL)相关的jar包。EL是JavaServer Pages (JSP) 2.0及更高版本中引入的一种轻量级表达式语言,用于简化在JSP页面中访问JavaBean...
3. **jsf-impl.jar**:与jsf-api.jar相对应,这个文件包含了JSF的实现代码。在实际开发中,开发者通常只需要引用api.jar进行编程,而impl.jar则在运行时提供具体的实现细节,执行用户界面的渲染和事件处理等功能。 ...
- `javax.faces.component.UIComponent`:表示JSF组件树中的一个节点,是所有JSF组件的基类。 - `javax.faces.context.FacesContext`:在JSF生命周期中,提供对请求、响应、会话、应用程序范围的访问,以及与视图...
- `javax.faces.event.ActionEvent`: JSF中的事件模型,用于处理组件级别的事件。 ### JSF中文教程.chm 这份中文教程可能是对JSF框架的详细解释,适合初学者。它可能涵盖了JSF的基础概念、生命周期、组件使用、...
https://javaserverfaces.dev.java.net/ mojarra-1.2._11_b0_FCS JDK 1.5 绝对能用 good luck
JSF(JavaServer Faces)是Java平台上的一种用于构建用户界面的MVC(Model-View-Controller)框架。它简化了Web应用开发,提供了一种声明式的方式来创建动态、交互式的Web界面。`jsf-api.jar` 文件是JSF API的核心库...
JavaServer Faces(JSF)是Java平台上的一种用于构建用户界面的服务器端框架,它简化了Web应用程序的开发,特别是处理用户交互和业务逻辑的集成。JSF的核心组件包括`jsf-api.jar`和`jsf-impl.jar`,这两个jar包在...
**JSF(JavaServer Faces)入门** JSF,全称为JavaServer Faces,是Java平台上的一个用于构建Web应用程序的UI框架。它为开发者提供了一种结构化、组件化的开发方式,使得创建用户界面变得更加简单。JSF的核心在于其...
在JavaServer Faces (JSF) 开发环境中,IntelliJ IDEA (IDEA) 是一个流行的集成开发环境。...理解并熟练运用javax.faces.jar和javax-inject.jar中的组件和服务,对于提升JSF应用的开发效率和质量至关重要。
- **javax.faces.lifecycle**:定义了JSF请求处理生命周期,`Lifecycle`对象负责处理请求,`LifecycleFactory`创建生命周期实例。 3. **JSF组件**: JSF组件是构建用户界面的基础,例如`UIComponent`是一个抽象...
5. **JSF(JavaServer Faces)**:JSF是一种MVC(模型-视图-控制器)框架,用于构建Web用户界面。`javax.faces`包提供了UI组件、事件处理和转换验证机制。 6. **JMS(Java Message Service)**:JMS允许应用之间...
9. `javax.el`: Java Expression Language (EL) 是Java EE的一部分,用于在JSF和其他Java应用中表达和评估属性。Spring MVC中的视图层,如JSP,可能会使用EL来动态计算和展示数据。 10. `javax.xml.rpc`: 这是Java ...
JSF支持多语言应用,通过`javax.faces.application.Application`的`getResourceBundle()`方法获取特定语言的资源包。开发者可以使用`.properties`文件来定义不同语言的文本资源。 **8. JSF与Ajax** JSF 2.0引入了...
这些JAR包在【标题】中提到的"jsf-api.jar"、"jsf-impl.jar"以及【描述】中列出的其他文件,都是与Java Web应用程序开发密切相关的库。现在我们将详细讨论每个JAR包的功能和用途。 1. **jsf-api.jar**:JavaServer ...
3. `javax.faces.component.UIComponent`:所有JSF组件的基类,定义了组件的基本行为。 4. `javax.faces.view.ViewDeclarationLanguage`:处理视图的解析和生成。 5. `javax.faces.event.PhaseListener`:监听JSF...