mojarra

com.sun.faces.ClientStateSavingPassword - recommendations for actual password?

人盡茶涼 提交于 2019-11-29 03:16:09
问题 In all of the reference pages I've found with regards to encrypting the ViewState, the only comment on the password is "your password here". Are there any recommendations regarding the length / complexity of the password that we should use? 回答1: Depends on Mojarra version. It had several flaws/fails in earlier versions. In Mojarra 1.2.x - 2.1.18 , it was never actually used. The JNDI entry name was namely incorrectly documented. It was documented as com.sun.faces.ClientStateSavingPassword

Own ResourceHandler to stream images from DB

99封情书 提交于 2019-11-28 23:54:01
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.RESOURCE_MEDIA_LIB.equals(libraryName)) { return new MediaResource(resourceName); } else { return super

java.lang.IllegalArgumentException: javax.faces.lifecycle.ClientWindowFactory

我的未来我决定 提交于 2019-11-28 11:48:27
We've been running a web app on a development server and recently somebody built a production server for us (with supposedly) the exact same tomcat config including the JSF libraries in the /lib directory. When I try to deploy my app the new server is throwing a rather confusing error message that I'd love some help understanding. catalina.out Both Production and Devel logs look similar up to this point: 24-Jun-2015 13:16:47.880 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/fleetforecaster/ff-tomcat/webapps/ROOT.war 24-Jun

How to disable jftfdi jffi query params in JSF

最后都变了- 提交于 2019-11-28 11:27:37
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? 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, the OutcomeTargetRenderer class who's responsible for HTML output generation of the <h:link> and <h:button>

Use of JSTL/core tags screws up ViewScoped Bean

雨燕双飞 提交于 2019-11-28 11:00:55
问题 I think I have run into a bug in Mojarra 2.1.0. Maybe I missed something but damned if I can see it. I rely a lot of @ViewScoped beans to save state whilst the browser does a lot of AJAX to the server. I find when I use certain tags, the @ViewScoped bean starts getting re-instantiated when it shouldn't be. Here is my test case backing bean: /* * TestStuff.java */ package test; import java.io.Serializable; import java.util.Arrays; import java.util.List; import java.util.logging.Level; import

JSF: Mojarra vs. OmniFaces @ViewScoped: @PreDestroy called but bean can't be garbage collected

柔情痞子 提交于 2019-11-28 10:33:54
This question is specific to the OmniFaces @ViewScoped bean (however of interest to wider discussion about memory leakage and resource disposal with JSF @ViewScoped). It is based on the results of this NetBeans8.1 test web app available on GitHub: Investigation of undesirable holding of references to various forms of JSF @ViewScoped beans by navigation type https://github.com/webelcomau/JSFviewScopedNav That test web app has a comprehensive README with complete instructions, as well as annotated test web pages comparing obsolete JSF2.0-style @ManagedBean @ViewScoped , JSF2.2-style CDI-friendly

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

回眸只為那壹抹淺笑 提交于 2019-11-28 01:08:27
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 ViewExpiredException), but they are still not destroyed until the session itself expires. For memory

ui:repeat and h:panelGrid

跟風遠走 提交于 2019-11-27 22:18:44
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? BalusC The output is fully as expected and specified. The <ui:repeat> is a render time tag, not a view build time

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

二次信任 提交于 2019-11-27 21:12:53
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 around with the offical context parameter from Mojarra which are set to 15 by default: com.sun.faces

f:viewParam doesn't pass required parameter when new xmlns.jcp.org namespace is used

萝らか妹 提交于 2019-11-27 15:47:58
I am trying to use Glassfish 4.0 with Java EE 7 XML namespaces to test the sample below. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:f="http://xmlns.jcp.org/jsf/core"> <h:head> <title>Title</title> </h:head> <h:body> <h:form> <ul> <ui:repeat value="#{appLoad.movieList}" var="movie"> <li> <h:link value="#{movie.title}" outcome="movie" includeViewParams="true"> <f:param name="id" value="#{movie.id}"/> </h:link> </li> </ui:repeat> </ul> </h:form> </h:body> </html> It links to the following page movie.xhtml :