You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Karl Kildén <ka...@gmail.com> on 2015/03/30 20:28:16 UTC

Wrong encoding using JSF with tomee 2.0-SNAPSHOT

Hello!

I am trying to debug why 2.0-SNAPSHOT gives me the wrong encoding in a post
method using JSF. The same app works fine using 1.7.1... When I debug my
action method for example é is double encoded into é so I guess ISO-8859-1
first then UTF-8?

I already have a filter that sets encoding to UTF-8 and I have the usual
meta tags in my facelets for it so I don't know how to debug it any
further... Any tips?

cheers

Re: Wrong encoding using JSF with tomee 2.0-SNAPSHOT

Posted by Romain Manni-Bucau <rm...@gmail.com>.
just pushed sthg better: basically all works OOTB while using cid in query
params. If not you need to add a flag in tomee to get back the spec
behavior (not the default since it would be a super huge regression)

It is a spec issue IMO.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-04-01 20:14 GMT+02:00 Karl Kildén <ka...@gmail.com>:

> Hello,
>
> OK thanks Romain! Glad to hear there's a workaround
>
> Will a proper be possible in the future or is the spec problem to grave?
>
> Thanks again for looking at it
>
> cheers
>
>
> On 1 April 2015 at 19:30, Romain Manni-Bucau <rm...@gmail.com>
> wrote:
>
> > Just pushed a fix allowing to skip conversation (was not possible on
> > current snasphot but should have been):
> >
> > $ cat webapps/demo/WEB-INF/application.properties
> > org.apache.webbeans.application.supportsConversation=false
> >
> > The issue is that the cdi conversation filter (by spec) is called eagerly
> > and forces parameters parsing.
> >
> > That said mapping this automatically added filter in your web.xml to a
> url
> > pattern not used would work as well.
> >
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2015-04-01 18:55 GMT+02:00 Karl Kildén <ka...@gmail.com>:
> >
> > > Hello!
> > >
> > > Sample is attached but it works because of pom version is
> > > <tomee.version>1.7.1</tomee.version>
> > >
> > > I did not manage to get it to download snapshot automatically... But
> when
> > > I build and deploy to snapshot the problem is present. Instructions
> > > included in the .zip
> > >
> > > cheers
> > >
> > > On 31 March 2015 at 22:48, Karl Kildén <ka...@gmail.com> wrote:
> > >
> > >> Hi Mark, yep I can fix a sample not a problem.
> > >>
> > >> Problem is I write the classic swedish test word köttfärssås and when
> I
> > >> debug the action method after posting the form with h:commandButton it
> > has
> > >> been garbled into köttfärssås
> > >>
> > >> I will post the sample tomorrow
> > >>
> > >>
> > >> On 31 March 2015 at 15:38, Mark Struberg <st...@yahoo.de> wrote:
> > >>
> > >>> So what is the exact problem? Is it Tomcat or is it in OWB?
> > >>>
> > >>> Probably have a small example for me?
> > >>>
> > >>> txs and LieGrue,
> > >>> strub
> > >>>
> > >>>
> > >>> > Am 31.03.2015 um 12:41 schrieb Karl Kildén <karl.kilden@gmail.com
> >:
> > >>> >
> > >>> > I tried downgrading to the catalina.jar from 1.7.1 and it works
> with
> > >>> that
> > >>> > one...
> > >>> >
> > >>> > On 31 March 2015 at 08:52, Karl Kildén <ka...@gmail.com>
> > wrote:
> > >>> >
> > >>> >> Ok I will try thank you.
> > >>> >>
> > >>> >> i will comeback with a github project demostrating the problem if
> it
> > >>> >> persists...
> > >>> >>
> > >>> >>
> > >>> >>
> > >>> >> On 31 March 2015 at 00:10, Romain Manni-Bucau <
> > rmannibucau@gmail.com>
> > >>> >> wrote:
> > >>> >>
> > >>> >>> request (http) is surely not parsed at the same time. You can
> > >>> breakpoint
> > >>> >>> in org.apache.catalina.connector.Request#parseParameters
> > >>> (tomcat-catalina
> > >>> >>> dependency if you need it).
> > >>> >>>
> > >>> >>> Also please try adding in content-type header of the request
> > >>> charset=utf-8
> > >>> >>>
> > >>> >>> It can be linked to CDI conversation handling, mapping "CDI
> > >>> Conversation
> > >>> >>> Filter" to a not existing url mapping in your web.xml can throw
> it
> > >>> away if
> > >>> >>> it is the issue.
> > >>> >>>
> > >>> >>> You can also add in WEB-INF/application.properties:
> > >>> >>>
> > >>> >>> org.apache.webbeans.application.supportsConversation=false
> > >>> >>>
> > >>> >>>
> > >>> >>>
> > >>> >>>
> > >>> >>>
> > >>> >>> Romain Manni-Bucau
> > >>> >>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > >>> >>> <http://rmannibucau.wordpress.com> | Github <
> > >>> >>> https://github.com/rmannibucau> |
> > >>> >>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > >>> >>> <http://www.tomitribe.com>
> > >>> >>>
> > >>> >>> 2015-03-30 23:46 GMT+02:00 Karl Kildén <ka...@gmail.com>:
> > >>> >>>
> > >>> >>>> Hi, I tried it but I have the same problem. It's weird that it
> > >>> works on
> > >>> >>>> 1.7.1 because I have the same EL and JSF version regardless
> (JUEL
> > >>> 2.2.7)
> > >>> >>>> and Myfaces 2.2.6...
> > >>> >>>>
> > >>> >>>>
> > >>> >>>>
> > >>> >>>> On 30 March 2015 at 21:55, Romain Manni-Bucau <
> > >>> rmannibucau@gmail.com>
> > >>> >>>> wrote:
> > >>> >>>>
> > >>> >>>>> Hi
> > >>> >>>>>
> > >>> >>>>> did you try to set it on Connector in server.xml instead of a
> > >>> filter?
> > >>> >>>>>
> > >>> >>>>>
> > >>> >>>>> Romain Manni-Bucau
> > >>> >>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > >>> >>>>> <http://rmannibucau.wordpress.com> | Github <
> > >>> >>>>> https://github.com/rmannibucau> |
> > >>> >>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> |
> Tomitriber
> > >>> >>>>> <http://www.tomitribe.com>
> > >>> >>>>>
> > >>> >>>>> 2015-03-30 20:28 GMT+02:00 Karl Kildén <karl.kilden@gmail.com
> >:
> > >>> >>>>>
> > >>> >>>>>> Hello!
> > >>> >>>>>>
> > >>> >>>>>> I am trying to debug why 2.0-SNAPSHOT gives me the wrong
> > encoding
> > >>> >>> in a
> > >>> >>>>> post
> > >>> >>>>>> method using JSF. The same app works fine using 1.7.1... When
> I
> > >>> >>> debug
> > >>> >>>> my
> > >>> >>>>>> action method for example é is double encoded into é so I
> guess
> > >>> >>>>> ISO-8859-1
> > >>> >>>>>> first then UTF-8?
> > >>> >>>>>>
> > >>> >>>>>> I already have a filter that sets encoding to UTF-8 and I have
> > the
> > >>> >>>> usual
> > >>> >>>>>> meta tags in my facelets for it so I don't know how to debug
> it
> > >>> any
> > >>> >>>>>> further... Any tips?
> > >>> >>>>>>
> > >>> >>>>>> cheers
> > >>> >>>>>>
> > >>> >>>>>
> > >>> >>>>
> > >>> >>>
> > >>> >>
> > >>> >>
> > >>>
> > >>>
> > >>
> > >
> >
>

