我想创建一个Java Servlet以允许 Android 设备发布照片。我应该从哪里开始?我应该使用 Apache 通用文件上传库吗?
我知道如何创建一个servlet,基本上是这样的吧:
@WebServlet(name = "UploadServlet")
public class UploadServlet extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
}
(我是 Java 和 Web 开发的新手。)