struts2 no longer accepts http map parameters?

后端 未结 1 467
挽巷
挽巷 2021-01-13 09:39

In struts2, I took advantage of built-in OGNL in struts2, naming my inputs like Which went to getters/setters

1条回答
  •  迷失自我
    2021-01-13 10:23

    It turns out that they hardened restrictions on parameter names to boost security.

    So I had to add to my struts.xml:

           
              
                 
                 
                     [a-zA-Z0-9\.\]\[\(\)_'\s"/]+
                 
              
           
    

    (I had "s and /s in my parameter names) File upload ceased working after that (interceptor stacks are madness), so I had to add it explicity either.

    Update: These days I strongly suggest using JSON to pass complex structures instead of rich OGNL forms. Of course you would need some JS.

    0 讨论(0)
提交回复
热议问题