?? createtests.java
字號(hào):
/*<%--////////////////////////////////////////////////////GTON原創(chuàng)作品-XML考試系統(tǒng)//////////////////////////////////////////////////////////////
////////////所用技術(shù):jsp2.0+servlet2.4+jstl1.1+JDOM+DOM+sqlserver2000+tomcat5.5/////////////////////////////////////
/////////////////////////////////////////////////////專(zhuān)業(yè)制作網(wǎng)站 專(zhuān)業(yè)制作畢業(yè)設(shè)計(jì)////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////QQ:27612285//////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////Mail:punkwang@126.com////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////WEB:www.98202.com www.630cn.com//////////////////////////////////////////////////////
////////////////////////////////////////////////////qq群:20665503////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////求高薪工作一個(gè)有意者聯(lián)系本人/////////////////////////////////////////////////////////
////////////////////////////////////////////////////Phone:010-81110277(王先生)///////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////--%>
<%--接 畢業(yè)設(shè)計(jì)業(yè)務(wù) 網(wǎng)站業(yè)務(wù) 商業(yè)網(wǎng)站 個(gè)人網(wǎng)站 商城系統(tǒng) 企業(yè)主頁(yè) JSP ASP.net PHP !!!
業(yè)務(wù)種類(lèi)
網(wǎng)站業(yè)務(wù): 商業(yè)網(wǎng)站 個(gè)人網(wǎng)站 商城系統(tǒng) 企業(yè)主頁(yè) 等中小型網(wǎng)站(asp, jsp ,php ,asp.net)
畢業(yè)設(shè)計(jì)業(yè)務(wù):java(j2ee j2se) vb delphi php .net等畢設(shè)業(yè)務(wù)
模塊業(yè)務(wù):各種中小型模塊 java .net
如有需要 價(jià)格細(xì)談 QQ:27612285
我的網(wǎng)站
HTTP://www.98202.com
HTTP://www.do3w.com
HTTP://www.201cn.com
HTTP://www.630cn.com--%>
*/package com.gton.servlet.admin;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import com.gton.bean.*;
import com.gton.bean.db.*;
import com.gton.util.*;
public class CreateTests extends HttpServlet {
private static final String CONTENT_TYPE = "text/html; charset=GBK";
//Initialize global variables
public void init() throws ServletException {
}
//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
int oneCount=Integer.parseInt(request.getParameter("OneCount"));
int mCount=Integer.parseInt(request.getParameter("MCount"));
DataBean db=new DataBean();
ArrayList list=new ArrayList();
list.addAll(db.getTestList(oneCount,"1"));
list.addAll(db.getTestList(mCount,"0"));
MyXML xml=new MyXML();
String date=MyDate.getDate();
TestsBean tsb=new TestsBean();
tsb.setTests_Time(date);
tsb.setTests_Path(xml.outXMLFile(list,date));
if(db.InsertTests(tsb))
{
request.setAttribute("alert","alert('生成成功')");
}else
{
request.setAttribute("alert","alert('生成失敗')");
}
request.getRequestDispatcher("index.jsp?action=2").forward(request, response);
db.Close();
}
//Process the HTTP Post request
public void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
doGet(request, response);
}
//Clean up resources
public void destroy() {
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -