• 大小: 5.48MB
    文件类型: .zip
    金币: 2
    下载: 0 次
    发布日期: 2023-08-13
  • 语言: Java
  • 标签: 服务端  

资源简介

基于Android的C语言题库管理系统由服务端和客户端组成,服务端基于Java语言编写,该设计基于毕业设计,该上传部分为服务端代码,适合大部分初学者。

资源截图

代码片段和文件信息

package com.clanguge.chapter.action;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;

import java.util.List;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadbase.FileSizeLimitExceededException;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;

import com.clanguge.chapter.dao.ChapterDao;
import com.clanguge.chapter.server.ChapterServer;
import com.clanguge.dbutils.DividePage;
import com.clanguge.dbutils.OpenWord;
import com.clanguge.dbutils.add.action.addaction;
import com.json.tools.JsonTools;

public class ChapterAction extends HttpServlet
{

private ChapterServer server;

/**
 * Constructor of the object.
 */
public ChapterAction()
{
super();
}

/**
 * Destruction of the servlet. 

 */
public void destroy()
{
super.destroy(); // Just puts “destroy“ string in log
// Put your code here
}

public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException
{

this.doPost(request response);
}

/**
 * The doPost method of the servlet. 

 * 
 * This method is called when a form has its tag value method equals to
 * post.
 * 
 * @param request
 *            the request send by the client to the server
 * @param response
 *            the response send by the server to the client
 * @throws ServletException
 *             if an error occurred
 * @throws IOException
 *             if an error occurred
 */
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException
{

response.setContentType(“text/html;charset=utf-8“);
request.setCharacterEncoding(“utf-8“);
response.setCharacterEncoding(“utf-8“);
PrintWriter out = response.getWriter();
String action_flag = request.getParameter(“action_flag“);
if (action_flag.equals(“list“))
{
Chapter_list(request response);
}
else if (action_flag.equals(“add“))
{
Chapter_addd(request response);
}
else if (action_flag.equals(“view“))
{
Chapter_view(request response);
}
else if (action_flag.equals(“del“))
{
Chapter_del(request response);
}else if (action_flag.equals(“search“))
{
Chapter_pra(request response);
}else if (action_flag.equals(“task“))
{
taskAction(request response);
}

out.flush();
out.close();
}
private void taskAction(HttpServletRequest request
HttpServletResponse response) throws Serv

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-11-14 00:27  CLanguageService\
     文件        2013  2015-04-26 20:18  CLanguageService\.classpath
     目录           0  2014-11-12 11:35  CLanguageService\.myeclipse\
     文件         321  2015-05-18 18:10  CLanguageService\.mymetadata
     文件        1759  2014-11-12 11:41  CLanguageService\.project
     目录           0  2014-11-12 11:35  CLanguageService\.settings\
     文件         500  2014-11-12 11:35  CLanguageService\.settings\.jsdtscope
     文件          78  2014-11-12 11:35  CLanguageService\.settings\com.genuitec.eclipse.ws.prefs
     文件         364  2014-11-12 11:35  CLanguageService\.settings\org.eclipse.jdt.core.prefs
     文件         486  2014-11-12 11:35  CLanguageService\.settings\org.eclipse.wst.common.component
     文件         252  2014-11-12 11:35  CLanguageService\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2014-11-12 11:35  CLanguageService\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2014-11-12 11:35  CLanguageService\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2014-12-10 11:54  CLanguageService\sql\
     文件        2674  2015-04-20 22:56  CLanguageService\sql\SQLQuery1.sql
     目录           0  2014-12-01 11:06  CLanguageService\src\
     目录           0  2015-04-26 19:39  CLanguageService\src\com\
     目录           0  2015-03-26 19:29  CLanguageService\src\com\clanguge\
     目录           0  2014-11-25 10:38  CLanguageService\src\com\clanguge\chapter\
     目录           0  2014-11-25 10:40  CLanguageService\src\com\clanguge\chapter\action\
     文件       10880  2015-04-26 21:47  CLanguageService\src\com\clanguge\chapter\action\ChapterAction.java
     目录           0  2014-11-25 10:43  CLanguageService\src\com\clanguge\chapter\dao\
     文件        3707  2015-04-21 20:18  CLanguageService\src\com\clanguge\chapter\dao\ChapterDao.java
     目录           0  2014-11-25 10:42  CLanguageService\src\com\clanguge\chapter\server\
     文件         925  2015-03-15 22:02  CLanguageService\src\com\clanguge\chapter\server\ChapterServer.java
     目录           0  2015-04-21 17:03  CLanguageService\src\com\clanguge\dbutils\
     目录           0  2014-11-13 23:57  CLanguageService\src\com\clanguge\dbutils\add\
     目录           0  2014-11-13 23:27  CLanguageService\src\com\clanguge\dbutils\add\action\
     文件        4072  2014-11-18 21:08  CLanguageService\src\com\clanguge\dbutils\add\action\addaction.java
     目录           0  2014-11-13 23:22  CLanguageService\src\com\clanguge\dbutils\add\dao\
     目录           0  2014-11-18 17:07  CLanguageService\src\com\clanguge\dbutils\add\server\
............此处省略318个文件信息

评论

共有 条评论