Questions tagged [facescontext]

This tag denotes the FacesContext class which is part of the Java Server Faces (JSF) model view presenter framework. It is used to permit disambiguation with the deprecated generic [context] tag.

This tag denotes the FacesContext class which is part of the Java Server Faces (JSF) model view presenter framework. It is used to permit disambiguation with the deprecated generic tag.

See Also

See the main information on .

112 questions
4
votes
2 answers

Websphere 8.5 - JSF webapp context init error: cleanupInitMaps

I have got a JSF 2.1 web application developed with mojarra 2.1.17 distibution which run with any problems on JBoss 6.1 container: now i have to change application server and I have to use websphere AS 8.5 which were born with MyFaces JSF 2…
MatteoM
  • 236
  • 2
  • 9
4
votes
2 answers

Failed to retrieve Session from FacesContext inside a Servlet Filter

After autheticating my user, I want to put a reference in the session to current logged in user. Here how I do it in the setCurrentUser method : FacesContext facesContext = FacesContext.getCurrentInstance(); HttpSession session = (HttpSession)…
Stephan
  • 41,764
  • 65
  • 238
  • 329
3
votes
2 answers

FacesContext not found

my jsp page is: Home.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%> <%@ taglib prefix="h" …
Jatin
  • 31
  • 1
  • 1
  • 4
3
votes
1 answer

FacesContext not injectable in Wildfly 14 with JSF 2.3 (Mojarra, main module)

I have a bean: import javax.faces.context.FacesContext; import javax.faces.view.ViewScoped; ... @Named @ViewScoped public class SimpleBean implements Serializable { private static final long serialVersionUID = 1L; @Inject protected…
Kawu
  • 13,647
  • 34
  • 123
  • 195
3
votes
1 answer

Finding n-th component nested in a4j:repeat tag in JSF tree

I have a problem with finding component in JSF tree. Suppose I have the following template:
3
votes
2 answers

FacesContext and "Servlet" Context

is there any equivalent to FacesContext, but in servlet environment? I have some DAOSessionManager that handles transaction to my database. I can use the FacesContext to identify the current http request when the current page is written using JSF,…
Francois
  • 10,730
  • 7
  • 47
  • 80
3
votes
0 answers

Critical error during deployment: : com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null

Hi I'm migrating my application from Websphere to Jboss and I'm getting below error while deploying my EAR. I would really appreciate if anyone could hint the error. I'm also getting error stating org.apache.myfaces.tiles.example.TilesBacking could…
3
votes
1 answer

Howto get @Service instance in Spring programatically

I need to implement javax.faces.convert.Converter to convert String-to-Object and Object-to-String. To do so, I have defined specific services (@Service), but I do not know how to get an instance. I have tried to use @Autowired and @Component to…
Valijon
  • 12,667
  • 4
  • 34
  • 67
3
votes
1 answer

Difference between by Application#getResourceBundle() and ResourceBundle#getBundle() in JSF 2.0

In order to retreive Strings from the resourse bundle, i am trying to compare the result from this two methods, below an example for the code: First Example: baseName: The fully qualified name of the resource bundle ( in…
Tarik
  • 4,961
  • 3
  • 36
  • 67
3
votes
1 answer

FacesContext instance is null in ApplicationScoped Managedbean

I created a ApplicationScoped bean that have a PostConstruct method named start. Whenever i want to get instance of FacesContext in the start method and it returns null: @ManagedBean @ApplicationScoped public class RemoveOldFilesScheduler implements…
Hosein Masbough
  • 431
  • 1
  • 4
  • 19
3
votes
1 answer

Why jsf life cycle skips render response after Invoke application when redirect the page?

I have two scenario I have two actions which have logic in bean like My buttons This are the two commnadButtons and there logic…
user3800551
  • 27
  • 1
  • 3
2
votes
1 answer

Link an error message to multiple UIComponent in JSF2

I'm coming with a question on JSF2. I'm currently mixing two different pieces of code proposed by BalusC on his blog :…
Wis
  • 705
  • 1
  • 11
  • 34
2
votes
1 answer

Is it possible to reference FacesContext from a TimerTask or ScheduledExecutorService on application startup?

I am attempting to create functionality in a JSF1.2/ADF web app that will periodically & dynamically generate a sitemap for a website that will have hundreds of pages whose content will change daily. The catch is that I need to read some config…
MattC
  • 59
  • 10
2
votes
2 answers

JSF 2 Partial Requests doesn't use FacesContext from the Factory

It seems like the partial requests don't use the faces context instances that are created by FacesContextFactory implementations. Here's the code in UIViewRoot#processDecodes that indicates the same if…
Abbas Gadhia
  • 14,532
  • 10
  • 61
  • 73
2
votes
1 answer

FacesContext.getCurrentInstance() throwing java.lang.VerifyError: Inconsistent stackmap frames at branch target exception

I already checked other stackoverflow answers but none of them had an answer for JSF facescontext so I had to put a question. We had jdk 6, jsf 1.2 and mySQL 5.5 and now we have upgraded to java 8 and mySQL 5.7. For that, I have replaced…
Aakash Patel
  • 549
  • 5
  • 19