I have the following process, which by the way has been working successfully for months, until just recently.
1) User comes to JSP page to upload images through a form that has the <input type="file"> fields as well as <input type="hidden"> to hold a few essential values.
2) User submits form, form action attribute set to go to a Servlet
3) Servlet reads all request params and inserts the images into a database.
I have code to read in the images...I use classes from the org.apache.commons package.
I could only assume it was the servlet that was the problem, but doubted that because why would it work all these months than suddenly stop.
I set up a test html page with a form and had it go to a jsp page to read the request params and print them out. To my suprise they all had NULL values.
Which tells me that the params aren't being read from the form.
How could this be??
Here is some example code snippets from my test pages:
HTML PAGE
<html><body>
<form name="images" action="testing_operations.jsp" enctype="multipart/form-data" method="post">
<input type="hidden" name="Customer_Number" value="4750">
<table>
<tr><td>
<input type="file" name="image1" />
</td></tr>
<tr><td>
<input type="file" name="image2" />
</td></tr>
<tr><td>
<input type="submit" value="submit">
</td></tr>
</table>
</form>
</body>
</html>
JSP PAGE
//...
String cus = request.getParameter("Customer_Number");
out.println("cus : " + cus +"<br>");
String image = request.getParameter("image1");
out.println("image: " + image);
//....
I'm stumped...what am I doing wrong?
I can't continue until I get this figured out, can anybody help me with this?
Message was edited by:
Love2Java