Re: Wrong encoding using JSF with tomee 2.0-SNAPSHOT

Posted by Karl Kildén <ka...@gmail.com>.
Hello,

OK thanks Romain! Glad to hear there's a workaround

Will a proper be possible in the future or is the spec problem to grave?

Thanks again for looking at it

cheers


On 1 April 2015 at 19:30, Romain Manni-Bucau <rm...@gmail.com> wrote:

> Just pushed a fix allowing to skip conversation (was not possible on
> current snasphot but should have been):
>
> $ cat webapps/demo/WEB-INF/application.properties
> org.apache.webbeans.application.supportsConversation=false
>
> The issue is that the cdi conversation filter (by spec) is called eagerly
> and forces parameters parsing.
>
> That said mapping this automatically added filter in your web.xml to a url
> pattern not used would work as well.
>
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-04-01 18:55 GMT+02:00 Karl Kildén <ka...@gmail.com>:
>
> > Hello!
> >
> > Sample is attached but it works because of pom version is
> > <tomee.version>1.7.1</tomee.version>
> >
> > I did not manage to get it to download snapshot automatically... But when
> > I build and deploy to snapshot the problem is present. Instructions
> > included in the .zip
> >
> > cheers
> >
> > On 31 March 2015 at 22:48, Karl Kildén <ka...@gmail.com> wrote:
> >
> >> Hi Mark, yep I can fix a sample not a problem.
> >>
> >> Problem is I write the classic swedish test word köttfärssås and when I
> >> debug the action method after posting the form with h:commandButton it
> has
> >> been garbled into köttfärssås
> >>
> >> I will post the sample tomorrow
> >>
> >>
> >> On 31 March 2015 at 15:38, Mark Struberg <st...@yahoo.de> wrote:
> >>
> >>> So what is the exact problem? Is it Tomcat or is it in OWB?
> >>>
> >>> Probably have a small example for me?
> >>>
> >>> txs and LieGrue,
> >>> strub
> >>>
> >>>
> >>> > Am 31.03.2015 um 12:41 schrieb Karl Kildén <ka...@gmail.com>:
> >>> >
> >>> > I tried downgrading to the catalina.jar from 1.7.1 and it works with
> >>> that
> >>> > one...
> >>> >
> >>> > On 31 March 2015 at 08:52, Karl Kildén <ka...@gmail.com>
> wrote:
> >>> >
> >>> >> Ok I will try thank you.
> >>> >>
> >>> >> i will comeback with a github project demostrating the problem if it
> >>> >> persists...
> >>> >>
> >>> >>
> >>> >>
> >>> >> On 31 March 2015 at 00:10, Romain Manni-Bucau <
> rmannibucau@gmail.com>
> >>> >> wrote:
> >>> >>
> >>> >>> request (http) is surely not parsed at the same time. You can
> >>> breakpoint
> >>> >>> in org.apache.catalina.connector.Request#parseParameters
> >>> (tomcat-catalina
> >>> >>> dependency if you need it).
> >>> >>>
> >>> >>> Also please try adding in content-type header of the request
> >>> charset=utf-8
> >>> >>>
> >>> >>> It can be linked to CDI conversation handling, mapping "CDI
> >>> Conversation
> >>> >>> Filter" to a not existing url mapping in your web.xml can throw it
> >>> away if
> >>> >>> it is the issue.
> >>> >>>
> >>> >>> You can also add in WEB-INF/application.properties:
> >>> >>>
> >>> >>> org.apache.webbeans.application.supportsConversation=false
> >>> >>>
> >>> >>>
> >>> >>>
> >>> >>>
> >>> >>>
> >>> >>> Romain Manni-Bucau
> >>> >>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> >>> >>> <http://rmannibucau.wordpress.com> | Github <
> >>> >>> https://github.com/rmannibucau> |
> >>> >>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> >>> >>> <http://www.tomitribe.com>
> >>> >>>
> >>> >>> 2015-03-30 23:46 GMT+02:00 Karl Kildén <ka...@gmail.com>:
> >>> >>>
> >>> >>>> Hi, I tried it but I have the same problem. It's weird that it
> >>> works on
> >>> >>>> 1.7.1 because I have the same EL and JSF version regardless (JUEL
> >>> 2.2.7)
> >>> >>>> and Myfaces 2.2.6...
> >>> >>>>
> >>> >>>>
> >>> >>>>
> >>> >>>> On 30 March 2015 at 21:55, Romain Manni-Bucau <
> >>> rmannibucau@gmail.com>
> >>> >>>> wrote:
> >>> >>>>
> >>> >>>>> Hi
> >>> >>>>>
> >>> >>>>> did you try to set it on Connector in server.xml instead of a
> >>> filter?
> >>> >>>>>
> >>> >>>>>
> >>> >>>>> Romain Manni-Bucau
> >>> >>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> >>> >>>>> <http://rmannibucau.wordpress.com> | Github <
> >>> >>>>> https://github.com/rmannibucau> |
> >>> >>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> >>> >>>>> <http://www.tomitribe.com>
> >>> >>>>>
> >>> >>>>> 2015-03-30 20:28 GMT+02:00 Karl Kildén <ka...@gmail.com>:
> >>> >>>>>
> >>> >>>>>> Hello!
> >>> >>>>>>
> >>> >>>>>> I am trying to debug why 2.0-SNAPSHOT gives me the wrong
> encoding
> >>> >>> in a
> >>> >>>>> post
> >>> >>>>>> method using JSF. The same app works fine using 1.7.1... When I
> >>> >>> debug
> >>> >>>> my
> >>> >>>>>> action method for example é is double encoded into é so I guess
> >>> >>>>> ISO-8859-1
> >>> >>>>>> first then UTF-8?
> >>> >>>>>>
> >>> >>>>>> I already have a filter that sets encoding to UTF-8 and I have
> the
> >>> >>>> usual
> >>> >>>>>> meta tags in my facelets for it so I don't know how to debug it
> >>> any
> >>> >>>>>> further... Any tips?
> >>> >>>>>>
> >>> >>>>>> cheers
> >>> >>>>>>
> >>> >>>>>
> >>> >>>>
> >>> >>>
> >>> >>
> >>> >>
> >>>
> >>>
> >>
> >
>

