You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Mathias Walter <ma...@gmx.net> on 2008/04/10 22:57:24 UTC

[Trinidad] inputText special characters

Hi,

I've some trouble with special characters (i. e. german umlauts) and
tr:inputText. With IE 6, the characters will be converted to some unreadable
two-byte codes, but with FF2 it works well.

I'm using Trinidad 1.2.7, Sun JSF RI 1.2 and Facelets.
The head of the rendered page is

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >

How can I fix this?

--
Kind regards,
Mathias


Re: [Trinidad] inputText special characters

Posted by Rafa PĂ©rez <ra...@gmail.com>.
I had the same problem. I do not know why, but in the very first request,
the character encoding of the request is UTF-8 and if you have configured
your application to use ISO-8859-1, it gets ignored.
The only solution I found was to introduce a filter for setting the charset,
something like

((HttpServletRequest)request).getSession().setAttribute(ViewHandler.CHARACTER_ENCODING_KEY,
''ISO-8859-1')


HTH,

-- Rafa

On Thu, Apr 10, 2008 at 11:34 PM, Mathias Walter <ma...@gmx.net>
wrote:

> Hi,
>
> > You may have ISO-8859-1 set to JSP response.
>
> I don't use JSP, I'm using Facelets. But I give it a try and changed the
> XML
> encoding. But it doesn't help.
>
> As soon as I submit the form, the characters will be converted.
>
> Why does this happens with IE and not with FF?
>
> Ah, I forgot to mention that form is partially submitted with a
> <tr:commandLink "partialSubmit=true">.
>
> --
> Regards,
> Mathias
>
> > Instead, please use UTF-8, like
> > <jsp:directive.page contentType="text/html;charset=UTF-8"/>
> > Hope this helps
> > Kenneth
> >
> > Mathias Walter wrote:
> > > Hi,
> > >
> > > I've some trouble with special characters (i. e. german umlauts) and
> > > tr:inputText. With IE 6, the characters will be converted
> > to some unreadable
> > > two-byte codes, but with FF2 it works well.
> > >
> > > I'm using Trinidad 1.2.7, Sun JSF RI 1.2 and Facelets.
> > > The head of the rendered page is
> > >
> > > <?xml version="1.0" encoding="ISO-8859-1" ?>
> > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
> > >
> > > How can I fix this?
> > >
> > > --
> > > Kind regards,
> > > Mathias
> > >
> > >
>
>

RE: [Trinidad] inputText special characters

Posted by Mathias Walter <ma...@gmx.net>.
Hi,

> You may have ISO-8859-1 set to JSP response.

I don't use JSP, I'm using Facelets. But I give it a try and changed the XML
encoding. But it doesn't help.

As soon as I submit the form, the characters will be converted.

Why does this happens with IE and not with FF?

Ah, I forgot to mention that form is partially submitted with a
<tr:commandLink "partialSubmit=true">.

--
Regards,
Mathias

> Instead, please use UTF-8, like
> <jsp:directive.page contentType="text/html;charset=UTF-8"/>
> Hope this helps
> Kenneth
> 
> Mathias Walter wrote:
> > Hi,
> >
> > I've some trouble with special characters (i. e. german umlauts) and
> > tr:inputText. With IE 6, the characters will be converted 
> to some unreadable
> > two-byte codes, but with FF2 it works well.
> >
> > I'm using Trinidad 1.2.7, Sun JSF RI 1.2 and Facelets.
> > The head of the rendered page is
> >
> > <?xml version="1.0" encoding="ISO-8859-1" ?>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
> >
> > How can I fix this?
> >
> > --
> > Kind regards,
> > Mathias
> >
> >   


Re: [Trinidad] inputText special characters

Posted by Kenneth Tang <ke...@oracle.com>.
Hi Matthias,
You may have ISO-8859-1 set to JSP response.  Instead, please use UTF-8, 
like
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
Hope this helps
Kenneth

Mathias Walter wrote:
> Hi,
>
> I've some trouble with special characters (i. e. german umlauts) and
> tr:inputText. With IE 6, the characters will be converted to some unreadable
> two-byte codes, but with FF2 it works well.
>
> I'm using Trinidad 1.2.7, Sun JSF RI 1.2 and Facelets.
> The head of the rendered page is
>
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
>
> How can I fix this?
>
> --
> Kind regards,
> Mathias
>
>   

Orchestra RequestParameterProviderManager.getInstance() NPE

Posted by Ben Neuman <bj...@comcast.net>.
Hello, 

I'm getting a NullPointerException when I add the MyFaces Extension
Filter to web.xml and navigate to a page with tomahawk tags that use the
filter.

java.lang.NullPointerException
	org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterProviderManager.getInstance(RequestParameterProviderManager.java:69)
	org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterResponseWrapper.encodeURL(RequestParameterResponseWrapper.java:42)
	javax.servlet.http.HttpServletResponseWrapper.encodeURL(HttpServletResponseWrapper.java:76)
	org.apache.myfaces.renderkit.html.util.DefaultAddResource$ScriptPositionedInfo.writePositionedInfo(DefaultAddResource.java:1040)
	org.apache.myfaces.renderkit.html.util.DefaultAddResource.writeWithFullHeader(DefaultAddResource.java:836)
	org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:170)
	org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
	org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
	org.ajax4jsf.Filter.doFilter(Filter.java:175)
	org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter.doFilter(RequestParameterServletFilter.java:63)
	org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

Anyone else seen issues with Orchestra and MyFacesExtensionFilter?
Any help would be greatly appreciated.

I can send more info if needed. 
Facelets 1.1.14
Orchestra 1.1
Tomahawk 1.1.6
Mojarra 1.2_07-b03-FCS
Tomcat 6.0.16
Richfaces 3.2.0

Thanks!
Ben