[JBoss Seam] - UTF-8 problem within JSF
by db__
Hi there,
I have a UTF-8 problem within my seam application,
Basically viewing my test.jsf shows me two byte UTF-8 character in plain text. encoded as #195;¶ for a german ö, instead it would be nice to have the correct htmlcode for ö which is ;ouml i guess.
So here is what I have done....
I have confirmed that the String withing the Bean is correct UTF-8.
I have content="text/html; charset=utf-8" within my header.
I have jboss set to UTF-8 charset by default, and confirmed that defaultcharset is UTF-8
I have added the following to my web.xml.
<!-- Encoding to UTF-8 -->
<filter-name>Seam Character Encoding</filter-name>
<filter-class>
org.jboss.seam.servlet.SeamCharacterEncodingFilter
</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>overrideClient</param-name>
<param-value>true</param-value>
</init-param>
<filter-mapping>
<filter-name>Seam Character Encoding</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
Is there anything more I have to do to get UTF-8 in jsf working?
thanks,
-dennis
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971517#3971517
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971517
19 years, 7 months
[Beginners Corner] - JBOSS 4.0.2
by golanbln
Hello everybody,
i am using Jboss4.0.1sp-1 with JSF and JSTL i have no problem when i deploy my application and is running ok..
i am trying to change to Jboss4.0.2 when i deploy i have no problems but when i run my application i got an error like
|
| ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
| javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error ge
| tting property 'links' from bean of type de.mentalproof.mpw.web.beans.LinksBean:
| java.lang.NullPointerException
| at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
|
| at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
|
| at javax.faces.component.UIData.getValue(UIData.java:527)
| at javax.faces.component.UIData.getDataModel(UIData.java:856)
| at javax.faces.component.UIData.setRowIndex(UIData.java:379)
| at com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRen
| derer.java:65)
| at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.jav
| a:683)
| at javax.faces.component.UIData.encodeBegin(UIData.java:681)
| at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:591
| )
| at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:543)
| at com.sun.faces.taglib.html_basic.DataTableTag.doEndTag(DataTableTag.ja
| va:491)
| at org.apache.jsp.mpw.index_jsp._jspx_meth_h_dataTable_0(org.apache.jsp.
| mpw.index_jsp:492)
| at org.apache.jsp.mpw.index_jsp._jspService(org.apache.jsp.mpw.index_jsp
| :268)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
| .java:322)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
| 14)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
| atcher.java:672)
| at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
| tionDispatcher.java:463)
| at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
| ispatcher.java:398)
| at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
| patcher.java:301)
| at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImp
| l.java:322)
| at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.
| java:130)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePha
|
|
|
i think that jboss can't use the JSF components cuz the LinksBean is used in a DATATABLE in my jsp..
when i run a jsp without JSF components i have no problem its run ok..
so can someone tell me plz what is happening here?? what should i do??
i think i missed some configuration or some jars that i have to use or add..
but witch?? anyone idea???
plz help me
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971511#3971511
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971511
19 years, 7 months
[JBossCache] - JBoss Cache (PojoCache) with Hibernate Collections (Persiste
by mleur
Hi,
I am using PojoCache to store Pojo Objects created by Hibernate.
I want to use the replication mode with this cache, so I pre-compile with aopc (ant task) my classes.
But when I call PojoCache.putObject with an Object (which contains collections) loaded by Hibernate, I have an exception :
Caused by: org.jboss.cache.CacheException: failure creating proxy
at org.jboss.cache.aop.CollectionClassHandler.collectionObjectPut(CollectionClassHandler.java:124)
at org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:213)
at org.jboss.cache.aop.TreeCacheAopDelegate._regularPutObject(TreeCacheAopDelegate.java:468)
at org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:206)
at org.jboss.cache.aop.PojoCache._putObject(PojoCache.java:731)
at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:462)
at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:423)
at com.gltrade.manager.cache.PojoCacheManagerImpl.put(PojoCacheManagerImpl.java:75)
... 12 more
Caused by: java.lang.RuntimeException: javassist.CannotCompileException: by java.lang.VerifyError: class AOPClassProxy$0 overrides final method .Û8Ý*h'+
at org.jboss.cache.aop.collection.CollectionInterceptorUtil.getMethodMap(CollectionInterceptorUtil.java:74)
at org.jboss.cache.aop.collection.CachedMapInterceptor.(CachedMapInterceptor.java:33)
at org.jboss.cache.aop.collection.CollectionInterceptorUtil.createMapProxy(CollectionInterceptorUtil.java:50)
at org.jboss.cache.aop.CollectionClassHandler.collectionObjectPut(CollectionClassHandler.java:122)
... 19 more
Caused by: javassist.CannotCompileException: by java.lang.VerifyError: class AOPClassProxy$0 overrides final method .Û8Ý*h'+
at javassist.ClassPool.toClass(ClassPool.java:906)
at javassist.ClassPool.toClass(ClassPool.java:846)
at org.jboss.aop.AOPClassPool.toClass(AOPClassPool.java:181)
at javassist.ClassPool.toClass(ClassPool.java:804)
at javassist.CtClass.toClass(CtClass.java:1037)
at org.jboss.aop.proxy.ClassProxyFactory.generateProxy(ClassProxyFactory.java:290)
at org.jboss.aop.proxy.ClassProxyFactory.getProxyClass(ClassProxyFactory.java:67)
at org.jboss.aop.proxy.ClassProxyFactory.newInstance(ClassProxyFactory.java:79)
at org.jboss.aop.proxy.ClassProxyFactory.newInstance(ClassProxyFactory.java:52)
at org.jboss.aop.proxy.ClassProxyFactory.newInstance(ClassProxyFactory.java:47)
at org.jboss.cache.aop.collection.CollectionInterceptorUtil.getMethodMap(CollectionInterceptorUtil.java:72)
... 22 more
Caused by: java.lang.VerifyError: class AOPClassProxy$0 overrides final method .Û8Ý*h'+
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javassist.ClassPool.toClass(ClassPool.java:898)
... 32 more
I have done many tests, I have reproduced the problem without Hibernate.
In fact, the problem is the Hibernate implementation of Collections e.g: org.hibernate.collection.PersistentSet.
When I create an Object which contains other objets within PersistentSet, I cannot put objets into PojoCache and I have the same exception.
So, Could PojoCache work with Hibernate Objects and its Collection implementations ???
Thanks for Help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971509#3971509
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971509
19 years, 7 months