Re: Wrong encoding using JSF with tomee 2.0-SNAPSHOT

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Just pushed a fix allowing to skip conversation (was not possible on
current snasphot but should have been):

$ cat webapps/demo/WEB-INF/application.properties
org.apache.webbeans.application.supportsConversation=false

The issue is that the cdi conversation filter (by spec) is called eagerly
and forces parameters parsing.

That said mapping this automatically added filter in your web.xml to a url
pattern not used would work as well.



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-04-01 18:55 GMT+02:00 Karl Kildén <ka...@gmail.com>:

> Hello!
>
> Sample is attached but it works because of pom version is
> <tomee.version>1.7.1</tomee.version>
>
> I did not manage to get it to download snapshot automatically... But when
> I build and deploy to snapshot the problem is present. Instructions
> included in the .zip
>
> cheers
>
> On 31 March 2015 at 22:48, Karl Kildén <ka...@gmail.com> wrote:
>
>> Hi Mark, yep I can fix a sample not a problem.
>>
>> Problem is I write the classic swedish test word köttfärssås and when I
>> debug the action method after posting the form with h:commandButton it has
>> been garbled into köttfärssås
>>
>> I will post the sample tomorrow
>>
>>
>> On 31 March 2015 at 15:38, Mark Struberg <st...@yahoo.de> wrote:
>>
>>> So what is the exact problem? Is it Tomcat or is it in OWB?
>>>
>>> Probably have a small example for me?
>>>
>>> txs and LieGrue,
>>> strub
>>>
>>>
>>> > Am 31.03.2015 um 12:41 schrieb Karl Kildén <ka...@gmail.com>:
>>> >
>>> > I tried downgrading to the catalina.jar from 1.7.1 and it works with
>>> that
>>> > one...
>>> >
>>> > On 31 March 2015 at 08:52, Karl Kildén <ka...@gmail.com> wrote:
>>> >
>>> >> Ok I will try thank you.
>>> >>
>>> >> i will comeback with a github project demostrating the problem if it
>>> >> persists...
>>> >>
>>> >>
>>> >>
>>> >> On 31 March 2015 at 00:10, Romain Manni-Bucau <rm...@gmail.com>
>>> >> wrote:
>>> >>
>>> >>> request (http) is surely not parsed at the same time. You can
>>> breakpoint
>>> >>> in org.apache.catalina.connector.Request#parseParameters
>>> (tomcat-catalina
>>> >>> dependency if you need it).
>>> >>>
>>> >>> Also please try adding in content-type header of the request
>>> charset=utf-8
>>> >>>
>>> >>> It can be linked to CDI conversation handling, mapping "CDI
>>> Conversation
>>> >>> Filter" to a not existing url mapping in your web.xml can throw it
>>> away if
>>> >>> it is the issue.
>>> >>>
>>> >>> You can also add in WEB-INF/application.properties:
>>> >>>
>>> >>> org.apache.webbeans.application.supportsConversation=false
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> >>> Romain Manni-Bucau
>>> >>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>> >>> <http://rmannibucau.wordpress.com> | Github <
>>> >>> https://github.com/rmannibucau> |
>>> >>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>>> >>> <http://www.tomitribe.com>
>>> >>>
>>> >>> 2015-03-30 23:46 GMT+02:00 Karl Kildén <ka...@gmail.com>:
>>> >>>
>>> >>>> Hi, I tried it but I have the same problem. It's weird that it
>>> works on
>>> >>>> 1.7.1 because I have the same EL and JSF version regardless (JUEL
>>> 2.2.7)
>>> >>>> and Myfaces 2.2.6...
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>> On 30 March 2015 at 21:55, Romain Manni-Bucau <
>>> rmannibucau@gmail.com>
>>> >>>> wrote:
>>> >>>>
>>> >>>>> Hi
>>> >>>>>
>>> >>>>> did you try to set it on Connector in server.xml instead of a
>>> filter?
>>> >>>>>
>>> >>>>>
>>> >>>>> Romain Manni-Bucau
>>> >>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>> >>>>> <http://rmannibucau.wordpress.com> | Github <
>>> >>>>> https://github.com/rmannibucau> |
>>> >>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>>> >>>>> <http://www.tomitribe.com>
>>> >>>>>
>>> >>>>> 2015-03-30 20:28 GMT+02:00 Karl Kildén <ka...@gmail.com>:
>>> >>>>>
>>> >>>>>> Hello!
>>> >>>>>>
>>> >>>>>> I am trying to debug why 2.0-SNAPSHOT gives me the wrong encoding
>>> >>> in a
>>> >>>>> post
>>> >>>>>> method using JSF. The same app works fine using 1.7.1... When I
>>> >>> debug
>>> >>>> my
>>> >>>>>> action method for example é is double encoded into é so I guess
>>> >>>>> ISO-8859-1
>>> >>>>>> first then UTF-8?
>>> >>>>>>
>>> >>>>>> I already have a filter that sets encoding to UTF-8 and I have the
>>> >>>> usual
>>> >>>>>> meta tags in my facelets for it so I don't know how to debug it
>>> any
>>> >>>>>> further... Any tips?
>>> >>>>>>
>>> >>>>>> cheers
>>> >>>>>>
>>> >>>>>
>>> >>>>
>>> >>>
>>> >>
>>> >>
>>>
>>>
>>
>

