I copied the sourcecode in my project and it works fine, but if I try to read the header in my servlet its nothing there.
Where is my mistake?
here is my servlet:
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.fileupload.FileItem;
public class FileServiceImpl extends HttpServlet {
private static final long serialVersionUID = 1L;
private FileItem uploadedFileItem;
@Override
protected void service(final HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
@SuppressWarnings("rawtypes")
java.util.Enumeration e = request.getParameterNames();
java.io.PrintWriter pw = response.getWriter();
String attrib;
while (e.hasMoreElements()) {
pw.print(
(attrib = (String) e.nextElement())
+ " : "
+ request.getParameter((String) attrib)
+ "<br>"
);
}
pw.print("<br>Fertig!");
}
}
Am Mittwoch, 15. August 2012 16:42:53 UTC+2 schrieb Chak Lai: