mojarra

How to specify resource library version in JSF2?

非 Y 不嫁゛ 提交于 2019-12-01 06:04:59
Say I have a resources/ folder in the webroot. In it, I have a css/ folder and in it there is a theme.css file. But I want to set an Expires: header. Therefore I want to use a version for resource libraries, say <h:outputStylesheet library="css" name="theme.css"/> would turn into <link rel="stylesheet" src="javax.faces.resources/theme.css.xhtml?ln=css"/> But I want to specify something like <h:outputStylesheet library="css" name="theme.css" version="1.2"/> And get <link rel="stylesheet" src="javax.faces.resources/theme.css.xhtml?ln=css&v=1_2"/> or similar. I have read that JSF2 has support for

How to specify resource library version in JSF2?

一世执手 提交于 2019-12-01 04:34:12
问题 Say I have a resources/ folder in the webroot. In it, I have a css/ folder and in it there is a theme.css file. But I want to set an Expires: header. Therefore I want to use a version for resource libraries, say <h:outputStylesheet library="css" name="theme.css"/> would turn into <link rel="stylesheet" src="javax.faces.resources/theme.css.xhtml?ln=css"/> But I want to specify something like <h:outputStylesheet library="css" name="theme.css" version="1.2"/> And get <link rel="stylesheet" src=

gzip compression for jsf stuff

廉价感情. 提交于 2019-11-30 14:34:04
I have an jsf application (mojarra 2.1.8, primefaces 3.3) running on tomcat 6. While analyzing the page in firebug with google page-speed, I realized I could optimize some stuff by gzip-compression. Compressing the following resources with gzip could reduce their transfer size by 371,1KiB (74% reduction). Compressing http://localhost:8080/someApp/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces could save 72,5KiB (74% reduction). Compressing http://localhost:8080/someApp/javax.faces.resource/theme.css.jsf?ln=primefaces-aristo could save 53,4KiB (71% reduction). Compressing http:/

How to find out the current version of Mojarra which my WebLogic is using?

烈酒焚心 提交于 2019-11-30 08:37:30
问题 I'm trying to identify the current version of Mojarra my WebLogic 12c is using. How can I find out that? 回答1: One way would be to programmatically extract the implementation detail from the Package information of an arbitrary JSF class, such as FacesContext . Package p = FacesContext.class.getPackage(); System.out.println(p.getImplementationTitle() + " " + p.getImplementationVersion()); Another way would be to explore the JSF module in /wlserver/modules folder of WebLogic installation. In my

Cannot create a session after the response has been committed

别等时光非礼了梦想. 提交于 2019-11-30 06:48:40
Opening the JSF page gives me the following exception: Caused by: java.lang.IllegalStateException: Cannot create a session after the response has been committed Here is the JSF code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.prime.com.tr/ui"> <h:head> <h:outputStylesheet name="master_c.css" library="css" /> <title>Quotes<

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

↘锁芯ラ 提交于 2019-11-30 05:30:14
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? 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 (with same prefix as Mojarra's other web.xml context parameters ), but the code actually checks for

Custom FaceletFactory in JSF 2.2 / Alternatives for virtual host facelets

扶醉桌前 提交于 2019-11-29 15:20:41
Since Mojarra/JSF 2.2. it is not possible anymore to provide a custom FaceletFactory using a web.xml context parameter: <context-param> <param-name>com.sun.faces.faceletFactory</param-name> <param-value>my.faces.overrides.MyFaceletFactory</param-value> </context-param> My application provides some CMS features, including virtual host support to serve different pages (facelets) based on the currently requested domain. So http://www.domain1.com/index.xhtml returns different content than http://www.otherdomain.com/index.xhtml . The mechanics behind that are not that big of a deal using a custom

JSF/Mojarra “flash scope” problems

 ̄綄美尐妖づ 提交于 2019-11-29 15:18:36
I've got an app running on Mojarra 2.1.1 / Glassfish 3.1 which has now grown to 150,000+ lines of code. The app uses ajax extensively with ViewScoped managed beans and the page-redirect-get pattern (i.e. faces-redirect=true). One thing that is continually annoying me is the apparent lack of ease of passing parameters from page to page, and bean to bean (every page has it's own backing bean). I've not been able to get the flash working. I typically need to access the data I've written to the flash in the preRenderView event listener of the next page. This doesn't work reliably, particularly

JSF how upgrade to Mojarra 2.1.21 in Netbeans7.1 (just sub jsf-api.jar and jsf-impl.jar fails)

那年仲夏 提交于 2019-11-29 08:41:46
I want to upgrade from JSF implementation Mojarra 2.1.3 in Netbeans7.1 (Glassfish 3.1.1). You might ask first why I don't just upgrade to Netbeans7.3, and the reasons include that it it runs Glassfish 3.1.2.2 and that I have some other 3rd party software in my web application that is not yet compatible with Glassfish higher than 3.1.1, and besides it only has Mojarra 2.1.6 anyway. I used to be able to upgrade Mojarra by simply replacing jsf-api.jar and jsf-impl.jar under /glassfish/modules, but that does not work with: https://maven.java.net/content/repositories/releases/com/sun/faces/jsf-api

JSF Validation Error: Value is not valid [duplicate]

做~自己de王妃 提交于 2019-11-29 04:54:43
This question already has an answer here: Validation Error: Value is not valid 3 answers I know this seems to be a common one, but I'm lost with it. Occurs on clicking the Add button in assessment.jsf. Anyway, I've attached what I think are the relevant sections. FWIW, AssessmentType.equals() isn't triggered when I debug. Thanks in advance. j_idt38:j_idt47:j_idt48: Validation Error: Value is not valid assessment.xhtml: <h:form> <h:selectOneMenu value="#{assessmentBean.assessmentField}"> <f:selectItems value="#{assessmentBean.assessment.type.fields}" /> </h:selectOneMenu> <h:commandButton value