Re: Wrong encoding using JSF with tomee 2.0-SNAPSHOT

Posted by Karl Kildén <ka...@gmail.com>.
Hello!

Sample is attached but it works because of pom version is
<tomee.version>1.7.1</tomee.version>

I did not manage to get it to download snapshot automatically... But when I
build and deploy to snapshot the problem is present. Instructions included
in the .zip

cheers

On 31 March 2015 at 22:48, Karl Kildén <ka...@gmail.com> wrote:

> Hi Mark, yep I can fix a sample not a problem.
>
> Problem is I write the classic swedish test word köttfärssås and when I
> debug the action method after posting the form with h:commandButton it has
> been garbled into köttfärssås
>
> I will post the sample tomorrow
>
>
> On 31 March 2015 at 15:38, Mark Struberg <st...@yahoo.de> wrote:
>
>> So what is the exact problem? Is it Tomcat or is it in OWB?
>>
>> Probably have a small example for me?
>>
>> txs and LieGrue,
>> strub
>>
>>
>> > Am 31.03.2015 um 12:41 schrieb Karl Kildén <ka...@gmail.com>:
>> >
>> > I tried downgrading to the catalina.jar from 1.7.1 and it works with
>> that
>> > one...
>> >
>> > On 31 March 2015 at 08:52, Karl Kildén <ka...@gmail.com> wrote:
>> >
>> >> Ok I will try thank you.
>> >>
>> >> i will comeback with a github project demostrating the problem if it
>> >> persists...
>> >>
>> >>
>> >>
>> >> On 31 March 2015 at 00:10, Romain Manni-Bucau <rm...@gmail.com>
>> >> wrote:
>> >>
>> >>> request (http) is surely not parsed at the same time. You can
>> breakpoint
>> >>> in org.apache.catalina.connector.Request#parseParameters
>> (tomcat-catalina
>> >>> dependency if you need it).
>> >>>
>> >>> Also please try adding in content-type header of the request
>> charset=utf-8
>> >>>
>> >>> It can be linked to CDI conversation handling, mapping "CDI
>> Conversation
>> >>> Filter" to a not existing url mapping in your web.xml can throw it
>> away if
>> >>> it is the issue.
>> >>>
>> >>> You can also add in WEB-INF/application.properties:
>> >>>
>> >>> org.apache.webbeans.application.supportsConversation=false
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> Romain Manni-Bucau
>> >>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> >>> <http://rmannibucau.wordpress.com> | Github <
>> >>> https://github.com/rmannibucau> |
>> >>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>> >>> <http://www.tomitribe.com>
>> >>>
>> >>> 2015-03-30 23:46 GMT+02:00 Karl Kildén <ka...@gmail.com>:
>> >>>
>> >>>> Hi, I tried it but I have the same problem. It's weird that it works
>> on
>> >>>> 1.7.1 because I have the same EL and JSF version regardless (JUEL
>> 2.2.7)
>> >>>> and Myfaces 2.2.6...
>> >>>>
>> >>>>
>> >>>>
>> >>>> On 30 March 2015 at 21:55, Romain Manni-Bucau <rmannibucau@gmail.com
>> >
>> >>>> wrote:
>> >>>>
>> >>>>> Hi
>> >>>>>
>> >>>>> did you try to set it on Connector in server.xml instead of a
>> filter?
>> >>>>>
>> >>>>>
>> >>>>> Romain Manni-Bucau
>> >>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> >>>>> <http://rmannibucau.wordpress.com> | Github <
>> >>>>> https://github.com/rmannibucau> |
>> >>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>> >>>>> <http://www.tomitribe.com>
>> >>>>>
>> >>>>> 2015-03-30 20:28 GMT+02:00 Karl Kildén <ka...@gmail.com>:
>> >>>>>
>> >>>>>> Hello!
>> >>>>>>
>> >>>>>> I am trying to debug why 2.0-SNAPSHOT gives me the wrong encoding
>> >>> in a
>> >>>>> post
>> >>>>>> method using JSF. The same app works fine using 1.7.1... When I
>> >>> debug
>> >>>> my
>> >>>>>> action method for example é is double encoded into é so I guess
>> >>>>> ISO-8859-1
>> >>>>>> first then UTF-8?
>> >>>>>>
>> >>>>>> I already have a filter that sets encoding to UTF-8 and I have the
>> >>>> usual
>> >>>>>> meta tags in my facelets for it so I don't know how to debug it any
>> >>>>>> further... Any tips?
>> >>>>>>
>> >>>>>> cheers
>> >>>>>>
>> >>>>>
>> >>>>
>> >>>
>> >>
>> >>
>>
>>
>

Re: Wrong encoding using JSF with tomee 2.0-SNAPSHOT

Posted by Karl Kildén <ka...@gmail.com>.
Hi Mark, yep I can fix a sample not a problem.

Problem is I write the classic swedish test word köttfärssås and when I
debug the action method after posting the form with h:commandButton it has
been garbled into köttfärssås

I will post the sample tomorrow


On 31 March 2015 at 15:38, Mark Struberg <st...@yahoo.de> wrote:

> So what is the exact problem? Is it Tomcat or is it in OWB?
>
> Probably have a small example for me?
>
> txs and LieGrue,
> strub
>
>
> > Am 31.03.2015 um 12:41 schrieb Karl Kildén <ka...@gmail.com>:
> >
> > I tried downgrading to the catalina.jar from 1.7.1 and it works with that
> > one...
> >
> > On 31 March 2015 at 08:52, Karl Kildén <ka...@gmail.com> wrote:
> >
> >> Ok I will try thank you.
> >>
> >> i will comeback with a github project demostrating the problem if it
> >> persists...
> >>
> >>
> >>
> >> On 31 March 2015 at 00:10, Romain Manni-Bucau <rm...@gmail.com>
> >> wrote:
> >>
> >>> request (http) is surely not parsed at the same time. You can
> breakpoint
> >>> in org.apache.catalina.connector.Request#parseParameters
> (tomcat-catalina
> >>> dependency if you need it).
> >>>
> >>> Also please try adding in content-type header of the request
> charset=utf-8
> >>>
> >>> It can be linked to CDI conversation handling, mapping "CDI
> Conversation
> >>> Filter" to a not existing url mapping in your web.xml can throw it
> away if
> >>> it is the issue.
> >>>
> >>> You can also add in WEB-INF/application.properties:
> >>>
> >>> org.apache.webbeans.application.supportsConversation=false
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> Romain Manni-Bucau
> >>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> >>> <http://rmannibucau.wordpress.com> | Github <
> >>> https://github.com/rmannibucau> |
> >>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> >>> <http://www.tomitribe.com>
> >>>
> >>> 2015-03-30 23:46 GMT+02:00 Karl Kildén <ka...@gmail.com>:
> >>>
> >>>> Hi, I tried it but I have the same problem. It's weird that it works
> on
> >>>> 1.7.1 because I have the same EL and JSF version regardless (JUEL
> 2.2.7)
> >>>> and Myfaces 2.2.6...
> >>>>
> >>>>
> >>>>
> >>>> On 30 March 2015 at 21:55, Romain Manni-Bucau <rm...@gmail.com>
> >>>> wrote:
> >>>>
> >>>>> Hi
> >>>>>
> >>>>> did you try to set it on Connector in server.xml instead of a filter?
> >>>>>
> >>>>>
> >>>>> Romain Manni-Bucau
> >>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> >>>>> <http://rmannibucau.wordpress.com> | Github <
> >>>>> https://github.com/rmannibucau> |
> >>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> >>>>> <http://www.tomitribe.com>
> >>>>>
> >>>>> 2015-03-30 20:28 GMT+02:00 Karl Kildén <ka...@gmail.com>:
> >>>>>
> >>>>>> Hello!
> >>>>>>
> >>>>>> I am trying to debug why 2.0-SNAPSHOT gives me the wrong encoding
> >>> in a
> >>>>> post
> >>>>>> method using JSF. The same app works fine using 1.7.1... When I
> >>> debug
> >>>> my
> >>>>>> action method for example é is double encoded into é so I guess
> >>>>> ISO-8859-1
> >>>>>> first then UTF-8?
> >>>>>>
> >>>>>> I already have a filter that sets encoding to UTF-8 and I have the
> >>>> usual
> >>>>>> meta tags in my facelets for it so I don't know how to debug it any
> >>>>>> further... Any tips?
> >>>>>>
> >>>>>> cheers
> >>>>>>
> >>>>>
> >>>>
> >>>
> >>
> >>
>
>

Re: Wrong encoding using JSF with tomee 2.0-SNAPSHOT

Posted by Mark Struberg <st...@yahoo.de>.
So what is the exact problem? Is it Tomcat or is it in OWB?

Probably have a small example for me?

txs and LieGrue,
strub


> Am 31.03.2015 um 12:41 schrieb Karl Kildén <ka...@gmail.com>:
> 
> I tried downgrading to the catalina.jar from 1.7.1 and it works with that
> one...
> 
> On 31 March 2015 at 08:52, Karl Kildén <ka...@gmail.com> wrote:
> 
>> Ok I will try thank you.
>> 
>> i will comeback with a github project demostrating the problem if it
>> persists...
>> 
>> 
>> 
>> On 31 March 2015 at 00:10, Romain Manni-Bucau <rm...@gmail.com>
>> wrote:
>> 
>>> request (http) is surely not parsed at the same time. You can breakpoint
>>> in org.apache.catalina.connector.Request#parseParameters (tomcat-catalina
>>> dependency if you need it).
>>> 
>>> Also please try adding in content-type header of the request charset=utf-8
>>> 
>>> It can be linked to CDI conversation handling, mapping "CDI Conversation
>>> Filter" to a not existing url mapping in your web.xml can throw it away if
>>> it is the issue.
>>> 
>>> You can also add in WEB-INF/application.properties:
>>> 
>>> org.apache.webbeans.application.supportsConversation=false
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Romain Manni-Bucau
>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>> <http://rmannibucau.wordpress.com> | Github <
>>> https://github.com/rmannibucau> |
>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>>> <http://www.tomitribe.com>
>>> 
>>> 2015-03-30 23:46 GMT+02:00 Karl Kildén <ka...@gmail.com>:
>>> 
>>>> Hi, I tried it but I have the same problem. It's weird that it works on
>>>> 1.7.1 because I have the same EL and JSF version regardless (JUEL 2.2.7)
>>>> and Myfaces 2.2.6...
>>>> 
>>>> 
>>>> 
>>>> On 30 March 2015 at 21:55, Romain Manni-Bucau <rm...@gmail.com>
>>>> wrote:
>>>> 
>>>>> Hi
>>>>> 
>>>>> did you try to set it on Connector in server.xml instead of a filter?
>>>>> 
>>>>> 
>>>>> Romain Manni-Bucau
>>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>>>> <http://rmannibucau.wordpress.com> | Github <
>>>>> https://github.com/rmannibucau> |
>>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>>>>> <http://www.tomitribe.com>
>>>>> 
>>>>> 2015-03-30 20:28 GMT+02:00 Karl Kildén <ka...@gmail.com>:
>>>>> 
>>>>>> Hello!
>>>>>> 
>>>>>> I am trying to debug why 2.0-SNAPSHOT gives me the wrong encoding
>>> in a
>>>>> post
>>>>>> method using JSF. The same app works fine using 1.7.1... When I
>>> debug
>>>> my
>>>>>> action method for example é is double encoded into é so I guess
>>>>> ISO-8859-1
>>>>>> first then UTF-8?
>>>>>> 
>>>>>> I already have a filter that sets encoding to UTF-8 and I have the
>>>> usual
>>>>>> meta tags in my facelets for it so I don't know how to debug it any
>>>>>> further... Any tips?
>>>>>> 
>>>>>> cheers
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 
>> 


