資源簡介
基于JSP+Sevlet+mysql實現的人工智能專家系統——簡易動物識別系統。

代碼片段和文件信息
package?com.st.servlet;
import?java.io.IOException;
import?java.io.PrintWriter;
import?javax.servlet.ServletException;
import?javax.servlet.http.HttpServlet;
import?javax.servlet.http.HttpServletRequest;
import?javax.servlet.http.HttpServletResponse;
public?class?ManageServlet?extends?HttpServlet?{
/**
?*?Constructor?of?the?object.
?*/
public?ManageServlet()?{
super();
}
/**
?*?Destruction?of?the?servlet.?
?*/
public?void?destroy()?{
super.destroy();?//?Just?puts?“destroy“?string?in?log
//?Put?your?code?here
}
/**
?*?The?doGet?method?of?the?servlet.?
?*
?*?This?method?is?called?when?a?form?has?its?tag?value?method?equals?to?get.
?*?
?*?@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?doGet(HttpServletRequest?request?HttpServletResponse?response)
throws?ServletException?IOException?{
response.setContentType(“text/html“);
PrintWriter?out?=?response.getWriter();
out.println(““);
out.println(““);
out.println(“??tle>A?Servlet tle>“);
out.println(“??“);
out.print(“????This?is?“);
out.print(this.getClass());
out.println(“?using?the?GET?method“);
out.println(“??“);
out.println(““);
out.flush();
out.close();
}
/**
?*?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“);
PrintWriter?out?=?response.getWriter();
out.println(““);
out.println(““);
out.println(“??tle>A?Servlet tle>“);
out.println(“??“);
out.print(“????This?is?“);
out.print(this.getClass());
out.println(“?using?the?POST?method“);
out.println(“??“);
out.println(““);
out.flush();
out.close();*/
request.setCharacterEncoding(“UTF-8“);
//String?username=request.getParameter(“name“);
//System.out.println(“用戶名:“?+?username);
/*測試用,查看前臺傳來的數據*/
String[]?attr?=?request.getParameterValues(“attr“);
for(int?i=0;i ???System.out.println(“第“+(i+1)+“屬性值是:“+attr[i]);
/*跳轉到結果界面*/
response.sendRedirect(“result.jsp“);
}
/**
?*?Initialization?of?the?servlet.?
?*
?*?@throws?ServletException?if?an?error?occurs
?*/
public?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-10-16?09:33??animal_identifier\
?????文件?????????529??2017-10-12?15:27??animal_identifier\.classpath
?????目錄???????????0??2017-10-16?09:33??animal_identifier\.myeclipse\
?????文件?????????324??2017-10-12?15:27??animal_identifier\.myme
?????文件????????1760??2017-10-12?15:38??animal_identifier\.project
?????目錄???????????0??2017-10-16?09:33??animal_identifier\.settings\
?????文件?????????500??2017-10-12?15:27??animal_identifier\.settings\.jsdtscope
?????文件?????????364??2017-10-12?15:27??animal_identifier\.settings\org.eclipse.jdt.core.prefs
?????文件?????????489??2017-10-12?15:27??animal_identifier\.settings\org.eclipse.wst.common.component
?????文件?????????252??2017-10-12?15:27??animal_identifier\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件??????????49??2017-10-12?15:27??animal_identifier\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2017-10-12?15:27??animal_identifier\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????目錄???????????0??2017-10-16?09:33??animal_identifier\WebRoot\
?????目錄???????????0??2017-10-16?09:33??animal_identifier\WebRoot\me
?????文件??????????36??2017-10-12?15:27??animal_identifier\WebRoot\me
?????目錄???????????0??2017-10-16?09:33??animal_identifier\WebRoot\WEB-INF\
?????目錄???????????0??2017-10-16?09:33??animal_identifier\WebRoot\WEB-INF\classes\
?????目錄???????????0??2017-10-16?09:33??animal_identifier\WebRoot\WEB-INF\classes\com\
?????目錄???????????0??2017-10-16?09:33??animal_identifier\WebRoot\WEB-INF\classes\com\st\
?????目錄???????????0??2017-10-16?09:33??animal_identifier\WebRoot\WEB-INF\classes\com\st\servlet\
?????文件????????2377??2017-10-16?09:17??animal_identifier\WebRoot\WEB-INF\classes\com\st\servlet\ManageServlet.class
?????目錄???????????0??2017-10-16?09:33??animal_identifier\WebRoot\WEB-INF\lib\
?????文件?????????808??2017-10-12?15:53??animal_identifier\WebRoot\WEB-INF\web.xm
?????目錄???????????0??2017-10-16?09:33??animal_identifier\WebRoot\images\
?????文件?????????499??2017-10-12?17:17??animal_identifier\WebRoot\images\btn2.png
?????文件???????97481??2017-10-12?15:27??animal_identifier\WebRoot\images\cat.jpg
?????文件????????4040??2017-10-16?09:31??animal_identifier\WebRoot\index.jsp
?????文件?????????847??2017-10-16?09:15??animal_identifier\WebRoot\result.jsp
?????目錄???????????0??2017-10-16?09:33??animal_identifier\src\
?????目錄???????????0??2017-10-16?09:33??animal_identifier\src\com\
?????目錄???????????0??2017-10-16?09:33??animal_identifier\src\com\st\
............此處省略2個文件信息
評論
共有 條評論