Results 1 to 2 of 2

Thread: Form with random field name

  1. #1

    Default Form with random field name

    Hi.

    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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    You still have access to the HttpServletRequest and can use that to retrieve all the parameters/values you want...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •