import java.io.*;
import javax.servlet.*;
import javax.servlet.annotation.*;
import javax.servlet.http.*;

@WebServlet("/Testup")
@MultipartConfig
public class Testup extends HttpServlet {
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {				
	}
	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {		
		Part part=request.getPart("filedata1");
		if(part != null)
		{
			part.write("d:/test.wav");
			
			Writer out=response.getWriter();
			out.write("UPLOAD OK!");//反馈上传成功关键字给前端,包含"Result:1"关键字也可			
			out.close();	
		}
	}
}