• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

URI Encoding

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
I am having problem with tomcat uriencoding. I have html form in my jsp submitting with "get" method and parameters are sent to server as query string . But it seems tomcat doenst encode the url and submitted texts are not the original ones. Generally I know that such URIEncoding is handled by application server. I have already added URIEncoding attribute setting to "UTF-8" in <tomat_home>/conf/server.xml . But the problem remains , all submitted data are not as i expected.

Any help please
thanks
 
Yewint Ko
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way to do URIEncoding programatically. For the data submitted with POST method , i used to have a filter to encode incoming data. ( request.setCharacterEncoding() and resopnse.setCharacterEncoding() )

 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Character encoding is not URL encoding. Don't waste your time fiddling with character encoding if URL encoding is not working. On the other the browsers and Tomcat actually do URL encoding correctly, so perhaps the character encoding is really your problem after all. You might want to describe your problem (what you expected, what you see instead) before blindly trying to fix it.
 
Yewint Ko
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes , it is URL Encoding problem. I enter some UTF8 strings နည္းပညာ , but on the server side I got နည္းပညာ .
 
Yewint Ko
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used to solve such problem by adding URIEncoding attribute in server.xml. But this times , it doesnt work.

here is my connector tag

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