Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2000

@CreateIfNull doesn't works

    XMLWordPrintableJSON

Details

    • Important

    Description

      I found struts 2 use com.opensymphony.xwork2.util.DefaultObjectTypeDeterminer as default,but when I change xwork2.0.3 to xwork2.0.2,struts 2 use com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer as default,so @CreateIfNull works fine

      org.apache.struts2.dispatcher.Dispatcher line 401
      change
      ObjectTypeDeterminer objectTypeDeterminer = container.getInstance(ObjectTypeDeterminer.class);
      to
      ObjectTypeDeterminer objectTypeDeterminer = container.getInstance(ObjectTypeDeterminer.class,"tiger");

      this can make xwork2.0.3 works fine,but I don't think this is a good idea.

      Attachments

        Activity

          People

            rainerh Rainer Hermanns
            quaff Yanming Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: