forked from hzuapps/java-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
jweb/edu/hzu/javaweb/labs/se1414080902229/se1414080902229.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |