📄 actionservlet.java
字号:
/*
* Created on 2006-9-22
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package com.skyhawk.selffile;
import java.io.UnsupportedEncodingException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author Administrator
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class ActionServlet extends HttpServlet{
public void doPost (HttpServletRequest request,HttpServletResponse response){
try {
request.setCharacterEncoding("GBK");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
System.out.println("kkdkkkdlsflsjflskjf");
String tianjia=request.getParameter( "handle_code");
if(tianjia.equals("add")){
request.setAttribute("t",tianjia);
Tianjia tianjia1=new Tianjia();
tianjia1.execute(request,response);
}
else if (tianjia.equals( "cengjia")){
System.out.println("hoahaohaoaho+++++++++++++ahoaahofahoaahoahaohoho");
Tianjia cengjia=new Tianjia();
cengjia.execute( request,response);
}else if (tianjia.equals("shanchu")){
System.out.println("shanchuchengong");
String delfile=request.getParameter( "delfile");
String filePath="c:/aaa/"+delfile+"";
filePath=filePath.toString();
java.io.File myDelFile=new java.io.File(filePath);
myDelFile.delete();
}
else if(tianjia.equals( "chakan")){
ChaKan chakan=new ChaKan();
chakan.execute( request,response);
System.out.println("chakan -------------------------");
}
}
public void doGet (HttpServletRequest request,HttpServletResponse response){
doPost(request,response);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -