This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes wrong URL encoding? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "wrong URL encoding?" Watch "wrong URL encoding?" New topic

wrong URL encoding?

Achim Bell

Joined: Jun 14, 2012
Posts: 1

while my interceptor (Struts2) repeats his call, the URL in the repeated html-file for the next call is changing like this:

...nnsh%C3%B6ft+%28Strom... (this ist the correct call-fragment in the first html-wait-page)
...nnsh%C3%83%C2%B6ft+%28Strom... (second page)
...nnsh%C3%83%C2%83%C3%82%C2%B6ft+%28Strom... (third page)
...nnsh%C3%83%C2%83%C3%82%C2%83%C3%83%C2%82%C3%82%C2%B6ft+%28Strom... (and so on...)

Seems that the "%"-Chars after the first one of the Code %C3%B6 (wich represents "ö") is replaced by "%83%C2" (which represents the "%"-Char) and so on. Codes with only one "%" lile %28 for the "(" are handled correct. What is the problem? Is there a problem with Tomcat (7) or with Struts?

Thank You for an answer!

Joe Ess

Joined: Oct 29, 2001
Posts: 9137

Welcome to the JavaRanch.
It looks like you keep re-encoding the same string over and over. What does your code look like?

[How To Ask Questions On JavaRanch]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: wrong URL encoding?
It's not a secret anymore!