亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? servlet.xtp

?? 解壓在c盤
?? XTP
字號:
<s1 title="Servlet"><p>Servlets are Java classes which service HTTP requests.  The onlyrequirement for writing a servlet is that it implements thejavax.servlet.Servlet interface.</p><p>Servlets are loaded from the classpath like all Java classes.Normally, users put servlets in <var/WEB-INF/classes/> so Resin willautomatically reload them when they change.</p><p><a href='jsp.xtp'>JSP</a> pages are implemented asServlets, and tend to be more efficient for pages with lots of text.</p><s2 title='Examples'><s3 title='Configuring the web.xml'><p>The following is a complete working web.xml to run this example.</p><p>The <var/servlet-mapping/> tells Resin that the URL<var//hello/> should invoke the <var/hello-world/> servlet.</p><p>The <var/servlet/> tells Resin that <var/hello-world/> uses the<var/test.HelloWorld/> class and that the value of the <var/greeting/>init parameter is <var/Hello World/>.</p><example title='WEB-INF/web.xml'>&lt;web-app>  &lt;servlet-mapping url-pattern='/hello'                   servlet-name='hello-world'/>  &lt;servlet servlet-name='hello-world'           servlet-class='test.HelloWorld'>    &lt;init-param greeting='Hello, World'/>&lt;/web-app></example><p>The Java code, <var/HelloWorld.java/> belongs in</p><def>$app-dir/WEB-INF/classes/test/HelloWorld.java</def><p>Or, if you're compiling the servlet yourself, the class file belongs in</p><def>$app-dir/WEB-INF/classes/test/HelloWorld.class</def><p>Following is the actual servlet code.  It just prints a trivialHTML page filled with the greeting specified in the web.xml.</p><p><var/init()/> and <var/destroy()/> are included mostly forillustration.  Resin will call <var/init()/> when it starts the servletand <var/destroy/> before Resin destroys it.</p><example>package test;import java.io.*;import javax.servlet.*;import javax.servlet.http.*;public class HelloWorld extends HttpServlet {  private String greeting;  public void init()    throws ServletException  {    greeting = getInitParameter("greeting");  }  public void doGet(HttpServletRequest request,                    HttpServletResponse response)    throws ServletException, IOException  {    PrintWriter out = response.getWriter();    out.println("&lt;title>" + greeting + "&lt;/title>");    out.println("&lt;h1>" + greeting + "&lt;/h1>");  }    public void destroy()  {    // nothing to do  }}</example></s3><s3 title='Servlet Example for JSP Programmers'><p>Because Resin compiles JSP pages into servlets, programmers familiarwith JSP can start writing servlets fairly easily.  The following templatecan be used to see how to write a servlet for someone familiar with JSP.</p><example>package test;import java.io.*;import javax.servlet.*;import javax.servlet.http.*;public class HelloWorld extends HttpServlet {  public void service(HttpServletRequest request,  		      HttpServletResponse response)    throws ServletException, IOException  {    PrintWriter out = response.getWriter();    ServletContext application = getServletContext();    HttpSession session = request.getSession();    try {      // <var/code goes here/>      // The equivalent of jsp:include:      // request.getRequestDispatcher("/inc.jsp").include(request, response);    } catch (ServletException e) {      throw e;    } catch (Exception e) {      throw new ServletException(e);    }  }}</example></s3><s3 title='Using Databases from a Servlet'><p>The following is a sample design pattern for getting new databaseconnections.  The <var/try ... finally/> block is very important.  Withoutthe close in the finally block, Resin's database pool can loose connections.</p><p>Configuring the database is described in the<a href="db-config.xtp">database configuration</a> page.</p><example title="TestDatabase.java">package test;import java.io.*;import java.sql.*;import javax.servlet.*;import javax.servlet.http.*;import javax.naming.*;import javax.sql.*;public class TestDatabase extends HttpServlet {  DataSource pool;  public void init()    throws ServletException  {    try {      Context env = (Context) new InitialContext().lookup("java:comp/env");      pool = (DataSource) env.lookup("jdbc/test");      if (pool == null)        throw new ServletException("`jdbc/test' is an unknown DataSource");    } catch (NamingException e) {      throw new ServletException(e);    }  }  public void doGet(HttpServletRequest request,                    HttpServletResponse response)    throws IOException, ServletException  {    response.setContentType("text/html");    PrintWriter out = response.getWriter();    Connection conn = null;    try {      conn = pool.getConnection();      // <var/code for the servlet using the database goes here/>      rs.close();      stmt.close();    } catch (SQLException e) {      throw new ServletException(e);    } finally {      try {        if (conn != null)          conn.close();      } catch (SQLException e) {      }    }  }}</example></s3></s2><s2 title="Servlet Configuration"><defun title='init-param'><p>Initializes servlet variables. <code/servlet-param/>defines initial values for <code/getServletConfig().getInitParameter("foo")/>.</p><p>The full servlet 2.2 syntax is supported and allows a simple shortcut.</p><example>&lt;web-app id='/'&gt;&lt;servlet servlet-name='test.HelloWorld'&gt;  &lt;init-param foo='bar'/&gt;  &lt;init-param&gt;    &lt;param-name&gt;baz&lt;/param-name&gt;    &lt;param-value&gt;value&lt;/param-value&gt;  &lt;/init-param&gt;&lt;/servlet&gt;&lt;/web-app></example></defun><defun title="load-on-startup"><p>If present, starts the servlet when the server starts.</p><example>&lt;web-app id='/'>&lt;servlet servlet-name='hello'         servlet-class='test.HelloWorld'&gt;  &lt;load-on-startup/&gt;&lt;/servlet&gt;&lt;/web-app&gt;</example></defun><defun title='run-at' version='Resin 1.1'><p>If present, calls the servlet's <var/service()/> methodat the specified times.&lt;run-at> lets servlet writers execute periodic tasks without worryingabout creating a new Thread.</p><p>The value is a list of 24-hour times when theservlet should be automatically executed.  To run the servlet every 6hours, you could use:</p><example>&lt;servlet servlet-name='test.HelloWorld'&gt;  &lt;run-at&gt;0:00, 6:00, 12:00, 18:00&lt;/run-at&gt;&lt;/servlet&gt;</example><p>If the hour is omitted, the servlet runs every hour at thespecified minute.  To run the server every 15 minutes, you could use:</p><example>&lt;servlet servlet-name='test.HelloWorld'&gt;  &lt;run-at&gt;:00, :15, :30, :45&lt;/run-at&gt;&lt;/servlet&gt;</example></defun><defun title='servlet'><p>Defines a servlet alias for later mapping.</p><deftable><tr><th>Attribute<th>Description<tr><td>servlet-name<td>The servlet's name (alias)<tr><td>servlet-class<td>The servlet's class (defaults to servlet-name)<tr><td>init-param<td>Initialization parameters<tr><td>load-on-startup<td>Initializes the servlet when the server starts.<tr><td>run-at<td>Times to execute the servlet automatically</deftable><p>The following example defines a servlet alias 'hello'</p><example>&lt;web-app id='/'&gt;&lt;servlet-mapping url-pattern='/hello.html'                 servlet-name='hello'/&gt;&lt;servlet servlet-name='hello'         servlet-class='test.HelloWorld'&gt;  &lt;init-param title='Hello, World'/&gt;&lt;/servlet&gt;&lt;servlet servlet-name='cron'         servlet-class='test.DailyChores'&gt;  &lt;run-at&gt;3:00&lt;/run-at&gt;&lt;/servlet&gt;&lt;/web-app&gt;</example></defun><defun title='servlet-class'><p>Class of the servlet.  The CLASSPATH for servlets includesthe WEB-INF/classes directory and all jars in the WEB-INF/lib directory.</p></defun><defun title='servlet-name'><p>Alias of the servlet.</p></defun><defun title="servlet-mapping"><p>Maps from a URL to the servlet to execute.  The servlet-mappinghas a url-pattern to match the URL and a servlet-name to match theconfigured servlet.</p><example title="typical servlet-mapping">&lt;servlet>  &lt;servlet-name>hello&lt;/servlet-name>  &lt;servlet-class>test.HelloServlet&lt;/servlet-class>&lt;/servlet>&lt;servlet-mapping>  &lt;url-pattern>/hello/*&lt;/url-pattern>  &lt;servlet-name>hello&lt;/servlet-name>&lt;/servlet-mapping></example><p>Resin allows for a shortcut combining the servlet andthe servlet mapping:</p><example title="shortcut servlet-mapping">&lt;servlet-mapping url-pattern="/hello/*"                 servlet-class="test.HelloServlet"/></example></defun><defun title="url-pattern" version="Servlet 2.2"><p>Matches a set of URLs for servlet-mapping.</p><deftable><tr><th width='25%'>Pattern<th>Description<tr><td>/foo/bar.html<td>Matches exactly the /foo/bar.html URL.<tr><td>/foo/*<td>Matches /foo and any children<tr><td>*.foo<td>Matches any URL with a .foo extension<tr><td>/<td>Replaces the default servlet.</deftable><p><var///> defines a default handler and <var//*/> defines a prefix handler.<var//*/> will override extension handlers like <var/*.foo/>. <var///>will only be used if no other pattern matches.</p><p>No default.  Either url-pattern or url-regexp is required.</p></defun></s2></s1>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠色综合播放一区二区| 日韩精品在线网站| 色先锋久久av资源部| 成人a级免费电影| www.成人网.com| 99久久精品免费看国产免费软件| 国产ts人妖一区二区| 国产成人一区二区精品非洲| 高清不卡一二三区| av中文字幕不卡| 在线观看一区不卡| 欧美人狂配大交3d怪物一区| 3d动漫精品啪啪1区2区免费| 91精品国产综合久久香蕉麻豆| 欧美精品成人一区二区三区四区| 欧美精品日日鲁夜夜添| 日韩欧美国产三级| 久久午夜老司机| 国产精品国产三级国产aⅴ无密码| 中文字幕中文字幕在线一区| 一区二区三区欧美久久| 午夜精品一区二区三区电影天堂 | 精品国产乱码久久久久久浪潮| 欧美成人精品高清在线播放| 久久免费的精品国产v∧| 国产精品久久99| 亚洲一区二区三区自拍| 奇米影视一区二区三区| 国内精品免费**视频| 成人免费视频网站在线观看| 色老汉一区二区三区| 欧美日韩久久久| 国产亚洲精品aa午夜观看| 一区二区三区四区精品在线视频 | 91蝌蚪porny九色| 欧美美女一区二区三区| 26uuu国产在线精品一区二区| 国产精品视频一二| 亚洲国产日韩a在线播放性色| 毛片av一区二区三区| 福利一区二区在线| 欧美性大战xxxxx久久久| 欧美一区二区三区喷汁尤物| 国产网站一区二区| 亚洲综合色成人| 国产精品一二三四| 欧美自拍丝袜亚洲| 精品国产91久久久久久久妲己 | 亚洲欧美色图小说| 奇米777欧美一区二区| 成人小视频在线观看| 欧美日韩免费观看一区三区| 国产午夜三级一区二区三| 亚洲午夜日本在线观看| 国产传媒日韩欧美成人| 在线观看91精品国产麻豆| 国产精品久久久久影院亚瑟| 三级不卡在线观看| 91免费版在线| 久久精品综合网| 视频在线观看一区| 91美女在线视频| 久久久久久久综合色一本| 亚洲va欧美va国产va天堂影院| 成人夜色视频网站在线观看| 欧美一区二区三区男人的天堂| 亚洲天堂免费看| 国产精品一级二级三级| 日韩一区二区三区在线| 亚洲综合免费观看高清完整版在线 | 91精品国产综合久久久蜜臀粉嫩| 中文字幕一区三区| 久88久久88久久久| 欧美高清性hdvideosex| 伊人开心综合网| 成人午夜视频在线观看| 精品国产乱码久久久久久免费 | 欧美日韩国产精品自在自线| 中文字幕一区二区视频| 国产永久精品大片wwwapp | 日本一不卡视频| 欧美日韩一区二区不卡| 亚洲激情图片一区| 91免费在线播放| 国产精品二三区| 成人动漫视频在线| 久久久久国产一区二区三区四区| 青青草一区二区三区| 欧美人成免费网站| 日日欢夜夜爽一区| 欧美精品1区2区| 舔着乳尖日韩一区| 欧美日韩一区高清| 五月天亚洲精品| 欧美巨大另类极品videosbest | 欧美丝袜自拍制服另类| 亚洲激情自拍偷拍| 91成人免费在线| 亚洲乱码一区二区三区在线观看| 成人av电影在线观看| 国产精品久久久久久福利一牛影视 | 国产一区999| 精品福利av导航| 国产精品资源站在线| 久久久蜜桃精品| 国产激情视频一区二区在线观看| 精品入口麻豆88视频| 国产做a爰片久久毛片| 久久久精品日韩欧美| 国产成a人亚洲| 国产精品久久久一本精品| 99久久综合国产精品| 亚洲精品欧美激情| 欧美日韩激情在线| 奇米色777欧美一区二区| 欧美电影免费观看高清完整版| 久久成人免费网站| 久久久精品国产免大香伊| 国产白丝网站精品污在线入口| 欧美高清在线精品一区| 色婷婷狠狠综合| 高清shemale亚洲人妖| 国产精品福利在线播放| 在线中文字幕一区二区| 国产精品久久久久三级| 国产suv精品一区二区三区| 亚洲欧洲无码一区二区三区| 欧美日韩综合在线| 日本久久电影网| 久久成人免费网站| 国产色91在线| 91麻豆国产香蕉久久精品| 亚洲成人福利片| 久久免费视频一区| 色综合久久88色综合天天6| 日韩影院免费视频| 国产亚洲午夜高清国产拍精品| 91亚洲永久精品| 香蕉成人啪国产精品视频综合网 | 亚洲女同ⅹxx女同tv| 欧美群妇大交群中文字幕| 狠狠狠色丁香婷婷综合激情| 亚洲视频一区二区在线| 3atv在线一区二区三区| 丁香六月久久综合狠狠色| 一区二区三区成人| 亚洲精品一区二区三区蜜桃下载| 99这里都是精品| 久久精品国产一区二区三 | 国内外成人在线| 亚洲欧美日本在线| 日韩欧美中文字幕公布| 色综合久久66| 极品销魂美女一区二区三区| 中文字幕一区二区三| 欧美tk—视频vk| 在线一区二区三区四区| 国产米奇在线777精品观看| 亚洲黄色免费电影| 久久综合九色综合97婷婷女人 | 欧美日韩国产另类不卡| 粗大黑人巨茎大战欧美成人| 午夜精品久久一牛影视| 中文一区在线播放| 欧美一级艳片视频免费观看| 99在线精品一区二区三区| 激情偷乱视频一区二区三区| 一级做a爱片久久| 久久久久久免费网| 欧美一区二区三区四区视频| 在线中文字幕一区| 国产成人aaaa| 久久爱另类一区二区小说| 亚洲图片欧美一区| 国产精品久久久99| 久久嫩草精品久久久久| 欧美夫妻性生活| 色婷婷亚洲婷婷| k8久久久一区二区三区 | 欧美一卡二卡在线观看| 色综合久久精品| 99r精品视频| 成人午夜av在线| 国产一区二区三区在线观看免费视频| 亚洲国产综合色| ㊣最新国产の精品bt伙计久久| 久久久亚洲欧洲日产国码αv| 日韩视频永久免费| 欧美日韩精品一区二区三区四区| av电影在线观看不卡| 国产a精品视频| 国产一区免费电影| 久久精品国产精品青草| 奇米影视7777精品一区二区| 视频精品一区二区| 一区二区三区四区亚洲| 亚洲欧美日韩精品久久久久| 国产精品家庭影院| 亚洲欧洲精品一区二区三区| 中文字幕av一区 二区|