faces-config.xml keep updating itself - managed-bean

I have 2 faces-config.xml file.
I created a new page and added bean into the second file.
However, the first faces-config file automatically keeps adding bean to it as well.
Thus, every time I tried to refresh a page there is a classNotFoundException because there are 2 classes
for that page.
Can anyone tell me the cause and how to fix this?
(I am using ibm rad6)

Related

Caching: refreshing external content

in a web project using myFaces 2.1.8, I use the following line of code in a composite component in order to include external content (located at the application server, outside of the webapp-folder):
<ui:include src="file:/#{someSingletonBean.externalContentDir}/#{cc.attrs.externalContentFilename}" />
The FACELETS_REFRESH_PERIOD context param is set to 2 hours.
Changes made to the external content files are however not refreshed until the server gets restarted.
Is there a way to populate these changes to myFaces without restarting the server?
There is a bug recently found and fixed in 2.2.4 that cause the problem. See MYFACES-3890 for details.

Some managed beans are not loaded

I have an issue with a perfectly working application (JSF 2, primefaces, tomcat 6). I have many Managed Beans that work just fine, but lately when I try to add a new Managed Bean the views dont seem to recognize it. Even more, there is no error message the application manages to ignore controls refering to the new managed bean and even by using debugging I don't have access to the #PostConstruct method when the view loads. this seems to be the issue for whatever control I put in my view.

Springwebflow + CDI + JSF application on Jboss 7

I have been trying to get my application working under JBoss 7 but have finally hit a problem that I cannot find an answer to.
The application is a web based application using springwebflow,cdi,jsf (primefaces).
it gets deployed without an error and renders the first page (login.xhtml). once i'm logged in, if i try to click list of accounts (users's accounts) link (which invokes the webflow for list of Accounts) which display a list of accounts but when the server looks for the resource to use for rendering the view, it fails with FileNotFoundException when attempting to load a resource as below. javax.faces.FacesException: Error Checking Last Modified for jndi:/localhost/datapTest/AccountSelect.xhtml For some reason the default view of the flow (Accountflow) is being converted to a jndi resource location. Can anybody help?
Updated :
after changing the param javax.faces.FACELETS_REFRESH_PERIOD value to 1
exception :
Caused by: javax.faces.FacesException: java.io.FileNotFoundException: Facelet /accountSelect.xhtml not found at: jndi:/default-host/datapTest/accountSelect.xhtml
I was having a similar problem, and i found out that the problem was a conflict with the omnifaces lib. The problem occurs because omnifaces registers a view handler called RestorableViewHandler and this view handler does not know how to solve the id's from the flows files.
To solve that, we need to add the view handler of spring-webflow locally on our faces-config.xml file:
<application>
<view-handler>org.springframework.faces.webflow.FlowViewHandler</view-handler>
</application>
PS: Or you can just remove the omnifaces dependence from your application.

JSF calls actions on CDI bean when page is loaded

In a JSF file addLink.xhtml I use a CDI bean LinkAdapter. When the JSF file is processed, every method in the LinkAdapter is called several times, although most of them aren't even referenced anywhere in the whole project by now.
The LinkAdapter is #Named and #SessionScoped. But I think that this is not relevant, since it seems to happen with every other bean in any other JSF file.
Can anyone tell me the reason of this behavior?
I use JBoss AS 7.0.2, prettyfaces (JSF2) 3.3.2 and Weld 1.0.0.Final

icefaces 3 - Cannot reach the backing bean from pages inside WEB-INF

I upgraded icefaces version from 1.8 to 3 and I'm facing the following problem:
everytime I call a method in a backing bean form pages inside WEB-INF, I have the error "Network connection interrupted" and, in firefox I see when I hover the button, POST mypage.jsf , STATUS 404 Not Found.
Can anybody help me, please?
If I move the pages outside WEB-INF it works, but I wouldn't change all the structure of my project...
Thank you very much
I suggest you to move pages outside WEB-INF. This directory has a specific meaning in web application deployment. It holds configuration and (e.g.) classes used by servlet.
Web container should not serve the content of this directory, if in 1.8 this happen, probably it's a bug that has been fixed.

Resources