You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Musachy Barroso (JIRA)" <ji...@apache.org> on 2008/12/24 04:35:37 UTC

[jira] Issue Comment Edited: (WW-2780) return null, rather than throw NullpointExetion while ServletActionContext.getRequest()

    [ https://issues.apache.org/struts/browse/WW-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45378#action_45378 ] 

musachy edited comment on WW-2780 at 12/23/08 7:34 PM:
---------------------------------------------------------------

By "request is not from STRUTS" do you mean that the filter handling the request is the one for the other framework? In that case must of the struts methods in classed classes like ServletActionContext will fail (there is nothing we can do in that case either). 

      was (Author: musachy):
    By "request is not from STRUTS" do you mean that the filter handling the request is the one for the other framework? In that case must of the struts methods in classed classes like ServletActionContext will fail (there is nothing we can do in that either). 
  
> return null, rather than throw NullpointExetion while ServletActionContext.getRequest()
> ---------------------------------------------------------------------------------------
>
>                 Key: WW-2780
>                 URL: https://issues.apache.org/struts/browse/WW-2780
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Actions
>    Affects Versions: 2.1.2
>            Reporter: dapeng.ni
>            Priority: Minor
>             Fix For: 2.1.4
>
>
> I use STRUTS in mixed env with other framework.  In 2.0.x ,  I create utility method to get HttpRequest.  It try to get request from ServletActionContext.getRequest(), if it return null, then get from another API.  
> But in 2.1.2,  if request is not from STRUTS,  ServletActionContext.getRequest() will throw NullpointException.. It is not good design. as I have to put try-catch even it just simply need a HttpRequest.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.