[
http://issues.apache.org/jira/browse/MYFACES-757?page=comments#action_12356587
]
Martin Marinschek commented on MYFACES-757:
-------------------------------------------
This is the code where getActionURL is used for redirects - is that causing any
problem for you? For me, it looks good.
ExternalContext externalContext =
facesContext.getExternalContext();
ViewHandler viewHandler =
facesContext.getApplication().getViewHandler();
String redirectPath = viewHandler.getActionURL(facesContext,
navigationCase.getToViewId());
try
{
externalContext.redirect(externalContext.encodeActionURL(redirectPath));
}
catch (IOException e)
{
throw new FacesException(e.getMessage(), e);
}
regards,
Martin
> Using a custom getActionURL creates a 404 error
> -----------------------------------------------
>
> Key: MYFACES-757
> URL: http://issues.apache.org/jira/browse/MYFACES-757
> Project: MyFaces
> Type: Bug
> Components: Implementation
> Reporter: Ryan Dewell
>
> A change has been made between the MyFaces that shipped with JBoss 4.0.3 RC2,
> and the MyFaces that ships with JBoss 4.0.3 SP1. I have isolated it to
> MyFaces by copying the two myfaces libraries from 4.0.3 RC2 TO 4.0.3 SP1. My
> code only works when 4.0.3 SP1 is using the MyFaces libraries from 4.0.3 RC2.
> Here is the problem. I use a custom ViewHandler which returns a getActionURL
> to a custom location. This location is virtual, it does not have a physical
> location as a file. When using the later MyFaces build mentioned above, I
> visit:
> http://localhost:8080/bm-hosted/nextup/
> Oddly, I then receive a 404 error FOR the URL returned by getActionURL
> The requested resource (http://localhost:8080/bm-hosted/nextup/view) is not
> available.
> even though that is not the URL I visited at this time.
> It is important to note that this ALL works perfectly with the older MyFaces
> libraries. It almost seems like the later version of MyFaces is somehow
> checking for the existence of getActionURL, and returning 404 when it can't
> find it??
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira