Well, I'm programming a web site.
In one page the user can upload a image (in the html I use the element <input type="file" name="flUpload"....> and in the form I add this attribute: enctype="multipart/form-data"), when the user press Send I receive the form in a
servlet. In this servlet I do this:
But when I upload my web site to my
Tomcat 7 server, the user can't upload images. I have got this exception:
java.lang.NullPointerException
org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:184)
Interfaz.RegistroImagen.doPost(RegistroImagen.java:108)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
Where Interfaz.RegistroImagen is my servlet.
In my GlassFish server this runs OK, the user can upload images.
What can I do?
Thanks.