Type of object returned by an input from a web page
- by controlfreak123
I'm attempting to upload a file into a jsp and then use the file in some other code. My problem is that it comes into the servlet as an Object via the request.getAttribute() call so I don't know what to cast it to.
I have this code so far to try and test what it is but I'm getting a NullPointerException.
PrintWriter out = response.getWriter();
out.println(request.getAttribute("file1").getClass());
Is my understanding of whats going on flawed or am I just coding it up wrong?