jsp技術網(wǎng)站設計外文翻譯_第1頁
已閱讀1頁,還剩17頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、<p>  Combining JSP and Servlets</p><p>  The technology of JSP and Servlet is the most important technology which use Java technology to exploit request of server, and it is also the standard which exp

2、loit business application .Java developers prefer to use it for a variety of reasons, one of which is already familiar with the Java language for the development of this technology are easy to learn Java to the other is

3、"a preparation, run everywhere" to bring the concept of Web applications, To achieve a "one-prepared everywhere realized</p><p>  Early dynamic pages mainly CGI (Common Gateway Interface, publ

4、ic Gateway Interface) technology, you can use different languages of the CGI programs, such as VB, C / C + + or Delphi, and so on. Though the technology of CGI is developed and powerful, because of difficulties in progra

5、mming, and low efficiency, modify complex shortcomings, it is gradually being replaced by the trend. Of all the new technology, JSP / Servlet with more efficient and easy to program, more powerful, more secure and has &l

6、t;/p><p>  Similar to CGI, Servlet support request / response model. When a customer submit a request to the server, the server presented the request Servlet, Servlet responsible for handling requests and gener

7、ate a response, and then gave the server, and then from the server sent to the customer. And the CGI is different, Servlet not generate a new process, but with HTTP Server at the same process. It threads through the use

8、of technology, reduce the server costs. Servlet handling of the request process i</p><p>  Although such a complex, in fact, simply said to Servlet is a Java class. And the general category of the difference

9、 is that this type operating in a Servlet container, which can provide session management and targeted life-cycle management. So that when you use the Servlet, you can get all the benefits of the Java platform, including

10、 the safety of the management, use JDBC access the database and cross-platform capability. Moreover, Servlet using thread, and can develop more efficient Web applic</p><p>  JSP technology is a key J2EE tech

11、nology, it at a higher level of abstraction of a Servlet. It allows conventional static and dynamic HTML content generated by combining an HTML page looks like, but as a Servlet to run. There are many commercial applicat

12、ion server support JSP technology, such as BEA WebLogic, IBM WebSphere, JRun, and so on. JSP and Servlet use more than simple. If you have a JSP support for Web servers, and a JSP document, you can put it Fangdao any sta

13、tic HTML files can be place</p><p>  JSP document looks like an ordinary static HTML document, but inside contains a number of Java code. It uses. Jsp the suffix, used to tell the server this document in nee

14、d of special treatment. When we visit a JSP page, the document will first be translated into a JSP engine Java source files, is actually a Servlet, and compiler, and then, like other Servlet, from Servlet engine to handl

15、e. Servlet engine of this type loading, handling requests from customers, and the results returned to the cust</p><p>  Figure 1: Calling the process of JSP pages</p><p>  After another visit th

16、is page to the customer, as long as the paper there have been no changes, JSP engine has been loaded directly call the Servlet. If you have already been modified, it will be once again the implementation of the above pro

17、cess, translate, compile and load. In fact, this is the so-called "first person to punishment." Because when the first visit to the implementation of a series of the above process, so will spend some time after

18、 such a visit would not. </p><p>  Java servlets offer a powerful API that provides access to all the information about the request, the session, and the application. combining JSP with servlets lets you cle

19、arly separate the application logic from the presentation of the application; in other words, it lets you use the most appropriate component type for the roles of Model, View and Controller.</p><p>  Servle

20、ts, Filters, and Listeners </p><p>  A servlet is a Java class that extends a server with functionality for processing a request and producing a response. It's implemented using the classes and interface

21、s defined by the Servlet API. The API consists of two packages: the javax.servlet package contains classes and interfaces that are protocol-independent, while the javax.servlet.http package provides HTTP-specific extensi

22、ons and utility classes.</p><p>  What makes a servlet a servlet is that the class implements an interface named javax.servlet.Servlet, either directly or by extending one of the support classes. This interf

23、ace defines the methods used by the web container to manage and interact with the servlet. A servlet for processing HTTP requests typically extends the javax.servlet.http.HttpServlet class. This class implements the Serv

24、let interface and provides additional methods suitable for HTTP processing. </p><p>  Servlet Lifecycle</p><p>  The web container manages all aspects of the servlet's lifecycle. It creates

25、an instance of the servlet class when needed, passes requests to the instance for processing, and eventually removes the instance. For an HttpServlet, the container calls the following methods at the appropriate times in

26、 the servlet lifecycle.</p><p>  Besides the doGet( ) and doPost( ) methods, there are methods corresponding to the other HTTP methods: doDelete( ), doHead( ), doOptions( ), doPut( ), and doTrace( ). Typical

27、ly you don't implement these methods; the HttpServlet class already takes care of HEAD, OPTIONS, and TRACE requests in a way that's suitable for most servlets, and the DELETE and PUT HTTP methods are rarely used

28、 in a web application. </p><p>  It's important to realize that the container creates only one instance of each servlet. This means that the servlet must be thread safe -- able to handle multiple reques

29、ts at the same time, each executing as a separate thread through the servlet code. Without getting lost in details, you satisfy this requirement with regards to instance variables if you modify the referenced objects onl

30、y in the init( ) and destroy( ) methods, and just read them in the request processing methods.</p><p>  Compiling and Installing a Servlet</p><p>  To compile a servlet, you must first ensure th

31、at you have the JAR file containing all Servlet API classes in the CLASSPATH environment variable. The JAR file is distributed with all web containers. Tomcat includes it in a file called servlet.jar, located in the comm

32、on/lib directory. On a Windows platform, you include the JAR file in the CLASSPATH.</p><p>  . Reading a Request</p><p>  One of the arguments passed to the doGet( ) and doPost( ) methods is an

33、object that implements the HttpServletRequest interface. This interface defines methods that provide access to a wealth of information about the request.</p><p>  Generating a Response</p><p>  

34、Besides the request object, the container passes an object that implements the HttpServletResponse interface as an argument to the doGet( ) and doPost( ) methods. This interface defines methods for getting a writer or st

35、ream for the response body. It also defines methods for setting the response status code and headers.</p><p>  Using Filters and Listeners</p><p>  The servlet specification defines two componen

36、t types beside servlets: filters and listeners. These two types were introduced in the Servlet 2.3 specification, so if you're using a container that doesn't yet support this version of the specification, I'm

37、 afraid you're out of luck.</p><p><b>  Filters</b></p><p>  A filter is a component that can intercept a request targeted for a servlet, JSP page, or static page, as well as the

38、 response before it's sent to the client. This makes it easy to centralize tasks that apply to all requests, such as access control, logging, and charging for the content or the services offered by the application. A

39、 filter has full access to the body and headers of the request and response, so it can also perform various transformations. One example is compressing the response bo</p><p>  A filter can be applied to eit

40、her a specific servlet or to all requests matching a URL pattern, such as URLs starting with the same path elements or having the same extension.</p><p>  Listeners </p><p>  Listeners allow you

41、r application to react to certain events. Prior to Servlet 2.3, you could handle only session attribute binding events (triggered when an object was added or removed from a session). You could do this by letting the obje

42、ct saved as a sessionattribute(using the HttpSession.setAttribute() method)implement the HttpSessionBindingListener interface. With the new interfaces introduced in the 2.3 version of the specification, you can create li

43、steners for servlet context and session l</p><p>  The new types of listeners follow the standard Java event model. In other words, a listener is a class that implements one or more of the listener interface

44、s. The interfaces define methods that correspond to events. The listener class is registered with the container when the application starts, and the container then calls the event methods at the appropriate times.</p&

45、gt;<p>  Initializing Shared Resources Using a Listener</p><p>  Beans like this typically need to be initialized before they can be used. For instance, they may need a reference to a database or some

46、 other external data source and may create an initial information cache in memory to provide fast access even to the first request for data. You can include code for initialization of the shared resources in the servlet

47、and JSP pages that need them, but a more modular approach is to place all this code in one place and let the other parts of the application work </p><p>  Picking the Right Component Type for Each Task</p

48、><p>  The Project Billboard application introduced is a fairly complex application. Half the pages are pure controller and business logic processing, it accesses a database to authenticate users, and most page

49、s require access control. In real life, it would likely contain even more pages, for instance, pages for access to a shared document archive, time schedules, and a set of pages for administration. As the application evol

50、ves, it may become hard to maintain as a pure JSP application. It's easy to f</p><p>  This is clearly an application that can benefit from using a combination of JSP pages and the component types define

51、d by the servlet specification for the MVC roles. Let's look at the main requirements and see how we can map them to appropriate component types:</p><p>  Database access should be abstracted, to avoid k

