Hi Vidar,

Thank you for the suggestion. I will try it.
Now I found that request filters are described here
http://sling.apache.org/site/filters.html

Best regards,
Peter

On Fri, Feb 11, 2011 at 3:27 PM, Vidar Ramdal-2 [via Apache Sling] <
[email protected]> wrote:

> On Thu, Feb 10, 2011 at 11:56 PM, Peter Dotchev <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=2473494&i=0>>
> wrote:
>
> >
> > Hi,
> >
> > Recently
> >
> http://dotev.blogspot.com/2011/02/posting-non-ascii-characters-in-web.html I
>
> > stumbled  over this issue too.
> >
> > I don't want to add _charset_ input to all the forms.
> > Is there a way to set the request encoding to UTF-8?
> > IMHO it would be better if the request encoding is configurable like it
> is
> > done in Wicket.
> >
> > http://wiki.apache.org/tomcat/FAQ/CharacterEncoding Tomcat FAQ  suggests
>
> > using a filter.
> > How can I do that in Sling?
>
> Hi, you can implement the javax.servlet.Filter interface and register
> your implementation as a Filter service:
>
> @Component(immediate = true)
> @Properties({
>         @Property(name = "filter.scope", value = "request",
> propertyPrivate = true),
>         @Property(name = "filter.order", value = "-9", propertyPrivate =
> true)
> })
> @Services({@Service(javax.servlet.Filter.class)})
> public class YourFilter implements javax.servlet.Filter {
>  ...
> }
>
>
>
> --
> Vidar S. Ramdal <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=2473494&i=1>>
> - http://www.idium.no
> Sommerrogata 13-15, N-0255 Oslo, Norway
> + 47 22 00 84 00
> Quando omni flunkus moritatus!
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-sling.73963.n3.nabble.com/request-getCharacterEncoding-always-returns-ISO-8859-1-tp1740512p2473494.html
>  To unsubscribe from request.getCharacterEncoding() always returns
> ISO-8859-1, click 
> here<http://apache-sling.73963.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1740512&code=ZG90Y2hldkBnbWFpbC5jb218MTc0MDUxMnwtMTcyMjY3ODE2NA==>.
>
>

-- 
View this message in context: 
http://apache-sling.73963.n3.nabble.com/request-getCharacterEncoding-always-returns-ISO-8859-1-tp1740512p2474201.html
Sent from the Sling - Users mailing list archive at Nabble.com.

Reply via email to