myfaces

Making Glassfish respond to ajax request JSF 2

左心房为你撑大大i 提交于 2019-12-01 10:58:46
I'm trying to do an ajax request to my server (Glassfish v3.1 open source edition) and for any reason the request never go to the server, running the same proyect on tomcat 7 it works correctly, there's any configuration that i should make on glassfich or anything?? im using eclipse helios, jsf 2 MyFaces 2.1.1, richfaces 4.0.0, and glassfish 3.1 open source edition here's my code <h:panelGroup> <h:inputText id="firstName" value="#{RegistrationForm.first_name}" required="true" requiredMessage="Please enter your first name"> <f:converter converterId="bankingCore.UpperCaseConventer for="firstName

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=

NoClassDefFoundError (Digester) with Tomcat and MyFaces

青春壹個敷衍的年華 提交于 2019-12-01 01:44:35
I was using Tomcat with Eclipse nicely. Now I cannot start the server. I get the following exception when trying to start. Things were working great. I'm not aware of having changed anything, but obviously something changed. Apr 7, 2012 12:28:29 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.<init>

Reusing ViewState value in other session (CSRF)

为君一笑 提交于 2019-11-30 22:28:17
I'm using a *myfaces-api-2.2.3 with javax.faces.STATE_SAVING_METHOD set to client , I got the following scenario, 1) User X logs into the system and adds user XXX (using jsf f:ajax action) , while inspecting the chrome dev tools you can see the form that being submitted along with the ViewState value. 2) Copy that ViewState value (from chrome dev tools --> network tab) --> place it into html file with form (that mimics my original add user X ) 3) Logout from user X session (session being invalidated during that process) 4) Login with user Y --> open that html file in browser and hit the submit

NoClassDefFoundError (Digester) with Tomcat and MyFaces

夙愿已清 提交于 2019-11-30 20:49:00
问题 I was using Tomcat with Eclipse nicely. Now I cannot start the server. I get the following exception when trying to start. Things were working great. I'm not aware of having changed anything, but obviously something changed. Apr 7, 2012 12:28:29 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener java.lang.NoClassDefFoundError: org/apache/commons

Prevent CSRF in JSF2 with client side state saving

纵饮孤独 提交于 2019-11-30 17:41:35
问题 I'm Using MyFaces 2.2.3 with client side state saving + PrimeFaces After asking how to prevent the re-use of a ViewState in different sessions I was told by BalusC , that I can inject my own CSRF token by override the from renderer to let the value be a CSRF token , I'm looking for a solution that wont force me to modify my xhtml pages at all :) BalusC has suggested a better way to prevent CSRF attack by extending ViewHandlerWrapper , and it works great, I only had to modify a bit the

ViewExpiredException when i use @ViewScoped

老子叫甜甜 提交于 2019-11-30 16:07:02
问题 I have problem with my h:commandButton "Login": when I use @ViewScoped and push this button there is ViewExpiredException, but when I use @SessionScoped, there isn't any error. Stack Trace: javax.faces.application.ViewExpiredException: /pages/register.xhtmlNo saved view state could be found for the view identifier: /pages/register.xhtml at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:132) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase

Reusing ViewState value in other session (CSRF)

北慕城南 提交于 2019-11-30 05:31:05
问题 I'm using a *myfaces-api-2.2.3 with javax.faces.STATE_SAVING_METHOD set to client , I got the following scenario, 1) User X logs into the system and adds user XXX (using jsf f:ajax action) , while inspecting the chrome dev tools you can see the form that being submitted along with the ViewState value. 2) Copy that ViewState value (from chrome dev tools --> network tab) --> place it into html file with form (that mimics my original add user X ) 3) Logout from user X session (session being

@ManagedProperty injected AFTER @PostConstruct

蓝咒 提交于 2019-11-29 17:56:35
THIS PROBLEM IS ALREADY SOLVED IN THE MYFACES 2.1 IMPLEMENTATION I have a link which passes an Integer parameter properly like this: <h:link outcome="/process/createProcess"> <f:param name="id" value="#{process.idprocess}" /> Edit </h:link> It goes to "createProcess.xhtml?id=21" properly, and I have this code in the request scope backing Bean createProcess: @ManagedProperty(value="#{param.id}") private Integer idProcess; private Process newProcess; @PostConstruct public void init() { log(); if (idProcess!=null) newProcess = Dao.getProcessDAO().get(idProcess); else newProcess = new Process(); }