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

Add actionMapper that ignores prefixes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • 2.3.16
    • Core Actions
    • None

    Description

      The prefixes 'method:' and 'action:' are treated specially in struts2.

      The treatment for 'method:' can be deactivated by 'useDynamicInvocation=false' but the treatment of 'action:' cannot be deactivated.

      I think it would be useful if the following actionmapper is included in the library so people can easily deactivate all special treatment:

      package org.apache.struts2.dispatcher.mapper;
      
      import org.apache.struts2.util.PrefixTrie;
      
      public class IgnorePrefixActionMapper
      	extends DefaultActionMapper
      {
      	public IgnorePrefixActionMapper()
      	{
      		super();
      		// remove any injected prefix treatments
      		prefixTrie = new PrefixTrie();
      	}
      }
      

      The reason I want to disable all this is that I do not want anyone to change the behavior of the implemented application by using these techniques.

      Attachments

        Activity

          People

            lukaszlenart Lukasz Lenart
            tbriers Tom Briers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: