freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

北京工業(yè)大學(xué)軟件學(xué)院本科生j2ee與中間件技術(shù)考試模擬試題_-_評分標(biāo)準(zhǔn)及參考答案(編輯修改稿)

2024-12-02 12:27 本頁面
 

【文章內(nèi)容簡介】 得分 分 未答、或答案明顯錯誤,得分 0 分 第 11 頁 共 29 頁 四、 J2EE 程序設(shè)計和程序閱讀題題 ( 20 分) 1 ( 5 分) 編寫包含 servlet 基本架構(gòu) 的程序,實現(xiàn)輸出 “ This is m y servlet demo!”, 要求:必須實現(xiàn) Servlet 生命周期的各種方法的調(diào)用過程; 1 實施 Servlet API 導(dǎo)入 import 。 import 。 import 。 import 。 import 。 import 。 2 表示和實現(xiàn) MyServlet 類 public class MyServlet extends HttpServlet { /** * Constructor of the object. */ public MyServlet() { super()。 } 3 表示和實施 init()和 destroy() 方法 /** * Destruction of the servlet. br */ public void destroy() { ()。 // Just puts destroy string in log // Put your code here } 4 表示和實施 doGet 方法 /** * The doGet method of the servlet. br * 得 分 第 12 頁 共 29 頁 * 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 { (text/html)。 PrintWriter out = ()。 (!DOCTYPE HTML PUBLIC \//W3C//DTD HTML Transitional//EN\)。 (HTML)。 ( HEADTITLEA Servlet/TITLE/HEAD)。 ( BODY)。 ( This is my servlet demo!)。 (())。 (, using the GET method)。 ( /BODY)。 (/HTML)。 ()。 ()。 } 5 表示和實施 doPost()方法內(nèi)容 /** * The doPost method of the servlet. br * * 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 { (text/html)。 PrintWriter out = ()。 第 13 頁 共 29 頁 (!DOCTYPE HTML PUBLIC \//W3C//DTD HTML Transitional//EN\)。 (HTML)。 ( HEADTITLEA Servlet/TITLE/HEAD)。 ( BODY)。 ( This is my servlet demo!)。 (())。 (, using the POST method)。 ( /BODY)。 (/HTML)。 ()。 ()。 } /** * Initialization of the servlet. br * * @throws ServletException if an error occurs */ public void init() throws ServletException { // Put your code here } } 評分標(biāo)準(zhǔn): 1 能表示和描述 Servlet 導(dǎo)入對象得 分; 2 能表示和實施 MyServlet 類, 得 1 分; 3 能表示和實施 init()、 destroy 類方法內(nèi)容, 得 1 分; 4 能表示 和實施 doGet 方法內(nèi)容, 得 1 分; 5 能表示和實施 doPost() 方法內(nèi)容, 得 1 分 在每一步驟內(nèi)容, 不符合標(biāo)準(zhǔn)答案,但答題的內(nèi)容在內(nèi)容表達上符合要求, 得分 分 未答、或答案明顯錯誤,得分 0 分 2 ( 5 分) 寫一個 JSP 的程序,用它來計算 整數(shù) 1, 2, 3, … .100 的和 1 表示和實施 JSP 方法 %@ page language=java import=.* pageEncoding=GB18030% 第 14 頁 共 29 頁 HTML BODY BGCOLOR=cyan FONT Size=1 P This is My JSP Page for /P 2 表示和實施 java 程序塊 % int i, sum=0。 for(i=1。i=100。i++){ sum=sum+i。 } % P 1 到 100 的連續(xù)和是: /P BR 3 表示和實施計算結(jié)果 %= sum % /FONT /BODY HTML 評分標(biāo)準(zhǔn): 1 能表示和描述 JSP 導(dǎo)入對象得 1 分; 2 能表示和實施 Java 程序段, 得 2 分; 3 能表示和實施計算結(jié)果方 法內(nèi)容, 得 2 分; 在每一步驟內(nèi)容, 不符合標(biāo)準(zhǔn)答案,但答題的內(nèi)容在內(nèi)容表達上符合要求, 得分 分 未答、或答案明顯錯誤,得分 0 分 3( 5 分) 寫 出下面 JSP 程序的運行結(jié)果 %@ page language=java import=.* pageEncoding=GB18030% 第 15 頁 共 29 頁 !DOCTYPE HTML PUBLIC //W3C//DTD HTML Transitional//EN html headtitle JSP Code Page /title/head body This is a jsp exam_code page. hr br %! int i, j。 % %! int a=5, b=10。 double c=。 % % for(i = 0。 i =10。 i++) { for (j=0。 j = i。 j++) { % %= j %。 % } % br % } % br a+b = %= a+b % br 半徑為 %= c % 的圓面積是: %= *(c,2) % /body /html 1 JSP 中 HTML 執(zhí)行結(jié)果 This is a jsp exam_code page. 2 能表示和實施 Java 程序段 0。 0。 1。 第 16 頁 共 29 頁 0。 1。 2。 0。 1。 2。 3。 0。 1。 2。 3。 4。 0。 1。 2。 3。 4。 5。 0。 1。 2。 3。 4。 5。 6。 0
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1