I get parameters from client with java servlet.
This is my post:

For sending the request to the server I use ExtJs:
var x = new Ext.Window({
title:'Загрузка файла',
items:[
formp = new Ext.FormPanel({
fileUpload: true,
width: 350,
autoHeight: true,
bodyStyle: 'padding: 10px 10px 10px 10px;',
labelWidth: 70,
defaults: {
anchor: '95%',
allowBlank: false,
msgTarget: 'side'
},
items:[{
xtype:"combo",
fieldLabel:'Тип файла ',
name:"cb_file",
id:"cb_file",
mode:"local",
typeAhead: false,
loadingText: 'Загрузка...',
store:new Ext.data.SimpleStore({
fields: ['file_name', 'file_type'],
data : [['*.MIF/MID', 'mif'],['*.GPX', 'gpx']]
}),
forceSelection:true,
emptyText:'выбирите тип...',
triggerAction:'all',
valueField:'file_type',
displayField:'file_name',
anchor:'60%'
},{
xtype: 'fileuploadfield',
id: 'filedata',
emptyText: 'Выберите файл для загрузки...',
fieldLabel: 'Имя файла',
buttonText: 'Обзор'
}],
buttons: [{
text: 'Загрузить',
handler: function(){
mapinfo="mapinfo";
formp.getForm().submit({
url: url_servlet+'uploadfile',
//params: {file_type: mapinfo},
success: function(formp, o) {
alert(o.result.file);
alert(o.result.success);
kad_tab.getStore().reload()
zoom_store.load();
}
})
}
}]
})
]
})
x.show();
If I understand this correctly: after sending 2 parameters to the server cb_file and filedata. I try to get them by:
String st = request.getParameter("cb_file");
But get null.
When I try to get the file:
list = upload.parseRequest(request);
I get null as well.
But if I send only the file (for this i delete lines with combobox) it works fine.
How to parse this request?
That´s because the request is a multipart one. You can read the request stream and parse it for yourself or use the Apache Commons (use this one please!).
Here you have a sniplet that ilustrate how to do what you want to do with Apache Commons fileupload:
Good luck!