• 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

Default value for webapp.encoding.default in weblogic-application.xml ?

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If webapp.encoding.default is not defined in weblogic-application.xml, what encoding is used by default?

I am interested in the encoding of URI/URL parameters, as explained here: http://www.lucamasini.net/Home/java-enterprise/non-ascii-char-and-http-requests-with-tomcat-weblogic
(also see the WebLogic docs at http://docs.oracle.com/cd/E21764_01/web.1111/e13706/app_xml.htm#r6c1-t2 )


Thanks,
David
 
Ranch Hand
Posts: 376
2
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the parameter itself is null by default.
however default encoding is hardcoded set to ISO-8859-1
 
German Gonzalez-Morris
Ranch Hand
Posts: 376
2
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
as required by JSP/Servlet specification
 
David Balažic
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The encoding of URI/URL parameters is not mentioned in the specs.
 
German Gonzalez-Morris
Ranch Hand
Posts: 376
2
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Balažic wrote:The encoding of URI/URL parameters is not mentioned in the specs.



are we talking about ServletResponse ?
(perhaps method encodeRedirectURL)

From spec Servlet 2.5 :

If the servlet does not specify a character encoding before the getWriter
method of the ServletResponse interface is called or the response is committed,
the default ISO-8859-1 is used.

 
David Balažic
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, I'm talking .... http://www.example.com/foo?bar=about_this_here
 
German Gonzalez-Morris
Ranch Hand
Posts: 376
2
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, the value for webapp.encoding.default is ISO-8859-1

Could you be more specific how are you generating that URL ?

If it is for a sendRedirect() you need to encode it by yourself:

URLEncoder.encode(e.getType(), "UTF-8")

 
Hey cool! They got a blimp! But I have a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic