QTPУ??????????????????
???????????? ???????[ 2014/5/12 15:20:47 ] ????????QTP ????????????
????????У?鸚?????????????????QTPCommonServlet.java??QTPCommonDao.java
????????QTPCommonServlet.java???
package com.runqianapp.qtp;
import java .io.PrintWriter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.runqianapp.qtp.QTPCommonDao;
import com.geezn.exception.GeeznException;
import com.runqianapp.common.log.GEZLoggerManager;
import com.runqianapp.common.servlet.AbstractGezServlet;
/**
* QTP ??????Servlet
* @author RAQ
*
*/
public class QTPCommonServlet extends AbstractGezServlet {
/**???????????????*/
private static final String GET_ALL_DATA = "getAllData";
/**?????????????*/
private static final String CHECK_DELETE_RESULT = "checkDeleteResult";
/**
* ??дservice()????
*/
public void service(HttpServletRequest request?? HttpServletResponse response){
response.setContentType("text/html");
PrintWriter out = null;
try {
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
out = response.getWriter();
} catch (Exception e) {
GeeznException ge;
if(e instanceof GeeznException){
ge = (GeeznException) e;
}else{
ge = new GeeznException(QTPCommonDao.MODULE_QTP?? GEZLoggerManager.LOGLEVEL_ERROR??"?????????????????????????????????"?? e?? "{}");
}
out.print(ge.getErrorMessageJson());
}
String action = request.getParameter("action");
if(GET_ALL_DATA.equals(action)){
String sql = request.getParameter("sql");
String sqlDateNumber = request.getParameter("sqlDateNumber");
String allDatas = "";
try {
allDatas = QTPCommonDao.getAllDatas(sql??sqlDateNumber);
} catch (GeeznException e) {
GeeznException ge;
if(e instanceof GeeznException){
ge = (GeeznException) e;
}else{
ge = new GeeznException(QTPCommonDao.MODULE_QTP?? GEZLoggerManager.LOGLEVEL_ERROR??"??????????????????????"?? e?? "{}");
}
out.print(ge.getErrorMessageJson());
}
out.print(allDatas);
}else if(CHECK_DELETE_RESULT.equals(action)){
String sql = request.getParameter("sql");
boolean deleteResult = false;
try {
deleteResult = QTPCommonDao.checkDeleteResult(sql);
} catch (GeeznException e) {
GeeznException ge;
if(e instanceof GeeznException){
ge = (GeeznException) e;
}else{
ge = new GeeznException(QTPCommonDao.MODULE_QTP?? GEZLoggerManager.LOGLEVEL_ERROR??"????????????????????????"?? e?? "{}");
}
out.print(ge.getErrorMessageJson());
}
out.print(deleteResult);
}
}
}
|
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????