52、nowledge of a specific data schema or database engine in more than one part of the application: beans in the role of Model can be used to accomplish this.</p><p>  The database access beans must be made avai

53、lable to all other parts of the application when it starts: an application lifecycle event listener is the perfect component type for this task. </p><p>  Only authenticated users must be allowed to use the

54、 application: a filter can perform access control to satisfy this requirement. </p><p>  Request processing is best done with Java code: a servlet, acting as the Controller, fits the bill. </p><

55、p>  It must be easy to change the presentation: this is where JSP shines, acting as the View. </p><p>  Adding servlets, listeners, and filters to the mix minimizes the need for complex logic in the JSP

56、pages. Placing all this code in Java classes instead makes it possible to use a regular Java compiler and debugger to fix potential problems.</p><p>  Centralized Request Processing Using a Servlet</p>

57、<p>  With a servlet as the common entry point for all application requests, you gain control over the page flow of the application. The servlet can decide which type of response to generate depending on the outco

58、me of the requested action, such as returning a common error page for all requests that fail, or different responses depending on the type of client making the request. With the help from some utility classes, it can als

59、o provide services such as input validation, I18N preparations, and in ge</p><p>  When you use a servlet as a Controller, you must deal with the following basic requirements: </p><p>  All requ

60、ests for processing must be passed to the single Controller servlet.</p><p>  The servlet must be able to distinguish requests for different types of processing. </p><p>  Here are other featur

61、es you will want support for, even though they may not be requirements for all applications: </p><p>  A strategy for extending the application to support new types of processing requests in a flexible manne

62、r.</p><p>  A mechanism for changing the page flow of the application without modifying code.</p><p>  Mapping Application Requests to the Servlet</p><p>  The first requirement for

63、 using a Controller servlet is that all requests must pass through it. This can be satisfied in many ways. If you have played around a bit with servlets previously, you're probably used to invoking a servlet with a U

64、RI that starts with /myApp/servlet. This is a convention introduced by Suns Java Web Server (JWS), the first product to support servlets before the API was standardized. Most servlet containers support this convention to

65、day, even though it's not formally defi</p><p>  將Servlet和JSP組合使用</p><p>  Servlet和JSP技術是用Java開發(fā)服務器端應用的主要技術,是開發(fā)商務應用表示端的標準。Java開發(fā)者喜歡使用它有多種原因,其一是對于已經(jīng)熟悉Java語言的開發(fā)者來說這個技術容易學習;其二是Java把“一次編寫,到處運行”的

66、理念帶入到Web應用中,實現(xiàn)了“一次編寫,到處實現(xiàn)”。而且更為重要的是,如果遵循一些良好的設計原則的話,就可以把表示和內容相分離,創(chuàng)造出高質量的、可以復用的、易于維護和修改的應用程序。比方說,在HTML文檔中如果嵌入過多的Java代碼(scriptlet),就會導致開發(fā)出來的應用非常復雜、難以閱讀、不容易復用,而且對以后的維護和修改也會造成困難。事實上,在CSDN的JSP/Servlet論壇中,經(jīng)??梢钥吹揭恍┨釂?,代碼很長,可以邏輯卻

67、不是很清晰,大量的HTML和Java代碼混雜在一起,讓人看得一頭霧水。這就是隨意開發(fā)的弊端。</p><p>  早期的動態(tài)網(wǎng)頁主要采用CGI(Common Gateway Interface,公共網(wǎng)關接口)技術,你可以使用不同的語言編寫CGI程序,如VB、C/C++或Delphi等。雖然CGI技術發(fā)展成熟且功能強大,但由于編程困難、效率低下、修改復雜等缺點,所以有逐漸被取代的趨勢。在所有的新技術中,JSP/Se

68、rvlet具備更高效、更容易編程、功能更強、更安全和具有良好的可移植性,因而被許多人認為是未來最有發(fā)展前途的動態(tài)網(wǎng)站技術。</p><p>  與CGI相似,Servlet支持請求/響應模型。當一個客戶向服務器遞交一個請求時,服務器把請求送給Servlet,Servlet負責處理請求并生成響應,然后送給服務器,再由服務器發(fā)送給客戶。與CGI不同的是,Servlet沒有生成新的進程,而是與HTTP Server處于

