• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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: 374
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: 374
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: 374
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: 374
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")

 
Watchya got in that poodle gun? Anything for me? Or this tiny ad?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic