Re: file upload and unicode
Dzidorius Martinaitis (kafka) rta: Hello, I try use filter, but always get this error: 09:38:52,076 ERROR [Digester] Parse Error at line 65 column -1: Element web-app does not allow filter here. org.xml.sax.SAXParseException: Element web-app does not allow filter here. at org.apache.crimson.parser.Parser2.error(Parser2.java:3160) My server is Tomcat 4.1.12 Chck your dtd. It should be !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; The web-app_2_2 does not allow filters. Hth, Tib - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload and unicode
Yes, I know. And my web.xml have exactly this declaration. But problem is same. Chck your dtd. It should be !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; The web-app_2_2 does not allow filters. Hth, Tib - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload and unicode
Dzidorius Martinaitis (kafka) rta: Yes, I know. And my web.xml have exactly this declaration. But problem is same. And the order of tags are preserved according to this DTD? Some containers require this as well others not. !ELEMENT web-app (icon?, display-name?, description?, distributable?, context-param*, filter*, filter-mapping*, listener*, servlet*, servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?, error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*, login-config?, security-role*, env-entry*, ejb-ref*, ejb-local-ref*) Tib - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload and unicode
part of web.xml: ?xml version=1.0? !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 filter filter-nameSet Character Encoding/filter-name filter-classfilters.SetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueUTF-8/param-value /init-param /filter filter-mapping filter-nameSet Character Encoding/filter-name servlet-nameaction/servlet-name /filter-mapping !-- Standard Action Servlet Configuration (with debugging) -- servlet skip Yes, I know. And my web.xml have exactly this declaration. But problem is same. And the order of tags are preserved according to this DTD? Some containers require this as well others not. !ELEMENT web-app (icon?, display-name?, description?, distributable?, context-param*, filter*, filter-mapping*, listener*, servlet*, servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?, error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*, login-config?, security-role*, env-entry*, ejb-ref*, ejb-local-ref*) Tib - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload and unicode
Dzidorius Martinaitis (kafka) rta: Hello, I try use filter, but always get this error: 09:38:52,076 ERROR [Digester] Parse Error at line 65 column -1: Element What is on 65th line of your web.xml? Tib - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload and unicode
Sorry, you was right. I lift filter declaration above all and have good depoyment. And now I have unicode and file upload. Thank you very much. Hello, I try use filter, but always get this error: 09:38:52,076 ERROR [Digester] Parse Error at line 65 column -1: Element What is on 65th line of your web.xml? Tib - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload and unicode
Just upload the file as normal binary file. When you read this file at the server side, make sure to read it with correct encoding of unicode type (like UTF8,UTF16, etc) You probably need to allow the user to enter the upload file encoding type, and pass along this info to server -Dan - Original Message - From: Dzidorius Martinaitis (kafka) [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, June 22, 2003 11:46 PM Subject: file upload and unicode Hello, I try use filter, but always get this error: 09:38:52,076 ERROR [Digester] Parse Error at line 65 column -1: Element web-app does not allow filter here. org.xml.sax.SAXParseException: Element web-app does not allow filter here. at org.apache.crimson.parser.Parser2.error(Parser2.java:3160) My server is Tomcat 4.1.12 I want add filter from: http://www.anassina.com/struts/i18n/i18n.html I have problem with file upload and unicode and will hope that this solve my problem. Now I use my RequestProcessor, but it not solve problem with file upload and unicode. This code I use in RequestProcessor: try { request.setCharacterEncoding(UTF-8) ; } catch(java.io.UnsupportedEncodingException e) { System.out.println(e); } Could I hope, what filter will solve my problem with file upload and unicode and why I get this error? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]