How can I Pass parameter from FormPanel of GWT to Servlet?
FormPanel formPanel = new FormPanel();
formPanel.setAction(GWT.getModuleBaseURL()
+ "ntPdfDownload?myParam=" + String.valueOf(document.getId())+ "&myValue="+ConstantName.IS_REQUIRED.toString()+"");
formPanel.setMethod(FormPanel.METHOD_GET);
formPanel.setEncoding(FormPanel.ENCODING_MULTIPART);
formPanel.submit();
This is what I have done.. But I am not able to get parameters at Servelt.
If you want to use
ENCODING_MULTIPART. Your method has to bePOST. This is generally required when you want to upload files to server.I guess you are passing simple parameters to your servlet.So, It should work without
formPanel.setEncoding(FormPanel.ENCODING_MULTIPART);.