Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: binary data in a form field gets changed

$
0
0

Just to let you know I have been busy looking for a suitable form-handler for multipart/form-data enctype. My research on this subject tells me there is something broken in the way ColdFusion handles form posts. There are more issues besides the getHttpRequestData bug we uncovered. For example, if you attempt to handle a 'posted' form using getPagecontext(), a null value is returned.

 

I have tried the following methods, unsuccessfully:

 

1) getHttpRequestData;

2) getPageContext, for example

req=getPagecontext().getRequest();

res=getPagecontext().getResponse();

/*Always returns null for forms submitted with method="post". Works as expected for forms submitted with method="get".*/

data=req.getParameter("filecontent");

out = res.getWriter();

etc.

3) implementing the doPost method in a FormHandler servlet that extends HttpServlet, and running the servlet via

getPagecontext().forward("FormHandler");

 

At the moment, I am grappling with the Apache FileUpload library.


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>