cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomasz Piechowicz <tomasz.piechow...@gmail.com>
Subject Reading Content-Disposition header in flow.
Date Fri, 02 Oct 2009 17:35:36 GMT
Hi
I have simple form with file upload widget. I need to read
'Content-Disposition' http header, but I don`t know how to do it. I
tried to use cocoon.request functions but they doesn`t work.

My upload function :
function Fup()
{
	form = new Form("resource/internal/test/fup_model.xml");
	form.createBinding("resource/internal/test/fup_binding.xml");
	form.showForm("fup-display-pipeline");
	
	// reading http header
	var contDisp = cocoon.request.getAttribute('Content-Disposition');
	
	// my own java object that writes text to console
	console.println('contDisp = ' + contDisp);
	
	cocoon.redirectTo("fup", true);
}

After I upload some file function writes to console : contDisp = null

I tried also to read different http headers like : Content-Type or
Content-Length - but getAttribute() always returns null.
Interestingly, when I use request.getContentType() or
request.getContentLength() - this functions works well.

Can any one tell me what I`m doing wrong ? How to read any http-header
in flow function ?

Regards,
Tomek Piechowicz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message