Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-284

Railo doesn't use java request attributes for request scope storage

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Labels:
      None
    • Environment:

      tomcat 6, magnolia 4.1

    • Workaround Description:
      Hide

      To bring "real" request variables in to the request scope, you would have to do this:

      <cfloop collection="#getPageContext().getRequest().getAttributeNames()#" item="i">
      <cfset request[i] = getPageContext().getRequest().getAttribute />
      </cfloop>

      And then syncronize BACK by using

      <cfset getPageContext().getRequest().setAttribute('name','secret') />

      Somehow tracking all the changes to request... this is very error prone and doesn't work that well...

      Show
      To bring "real" request variables in to the request scope, you would have to do this: <cfloop collection="#getPageContext().getRequest().getAttributeNames()#" item="i"> <cfset request [i] = getPageContext().getRequest().getAttribute /> </cfloop> And then syncronize BACK by using <cfset getPageContext().getRequest().setAttribute('name','secret') /> Somehow tracking all the changes to request... this is very error prone and doesn't work that well...

      Description

      Please read RAILO-282 for reference.

      In order to facilitate intra request messaging between template and paragraph in magnolia, we use the request scope. ColdFusion uses the standard java request attributes for storage of request scope, so if for example, you set something in a template:

      cfset request.test = "hello"

      it will be available in the paragraph too.

      In railo, since it does not use java's request attributes for request scope storage, the request scope is wiped clean each time. You can access the java request attributes easy enough, but synchronizing the two seems like a burden that shouldn't exist.

      The java request attributes also fit the request scope perfectly, so it seems like a much better candidate than a railo internal implementation.

      Not only would it help with this, but other jsp interactions would become simpler as well.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                micstriit Michael Offner
                Reporter:
                frankamp Joshua Frankamp
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: