I have been checking out some issues about this problem but it did not work.
There are two situations:
1.I start on /alertas/index.jsf
I log in with my username and password and according to my faces-config.xml I am redirected to /alertas/pages/alertas.jsf and my page is showed correctly with all the functions working but growl messages. (The URL showed at the top when I am in alertas.jsf is index.jsf)
- If I am already logged and I access directly to /alertas/pages/alertas.jsf, everything works, even growl messages.
I do not know if this could be a problem of the redirection. I tried the next sentence which I read on another threads, but did not work.
context.getExternalContext().getFlash().setKeepMessages(true);
The content of my file faces-config is:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">
<navigation-rule>
<from-view-id>/index.xhtml</from-view-id>
<navigation-case>
<from-outcome>irAlertas</from-outcome>
<to-view-id>/pages/alertas.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
I am searching for a solution but it is being really hard.
Thanks for the time !!