webtier@glassfish.java.net

Re: [webtier] ServletFilter and AjaxRequest

From: Joel Weight <digitaljoel_at_gmail.com>
Date: Tue, 19 Oct 2010 09:24:48 -0600

I had the same question back in june.

http://forums.java.net/jive/thread.jspa?messageID=473812&#473812<http://forums.java.net/jive/thread.jspa?messageID=473812񳫔>

<http://forums.java.net/jive/thread.jspa?messageID=473812񳫔>Joel

On Tue, Oct 19, 2010 at 5:30 AM, Lyn Büsching <buesching_at_lat-lon.de> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I have a problem with a component uploading a file input written by my own.
> First the request will be parsed by a ServletFilter if it has a multipart
> content.
> In case the form will be send by using the ajax mechanism the form does not
> have
> the original contenttype I entered in the form element:
>
> <h:form id="form" enctype="multipart/form-data">...
>
> In the jsf javascript file the request header is set as follows:
>
> if (typeof req.xmlReq.setRequestHeader !== 'undefined') {
> req.xmlReq.setRequestHeader('Faces-Request', 'partial/ajax');
> req.xmlReq.setRequestHeader('Content-type',
> 'application/x-www-form-urlencoded');
> }
>
> Can I adapt them as I need? Am I missing anything?
>
> Lyn
>
>
> - --
> l a t / l o n GmbH
> Aennchenstrasse 19 53177 Bonn, Germany
> phone ++49 +228 18496-0 fax ++49 +228 18496-29
> http://www.lat-lon.de http://www.deegree.org
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> deegree day 2010
> http://deegreeday.deegree.org
> * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAky9gWEACgkQ/QSXMw31ZSuIVgCfTYVzuzXUZX4k9QDeL30sdrPO
> Nr8An3Q/3bRcevC1cfbgxfH2quDTXV9u
> =Scxh
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>