You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Phillip Qin <Ph...@shareowner.com> on 2004/09/30 15:52:20 UTC

RE: org.apache.commons.digester.Digester error--- at tomcat start up...

Move resource-ref down to the end. You have to follow the order of each
element.

-----Original Message-----
From: Shilpa Nalgonda [mailto:snalgonda@mypublisher.com] 
Sent: September 30, 2004 9:39 AM
To: Tomcat Users List
Subject: org.apache.commons.digester.Digester error--- at tomcat startup...


I added some elements in web.xml on linux machine and i get this error, but
i cannot see any problem with web.xml, the same web.xml works fine on
windows...below is my web.xml...can someone please suggest


Sep 30, 2004 9:03:31 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 26 column 11: The content of element type
"web-app" must match
"(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*)".
org.xml.sax.SAXParseException: The content of element type "web-app" must
match
"(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*)".
        at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHand
lerWrapper.java:236)
        at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:17
2)
        at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:38
0)
        at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:31
4)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.
java:2049)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:9
33)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu
mentFragmentScannerImpl.java:1083)


web.xml...
<!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>

    <display-name>MyPub XmlRpc</display-name>
    <description>
      This is the container to hold the MLRPC calls
    </description>
    <resource-ref>
        <description>DB Connection</description>
        <res-ref-name>jdbc/mydb</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    <servlet>
        <servlet-name>XmlRpcServlet</servlet-name>
        <servlet-class>XmlRpcServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>XmlRpcServlet</servlet-name>
        <url-pattern>/rpc</url-pattern>
    </servlet-mapping>
 </web-app>
~


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


!DSPAM:415c0db286331880812122!

RE: Internationalization of characters --UTF8 encoding

Posted by Shilpa Nalgonda <sn...@mypublisher.com>.
Our java Application takes UTF-8 encoded unicode data and sores in a Java
String , and should insert that into Oracle8.1.7 database.
Oracle database has US7ASCII encoding.
So when i insert data some of the characters are being lost, and i see '?'
being inserted into database.
How can i convert this UTF-8 encoded java String into ASCII so that database
can load it.

Can anyone suggest what to do...









--- Shilpa Nalgonda <sn...@mypublisher.com> wrote:

> can u point me to a resource how i can do it.
>
> -----Original Message-----
> From: Evgeny Gesin [mailto:evgenygesin@yahoo.com]
> Sent: Friday, October 29, 2004 9:42 AM
> To: Tomcat Users List
> Subject: Re: Internationalization of characters
> --UTF8 encoding
>
>
> > .. is supposed to take japanese characters an
> insert
> > them into database. Is there any setting in
> Tomcat4
> > where i should be giving the encoding option.
>
> You can specify parameters for SQL driver when you
> define DataSource in Tomcat's server.xml. I think
> most
> of Oracle drivers can process UTF-8, without the
> needs
> for such parameters, but MySQL 3.xx, for example,
> needs such parameters...
>
> Evgeny
> Javadesk / AllTelescopes
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We
> finish.
> http://promotions.yahoo.com/new_mail
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
>
>




__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Internationalization of characters --UTF8 encoding

Posted by Evgeny Gesin <ev...@yahoo.com>.
It's specific for driver you use. I don't have a url
for Oracle drivers, I use JConnector for MySQL
http://dev.mysql.com/doc/connector/j/en/

Here is sample of driver line in server.xml:

jdbc:mysql://127.0.0.1:3306/db?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=utf8&amp

Take attention of these two parameters useUnicode=true
and characterEncoding=utf8.

Evgeny
Javadesk / AllTelescopes


--- Shilpa Nalgonda <sn...@mypublisher.com> wrote:

> can u point me to a resource how i can do it.
> 
> -----Original Message-----
> From: Evgeny Gesin [mailto:evgenygesin@yahoo.com]
> Sent: Friday, October 29, 2004 9:42 AM
> To: Tomcat Users List
> Subject: Re: Internationalization of characters
> --UTF8 encoding 
> 
> 
> > .. is supposed to take japanese characters an
> insert
> > them into database. Is there any setting in
> Tomcat4
> > where i should be giving the encoding option.
> 
> You can specify parameters for SQL driver when you
> define DataSource in Tomcat's server.xml. I think
> most
> of Oracle drivers can process UTF-8, without the
> needs
> for such parameters, but MySQL 3.xx, for example,
> needs such parameters...
> 
> Evgeny
> Javadesk / AllTelescopes
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We
> finish.
> http://promotions.yahoo.com/new_mail 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Internationalization of characters --UTF8 encoding

Posted by Shilpa Nalgonda <sn...@mypublisher.com>.
can u point me to a resource how i can do it.

-----Original Message-----
From: Evgeny Gesin [mailto:evgenygesin@yahoo.com]
Sent: Friday, October 29, 2004 9:42 AM
To: Tomcat Users List
Subject: Re: Internationalization of characters --UTF8 encoding 


> .. is supposed to take japanese characters an insert
> them into database. Is there any setting in Tomcat4
> where i should be giving the encoding option.

You can specify parameters for SQL driver when you
define DataSource in Tomcat's server.xml. I think most
of Oracle drivers can process UTF-8, without the needs
for such parameters, but MySQL 3.xx, for example,
needs such parameters...

Evgeny
Javadesk / AllTelescopes


		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Internationalization of characters --UTF8 encoding

Posted by Evgeny Gesin <ev...@yahoo.com>.
> .. is supposed to take japanese characters an insert
> them into database. Is there any setting in Tomcat4
> where i should be giving the encoding option.

You can specify parameters for SQL driver when you
define DataSource in Tomcat's server.xml. I think most
of Oracle drivers can process UTF-8, without the needs
for such parameters, but MySQL 3.xx, for example,
needs such parameters...

Evgeny
Javadesk / AllTelescopes


		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Internationalization of characters --UTF8 encoding

Posted by Shilpa Nalgonda <sn...@mypublisher.com>.
Hi,

I am using Tomcat4.1, Oracle 8i , and XmlRpc to write an application which
is supposed to take japanese characters an insert them into database.  Is
there any setting in Tomcat4 where i should be giving the encoding option.
And aslo i get the request from the client in the form of xml and pass that
request via xmlrpc and insert into oracle database.
The client sends japanese characters in Unicode , our database has caracter
set of US7ASCII.

select * from NLS_DATABASE_PARAMETERS where parameter = 'NLS_CHARACTERSET';

PARAMETER VALUE
------------------------------ ------------------------------
NLS_CHARACTERSET US7ASCII

The data is being inserted as all brackets in  database.'{{{'
Is there any conversion i need to do while inserting in the database.

Please suggest if anyone has any opinions.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org