UTF8 Characterset Problem in Xapp4.1.1

Hello I have Characterset problem in Xapplication 4.1.1
I have the same JSP files working in Xapp 3.1.3 without any problem.
The characters are corrupted while modifying a document.
My view and modify jsp pages are in the attached zip file.
There is also a picture in the zip file which shows the corrupted characters more clearly.

Thanks Server

X-Application Version: 4.1.1
Tamino Version : 4.1.1
Platform : Win2k
WebContainer : Tamocat 4.1.1
JDK Version : 1.3.1

Hi,

using utf8 with Tomcat 4.1.18 for requires some additional tomcat setup (and this setup is different from Tomcat 3.3 setup). Maybe that’s what’s missing for your application. Please have a look at the I18N section of the documentation.

Michael

Software AG Germany, Darmstadt

Hello,
It says I should add these lines to the web.xml file but I recieve an exception when I add it :



Set Character Encoding
filters.SetCharacterEncodingFilter

encoding
UTF-8



Set Character Encoding
/*



Exception :

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: This absolute uri (http://www.softwareag.com/xtools/xapplication) cannot be resolved in either web.xml or the jar files deployed with this application
void org.apache.jasper.compiler.DefaultErrorHandler.jspError(java.lang.String, java.lang.Exception)
void org.apache.jasper.compiler.ErrorDispatcher.dispatch(org.apache.jasper.compiler.Mark, java.lang.String, java.lang.Object, java.lang.Exception)
void org.apache.jasper.compiler.ErrorDispatcher.jspError(java.lang.String, java.lang.String)
void org.apache.jasper.compiler.TagLibraryInfoImpl.(org.apache.jasper.JspCompilationContext, java.lang.String, java.lang.String, java.lang.String, org.apache.jasper.compiler.ErrorDispatcher)
void org.apache.jasper.compiler.Parser.parseTaglibDirective(org.apache.jasper.compiler.Node)
void org.apache.jasper.compiler.Parser.parseDirective(org.apache.jasper.compiler.Node)
void org.apache.jasper.compiler.Parser.parseElements(org.apache.jasper.compiler.Node)
org.apache.jasper.compiler.Node$Nodes org.apache.jasper.compiler.Parser.parse(org.apache.jasper.compiler.ParserController, org.apache.jasper.compiler.JspReader, org.apache.jasper.compiler.Node)
org.apache.jasper.compiler.Node$Nodes org.apache.jasper.compiler.ParserController.parse(java.lang.String, org.apache.jasper.compiler.Node)
org.apache.jasper.compiler.Node$Nodes org.apache.jasper.compiler.ParserController.parse(java.lang.String)
void org.apache.jasper.compiler.Compiler.generateJava()
void org.apache.jasper.compiler.Compiler.compile()
void org.apache.jasper.JspCompilationContext.compile()
void org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean)
void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void filters.SetCharacterEncodingFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardContext.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardHostValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.valves.ErrorDispatcherValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardEngineValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.coyote.tomcat4.CoyoteAdapter.service(org.apache.coyote.Request, org.apache.coyote.Response)
void org.apache.coyote.http11.Http11Processor.process(java.io.InputStream, java.io.OutputStream)
void org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(org.apache.tomcat.util.net.TcpConnection, java.lang.Object)
void org.apache.tomcat.util.net.TcpWorkerThread.runIt(java.lang.Object)
void org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run()
void java.lang.Thread.run()



--------------------------------------------------------------------------------

Apache Tomcat/4.1.18
files.zip (1020 Bytes)

Hi,

you did almost correct.

Your doctype elment looks like the following:

<!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
      "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">  
</pre><BR><BR>You have added the needed parts to the web.xml, but you have forgotten to modify the doctype element. The correct will look like the following:<BR><pre class="ip-ubbcode-code-pre">
<!DOCTYPE web-app PUBLIC
	"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
	"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>



Change the doctype element please, and the it should work.

Bye and good luck
Thorsten

I still recieve exception :frowning:

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: This absolute uri (http://www.softwareag.com/xtools/xapplication) cannot be resolved in either web.xml or the jar files deployed with this application
void org.apache.jasper.compiler.DefaultErrorHandler.jspError(java.lang.String, java.lang.Exception)
void org.apache.jasper.compiler.ErrorDispatcher.dispatch(org.apache.jasper.compiler.Mark, java.lang.String, java.lang.Object, java.lang.Exception)
void org.apache.jasper.compiler.ErrorDispatcher.jspError(java.lang.String, java.lang.String)
void org.apache.jasper.compiler.TagLibraryInfoImpl.(org.apache.jasper.JspCompilationContext, java.lang.String, java.lang.String, java.lang.String, org.apache.jasper.compiler.ErrorDispatcher)
void org.apache.jasper.compiler.Parser.parseTaglibDirective(org.apache.jasper.compiler.Node)
void org.apache.jasper.compiler.Parser.parseDirective(org.apache.jasper.compiler.Node)
void org.apache.jasper.compiler.Parser.parseElements(org.apache.jasper.compiler.Node)
org.apache.jasper.compiler.Node$Nodes org.apache.jasper.compiler.Parser.parse(org.apache.jasper.compiler.ParserController, org.apache.jasper.compiler.JspReader, org.apache.jasper.compiler.Node)
org.apache.jasper.compiler.Node$Nodes org.apache.jasper.compiler.ParserController.parse(java.lang.String, org.apache.jasper.compiler.Node)
org.apache.jasper.compiler.Node$Nodes org.apache.jasper.compiler.ParserController.parse(java.lang.String)
void org.apache.jasper.compiler.Compiler.generateJava()
void org.apache.jasper.compiler.Compiler.compile()
void org.apache.jasper.JspCompilationContext.compile()
void org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean)
void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void filters.SetCharacterEncodingFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardContext.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardHostValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.valves.ErrorDispatcherValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardEngineValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
void org.apache.coyote.tomcat4.CoyoteAdapter.service(org.apache.coyote.Request, org.apache.coyote.Response)
void org.apache.coyote.http11.Http11Processor.process(java.io.InputStream, java.io.OutputStream)
void org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(org.apache.tomcat.util.net.TcpConnection, java.lang.Object)
void org.apache.tomcat.util.net.TcpWorkerThread.runIt(java.lang.Object)
void org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run()
void java.lang.Thread.run()



--------------------------------------------------------------------------------

Apache Tomcat/4.1.18

web.xml is attached.
web.xml (1.1 KB)

Hi,

I found one obvious mistake in your web.xml:
PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN”
http://java.sun.com/dtd/web-app_2_3.dtd”>

This should be a 3, but strange, I tried your web.xml with one of my applications and it didn’t work.
I don’t know why, I compared it line by line with a working web.xml of mine.

Cause of that reason I packed my web.xml with the need filter class and I attched it to this post.

Please replace the files in our application and please try it again.

Good luck

Thorsten
files.zip (1.96 KB)

Hello Thorsten,
I copied the files you have sent and now it seems working without any problem :slight_smile:
Many thanks.
Server