[weld-issues] [JBoss JIRA] Commented: (WELD-448) invoking sendRedirect() in a JSP causes WELD-001303

Viggo Navarsete (JIRA) jira-events at lists.jboss.org
Wed Jun 16 16:13:46 EDT 2010

    [ https://jira.jboss.org/browse/WELD-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12535967#action_12535967 ] 

Viggo Navarsete commented on WELD-448:

Hi, I've just created a new application using the WELD archetype (mvn archetype:generate -DinteractiveMode=n -DarchetypeArtifactId=weld-jsf-jee -DarchetypeGroupId=org.jboss.weld.archetypes -DarchetypeVersion=1.0.0-BETA1 -DgroupId=com.tmp -DartifactId=tmp
), and I encounter the error described in this issue when deploying to JBoss 6.0.0.M3.
What can I do to get any further? I can see that this issue is fixed in 1.0.1.Final of some artifact (weld?!), but I don't see any artifact looking like WELD in my pom.xml. Is this something that JBoss relies on?

> invoking sendRedirect() in a JSP causes WELD-001303
> ---------------------------------------------------
>                 Key: WELD-448
>                 URL: https://jira.jboss.org/browse/WELD-448
>             Project: Weld
>          Issue Type: Bug
>          Components: Conversations
>    Affects Versions: 1.0.1.CR2
>            Reporter: Dan Allen
>            Assignee: Pete Muir
>             Fix For: 1.0.1.Final
> When sendRedirect() is used inside of a JSP page, it results in the exception WELD-001303: No active contexts for scope type @ConversationScoped
> A source of this error is a typical /index.jsp redirector page:
> <% response.sendRedirect("home.jsf"); %>
> The ConversationPropagationFilter is wrapping all requests (not just JSF requests). The conversation scope is only active during JSF requests. The problem comes when ConversationPropagationFilter traps calls to sendRedirect(). It first checks whether the conversation is transient. But this check mandates that the conversation scope be active.
> ConverationPropagationFilter.java:
> ...
> @Override
> public void sendRedirect(String path) throws IOException
> {
>    ConversationImpl conversation = conversation(ctx);
>    if (!conversation.isTransient())
>    {
>       ...
>    }
>    super.sendRedirect(path);
> }
> ...
> ConversationImpl.java
> ...
> public boolean isTransient()
> {
>    checkConversationActive();
>    return _transient;
> }
> ...
> I don't understand why isTransient() is enforcing that a conversation be active. If it's not active, then that should be considered transient (or there needs to be a portable way of checking if it's active.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the weld-issues mailing list