Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2344

Separating processPopulate method into two different methods

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 1.2.4
    • None
    • Extras
    • None
    • Operating System: Windows XP
      Platform: PC
    • 33247

    Description

      I encountered a problem with multipart requests when I am developing a framework
      based on struts. This issue occurs when multipart form used. I need to get a
      parameter value from actionform before processPopulate begins. It is easy when
      not using multipart forms. If multipart forms used, I couldt get that specific
      values until after processPopulate method. But I need it before
      processPopulate() method to init actionform.

      My suggestion is to separate processPopulate so that first function gets all
      information in request object and second function populates bean with this
      request object.

      More specifically, in RequestUtils() function, the lines below should be removed
      and "properties" object returned.

      // Set the corresponding properties of our bean
      try

      { BeanUtils.populate(bean, properties); }

      catch(Exception e)

      { throw new ServletException("BeanUtils.populate", e); }

      The variable "properties" above, must be returned and rest of lines must be
      called by a different function.

      Attachments

        Activity

          People

            Unassigned Unassigned
            erdinc Erdinc Kocaman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: