Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Redirection with parameters in Spring MVC + Spring Security

  1. #11
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    Your TEST works but you still haven't fixed the problem you set out to fix..

    As mentioned you shouldn't be calling your webapp from within your webapp like that (at least not to fix a bug). Write a test that calls your application (or a script which used curl or something).

    Again you are fixing something that isn't broken but which is a problem in the first place or at least a problem introduced byt your test due to not proberly encoding the parameter...
    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

  2. #12
    Join Date
    Jul 2008
    Posts
    19

    Default

    So how I should encode the parameter?

  3. #13
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    Spring does this for you if you use the correct way of redirecting (which I mentioned in my first post) . You could also use URLEncoder.encode.

    However as mentioned before you shouldn't be doing this if you want to test write a test and not a test controller which is being deployed... IMHO you are using the wrong tool to simulate something...
    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

  4. #14
    Join Date
    Jul 2008
    Posts
    19

    Default

    Quote Originally Posted by Marten Deinum View Post
    Spring does this for you if you use the correct way of redirecting (which I mentioned in my first post) . You could also use URLEncoder.encode.
    I already tried this two options but the error remains the same...

    Quote Originally Posted by Marten Deinum View Post
    However as mentioned before you shouldn't be doing this if you want to test write a test and not a test controller which is being deployed... IMHO you are using the wrong tool to simulate something...
    I'll try something different then... thanks

  5. #15
    Join Date
    Jul 2008
    Posts
    19

    Default

    Just to let you know that you were absolutely right I developed the test as a sepparate Struts app and now it works withouth that ugly hack, thanks

Posting Permissions

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