<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    如何學(xué)好java

    如何學(xué)好java,其實(shí)很簡(jiǎn)單,只要用心體會(huì),慢慢積累!
    posts - 106, comments - 7, trackbacks - 0, articles - 3
      BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理
    Web.xml
    二話不說(shuō)看代碼:
      
     
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" 
        xmlns
    ="http://java.sun.com/xml/ns/j2ee" 
        xmlns:xsi
    ="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation
    ="http://java.sun.com/xml/ns/j2ee 
        http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
      <servlet>
        
    <description>This is the description of my J2EE component</description>
        
    <display-name>This is the display name of my J2EE component</display-name>
        
    <servlet-name>ValidateView</servlet-name>
        
    <servlet-class>org.man.prj.ValidateView</servlet-class>
      
    </servlet>

      
    <servlet-mapping>
        
    <servlet-name>ValidateView</servlet-name>
        
    <url-pattern>/ValidateView</url-pattern>
      
    </servlet-mapping>
      
    <welcome-file-list>
        
    <welcome-file>index.jsp</welcome-file>
      
    </welcome-file-list>
    </web-app>

    package org.man.prj;

    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 ValidateView extends HttpServlet {

        
    /**
         * The doGet method of the servlet. <br>
         *
         * 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 {

            doPost(request, response);
        }

        
    /**
         * 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 {

            response.setContentType(
    "text/html");
            PrintWriter out 
    = response.getWriter();
            out.println(
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
            out.println("<HTML>");
            out.println(
    "  <HEAD><TITLE>A Servlet</TITLE></HEAD>");
            out.println(
    "  <BODY>");
            out.print(
    "    This is ");
            out.print(
    this.getClass());
            out.println(
    ", using the POST method");
            out.println(
    "  </BODY>");
            out.println(
    "</HTML>");
            out.flush();
            out.close();
        }

    }
    輸入tomcat驗(yàn)證一下:
    http://localhost:8888/Validate/ValidateView



    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 青青草国产免费国产是公开| 亚洲jizzjizz在线播放久| 亚洲日本在线观看| 亚洲精品在线免费看| 亚洲成年网站在线观看| AV激情亚洲男人的天堂国语| 免费人成动漫在线播放r18| 中文字幕在线视频免费观看| 七色永久性tv网站免费看| 亚洲高清中文字幕免费| 国产公开免费人成视频| 亚洲无线观看国产精品| 亚洲国语在线视频手机在线| 亚洲色最新高清av网站| caoporm超免费公开视频| 中文字幕成人免费视频| 免费羞羞视频网站| 国产成人精品日本亚洲专区61 | 毛片免费在线观看网站| 国产在线观看免费完整版中文版| 久久影视国产亚洲| 亚洲精品人成电影网| 麻豆亚洲AV成人无码久久精品 | 亚洲午夜免费视频| 成人免费无遮挡无码黄漫视频| 亚洲精品乱码久久久久久不卡| 亚洲成熟xxxxx电影| 大桥未久亚洲无av码在线 | 99精品视频免费| 久久精品无码一区二区三区免费| 一本色道久久88亚洲综合| 亚洲资源在线观看| 国产天堂亚洲国产碰碰| 久久久久久毛片免费播放| 免费一级一片一毛片| 亚洲精品国产电影午夜| 一区在线免费观看| 亚洲中文无码永久免费| 国产AV无码专区亚洲AV漫画| 一本天堂ⅴ无码亚洲道久久| 日韩电影免费在线观看网站|