Re: Wrong encoding using JSF with tomee 2.0-SNAPSHOT

Posted by Karl Kildén <ka...@gmail.com>.
I tried downgrading to the catalina.jar from 1.7.1 and it works with that
one...

On 31 March 2015 at 08:52, Karl Kildén <ka...@gmail.com> wrote:

> Ok I will try thank you.
>
> i will comeback with a github project demostrating the problem if it
> persists...
>
>
>
> On 31 March 2015 at 00:10, Romain Manni-Bucau <rm...@gmail.com>
> wrote:
>
>> request (http) is surely not parsed at the same time. You can breakpoint
>> in org.apache.catalina.connector.Request#parseParameters (tomcat-catalina
>> dependency if you need it).
>>
>> Also please try adding in content-type header of the request charset=utf-8
>>
>> It can be linked to CDI conversation handling, mapping "CDI Conversation
>> Filter" to a not existing url mapping in your web.xml can throw it away if
>> it is the issue.
>>
>> You can also add in WEB-INF/application.properties:
>>
>> org.apache.webbeans.application.supportsConversation=false
>>
>>
>>
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> <http://rmannibucau.wordpress.com> | Github <
>> https://github.com/rmannibucau> |
>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>> <http://www.tomitribe.com>
>>
>> 2015-03-30 23:46 GMT+02:00 Karl Kildén <ka...@gmail.com>:
>>
>> > Hi, I tried it but I have the same problem. It's weird that it works on
>> > 1.7.1 because I have the same EL and JSF version regardless (JUEL 2.2.7)
>> > and Myfaces 2.2.6...
>> >
>> >
>> >
>> > On 30 March 2015 at 21:55, Romain Manni-Bucau <rm...@gmail.com>
>> > wrote:
>> >
>> > > Hi
>> > >
>> > > did you try to set it on Connector in server.xml instead of a filter?
>> > >
>> > >
>> > > Romain Manni-Bucau
>> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> > > <http://rmannibucau.wordpress.com> | Github <
>> > > https://github.com/rmannibucau> |
>> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>> > > <http://www.tomitribe.com>
>> > >
>> > > 2015-03-30 20:28 GMT+02:00 Karl Kildén <ka...@gmail.com>:
>> > >
>> > > > Hello!
>> > > >
>> > > > I am trying to debug why 2.0-SNAPSHOT gives me the wrong encoding
>> in a
>> > > post
>> > > > method using JSF. The same app works fine using 1.7.1... When I
>> debug
>> > my
>> > > > action method for example é is double encoded into é so I guess
>> > > ISO-8859-1
>> > > > first then UTF-8?
>> > > >
>> > > > I already have a filter that sets encoding to UTF-8 and I have the
>> > usual
>> > > > meta tags in my facelets for it so I don't know how to debug it any
>> > > > further... Any tips?
>> > > >
>> > > > cheers
>> > > >
>> > >
>> >
>>
>
>

Re: Wrong encoding using JSF with tomee 2.0-SNAPSHOT

Posted by Karl Kildén <ka...@gmail.com>.
Ok I will try thank you.

i will comeback with a github project demostrating the problem if it
persists...



On 31 March 2015 at 00:10, Romain Manni-Bucau <rm...@gmail.com> wrote:

