You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "David Lapetina (JIRA)" <de...@myfaces.apache.org> on 2006/11/15 15:22:37 UTC

[jira] Created: (MYFACES-1494) FacesServlet.service() have _lifecycle.execute(facesContext) and _lifecycle.render(facesContext) in the same try & catch block which is not relevant

FacesServlet.service() have 	_lifecycle.execute(facesContext) and _lifecycle.render(facesContext) in the same try & catch block which is not relevant
-----------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: MYFACES-1494
                 URL: http://issues.apache.org/jira/browse/MYFACES-1494
             Project: MyFaces Core
          Issue Type: Improvement
          Components: General
    Affects Versions: 1.1.4
         Environment: All plateform
            Reporter: David Lapetina
            Priority: Trivial


In the service() method of FacesServlet you have the following code :
        try {
			_lifecycle.execute(facesContext);
			_lifecycle.render(facesContext);
	} catch (Throwable e)  {
             ...

So, if an exception occurs in the execute step it is impossible to do the render step and the consequence is a blank page which is not very user-friendly

-- 
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

        

[jira] Commented: (MYFACES-1494) FacesServlet.service() have _lifecycle.execute(facesContext) and _lifecycle.render(facesContext) in the same try & catch block which is not relevant

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1494?page=comments#action_12450320 ] 
            
Martin Marinschek commented on MYFACES-1494:
--------------------------------------------

Why would I want to render anything if there is an exception in the execute step?

Wouldn't it be better to forward to something else entirely (=an error page) if an error occurred?

regards,

Martin

> FacesServlet.service() have 	_lifecycle.execute(facesContext) and _lifecycle.render(facesContext) in the same try & catch block which is not relevant
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1494
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1494
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General
>    Affects Versions: 1.1.4
>         Environment: All plateform
>            Reporter: David Lapetina
>            Priority: Trivial
>
> In the service() method of FacesServlet you have the following code :
>         try {
> 			_lifecycle.execute(facesContext);
> 			_lifecycle.render(facesContext);
> 	} catch (Throwable e)  {
>              ...
> So, if an exception occurs in the execute step it is impossible to do the render step and the consequence is a blank page which is not very user-friendly

-- 
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

        

[jira] Commented: (MYFACES-1494) FacesServlet.service() have _lifecycle.execute(facesContext) and _lifecycle.render(facesContext) in the same try & catch block which is not relevant

Posted by "David Lapetina (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1494?page=comments#action_12450408 ] 
            
David Lapetina commented on MYFACES-1494:
-----------------------------------------

The RI does the same, but the specification says :
11.1 "The Lifecycle instance invokes appropriate processing logic to implement the required functionality for each phase of the request processing 
lifecycle, as described in Section 2.2 "Standard Request Processing Lifecycle Phases".

So each phase must be called. Furthermore, when an exception occurs in the execute() the afterPhase() method is not called though the beforePhase is called.

I don't think it is good to redirect to a generic error page because :
- if the service called through the execute() processes many other calls to business logic you can have some stuff in your FacesContext you don't wanna lose
- you may just want to display the same page as before with a JSF component showing the exception in a more user-frendly way than the generic code 500 page.

> FacesServlet.service() have 	_lifecycle.execute(facesContext) and _lifecycle.render(facesContext) in the same try & catch block which is not relevant
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1494
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1494
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General
>    Affects Versions: 1.1.4
>         Environment: All plateform
>            Reporter: David Lapetina
>            Priority: Trivial
>
> In the service() method of FacesServlet you have the following code :
>         try {
> 			_lifecycle.execute(facesContext);
> 			_lifecycle.render(facesContext);
> 	} catch (Throwable e)  {
>              ...
> So, if an exception occurs in the execute step it is impossible to do the render step and the consequence is a blank page which is not very user-friendly

-- 
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

        

[jira] Commented: (MYFACES-1494) FacesServlet.service() have _lifecycle.execute(facesContext) and _lifecycle.render(facesContext) in the same try & catch block which is not relevant

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1494?page=comments#action_12450322 ] 
            
Matthias Weßendorf commented on MYFACES-1494:
---------------------------------------------

I think this is the expected scenario. Calling exe() and render() in once.
Do you know what the RI does ?

> FacesServlet.service() have 	_lifecycle.execute(facesContext) and _lifecycle.render(facesContext) in the same try & catch block which is not relevant
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1494
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1494
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General
>    Affects Versions: 1.1.4
>         Environment: All plateform
>            Reporter: David Lapetina
>            Priority: Trivial
>
> In the service() method of FacesServlet you have the following code :
>         try {
> 			_lifecycle.execute(facesContext);
> 			_lifecycle.render(facesContext);
> 	} catch (Throwable e)  {
>              ...
> So, if an exception occurs in the execute step it is impossible to do the render step and the consequence is a blank page which is not very user-friendly

-- 
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

       

[jira] Commented: (MYFACES-1494) FacesServlet.service() have _lifecycle.execute(facesContext) and _lifecycle.render(facesContext) in the same try & catch block which is not relevant

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1494?page=comments#action_12450410 ] 
            
Matthias Weßendorf commented on MYFACES-1494:
---------------------------------------------

-well it is possible to execute only "parts" of the lifecycle (for instance, when validation error occurs, it doesn't call updateModel and invokeA)

> FacesServlet.service() have 	_lifecycle.execute(facesContext) and _lifecycle.render(facesContext) in the same try & catch block which is not relevant
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1494
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1494
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General
>    Affects Versions: 1.1.4
>         Environment: All plateform
>            Reporter: David Lapetina
>            Priority: Trivial
>
> In the service() method of FacesServlet you have the following code :
>         try {
> 			_lifecycle.execute(facesContext);
> 			_lifecycle.render(facesContext);
> 	} catch (Throwable e)  {
>              ...
> So, if an exception occurs in the execute step it is impossible to do the render step and the consequence is a blank page which is not very user-friendly

-- 
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