1

In my JSF 2.2 bases application I created a wizard which is based on @ConversationScope. To deal with errors I added CDI Conversation Filter to my web.xml.

My first question is about the right url-pattern for the filter-mapping. My Wizard runs behind the url /report/*. If I use this as pattern, all other pages throw the following exception:

javax.servlet.ServletException: A request must be associated with the context in order to load the known conversations

So, i had to use "/*" as pattern, which worked fine so far. But now, I want to integrate container-managed security. When requesting the restricted resource, the mentioned error is thrown, when redirecting to login-page.

Does anybody know, how to solve that?

Thanks in advance.

SANN3
  • 9,459
  • 6
  • 61
  • 97
jheider
  • 111
  • 8
  • Deal with errors? What errors exactly are you talking about? What filter exactly are you talking about? A homegrown or a standard one? At least, this doesn't seem to have anything to do with JSF. Have you actually looked at the JSF 2.2 way for maintaining conversations, the new flow scope with `@FlowScoped`? – BalusC Jan 29 '14 at 08:19
  • I am talking about the standard CDI Conversation Filter mentioned in the weld documentation (5.3.4. CDI Conversation filter) to catch errors like `NonexistentConversationException` or `BusyConversationException`. I have looked at `@FlowScoped` first, but since it doesn't work in templates, I decided to use `@ConversationScoped` instead, which is working fine so far. The only problem is the exception mentioned above. – jheider Jan 29 '14 at 08:26

0 Answers0