P
Pablo
Hi all,
I am using the commons-fileUpload 1.1.1 lib to upload files to my
server. The objective is to insert some info in a DB together with the
file path in the server.
The problem is that when I put the ENCTYPE to multipart/form-data, the
other parameters are set to NULL in the servlet that treats the
request.
Did anyone run into this problem?
<FORM ENCTYPE="multipart/form-data" method="post" ACTION="<%=
UtilityClass.APP_PATH + "servlet/ServletDebtLetter" %>" >
<input type="file" name="fileName" maxlength="100" size="30"/>
<input type="text" name="subject" maxlength="100" size="30"/>
</form>
In my doPost method on my servlet I have this in the first line:
public void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException
{
System.out.println(request.getParameter("subject"));
....
}
The output of the println is NULL. Anyone has any clue about it???
Regards,
Pablo
I am using the commons-fileUpload 1.1.1 lib to upload files to my
server. The objective is to insert some info in a DB together with the
file path in the server.
The problem is that when I put the ENCTYPE to multipart/form-data, the
other parameters are set to NULL in the servlet that treats the
request.
Did anyone run into this problem?
<FORM ENCTYPE="multipart/form-data" method="post" ACTION="<%=
UtilityClass.APP_PATH + "servlet/ServletDebtLetter" %>" >
<input type="file" name="fileName" maxlength="100" size="30"/>
<input type="text" name="subject" maxlength="100" size="30"/>
</form>
In my doPost method on my servlet I have this in the first line:
public void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException
{
System.out.println(request.getParameter("subject"));
....
}
The output of the println is NULL. Anyone has any clue about it???
Regards,
Pablo