Hi, i am using extjs version 4.1.3, Try to upload file using on filefield. When I submit the form I can content type and content-disposition in firebug.
In servlet class I get content type correctly but the content-disposition is null.
how to i get the upload file in servlet class.

My Extjs code below:

var upoladForm = Ext.create('Ext.form.Panel', {
title: 'Upload a Photo',
width: 400,
bodyPadding: 10,
frame: true,
renderTo: Ext.getBody(),
items: [{
xtype: 'filefield',
name: 'photo',
fieldLabel: 'Photo',
labelWidth: 50,
msgTarget: 'side',
allowBlank: false,
anchor: '100%',
buttonText: 'Select Photo...'
}],

buttons: [{
text: 'Upload',
handler: function() {
var form = this.up('form').getForm();
if(form.isValid()){
form.submit({
url: 'DOC_UPLOAD',
isUpload : true,
waitMsg: 'Uploading your photo...',
success: function(fp, o) {
Ext.Msg.alert('Success', 'Your photo "' + o.result.file + '" has been uploaded.');
}
});
}
}
}]
});
Ext.define('UploadPopup', {
extend: 'Ext.window.Window',
title: 'This is a Window with a Form',
height: 200,
id: 'uploadPopup',
width: 400,
layout: 'fit',
items: [upoladForm]
});



My Java code below.

public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
String command = request.getParameter("command");

response.setCharacterEncoding("UTF-8");
String contentHeader = request.getHeader("content-type");
String contentDis = request.getHeader("content-disposition");
for(Part part : request.getParts()){
System.out.println("PN: "+ part.getName());
Collection<String> headers = part.getHeaders("content-disposition");
if (headers == null)
continue;
for(String header : headers){
System.out.println("CDH: " + header);
}
}

}

Please help me on this.

Thanks,
Karthick