69、同一進程中。它通過使用線程技術,減小了服務器的開銷。Servlet處理請求的過程是這樣的:當收到來自客戶端的請求后,調用service方法,該方法中Servlet先判斷到來的請求是什么類型的(GET/POST/HEAD…),然后調用相應的處理方法(doGet/doPost/doHead…)并生成響應。</p><p>  別看這么復雜,其實簡單說來Servlet就是一個Java類。與一般類的不同之處是,這個類運行

70、在一個Servlet容器內,可以提供session管理和對象生命周期管理。因而當你使用Servlet的時候,你可以得到Java平臺的所有好處,包括安全性管理、使用JDBC訪問數(shù)據(jù)庫以及跨平臺的能力。而且,Servlet使用線程,因而可以開發(fā)出效率更高的Web應用。</p><p>  JSP技術是J2EE的一個關鍵技術,它在更高一級的層次上抽象Servlet。它可以讓常規(guī)靜態(tài)HTML與動態(tài)產生的內容相結合,看起來

71、像一個HTML網(wǎng)頁,卻作為Servlet來運行?,F(xiàn)在有許多商業(yè)應用服務器支持JSP技術,比如BEA WebLogic、IBM WebSphere、 JRun等等。使用JSP比用Servlet更簡單。如果你有一個支持JSP的Web服務器,并且有一個JSP文件,你可以把它放倒任何靜態(tài)HTML文件可以放置的位置,不用編譯,不用打包,也不用進行ClassPath的設置,就可以像訪問普通網(wǎng)頁那樣訪問它,服務器會自動幫你做好其他的工作。</p

72、><p>  JSP 文件看起來就像一個普通靜態(tài)HTML文件,只不過里面包含了一些Java代碼。它使用.jsp的后綴,用來告訴服務器這個文件需要特殊的處理。當我們訪問一個JSP頁面的時候,這個文件首先會被JSP引擎翻譯為一個Java源文件,其實就是一個Servlet,并進行編譯,然后像其他Servlet一樣,由Servlet引擎來處理。Servlet引擎裝載這個類,處理來自客戶的請求,并把結果返回給客戶,如下圖所示:

73、</p><p>  圖1: 調用JSP頁面的流程</p><p>  以后再有客戶訪問這個頁面的時候,只要該文件沒有發(fā)生過更改,JSP引擎就直接調用已經(jīng)裝載的Servlet。如果已經(jīng)做過修改的話,那就會再次執(zhí)行以上過程,翻譯、編譯并裝載。其實這就是所謂的“第一人懲罰”。因為首次訪問的時候要執(zhí)行一系列以上的過程,所以會耗費一些時間;以后的訪問就不會這樣了。</p><p

74、>  Java servlet提供了一種強有力的API,用這個API可以訪問關于請求、會話和應用程序的所有信息。將servlet和JSP頁面組合起來使用,可以把應用程序的邏輯部分和外觀呈現(xiàn)部分清楚地分開;換句話,利用這個方式可以對模型、視圖和控制器這三種角色分別使用最合適的組件類型。</p><p>  Servlet、過濾器和監(jiān)聽器</p><p>  Servlet是一種Java

75、類,它使得服務器的功能可擴展至處理請求和生成應答。它是用Servlet API定義的類和接口實現(xiàn)的。API由兩個程序包組成:jvavax.servlet程序包包含獨立于協(xié)議的類和接口,而javax.servlet.http程序包則提供HTTP特定的擴展的實用程序類。</p><p>  Servlet的實質是實現(xiàn)了接口javax.servlet.Servlet的類,實現(xiàn)是直接完成或通過擴展某個支持類來完成的。該接

76、口定義了Web容器用來管理servlet和與之交互的方法。用于處理HTTP請求的servlet一般情況下都會擴展javax.servlet.http.HttpServlet類。該類實現(xiàn)了Servlet接口,并提供了使用HTTP處理的附加方法。</p><p>  Servlet的生命周期</p><p>  Web容器管理servlet生命周期的所有方面。它根據(jù)需要創(chuàng)建servlet類的實

77、例、將請求傳遞給實例進行處理,最終刪除實例。對于HttpServlet來說,容器會在servlet生命周期的適當時間調用方法。</p><p>  除了doGet()和doPost()方法之外,還有一些對應于其他HTTP方法的方法:doDelete()、doHead()、doOptiongs()、doPut()和doTrace()。一般情況下不用實現(xiàn)這些方法,因為HttpServlet類已經(jīng)用適用于大多數(shù)serv

78、let的方法考慮到了HEAD、OPTIONS和TRACE請求,而且DELETE和PUT這兩種HTTP方法很少用在Web應用程序中。</p><p>  容器只為每個Servlet創(chuàng)建一個實例非常重要。這意味著servlet必須是線程安全的—即,能夠同時處理多個請求,每個處理都通過servlet代碼作為單獨的線程來執(zhí)行。如果只在init()和destroy()方法中修改參考的對象,而且只在請求處理方法中讀取他們,那

79、么不用喪失任何細節(jié)就可以滿足關于實例變量的這個要求。</p><p>  編譯和安裝servlet</p><p>  要編譯servlet,必須首先確保JAR文件包含著CLASSPATH環(huán)境變量中所有Servlet API類。該JAR文件將隨所有的Web容器一起發(fā)布。Tomcat中包含了一個名為servlet.jar的JAR文件,位于common/lib目錄中。在Windows平臺中,應

80、在CLASSPATH中包含JAR文件。</p><p><b>  讀取請求</b></p><p>  傳遞到doGet()和doPost()方法的參數(shù)之一是實現(xiàn)了HttpServletRequest接口的對象。該接口定義的方法可提供對關于請求的許多信息的訪問。</p><p><b>  生成應答</b></p&

81、gt;<p>  除應答對象之外,容器還將實現(xiàn)HttpServletRequest接口的對象作為icanshu傳遞給doGet()和doPost()方法。該接口定義了為應答行為體獲取數(shù)序程序或流的方法。它還定義了設置應答狀態(tài)代碼和首部的方法。</p><p><b>  使用過濾器和監(jiān)聽器</b></p><p>  Servlet規(guī)范servlet內定

82、義了兩種組件類型:過濾器和監(jiān)聽器。這兩種類型是在Servlet 2.3規(guī)范中引入的,因此,如果你使用的是不支持該版本規(guī)范的容器,恐怕就不能繼續(xù)學習了。</p><p><b>  過濾器</b></p><p>  過濾器是一種組件,可以解釋對servlet、JSP頁面或靜態(tài)頁面的請求以及發(fā)送給客戶端之前的應答。這樣可以很容易地將應用于所有請求的任務集中在一起,例如訪

83、問控制、登錄和內容的開銷或應用提供的服務等。過濾器對請求與應答的行為體和首部具有完全訪問權限,因此還可以執(zhí)行各種轉換。例如,如果Accept-Language請求首部指出客戶端可以處理壓縮的應答,那么過濾器就可以壓縮應答的行為體。</p><p>  過濾器可以應用在特定servlet上,或匹配某種URL模式的所有請求上,例如以相同的路徑元素開頭或具有相同擴展名的URL。</p><p>

84、<b>  監(jiān)聽器</b></p><p>  監(jiān)聽器允許應用程序對特定事件做出回應。Servlet 2.3之前,只能處理會話屬性綁定事件(在添加對象或從會話中刪除對象時)。實現(xiàn)監(jiān)聽器的方式是用保存為會話屬性(使用HttpSession.setAttribute()方法)的對象實現(xiàn)HttpSessionBinding-Listener接口。隨著Servlet規(guī)范的2.3版本中新接口的引入,可

85、以為servlet環(huán)境和會話生命周期事件以及激活和鈍化事件(容器用來暫時將會話狀態(tài)保存在磁盤上或將會話移植到另一個服務器上)創(chuàng)建監(jiān)聽器。使用新的會話屬性事件監(jiān)聽器還可以在一個位置上處理所有會話的屬性綁定事件,而不是在每個會話中防止單獨的監(jiān)聽器對象。</p><p>  新類型的監(jiān)聽器遵循的是標準Java事件模型。換句話說,監(jiān)聽器是實現(xiàn)了一個或多個監(jiān)聽器接口的類。接口定義的是事件相應的方法。當應用程序啟動是,容易會

