Announcement Announcement Module
No announcement yet.
Form with random field name Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Form with random field name


    I am using Spring @MVC with Spring 3 annotated controllers and I've come across a problem I can't find the solution to.

    I have a form that is backed by a form bean, and now I need to add a new field with a random name as part of a security requirement.

    I've spent some time on this, I can generate a random field name and have the field take that name without too much hassle, but for the life of me I can't figure out how to retrieve the value of this field in the controller's POST handling method. So far it appears like I can only retrieve values that can be set onto a bean via setters (or direct field access) of a known, instantiable class.

    Any suggestions?

  • #2
    You still have access to the HttpServletRequest and can use that to retrieve all the parameters/values you want...