Skip to content

Commit

Permalink
hzuapps#4 提交实验代码
Browse files Browse the repository at this point in the history
  • Loading branch information
firesWu committed Nov 25, 2016
1 parent cfd4f03 commit 4d46323
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions jweb/edu/hzu/javaweb/labs/se1414080902229/se1414080902229.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package se1414080902229;

import javax.servlet.annotation.WebServlet;
import java.io.IOException;

/**
* Created by yuan on 2016/11/7.
*/
@WebServlet(value = "/se1414080902229")
public class se1414080902229 extends javax.servlet.http.HttpServlet {
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("utf-8");
response.setContentType("text/html; charset=utf-8");
response.getWriter().println("servlet 接受成功");
}

protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {
doPost(request,response);
}
}

0 comments on commit 4d46323

Please sign in to comment.