86、注冊監(jiān)聽器類,然后該容器會在合適的事件調用那些事件方法。</p><p>  使用監(jiān)聽器初始化共享資源</p><p>  Bean一般都有需要在使用之前進行初始化。例如,它們可能需要對數(shù)據(jù)庫或某些其他外部數(shù)據(jù)源的引用,還可能在內存中創(chuàng)建一個初始消息緩存,以便即使是第一個請求數(shù)據(jù)也可以提供更快的訪問??梢栽谛枰蚕碣Y源的servlet和JSP頁面中包含初始化共享資源的代碼,但是更標準的方法

87、是在一個位置放置所有這些代碼,并在假設資源已經(jīng)初始化和可用的情況下,使應用程序的其他部分可以正常工作。應用程序生命周期監(jiān)聽器是此類資源初始化的絕好工具。此類監(jiān)聽器實現(xiàn)了javax.servlet.ServletContextListener接口,當應用程序啟動和關閉時會由容器調用該接口的方法。</p><p>  為每個任務選擇正確的組件類型</p><p>  在之前介紹的項目公告牌應用

88、程序是相當復雜的應用程序。頁面的一般都是純粹的控制器和商務邏輯處理,它訪問數(shù)據(jù)庫以對用戶進行身份驗證,而且多數(shù)頁面都需要訪問控制。在現(xiàn)實生活中,它可能會包含更多的頁面,例如,用于訪問共享文檔檔案、事件表的頁面和用于管理的一組頁面等。由于應用程序在不斷地發(fā)展變化,因此可能變得很難作為純JSP應用程序來維護。例如,很容易忘記在新頁面中包含訪問控制代碼。</p><p>  很明顯,這種應用程序可以從使用JSP頁面與組

89、件類型的組合中受益,其中組件類型由用于MVC角色的servlet規(guī)范所定義。下面看一下主要的要求,并了解如何將他們映射到適當?shù)慕M件類型上:</p><p>  數(shù)據(jù)庫訪問應該是抽象的,從而避免料接應用程序中多個部分的特定數(shù)據(jù)模式或數(shù)據(jù)庫引擎:模型角色中的bean可以用來完成這種認知。</p><p>  數(shù)據(jù)庫訪問bean必須在應用程序啟動時可用于所有其他的部分:應用程序生命周期時間監(jiān)聽器

90、是用了該任務的完美的組件類型。</p><p>  只有通過驗證的用戶才允許使用應用程序:過濾器可以完成訪問控制以滿足該要求。</p><p>  用Java代碼進行請求處理效果最佳:servlet作為控制器正符合需要。</p><p>  必須很容易改編外觀呈現(xiàn):這正是JSP的反光點,也就是作為視圖。</p><p>  將servlet、

91、監(jiān)聽器和過濾器混合起來,就將JSP頁面對復雜邏輯的需求降到了最低。將這些代碼放置到Java類中后,就可以使用普通的Java編譯程序和調試程序來修復潛在的問題。</p><p>  使用servlet集中處理請求</p><p>  將servlet作為所有應用程序請求的公共入口時,可以獲得對應用程序頁面流的整體控制。Servlet可以根據(jù)所請求行為的結果來決定要生成的應答類型,例如,為所有

92、失敗的請求返回公共的錯誤頁面,或者根據(jù)發(fā)出請求的客戶端返回不同的應答等。在某些使用程序類的幫助下,servlet還可以提供諸如輸入驗證、J18N準備之類的服務,而且通常會鼓勵使用更有效率的方法來請求處理。</p><p>  當使用servlet作為控制器時,必須處理下列基本要求:</p><p>  所有處理請求必須傳遞到單獨的控制器servlet中。</p><p&

93、gt;  Servlet必須能夠區(qū)分請求,以便進行不同類型的處理。</p><p>  下面是其他一些你可能希望支持的功能,即使并非所有應用程序都要求:</p><p>  擴展應用程序以便以更靈活的方式支持新類型的請求處理。</p><p>  在不修改代碼的情況下改變應用程序頁面流的機制。</p><p>  當然,你可以自己開發(fā)滿足這些

94、要求的servlet,但是已經(jīng)有開源式servlet了,他們可以滿足所有這些要求,甚至還有更多的功能。</p><p>  將應用程序請求映射到servlet</p><p>  使用控制器servlet的第一個要求是所有請求必須都經(jīng)過該servlet。該要求可以通過多種方式來滿足。如果你以前曾經(jīng)使用過servlet,那么你可能習慣于用以/myApp/servlet開頭的URI來調用ser

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論