> request (http) is surely not parsed at the same time. You can breakpoint
> in org.apache.catalina.connector.Request#parseParameters (tomcat-catalina
> dependency if you need it).
>
> Also please try adding in content-type header of the request charset=utf-8
>
> It can be linked to CDI conversation handling, mapping "CDI Conversation
> Filter" to a not existing url mapping in your web.xml can throw it away if
> it is the issue.
>
> You can also add in WEB-INF/application.properties:
>
> org.apache.webbeans.application.supportsConversation=false
>
>
>
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-03-30 23:46 GMT+02:00 Karl Kildén <ka...@gmail.com>:
>
> > Hi, I tried it but I have the same problem. It's weird that it works on
> > 1.7.1 because I have the same EL and JSF version regardless (JUEL 2.2.7)
> > and Myfaces 2.2.6...
> >
> >
> >
> > On 30 March 2015 at 21:55, Romain Manni-Bucau <rm...@gmail.com>
> > wrote:
> >
> > > Hi
> > >
> > > did you try to set it on Connector in server.xml instead of a filter?
> > >
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > <http://rmannibucau.wordpress.com> | Github <
> > > https://github.com/rmannibucau> |
> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > <http://www.tomitribe.com>
> > >
> > > 2015-03-30 20:28 GMT+02:00 Karl Kildén <ka...@gmail.com>:
> > >
> > > > Hello!
> > > >
> > > > I am trying to debug why 2.0-SNAPSHOT gives me the wrong encoding in
> a
> > > post
> > > > method using JSF. The same app works fine using 1.7.1... When I debug
> > my
> > > > action method for example é is double encoded into é so I guess
> > > ISO-8859-1
> > > > first then UTF-8?
> > > >
> > > > I already have a filter that sets encoding to UTF-8 and I have the
> > usual
> > > > meta tags in my facelets for it so I don't know how to debug it any
> > > > further... Any tips?
> > > >
> > > > cheers
> > > >
> > >
> >
>

Re: Wrong encoding using JSF with tomee 2.0-SNAPSHOT

Posted by Romain Manni-Bucau <rm...@gmail.com>.
request (http) is surely not parsed at the same time. You can breakpoint
in org.apache.catalina.connector.Request#parseParameters (tomcat-catalina
dependency if you need it).

Also please try adding in content-type header of the request charset=utf-8

It can be linked to CDI conversation handling, mapping "CDI Conversation
Filter" to a not existing url mapping in your web.xml can throw it away if
it is the issue.

You can also add in WEB-INF/application.properties:

org.apache.webbeans.application.supportsConversation=false





Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-03-30 23:46 GMT+02:00 Karl Kildén <ka...@gmail.com>:

> Hi, I tried it but I have the same problem. It's weird that it works on
> 1.7.1 because I have the same EL and JSF version regardless (JUEL 2.2.7)
> and Myfaces 2.2.6...
>
>
>
> On 30 March 2015 at 21:55, Romain Manni-Bucau <rm...@gmail.com>
> wrote:
>
> > Hi
> >
> > did you try to set it on Connector in server.xml instead of a filter?
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2015-03-30 20:28 GMT+02:00 Karl Kildén <ka...@gmail.com>:
> >
> > > Hello!
> > >
> > > I am trying to debug why 2.0-SNAPSHOT gives me the wrong encoding in a
> > post
> > > method using JSF. The same app works fine using 1.7.1... When I debug
> my
> > > action method for example é is double encoded into é so I guess
> > ISO-8859-1
> > > first then UTF-8?
> > >
> > > I already have a filter that sets encoding to UTF-8 and I have the
> usual
> > > meta tags in my facelets for it so I don't know how to debug it any
> > > further... Any tips?
> > >
> > > cheers
> > >
> >
>

Re: Wrong encoding using JSF with tomee 2.0-SNAPSHOT

Posted by Karl Kildén <ka...@gmail.com>.
Hi, I tried it but I have the same problem. It's weird that it works on
1.7.1 because I have the same EL and JSF version regardless (JUEL 2.2.7)
and Myfaces 2.2.6...



On 30 March 2015 at 21:55, Romain Manni-Bucau <rm...@gmail.com> wrote:

> Hi
>
> did you try to set it on Connector in server.xml instead of a filter?
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-03-30 20:28 GMT+02:00 Karl Kildén <ka...@gmail.com>:
>
> > Hello!
> >
> > I am trying to debug why 2.0-SNAPSHOT gives me the wrong encoding in a
> post
> > method using JSF. The same app works fine using 1.7.1... When I debug my
> > action method for example é is double encoded into é so I guess
> ISO-8859-1
> > first then UTF-8?
> >
> > I already have a filter that sets encoding to UTF-8 and I have the usual
> > meta tags in my facelets for it so I don't know how to debug it any
> > further... Any tips?
> >
> > cheers
> >
>

Re: Wrong encoding using JSF with tomee 2.0-SNAPSHOT

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

did you try to set it on Connector in server.xml instead of a filter?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-03-30 20:28 GMT+02:00 Karl Kildén <ka...@gmail.com>:

> Hello!
>
> I am trying to debug why 2.0-SNAPSHOT gives me the wrong encoding in a post
> method using JSF. The same app works fine using 1.7.1... When I debug my
> action method for example é is double encoded into é so I guess ISO-8859-1
> first then UTF-8?
>
> I already have a filter that sets encoding to UTF-8 and I have the usual
> meta tags in my facelets for it so I don't know how to debug it any
> further... Any tips?
>
> cheers
>