mojarra

Own ResourceHandler to stream images from DB

耗尽温柔 提交于 2019-11-27 15:08:00
问题 I'm strugging with my own resource-implementation. The getInputStream -method doesn't get called. My handler: public class ResourceHandlerWrapperImpl extends ResourceHandlerWrapper { private final ResourceHandler wrapped; public ResourceHandlerWrapper(final ResourceHandler wrapped) { this.wrapped = wrapped; } @Override public ResourceHandler getWrapped() { return wrapped; } @Override public Resource createResource(final String resourceName, final String libraryName) { if (AppConstants

JSF and automatic reload of xhtml files

☆樱花仙子☆ 提交于 2019-11-27 13:08:49
I had some problems with hot-reloading XHTML files using JRebel, Spring, JSF Mojarra 2.0.3 and WebLogic 10.3. JRebel reloads regular Java classes and js/css files under /WebContent successfully, but not JSF's .xhtml files. A full republish was necessary to get xhtml files updated on the server. By trial and error I finally got it to work by adding some facelets parameters to web.xml and creating a custom ResourceResolver as described in this blog post . However, I wonder WHY this works, and more specifically: Why is a custom ResourceResolver needed? Isn't JRebel supposed to handle this by

Exception about flash in Mojarra JSF

試著忘記壹切 提交于 2019-11-27 08:28:05
I upgraded to Mojarra JSF 2.2.1 (from 2.1.22) and since then for each of my requests I'm having an exception in console: GRAVE: JSF1094: Could not decode flash data from incoming cookie value /?. Processing will continue, but the flash is unavailable for this request. com.sun.faces.lifecycle.InvokeApplicationPhase execute Request finishes succesfully when I'm not using flash scope on it. However, as I'm using this scope for FacesMessages , if I put a message here, I have a NullPointerException and the navigation flow is interrupted: GRAVE: El Servlet.service() para servlet Faces Servlet lanzó

How to disable jftfdi jffi query params in JSF

拟墨画扇 提交于 2019-11-27 06:20:57
问题 I tried the last version of JavaServer Faces 2.2 (Mojarra 2.2.4) and noticed changing my query string in this unwanted way: page.jsf?jftfdi=&jffi= instead of page.jsf I've found that it is the new JSF 2.2 feature. But these query params(jftfdi, jffi) spoil me SEO-friendly urls. How can I disable it? 回答1: This is a bug in Mojarra. They should not have been appended when there's no means of any flow navigation configuration (by the new @FlowScoped annotation and <j:flow-xxx> tags). Basically,

Bean validation doesn't work with mojarra 2.2.4

帅比萌擦擦* 提交于 2019-11-27 06:10:32
问题 I'm trying to use Hibernate Validator 5.0.1 and JSF2.2 but their integration seems to be broken since mojarra version 2.2.3. I've created small app to demonstrate the issue and get exception "javax.servlet.ServletException: Expression Error: Named Object: javax.faces.Bean not found." when running it on Tomcat 7.0.42. Does anyone else have this problem? webapp/pages/index.xhtml: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http:/

Configuration of com.sun.faces.config.ConfigureListener

旧城冷巷雨未停 提交于 2019-11-27 02:05:28
I'm reviewing a current JSF project where the web.xml configuration contains: the FacesServlet (configured on *.xhtml ) the com.sun.faces.config.ConfigureListener I'm using JSF 2.2 and Mojarra implementation. I'm confused about the ConfigureListener . Is this class needed in the configuration? What is the goal of this class? I couldn't find any information and the class has almost no javadoc. If I remove this configuration, everything seem to work the same way. Thus I guess that the ConfigureListener could or should be removed but I am not sure. BalusC The ConfigureListener is normally

ui:repeat and h:panelGrid

一世执手 提交于 2019-11-26 23:08:50
问题 When using something like <h:panelGrid columns="1"> <ui:repeat var="o" value="#{mybean.list}"> <h:outputText value="#{o.text}"/> </ui:repeat> </h:panelGrid> with lets say 10 list entries I only get 1 row e.g.: one tr with 1 td whereas when I use c:forEach i get 10 (but c:forEach is in fact evil, it messes up everything with ajax) I use mojarra 1.2 - is this a typical Mojarra bug which does not exist in the MyFaces implementation? Will it disappear in 2.x of the Mojarra releases? 回答1: The

JSF 2.2 Memory Consumption: Why does Mojarra keep the ViewScoped Beans of the last 25 Views in Memory?

让人想犯罪 __ 提交于 2019-11-26 23:01:37
问题 Memory per Session grows We are experiencing high memory consumption using JSF 2.2 (2.2.12) with Mojarra. After investigating our load tests it turned out that the size of the data in our ViewScoped Beans is quite high (sometimes more than 1MB). Anyway - when navigation from view to view, the session memory size grows and grows. We can't decrease the size of the beans on short-term, so this behavior has quite some impact. Solution 1 - Changing Context Params (not working) Now - we played

How to get rid of WARNING: PWC4011: Unable to set request character encoding to UTF-8

坚强是说给别人听的谎言 提交于 2019-11-26 22:23:15
This is on GlassFish 3.1, using PrimeFaces over Mojarra and salted with MyFaces CODI. On just about every request the following message appears: WARNING: PWC4011: Unable to set request character encoding to UTF-8 from context /com.myapp_war_0.1, because request parameters have already been read, or ServletRequest.getReader() has already been called This has happened ever since I started the project -- so far I have been ignoring it but now I have realized I am wasting a lot of time reading around it. I found an interesting but incomplete work-around here , but I don't understand it. Can

Why are expired @ViewScoped beans not destroyed until the session expires

故事扮演 提交于 2019-11-26 21:50:40
问题 I'm using Mojarra 2.2.4 on GlassFish 4 with Java 7. As I understand from BalusC's answer to How and when is a @ViewScoped bean destroyed in JSF?, @ViewScoped beans should be destroyed in three cases: Post-back with non-null outcome Session expiration Maximum number of logical views in session exceeded My beans are being destroyed in the first two cases, but not when the maximum number of logical views is exceeded. I have verified that the beans do expire when the maximum is exceeded (I get a