Re: passing data in multipart/form-data

Yuri Singidas <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Organization OIT
Message-ID <[email protected]>
some code snippet:

MultipartRequest mr = new MultipartRequest(request,uploadDirectory);
Enumeration params = mr.getParameterNames();  ---> you will grab it here
while (params.hasMoreElements()) {
                      String name = (String)params.nextElement();
                      String value = mr.getParameter(name);
                      System.out.println(name + " = " + value);
                }
Enumeration files = mr.getFileNames();
while (files.hasMoreElements()) {
         String name = (String)files.nextElement();
          String filename = mr.getFilesystemName(name);
..................................................

randie ursal wrote:

> hi lists,
>
>   I have a form that would submit data to a servlet. i'm confused why
> a hidden field could not be retreive on my servlet the parameter would
> return a null value. Is it because of this declaration on the form tag
> ENCTYPE="multipart/form-data"?
>
>   I was able to retrieve hidden field when the enctype is not multipart.
> Could you show me how to retrieve hidden fields in "multipart/form-data"
> forms.
>
>
> thanks a lot.
>
> ___________________________________________________________________________
>
> To unsubscribe, send email to [email protected] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>

___________________________________________________________________________
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.