Re: Base64 strange problem
- From: Tamir Weiss <tamir.weiss@xxxxxxxxx>
- Date: 14 May 2007 23:24:02 -0700
On May 14, 10:08 pm, Dr J R Stockton <j...@xxxxxxxxxxxxxxxxxx> wrote:
In comp.lang.javascript message <1179162644.877937.92...@xxxxxxxxxxxxxxx
glegroups.com>, Mon, 14 May 2007 10:10:44, Tamir Weiss
<tamir.we...@xxxxxxxxx> posted:
I'm trying to send a byte array (JPG image) from javascript to a
servlet for processing.
I'm using Base64 to encode the byte array in javascript, and then a
base64 decoder in the servlet to decode it.
The thing is, that even though the String has the same length on both
sides, the decoded byte array is shorter then the original one.
I've tried a couple of different implementation on both sides, with
the same results.
It is clear what your problem is; it is that you have done something
wrong.
A better description of what code you use might render possible a more
specific response. However, as you asked no question, you may not be
expecting any answer.
It's a good idea to read the newsgroup c.l.j and its FAQ. See below.
--
(c) John Stockton, Surrey, UK. ?...@xxxxxxxxxxxxxxxxxx Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
The encoding in JavaScript is done using the webtoolkit.base64 encoder
(on FireFox, but I'd imagine it would work on both).
The decoding is done using the org.apache.commons.codec library.
I'm not using any special parameters on neither sides, so I didn't
want to give any meaningless details.
I'm pretty new to all the javascript and base64 thing, so I'm
suspecting something in my HTML\Servlet is misconfigured.
If you've seen something like that, please tell me what helped you.
.
- References:
- Base64 strange problem
- From: Tamir Weiss
- Re: Base64 strange problem
- From: Dr J R Stockton
- Base64 strange problem
- Prev by Date: XSLT: Transforming HTML Input Element's Values
- Next by Date: Re: somebody help with virtual hosting plaese
- Previous by thread: Re: Base64 strange problem
- Next by thread: Re: Base64 strange problem
- Index(es):
Relevant Pages
|