posted 20 years ago
I am not sure whether pure JSP has such coding.
But I have worked with upload using
Struts. We can define a Form which captures the upload parameters (defined in the Struts config file), then we need to define an ActionDispatcher to handle the request. When the container calls the ActionDispatcher's method, the files and the form parameters have already been uploaded to the Struct Form, and we can get all info, including the upload file, from the Form.
Before using Struts, I have also used JSP Smart upload, which is a free API for JSP to upload file. However, it has a serious security issue, and finally, this API is not recommended.
Nick.
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)