tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Тимур Кулибаев <timur.kulib...@gmail.com>
Subject Re: Oracle Application Server 10g R3 works fine with RK-1048 codepage but Tomcat 7.0.47 does not.
Date Thu, 16 Jan 2014 15:22:58 GMT
Hello, Terence !

First of all thank you for your response and helping me.

+++ I've missed a good part of this thread
To let you review of the thread I saved all messages in one pdf-file so you
can read missed messages in pdf which
is attached.

+++ is the content type set either with the page directive or
HttpServletResponse.setContentType() ?

I checked servlet source code by search but there is not
HttpServletResponse.setContentType(...) in the project.
To be exact, the servlet is built based on Oracle UIX technology so it
reads all initialization parameters from
servlet configuration file named web.xml - see uploaded file with web.xml
of my servlet.
Web.xml contains the following section:

<init-param>
   <param-name>encoding</param-name>
   <param-value>windows-1251</param-value>
</init-param>

So servlet must work in single-byte code page windows-1251 . Oracle
Application Server with this servlet
deployed works fine with Kazakh language but Tomcat 7 does not. From the
browser we can view
html-code of uploaded html-page. First I uploaded to browser the page from
the servlet deployed on Oracle
Application Server and save one then I uploaded the same page from the same
servlet but deployed on
Tomcat 7 and then also saved one.
I compared both pages and I see that page from Tomcat is twice bigger in
size than page from Oracle
Application Server. Looking inside of pages I see that Tomcat gives data in
UTF-8 so file is big versus
Oracle AS which gives data in Windows-1251. Please see uploaded files with
screenshot.
To make Tomcat produce pages in windows-1251 I added filter to web.xml but
no effect all pages still
go in UTF-8:
<filter>
    <filter-name>AddDefaultCharsetFilter</filter-name>

<filter-class>org.apache.catalina.filters.AddDefaultCharsetFilter</filter-class>
    <init-param>
        <param-name>encoding</param-name>
        <param-value>system</param-value>
     </init-param>
</filter>

System settings are :
[oracle@n36 WEB-INF]$ echo $JAVA_OPTS
-XX:MaxPermSize=128M -Xms256m -Xmx1024m -Duser.language=ru -Duser.country=RU
[oracle@n36 WEB-INF]$
[oracle@n36 WEB-INF]$ echo $LC_ALL
russian
[oracle@n36 WEB-INF]$

How to force Tomcat to produce pages in windows-1251 ?

Thank you, Timur
PS: see uploaded files with web.xml, screenshot, html-pages from Tomcat 7
and Oracle AS.


2014/1/16 Terence M. Bandoian <terence@tmbsw.com>

> On 1/15/2014 10:13 AM, Тимур Кулибаев wrote:
> > Hello, Chris !
> >
> > I applied settings you adviced:
> > ++++Don't you want user.langauge=RU user.country=kz?
> >
> > [oracle@n36 logs]$ echo $JAVA_OPTS
> > -XX:MaxPermSize=128M -Xms256m -Xmx1024m -Duser.language=RU
> -Duser.country=kz
> >
> > But our java-application gives the following message:
> >
> > 15.01.2014 21:41:01 org.apache.catalina.core.ApplicationContext log
> > MESSAGE = ORA-00604: error occurred at recursive SQL level 1
> > ORA-12705: invalid or unknown NLS parameter value specified
> > , ERRORCODE = 604
> >
> > ++++So, there can be problems in a couple of places. If you have an
> > ++++extended characters correctly-stored in the Oracle database, will it
> > ++++display correctly if you try to show it on a web page? Let's make
> sure
> > ++++that works first, then we'll tackle submitting such characters via
> > forms.
> > ++++Note that using extended characters in GET requests is a nightmare:
> > ++++you should try to avoid it at all costs.
> >
> > There are two state languages in Kazakhstan - Russian and Kazakh and both
> > must
> > be supported. Our Oracle database works in single-byte cyrillic encoding
> > and
> > its size is up to 1 tB now. If we convert one to Unicode it will be ~2 tB
> > which
> > is impossible for us as no disk space.
> > Our java servlet was created based on Oracle UIX technology which is old
> > enough.
> > Within seven years we successfully use this servlet with Oracle
> Application
> > Server 10g R2/R3 (now OAS 10.1.3.5). There are not any troubles with
> Kazakh
> > letters displaying on web-pages with Oracle Application Server. But
> Tomcat
> > gives
> > troubles with Kazakh letters displaying. What difference between Oracle
> > Application
> > Server and Tomcat in characters processing ? In production we still use
> > this
> > servlet with Oracle Application Server. I can see any its settings if you
> > tell me
> > which ones to check.
> > >From Tomcat doc I see that we can convert GET-request to specified code
> > page by
> > using "URIEncoding" in http-connector definition of server.xml. I have
> > tried to use
> > the followng:
> > <Connector port="7785" protocol="HTTP/1.1"
> > connectionTimeout="20000"
> > redirectPort="8443"
> > URIEncoding="Cp1251" <-- also tried Windows-1251, WINDOWS-1251, CP1251
> > useBodyEncodingForURI="true"/> <--also tried without this one
> >
> > May be we must do some tracing to understand the root of the trouble ?
> >
> > Thank you for your helping me.
> > Waiting for your advices,
> > Timur
>
>
> Hi, Timur-
>
> I've missed a good part of this thread but is the content type set
> either with the page directive or HttpServletResponse.setContentType()?
>
> -Terence Bandoian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
View raw message