Re: file upload and unicode

2003-06-23 Thread Dan Tran
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]



Re: file upload and unicode

2003-06-23 Thread Dzidorius Martinaitis \(kafka\)
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

2003-06-23 Thread Gemes Tibor
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

2003-06-23 Thread Dzidorius Martinaitis \(kafka\)
part of web.xml:



http://java.sun.com/dtd/web-app_2_3.dtd";>



 Set Character Encoding
 filters.SetCharacterEncodingFilter
 
  encoding
  UTF-8
 




 Set Character Encoding
 action


  
  
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.
>
>  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

2003-06-23 Thread Gemes Tibor
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.



Tib



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: file upload and unicode

2003-06-22 Thread Dzidorius Martinaitis \(kafka\)
Yes, I know. And my web.xml have exactly this declaration.
But problem is same.

> Chck your dtd. It should be
>  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

2003-06-22 Thread Gemes Tibor
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
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]