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

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

?? webapp-begin.xtp

?? RESIN 3.2 最新源碼
?? XTP
?? 第 1 頁 / 共 4 頁
字號:
<document> <header><product>resin</product><title>An Overview of Web Applications</title><description><p>A web application is a self-contained subtree of the web site.  It usesServlets, Filters, JSP, and the functionality provided by Resin and any otherjava code to provide a response to a client that makes an HTTP request.</p></description></header><body><summary localtoc="3"/><s1 title="Web applications"><p>Each web application is part of the web server.  It has a unique name orpath that identifies it within the server.</p><p>Each web application has a corresponding url. The url begins with the partneeded to identify the server, followed by the webapp path:<code>http://server<var>/webapp-name</var></code>.  Each server has oneweb-app that is the default, it is the one that is used when no webapp-name isprovided.</p><p>Web applications are "deployed" within a web server, such as Resin.  Thesimplest way to "deploy" a new web application is to the create a subdirectoryin <code>$RESIN_HOME/webapps/<var>webapp-name</var></code>.  The specialwebapp name <code>ROOT</code> is used for the default web application. (Thereare other <a href="doc|webapp|deploy">deployment options</a>, but for thepurposes of this discussion the one described here is used).</p><p>A web application has "web components", such as Servlets, Filters, JSP's,supporting Java source files, and supporting java libraries.</p><s2 title="Try it!"><p>You can make your own web application in a local install of Resin.  Make adirectory <code>$RESIN_HOME/webapps/test</code>.  Use the url<code>http://localhost:8080/test</code> to access the web application.</p><p>To start with, you can make a file named<code>$RESIN_HOME/test/index.jsp</code>.</p><example title="$RESIN_HOME/test/index.jsp">Hello, world!</example><p><code>index.jsp</code> is a JSP file, and is also the name of the default pageto show for a directory.  So you can use the url<code>http://localhost:8080/test/index.jsp</code> in your browser, or since<code>index.jsp</code> is the default page to show, you can use<code>http://localhost:8080/test</code>.  </p></s2><s2 title="Example web application"><p>For example, <code>www.hogwarts.com</code> has two webapplications, the <var>default</var> web application, and a web-applicationnamed "intranet".</p><p><b>Server:</b> www.hogwarts.com<br/><b>Server URL:</b> http://www.hogwarts.com<br/><br/><b>webapp:</b> default webapp<br/><b>webapp URL:</b> http://www.hogwarts.com/<br/><b>filesystem directory:</b> $RESIN_HOME/webapps/ROOT<br/><b>default jsp page:</b> $RESIN_HOME/webapps/ROOT/index.jsp<br/><br/><b>webapp:</b> intranet<br/><b>webapp URL:</b> http://www.hogwarts.com/intranet<br/><b>filesystem directory:</b> $RESIN_HOME/webapps/intranet<br/><b>default jsp page:</b> $RESIN_HOME/webapps/intranet/index.jsp<br/></p></s2> <!-- Example web application --></s1><s1 name="components" title="Components of a web application"><s2 name="servlet" title="Servlet"><p>From the Servlet Specification 2.2:</p><blockquote>A servlet is a web component, managed by a container, that generatesdynamic content. Servlets are small, platform independent Java classescompiled to an architecture neutral bytecode that can be loadeddynamically into and run by a web server. Servlets interact with webclients via a request response paradigm implemented by the servletcontainer. This request-response model is based on the behavior of theHypertext Transfer Protocol (HTTP).</blockquote><p>A Servlet is a Java class that has a method that gets called withinformation about a client request and is expected to produce somekind of result to be sent back to the client. It is just like anyother class in Java, it happens to inherit from <a href="javadoc|javax.servlet.http.HttpServlet|"/>, so Resin can call certainmethods on it when a request is made.  </p><p>A Servlet class is made available by placing the <code>.java</code> source filein the approriate sub-directory and file of <code>WEB-INF/classes</code>:</p><example title="WEB-INF/classes/example/HelloWorldServlet.java">package example;import java.io.*;import javax.servlet.http.*;import javax.servlet.*;/** * Hello world servlet.  Most servlets will extend * javax.servlet.http.HttpServlet as this one does. */public class HelloServlet extends HttpServlet {  /**   * Initialize the servlet.  Servlets should override this method   * if they need any initialization like opening pooled   * database connections.   */  public void init() throws ServletException  {  }  /**   * Implements the HTTP GET method.  The GET method is the standard   * browser method.   *   * @param request the request object, containing data from the browser   * @param repsonse the response object to send data to the browser   */  public void doGet (HttpServletRequest request,                     HttpServletResponse response)    throws ServletException, IOException  {    // Returns a writer to write to the client    PrintWriter out = response.getWriter();    // Write a string to the browser.    out.println("Hello, world!");    out.close();  }}</example><p>Entries in ithe <code>WEB-INF/web.xml</code> file tell Resin the URL thatshould invoke the Servlet:</p><example title="WEB-INF/web.xml">&lt;web-app xmlns="http://caucho.com/ns/resin"&gt;  &lt;servlet&gt;    &lt;servlet-name&gt;hello&lt;/servlet-name&gt;    &lt;servlet-class&gt;example.HelloServlet&lt;/servlet-class&gt;  &lt;/servlet&gt;  &lt;servlet-mapping&gt;    &lt;url-pattern&gt;/hello&lt;/url-pattern&gt;    &lt;servlet-name&gt;hello&lt;/servlet-name&gt;  &lt;/servlet-mapping&gt;&lt;/web-app&gt;</example><p>In a web-app named "foo" on a server named "localhost" listening on port"80", the servlet is now invoked with the URL<code>http://localhost:8080/foo/hello</code>.</p><p>More information on the usage of Servlets is available in the <a href="doc|servlet|">Servlet</a> section of the Resin documenation.</p></s2> <!-- servlet --><s2 name="jsp" title="JSP"><p>Java Server Pages are text files that contain text to be output (usuallyHTML or somesuch) and special directives, actions, scripting elements, andexpressionsthat are used to generate results dynamically.  </p><p>From the JSP 2.0 specification:</p><blockquote>JavaServer Pages technology supports scripting elements as well as actions.Actions encapsulate useful functionality in a convenient form that can bemanipulated by tools. Expressions are used to access data. Scripts can be usedto glue together this functionality in a per-page manner.</blockquote><p>With JSP the developer specifies the content mostly as the kind of thing theywant to send back to the client or browser, for example HTML.  Optionallyinterspersed with the HTML are special xml tags (directives and actions), ELexpressions, or specially marked scripting code (Java code).   The special xmltags, EL expressions and Java code are used to generate dynamic ouput.</p><s3 name="jsp-translation" title="JSP's are translated into Servlets"><p>It is helpful to understand what it is that Resin does with aJSP page.  Basically, it takes the JSP page and turns it into the Javacode for a Servlet, a process of <var>translation</var>.  </p><p>From the JSP specification: </p><blockquote>JSP pages are textual components.  They go through twophases: a translation phase, and a request phase. Translation is doneonce per page. The request phase is done once per request.</blockquote><p>The translation phase occurs when Resin takes a look at theJSP page, reads it in, and creates a Servlet. This only needs to bedone once. Now when a request from a client comes in, Resinwill call the appropriate method in the Servlet that it created from the.</p><p>During translation, Resin takes all of the code that has been speciallymarked in the JSP as java code and inserts it directly into the code for aServlet.  It takes all of the template text and makes the equivalent of printstatements to generate that ouput.</p><p>Because JSP files are translated into Servlets, JSP is an extension to JavaServlets. Everything that applies to Java Servlets also applies to JSP.  Muchinformation that is relevent to JSP programming is found in documentation aboutJava Servlets.  So you want to have the Servlet Specification around as a handyreference, as well as the JSP Specification.  Any reference to the capabilitiesand resources available to a Servlet are also available to a JSP page.  </p><p>This process is invisible to the JSP developer, all the developerneeds to do is make the JSP page and Resin will look at it andturn it into a Servlet.</p></s3> <!-- jsp-translation --><s3 name="jsp-syntax" title="The syntax of a JSP file"><p>JSP has it's own <a href="doc|jsp|">section</a> in the Resin documentation,the following is an introductory guide.</p><s4 title="template data - The text to be output"><p>Unless specially marked, the text in the JSP file will be sent exactlyas it is in the text file as part of the response. This is called<var>template data</var> in the JSP specification.</p></s4><s4 title="JSP EL and JSTL"><p>JSP EL is the JSP <var>Expression Language</var>.  It is used to evaluateexpressions that do not have side-effects (side-effects are changes toObjects). The use of EL is recognizable by it's syntax: <code>${'${'} <var>expr</var> }</code>.</p><p>JSTL is the JavaServer Pages Standard Tag Libray, a set of <var>tags</var> that areused to create dynamic output from JSP.  These tags look like regular XML tags,and are interpreted by Resin at translation time to generate java code thatperforms the desired action.</p><p>EL and JSTL are used throughout this discussion, the <a href="doc|jsp|">Resin JSP documentation</a>, the <a href="spec|jsp|">JSPSpecification</a>, and the <a href="spec|jstl|">JSTL Specification</a> providemore information.</p><example title="x.jsp - Example JSP file using EL and JSTL">&lt;%@page session="false" contentType="text/html" %&gt;&lt;%@taglib uri="http://java.sun.com/jstl/core" prefix="c" %&gt;&lt;head&gt;&lt;title&gt;A simple thing&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;!-- this comment gets all the way to the browser --&gt;&lt;%-- this comment gets discarded when the JSP is translated into a Servlet --%&gt;&lt;%// some java code that makes the variable `x' available to ELpageContext.setAttribute("x",new Integer(5));%&gt;The value of x is ${'${'} x }The value of x + 2 is ${'${'} x + 2 }Is xless than 6?&lt;c:if test="${'${'} x &lt; 6 }"&gt;&lt;%@include file="y.jsp" %&gt;&lt;/c:if&gt;&lt;/body&gt;</example><example title="y.jsp - Example java code in JSP file to be included">Yes, it is true that x is less than 6, with a value of ${'${'} x }</example><results title="x.jsp output - The result of a call to x.jsp">&lt;head&gt;&lt;title&gt;A simple thing&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;!-- this comment gets all the way to the browser --&gt;The value of x is 5.The value of x + 2 is 7.Is xless than 6?Yes, it is true that x is less than 6,with a value of 5.&lt;/body&gt;</results><p>Prior to the introduction of JSTL and EL, JSP pages used the direct insertionof Java code to accomplish the same thing.  The use of JSTL and EL is muchcleaner and more maintable.</p></s4><s4 title="Including other files"><p>Often it is desirable to include the contents of another file into aJSP file. For example, sometimes there is code that you find yourselfusing over and over again. The mechanism for this is the<var>include</var> directive:</p><example>&lt;%@ include file="<var>relativeURLspec</var>"%&gt;</example><p>Using the include directive it is exactly the same as if the includedtext was in the original file.  The text is included at translationtime - when the JSP is turned into a servlet.</p></s4><s4 title="Specifying content type"><p>A JSP page can use the <var>contentType</var> attribute of the<code>page</code> directive to indicate the content type of the response it is sending. For example, <code>text/html</code> and<code>text/wml</code> are valid content types.</p><p>Since this value is part of a directive, a given page will alwaysprovide the same content type. It is also possible to dynamicallyindicate the content type using the <code>response</code> object, which isdiscussed later.</p></s4><s4 title="Comments"><p>A JSP comment is of the form:</p><example title="JSP comments">&lt;%-- anything but a closing --%&gt; ... --%&gt;</example><p>The body of the JSP content is ignored completely. JSP Comments are discardedat translation time, they do not become part of the Servlet that is used togenerate the response.  Comments are useful for documentation but also tocomment out some portions of a JSP page. JSP comments do not nest.</p><p>In order to generate comments that appear in the response to the requestingclient, the HTML and XML comment syntax is used, as follows:</p><example title="HTML comments">&lt;!-- comments ... --&gt;</example></s4><s4 title="Java code in the JSP file"><p>Java code in the JSP is marked by the special characters <code>&lt;%</code>and <code>%&gt;</code>.  To insert the value of a variable or an expression inthe output it is marked with <code>&gt;&lt;%= <var>expr</var> &amp;&gt;</code>.</p><p>Be careful not to depend on the ability of JSP to include Java code too much.JSP is best used to present a <var>view</var> of data that has already beenprepared in Servlets or other code, as discussed in <a href="#architecture">Architecture</a>.</p><p>Now that JSTL and JSP EL exist, they are preferred over the insertion of Javacode directly.</p><example title="x.jsp - Example java code in JSP file">&lt;%@page session="false" contentType="text/html" import="java.util.*, example.*%&gt;&lt;head&gt;&lt;title&gt;A simple thing&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;!-- this comment gets all the way to the browser --&gt;&lt;%-- this comment gets discarded when the JSP is translated into a Servlet --%&gt;<b>&lt;% int x = 5; // java-style comments valid here %&gt;</b>The value of x is <b>&lt;%= x %&gt;</b>.The value of x + 2 is <b>&lt;%= x + 2 %&gt;</b>.Is xless than 6?<b>&lt;% if (x &lt; 6) { %&gt;</b>&lt;%@include file="y.jsp" %&gt;<b>&lt;% } %&gt;</b>&lt;/body&gt;</example><example title="y.jsp - Example java code in JSP file to be included">Yes, it is true that x is less than 6, with a value of <b>&lt;%= x %&gt;</b>.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜欧美电影在线观看| 美女脱光内衣内裤视频久久影院| 亚洲色欲色欲www| 日韩二区三区四区| 成人av资源在线| 91精品啪在线观看国产60岁| 久久精品视频网| 偷拍一区二区三区| 91浏览器打开| 欧美国产1区2区| 精品一区二区三区久久| 欧美图片一区二区三区| 欧美激情在线免费观看| 精品伊人久久久久7777人| 欧美日韩一区在线观看| 亚洲欧美日韩国产另类专区| 国产一区欧美一区| 日韩视频一区二区三区在线播放 | 中文字幕欧美国产| 青青草原综合久久大伊人精品优势| 99精品国产91久久久久久| 久久久久久久久久久久久女国产乱 | 懂色av一区二区在线播放| 欧美一区二区网站| 一区2区3区在线看| 91在线观看污| 国产精品久久久久久久午夜片| 国内精品伊人久久久久av一坑| 91精品在线一区二区| 亚洲国产精品久久久久秋霞影院 | 亚洲激情成人在线| 99久久婷婷国产综合精品| 国产欧美日产一区| 国产a级毛片一区| 久久久久99精品国产片| 国产成人aaa| 国产精品欧美一级免费| 国产精品99久久久久久有的能看 | 国产伦精品一区二区三区免费迷 | 一二三四区精品视频| 国产91精品露脸国语对白| 精品国产乱码久久久久久免费| 性感美女极品91精品| 91丨porny丨户外露出| 国产欧美久久久精品影院| 九九九久久久精品| 91麻豆精品国产91久久久久| 亚洲人成影院在线观看| 成人午夜激情片| 久久久蜜桃精品| 国产精品99久久久久久宅男| 久久精品日产第一区二区三区高清版 | 在线亚洲一区观看| 国产精品久线观看视频| 丁香天五香天堂综合| 国产午夜精品一区二区三区四区| 精品一区二区三区香蕉蜜桃| 一本色道久久加勒比精品| 日韩欧美不卡一区| 成人福利视频网站| 最好看的中文字幕久久| 91视频国产观看| 亚洲自拍偷拍av| 欧美美女网站色| 免费国产亚洲视频| 精品久久久久久最新网址| 国产一区二区三区精品视频 | 亚洲国产综合91精品麻豆| 欧洲精品在线观看| 天天综合网 天天综合色| 欧美一区二区三区思思人| 久久99精品国产.久久久久久 | 久久精品噜噜噜成人av农村| 精品国产麻豆免费人成网站| 国产成人在线色| 亚洲精品免费在线| 91精品国产综合久久久蜜臀图片 | 夜夜夜精品看看| 欧美特级限制片免费在线观看| 六月丁香婷婷久久| 国产精品理伦片| 欧美日韩卡一卡二| 精品一区二区在线看| 国产精品卡一卡二| 555夜色666亚洲国产免| 国产成人综合在线观看| 国产免费观看久久| 欧美体内she精高潮| 国产精品中文字幕欧美| 亚洲人成人一区二区在线观看| 欧美二区三区的天堂| 天堂成人国产精品一区| 欧美肥胖老妇做爰| aaa国产一区| 蜜臀久久久久久久| 亚洲欧美另类在线| 欧美大片一区二区| 色婷婷综合激情| 国产一区二区三区不卡在线观看| 亚洲三级小视频| 亚洲精品一区二区三区在线观看| 91丨porny丨蝌蚪视频| 韩国精品主播一区二区在线观看 | 色综合久久久久| 精品亚洲成a人在线观看| 亚洲激情综合网| 国产亚洲精品免费| 日韩一级片网址| 色婷婷av一区二区三区gif| 国产一区二区三区在线观看精品| 一区二区三区产品免费精品久久75| 精品成人免费观看| 欧美亚洲日本一区| 蜜桃av一区二区| 一区二区三区久久久| 国产精品日韩精品欧美在线| 欧美videossexotv100| 欧美精品视频www在线观看| www..com久久爱| 懂色av一区二区三区免费观看| 男女性色大片免费观看一区二区 | 在线播放日韩导航| 色婷婷久久综合| 91丝袜美女网| www..com久久爱| 暴力调教一区二区三区| 免费成人深夜小野草| 一区二区三区四区在线播放| 亚洲一区二区五区| 一区二区在线观看视频在线观看| 中文字幕一区二区日韩精品绯色| 国产日韩精品一区二区三区在线| 欧美精品一区二区三区蜜桃| 日韩欧美国产一二三区| 欧美一区二区在线不卡| 欧美一区二区啪啪| 日韩女优av电影| 精品剧情v国产在线观看在线| 日韩久久免费av| 久久综合九色欧美综合狠狠| 日韩一区和二区| 欧美在线免费观看亚洲| 欧美系列亚洲系列| 欧美乱妇20p| 日韩欧美一二三区| 久久毛片高清国产| 国产欧美一区二区精品婷婷| 日本一区二区电影| 亚洲视频免费看| 亚洲免费在线播放| 亚洲成av人影院| 精品一区二区三区蜜桃| 国产精品一区三区| 成人av免费在线| 色呦呦日韩精品| 91麻豆精品国产无毒不卡在线观看| 欧美一区二区女人| 国产网站一区二区| 亚洲另类一区二区| 男人的天堂亚洲一区| 丁香另类激情小说| av电影天堂一区二区在线| 欧美无砖砖区免费| 精品人伦一区二区色婷婷| 亚洲国产精品激情在线观看| 一区二区三区四区在线播放| 免费视频最近日韩| 波多野结衣中文一区| 欧美日韩和欧美的一区二区| 26uuu另类欧美亚洲曰本| 国产精品国产自产拍高清av王其| 亚洲午夜影视影院在线观看| 老司机免费视频一区二区| 国产精品99久久久久久有的能看| 高清成人免费视频| 日韩视频一区二区三区| 亚洲视频在线一区二区| 日韩av电影免费观看高清完整版| 国产99久久久久| 欧美精品久久一区二区三区| 日本一区二区三区四区 | 精品国产区一区| 亚洲欧美日韩一区二区 | 亚洲在线视频一区| 日韩黄色在线观看| 91在线码无精品| 久久亚洲精品小早川怜子| 亚洲一区二区三区视频在线 | 精品一区二区免费在线观看| 一本一道综合狠狠老| 26uuu精品一区二区| 亚洲一二三四在线观看| 国产91精品在线观看| 91精品国产综合久久精品麻豆 | 国产精品女人毛片| 久久9热精品视频| 欧美日韩精品久久久| 精品国产一区二区精华| 亚洲午夜电影网| 91视频你懂的|