• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

Spring model attribute silently url-encoded between the controller and the view

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have a controller building up a url.

The & is not encoded and that is how this url should be.

However, when this url is passed to a model attribute, it ends up being encoded in the JSP view.

Here is the source code of the controller:



The original value was not url encoded as can be seen in the log:

2012-03-20 13:33:52,290 DEBUG [AnnotateController] =============>>> Controller requestUrl: 1&2



But the JSP page shows it encoded:

http://localhost:8080/annotate-web/1&2

I would like the framework NOT encoded my url, as I want to encode some parts of it only.

Stephane
 
Stephane Eybert
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I worked around the problem by decoding the variable in the JSP page.

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic