일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- Spring
- 単語
- 연습문제
- ruby
- 일본어
- springboot
- rails
- Python
- C로 시작하는 컴퓨터 프로그래밍4판
- 디지몬
- 자바
- rails7
- nico
- メソッド
- java
- Web
- Flutter
- 비즈니스일본어
- html
- jsp
- 건담베이스
- 반다이몰
- 一日一つメソッド
- vscode
- DART
- 건담
- CSS
- 日本語
- 인프런
- javascript
- Today
- Total
AR삽질러
JSP - 파일업로드(자카르타API) 본문
- 자카르타(Jakarta)는 Java를 기반으로 하는 웹 애플리케이션 프레임워크로 Jakarta는 기본적으로 Java EE의 기능을 계승하면서도 더욱 가볍고 유연한 구조를 가진다.
- 자카르타는 다양한 API를 제공하는데 파일 업로드와 관련된 API도 그 중 하나다. Jakarta Servlet API를 기반으로 하는 Jakarta Multipart API를 사용하여 파일 업로드를 처리할 수 있다.
- Jakarta Multipart API를 사용하려면 HTML form에서 enctype="multipart/form-data"로 지정된 form을 생성한후 서블릿에서 HttpServletRequest 객체를 사용하여 업로드된 파일을 처리할 수 있습니다.
1. https://commons.apache.org/proper/commons-fileupload/download_fileupload.cgi
FileUpload – Download Apache Commons FileUpload
Download Apache Commons FileUpload Using a Mirror We recommend you use a mirror to download our release builds, but you must verify the integrity of the downloaded files using signatures downloaded from our main distribution directories. Recent releases (4
commons.apache.org
아파치에 접속해 commons-fileupload와 밑에 io를 다운를 다운받는다.
2. https://commons.apache.org/proper/commons-io/download_io.cgi
Commons IO – Download Apache Commons IO
Download Apache Commons IO Using a Mirror We recommend you use a mirror to download our release builds, but you must verify the integrity of the downloaded files using signatures downloaded from our main distribution directories. Recent releases (48 hours)
commons.apache.org
3. FileUploadEx
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>FileUploadForm</title>
</head>
<body>
<form action="processFileUpload.jsp" method="post" enctype="multipart/form-data">
파일1 : <input type="file" name="file1"><br>
파일2 : <input type="file" name="file2"><br>
파일2 : <input type="file" name="file3"><br>
파라미터1 : <input type="text" name="param1"><br>
파라미터2 : <input type="text" name="param2"><br>
파라미터3 : <input type="text" name="param3"><br>
<input type="submit" value="전송">
</form>
</body>
</html>
'JAVA > JSP' 카테고리의 다른 글
JSP - JSTL(JSP Standard Tag Library) (0) | 2023.03.12 |
---|---|
JSP - 표현언어(Expression Language) (0) | 2023.03.10 |
JSP - 파일업로드 (0) | 2023.03.10 |
Session (0) | 2023.03.10 |
Cookie (0) | 2023.03.10 |