毕设 JSP 外文翻译

合集下载

毕业设计英文翻译JSP

毕业设计英文翻译JSP

JSP OverviewJSP is the latest Java technology for web application development and is based on the servlet technology introduced in the previous chapter. While servlets are great in many ways, they are generally reserved for programmers. In this chapter, we look at the problems that JSP technology solves, the anatomy of a JSP page, the relationship between servlets and JSP, and how the server processes a JSP page.In any web application, a program on the server processes requests and generates responses. In a simple one-page application, such as an online bulletin board, you don't need to be overly concerned about the design of this piece of code; all logic can be lumped together in a single program. However, when the application grows into something bigger (spanning multiple pages, using external resources such as databases, with more options and support for more types of clients), it's a different story. The way your site is designed is critical to how well it can be adapted to new requirements and continue to evolve. The good news is that JSP technology can be used as an important part in all kinds of web applications, from the simplest to the most complex.Therefore, this chapter also introduces the primary concepts in the design model recommended for web applications and the different roles played by JSP and other Java technologies in this model.The Problem with ServletsIn many Java servlet-based applications, processing the request and generating the response are both handled by a single servlet class. shows how a servlet class often looks.Example 3-1. A typical servlet classpublic class OrderServlet extends HttpServlet {public void doGet((HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException {("text/html");PrintWriter out = ( );if (isOrderInfoValid(request)) {saveOrderInfo(request);("<html>");(" <head>");(" <title>Order Confirmation</title>");(" </head>");(" <body>");(" <h1>Order Confirmation</h1>");renderOrderInfo(request);(" </body>");("</html>");}...If you're not a programmer, don't worry about all the details in this code. The point is that the servlet contains request processing and business logic (implemented by methods such as isOrderInfoValid() and saveOrderInfo( )), and also generates the response HTML code, embedded directly in the servlet code using println( ) calls. A more structured servlet application isolates different pieces of the processing in various reusable utility classes and may also use a separate class library for generating the actual HTML elements in the response. Even so, the pure servlet-based approach still has a few problems:Thorough Java programming knowledge is needed to develop and maintain all aspects of the application, since the processing code and the HTML elements are lumped together.Changing the look and feel of the application, or adding support for a new type of client (such as a WML client), requires the servlet code to be updated and recompiled.It's hard to take advantage of web page development tools when designing the application interface. If such tools are used to develop the web page layout, the generated HTML must then be manually embedded into the servlet code, a process which is time consuming, error prone, and extremely boring.Adding JSP to the puzzle lets you solve these problems by separating the request processing and business logic code from the presentation, as illustrated in . Instead of embedding HTML in the code, place all static HTML in a JSP page, just as in a regular web page, and add a few JSP elements to generate the dynamic parts of the page. The request processing can remain the domain of the servlet, and the business logic can be handled by JavaBeans and EJB components.Figure 3-1. Separation of request processing, business logic, and presentationAs I mentioned before, separating the request processing and business logic frompresentation makes it possible to divide the development tasks among people with different skills. Java programmers implement the request processing and business logic pieces, web page authors implement the user interface, and both groups can use best-of-breed development tools for the task at hand. The result is a much more productive development process. It also makes it possible to change different aspects of the application independently, such as changing the business rules without touching the user interface.This model has clear benefits even for a web page author without programming skills, working alone. A page author can develop web applications with many dynamic features, usingthe JSP standard actions and the JSTL libraries, as well as Java components provided by open source projects and commercial companies.JSP ProcessingJust as a web server needs a servlet container to provide an interface to servlets, the server needs a JSP container to process JSP pages. The JSP container is responsible for intercepting requests for JSP pages. To process all JSP elements in the page, the container first turns the JSP page into a servlet (known as the JSP page implementation class). The conversion is pretty straightforward; all template text is converted to println( ) statements similar to the ones in the handcoded servlet shown in , and all JSP elements are converted to Java code that implements the corresponding dynamic behavior. The container then compiles the servlet class.Converting the JSP page to a servlet and compiling the servlet form the translation phase. The JSP container initiates the translation phase for a page automatically when it receives the first request for the page. Since the translation phase takes a bit of time, the first user to request a JSP page notices a slight delay. The translation phase can also be initiated explicitly; this is referred to as precompilation of a JSP page. Precompiling a JSP page is a way to avoid hitting the first user with this delay. It is discussed in more detail in .The JSP container is also responsible for invoking the JSP page implementation class (the generated servlet) to process each request and generate the response. This is called the request processing phase. The two phases are illustrated in .Figure 3-2. JSP page translation and processing phasesAs long as the JSP page remains unchanged, any subsequent request goes straight to the request processing phase ., the container simply executes the class file). When the JSP page is modified, it goes through the translation phase again before entering the request processing phase.The JSP container is often implemented as a servlet configured to handle all requests for JSP pages. In fact, these two containers—a servlet container and a JSP container—are often combined in one package under the name web container.So in a way, a JSP page is really just another way to write a servlet without having to be a Java programming wiz. Except for the translation phase, a JSP page is handled exactly like a regular servlet; it's loaded once and called repeatedly, until the server is shut down. By virtue of being an automatically generated servlet, a JSP page inherits all the advantages of a servlet described in : platform and vendor independence, integration, efficiency, scalability, robustness, and security.JSP ElementsThere are three types of JSP elements you can use: directive, action, and scripting. A new construct added in JSP is an Expression Language (EL) expression; let's call this a forth element type, even though it's a bit different than the other three.Directive elementsThe directive elements, shown in , specify information about the page itself that remains the same between requests—for example, if session tracking is required or not, buffering requirements,Table 3-1. Directive elementscomponentsJSP elements, such as action and scripting elements, are often used to work with JavaBeans components. Put succinctly, a JavaBeans component is a Java class that complies with certain coding conventions. JavaBeans components are typically used as containers for information that describes application entities, such as a customer or an order.JSP Application Design with MVCJSP technology can play a part in everything from the simplest web application, such as an online phone list or an employee vacation planner, to complex enterprise applications, such as a human resource application or a sophisticated online shopping site. How large a part JSP plays MVC was first described by Xerox in a number of papers published in the late 1980s. The key differs in each case, of course. In this section, I introduce a design model called Model-View-Controller (MVC), suitable for logic into three distinct units: the Model, the View, and the Controller. In a server application, we commonly classify the parts of the application as business logic, presentation, and request processing. Business logic is the term used for the manipulation of an application's data, such as customer, product, and order information. Presentation refers to how the application data is displayed to the user, for example, position, font, and size. And finally, request processing is what ties the business logic and presentation parts together. In MVC terms, the Model corresponds to business logic and data, the View to the presentation, and the Controller to the request processing.Why use this design with JSP? The answer lies primarily in the first two elements. Remember that an application data structure and logic (the Model) is typically the most stable part of an application, while the presentation of that data (the View) changes fairly often. Just look at all the face-lifts many web sites go through to keep up with the latest fashion in web design. Yet, the data they present remains the same. Another common example of why presentation should be separated from the business logic is that you may want to present the data in different languages or present different subsets of the data to internal and external users. Access to the data through new types of devices, such as cell phones and personal digital assistants (PDAs), is the latest trend. Each client type requires its own presentation format. It should come as no surprise, then, that separating business logic from the presentation makes it easier to evolve an application as the requirements change; new presentation interfaces can be developed without touching the business logic.This MVC model is used for most of the examples in this book. In Part II, JSP pages are used as both the Controller and the View, and JavaBeans components are used as the Model. The examples in Chapter 5 through Chapter 9 use a single JSP page that handles everything, while Chapter 10 through Chapter 14 show how you can use separate pages for the Controller and the View to make the application easier to maintain. Many types of real-world applications can be developed this way, but what's more important is that this approach allows you to examine all the JSP features without getting distracted by other technologies. In Part III, we look at other possible role assignments when JSP is combined with servlets and Enterprise JavaBeans.JSP 概览JSP是一种用于Web应用程序开发的最新的Java技术,它是成立在servlet 技术基础之上的。

Servlet和JSP文献翻译外文文献

Servlet和JSP文献翻译外文文献

毕业设计(论文)外文Servlet和JSP文献翻译附件1:外文资料翻译译文Servlet和JSP技术简述Nagle and Wiegley,Aug. 2020,953 – 958.摘要:Servlet程序在效劳器端运行,动态地生成Web页面与传统的CGI和许多其他类似CGI的技术相较,Java Servlet具有更高的效率,更易利用,功能更壮大,具有更好的可移植性,更节省投资。

关键字:JSP技术,Servlet,HTTP效劳Servlet的功能Servlets是运行在Web或应用效劳器上的Java程序,它是一个中间层,负责连接来自Web 阅读器或其他HTTP客户程序的请求和HTTP效劳器上的数据库或应用程序。

Servlet的工作是执行西门的任务,如下图。

图中间件的作用(1)读取客户发送的显式数据。

最终用户一样在页面的HTML表单中输入这些数据。

可是,数据还有可能来自applet或定制的HTTP客户程序。

(2)读取由阅读器发送的隐式请求数据。

图中显示了一条从客户端到Web效劳器的单箭头,但事实上从客户端传送到Web效劳器的数据有两种,它们别离为用户在表单中输入的显式数据,和后台的HTTP信息。

两种数据都很重要。

HTTP信息包括cookie、阅读器所能识别的媒体类型和紧缩模式等。

(3)生成结果。

那个进程可能需要访问数据库、执行RMI或EJB挪用、挪用Web效劳,或直接计算得出对应的响应。

实际的数据可能存储在关系型数据库中。

该数据库可能不睬解HTTP,或不能返回HTML 形式的结果,所有Web阅读器不能直接与数据库进行会话。

即便它能够做到这一点,为了平安上的考虑,咱们也不希望让它这么做。

对应大多数其他应用程序,也存在类似的问题。

因此,咱们需要Web中间层从HTTP流中提取输入数据,与应用程序会话,并将结果嵌入到文档中。

(4)向客户发送显式数据(即文档)。

那个文档能够用各类格式发送,包括文本(HTML或XML),二进制(GIF图),乃至能够式成立在其他底层格式之上的紧缩格式,如gzip。

jsp技术网站设计外文翻译(适用于毕业论文外文翻译+中英文对照)

jsp技术网站设计外文翻译(适用于毕业论文外文翻译+中英文对照)

Combining JSP and ServletsThe 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 exploit 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 "a preparation, run everywhere" to bring the concept of Web applications, To achieve a "one-prepared everywhere realized." And more importantly, if followed some of the principles of good design, it can be said of separating and content to create high-quality, reusable, easy to maintain and modify the application. For example, if the document in HTML embedded Java code too much (script), will lead the developed application is extremely complex, difficult to read, it is not easy reuse, but also for future maintenance and modification will also cause difficulties. In fact, CSDN the JSP / Servlet forum, can often see some questions, the code is very long, can logic is not very clear, a large number of HTML and Java code mixed together. This is the random development of the defects.Early dynamic pages mainly CGI (Common Gateway Interface, public 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 programming, 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 a good portability, they have been many people believe that the future is the most dynamic site of the future development of technology.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 generate 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 of technology, reduce the server costs. Servlet handling of the request process is this: When received from the client's request, calling service methods, the method of Servlet arrival of the first judgement is what type of request (GET / POST / HEAD…), then calls the appropriate treatment (DoGet / doPos t / doHead…) and generate a response.Although such a complex, in fact, simply said to Servlet is a Java class. And the general category of the difference 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 the safety of the management, use JDBC access the database and cross-platform capability. Moreover, Servlet using thread, and can develop more efficient Web applications.JSP technology is a key J2EE technology, 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 application 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 static HTML files can be placed, do not have to compile, do not have to pack, do not have to ClassPath settings, you can visit as ordinary Web It did visit, the server will automatically help you to do other work.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 need 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 handle. Servlet engine of this type loading, handling requests from customers, and the results returned to the customer, as shown below:Figure 1: Calling the process of JSP pagesAfter another visit this 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 process, 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 such a visit would not.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 clearly 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.Servlets, Filters, and ListenersA 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 interfaces 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 extensions and utility classes.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 interface defines the methods used by the web container to manage and interact with theservlet. A servlet for processing HTTP requests typically extends the javax.servlet.http.HttpServlet class. This class implements the Servlet interface and provides additional methods suitable for HTTP processing.Servlet LifecycleThe web container manages all aspects of the servlet's lifecycle. It creates 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 the servlet lifecycle.Besides the doGet( ) and doPost( ) methods, there are methods corresponding to the other HTTP methods: doDelete( ), doHead( ), doOptions( ), doPut( ), and doTrace( ). Typically 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 in a web application.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 requests 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 only in the init( ) and destroy( ) methods, and just read them in the request processing methods.Compiling and Installing a ServletTo compile a servlet, you must first ensure that 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 common/lib directory. On a Windows platform, you include the JAR file in the CLASSPATH.. Reading a RequestOne of the arguments passed to the doGet( ) and doPost( ) methods is an object that implements the HttpServletRequest interface. This interface defines methods that provide access to a wealth of information about the request.Generating a ResponseBesides 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 stream for the response body. It also defines methods for setting the response status code and headers.Using Filters and ListenersThe servlet specification defines two component 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 afraid you'reout of luck.FiltersA filter is a component that can intercept a request targeted for a servlet, JSP page, or static page, as well as the 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 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 body if the Accept-Language request header indicates that the client can handle a compressed response.A filter can be applied to either 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. ListenersListeners allow your 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 object 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 listeners for servlet context and session lifecycle events as well as session activation and passivation events (used by a container that temporarily saves session state to disk or migrates a session to another server). A newsession attribute event listener also makes it possible to deal with attribute binding events for all sessions in one place, instead of placing individual listener objects in each session.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 interfaces. 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.Initializing Shared Resources Using a ListenerBeans like this typically need to be initialized before they can be used. For instance, they may need a reference to a database or some 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 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 on the assumption that the resources are already initialized and available. An application lifecycle listener is a perfect tool for this type of resource initialization. This type of listener implements the javax.servlet.ServletContextListener interface, with methods called by the container when the application starts and when it shuts down.Picking the Right Component Type for Each TaskThe Project Billboard application introduced is a fairly complex application. Half thepages are pure controller and business logic processing, it accesses a database to authenticate users, and most pages 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 evolves, it may become hard to maintain as a pure JSP application. It's easy to forget to include the access control code in new pages.This is clearly an application that can benefit from using a combination of JSP pages and the component types defined 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:●Database access should be abstracted, to avoid knowledge of a specific dataschema or database engine in more than one part of the application: beans in therole of Model can be used to accomplish this.●The database access beans must be made available to all other parts of theapplication when it starts: an application lifecycle event listener is the perfectcomponent type for this task.●Only authenticated users must be allowed to use the application: a filter canperform access control to satisfy this requirement.●Request processing is best done with Java code: a servlet, acting as the Controller,fits the bill.●It must be easy to change the presentation: this is where JSP shines, acting as theView.Adding servlets, listeners, and filters to the mix minimizes the need for complex logic in the JSP pages. Placing all this code in Java classes instead makes it possible to use a regular Java compiler and debugger to fix potential problems.Centralized Request Processing Using a ServletWith 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 outcome 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 also provide services such as input validation, I18N preparations, and in general, encourage a more streamlined approach to request handling.When you use a servlet as a Controller, you must deal with the following basic requirements:●All requests for processing must be passed to the single Controller servlet.●The servlet must be able to distinguish requests for different types of processing.Here are other features you will want support for, even though they may not be requirements for all applications:● A strategy for extending the application to support new types of processingA mechanism for changing the page flow of the application without modifyingcode.Mapping Application Requests to the ServletThe first requirement for 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 URI 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 today, even though it's not formally defined in the servlet specification.将Servlet和JSP组合使用Servlet和JSP技术是用Java开发服务器端应用的主要技术,是开发商务应用表示端的标准。

(完整版)外文翻译---JSP技术与主流JAVA+EE开源框架(SSH)技术简介

(完整版)外文翻译---JSP技术与主流JAVA+EE开源框架(SSH)技术简介

中文 3170 字本科毕业设计外文翻译JSP technology and mainstream open- source framework for JAVA EE院(系、部)名称:工商管理学院专业名称:信息管理与信息系统学生姓名:学生学号:指导教师:2012年5月18日JSP technology and mainstream open-source framework forJAVAEE1. JSP ProfileJSP (Java Server Pages) is initiated by Sun Microsystems, Inc., with many companies to participate in the establishment of a dynamic web page technical standards. JSP technology somewhat similar to ASP technology, it is in the traditional HTML web page document (*.htm, *. html) to insert the Java programming paragraph (Scriptlet) and JSP tag (tag), thus JSP documents (*.jsp). Using JSP development of the Web application is cross-platform that can run on Linux, is also available for other operating systems.JSP technology to use the Java programming language prepared by the category of XML tags and scriptlets, to produce dynamic pages package processing logic. Page also visit by tags and scriptlets exist in the services side of the resources of logic. JSP page logic and web page design and display separation, support reusable component-based design, Web-based application development is rapid and easy.Web server in the face of visits JSP page request, the first implementation of the procedures of, and then together with the results of the implementation of JSP documents in HTML code with the return to the customer. Insert the Java programming operation of the database can be re-oriented websites, in order to achieve the establishment of dynamic pages needed to function.JSP and Java Servlet, is in the implementation of the server, usually returned to the client is an HTML text, as long as the client browser will be able to visit.JSP 1.0 specification of the final version is launched in September 1999, December has introduced 1.1 specifications. At present relatively new is JSP1.2 norms, JSP2.0 norms of the draft has also been introduced.JSP pages from HTML code and Java code embedded in one of the components. The server was in the pages of client requests after the Java code and then will generate the HTML pages to return to the client browser. Java Servlet JSP is the technical foundation and large-scale Web application development needs of Java Servlet and JSP support to complete. JSP with the Java technology easy to use, fully object-oriented, and a platform-independent and secure mainly for all the characteristics of the Internet. JSP technology strength: (1) time to prepare, run everywhere. At this point Java better than PHP, in addition to systems, the code not to make any changes.(2) the multi-platform support. Basically on all platforms of any development environment, in any environment for deployment in any environment in the expansion. Compared ASP / PHP limitations are obvious. (3) a strong scalability. From only a small Jar documents can run Servlet / JSP, to the multiple servers clustering and load balancing, to multiple Application for transaction processing, information processing, a server to numerous servers, Java shows a tremendous Vitality. (4) diver sification and powerful development tools support. This is similar to the ASP, Java already have many very good development tools, and many can be free, and many of them have been able to run on a variety of platforms under. JSP technology vulnerable:(1) and the same ASP, Java is the advantage of some of its fatal problem. It is precisely because in order to cross-platform functionality, in order to extreme stretching capacity, greatly increasing the complexity of the product. (2) Java's speed is class to complete the permanent memory, so in some cases by the use of memory compared to the number of users is indeed a "minimum cost performance." On the other hand, it also needs disk space to store a series of. Java documents and. Class, as well as the corresponding versions of documents.2. J2EE Development FrameworkJava2 Enterprise Edition middleware unified ideology played a significant role. For example, J2EE for distributed transaction management, directory services and messaging services provide a standard programming interface. J2EE-based -Java2Standard Edition (J2SE), successfully access for Java provides a standard relational database.But, as this article "J2EE programming of the lack of support", as mentioned,J2EEplatform does not provide a satisfactory application programming model. Sun and some of the major application server vendors wanted to use the development tools to reduce the complexity of J2EE development, but these tools are no other outstanding JAVA development tools, which have advanced refactoring tools, and. NET platform compared, J2EE tool support appeared to be very inferior.Many J2EE development tools automatically generate the code for the same complex as the tools themselves. In many small-scale J2EE open source community developers chose another way of development - some can be difficult to reduce the development of J2EE development framework, the more popular such as: Struts, Hibernate, and Spring Framework, J2EE project types in many of today they play an important the role.2.1 Spring FrameworkThe Spring Framework is an open source application framework for the Java platform.The first version was written by Rod Johnson who released the framework with the publication of his book Expert One-on-One J2EE Design and Development in October 2002. The framework was first released under the Apache 2.0 license in June 2003.The first milestone release, 1.0, was released in March 2004, with further milestone releases in September 2004 and March 2005. The Spring 1.2.6 framework won a Jolt productivity award and a JAX Innovation Award in 2006. Spring 2.0 was released in October 2006, and Spring 2.5 in November 2007. In December 2009 version 3.0 GA was released. The current version is 3.0.5.The core features of the Spring Framework can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. Although the Spring Framework does not impose any specific programming model, it has become popular in the Java community as an alternative to, replacement for, or even addition to the Enterprise JavaBean (EJB) model.Modules The Spring Framework comprises several modules that provide arange of services:Inversion of Control container: configuration of application components and lifecycle management of Java objectsAspect-oriented programming: enables implementation of cross-cutting routinesData access: working with relational database management systems on theJava platform using JDBC and object-relational mapping toolsTransaction management: unifies several transaction management APIs and coordinates transactions for Java objectsModel-view-controller: an HTTP and Servlet-based framework providinghooks for extension and customizationRemote Access framework: configurative RPC-style export and import of Java objects over networks supporting RMI, CORBA and HTTP-based protocolsincluding web services (SOAP)Convention-over-configuration: a rapid application development solution forSpring-based enterprise applications is offered in the Spring model.Batch processing: a framework for high-volume processing featuring reusablefunctions including logging/tracing, transaction management, job processing statistics, job restart, skip, and resource managementAuthentication and authorization: configurable security processes that supporta range of standards, protocols, tools and practices via the Spring Security sub-project (formerly Acegi Security System for Spring).Remote Management: configurative exposure and management of Java objectsfor local or remote configuration via JMXMessaging: configurative registration of message listener objects for transparent message consumption from message queues via JMS, improvement of message sending over standard JMS APIsTesting: support classes for writing unit tests and integration testsInversion of Control container Central to the Spring Framework is its Inversion of Control container, which provides a consistent means of configuring and managingJava objects using callbacks. The container is responsible for managing object lifecycles: creating objects, calling initialization methods, and configuring objects by wiring them together.Objects created by the container are also called Managed Objects or Beans. Typically, the container is configured by loading XML files containing Bean definitions which provide the information required to create the beans.Objects can be obtained by means of Dependency lookup or Dependency injection. Dependency lookup is a pattern where a caller asks the container object for an object with a specific name or of a specific type. Dependency injection is a pattern where the container passes objects by name to other objects, via either constructors, properties, or factory methods.In many cases it's not necessary to use the container when using other parts of the Spring Framework, although using it will likely make an application easier to configure and customize. The Spring container provides a consistent mechanism to configure applications and integrates with almost all Java environments, from small-scale applications to large enterprise applications.The container can be turned into a partially-compliant EJB3 container by means of the Pitchfork project. The Spring Framework is criticized by some as not being standards compliant. However, Spring Source doesn't see EJB3 compliance as a major goal, and claims that the Spring Framework and the container allow for more powerful programming models.Aspect-oriented programming framework The Spring Framework has its ownAOP framework which modularizes cross-cutting concerns in aspects. The motivationfor creating a separate AOP framework comes from the belief that it would bepossible to provide basic AOP features without too much complexity in either design, implementation, or configuration. The SAOP framework also takes full advantage ofthe Spring Container.The Spring AOP framework is interception based, and is configured at runtime. This removes the need for a compilation step or load-time weaving. On the other hand, interception only allows for public or protected method execution on existing objects ata join point.Compared to the AspectJ framework, Spring AOP is less powerful but also less complicated. Spring 1.2 includes support to configure AspectJ aspects in the container. Spring 2.0 added more integration with AspectJ; for example, the pointcut language is reused and can be mixed with SpAOP-based aspects. Further, Spring 2.0 added a Spring Aspects library which uses AspectJ to offer common Spring features such as declarative transaction management and dependency injection via AspectJ compile-time or load-time weaving. Spring Source also uses AspectJ for AOP in other Spring projects such as Spring Roo and Spring Insight, with Spring Security also offering an AspectJ-based aspect library.Spring AOP has been designed to make it able to work with cross-cutting concerns inside the Spring Framework. Any object which is created and configured by the container can be enriched using Spring AOP.The Spring Framework uses Spring AOP internally for transaction management, security, remote access, and JMX.Since version 2.0 of the framework, Spring provides two approaches to theAOP configuration:schema-based approach.@AspectJ-based annotation style.The Spring team decided not to introduce new AOP-related terminology; therefore, in the Spring reference documentation and API, terms such as aspect, join point, advice, pointcut, introduction, target object (advised object), AOP proxy, and weaving all have the same meanings as in most other AOP frameworks (particularly AspectJ).Data access framework Spring's data access framework addresses common difficulties developers face when working with databases in applications. Support is provided for all popular data access frameworks in Java: JDBC, iBatis, Hibernate, JDO, JPA, Oracle Top Link, Apache OJB, and Apache Cayenne, among others.For all of these supported frameworks, Spring provides these features:Resource management - automatically acquiring and releasing database resources Exception handling - translating data access related exception to a Spring data access hierarchyTransaction participation - transparent participation in ongoing transactionsResource unwrapping - retrieving database objects from connection pool wrappers Abstraction for BLOB and CLOB handlingAll these features become available when using Template classes provided by Spring for each supported framework. Critics say these Template classes areintrusive and offer no advantage over using (for example) the Hibernate API.. directly.In response, the Spring developers have made it possible to use the Hibernate andJPA APIs directly. This however requires transparent transaction management, as application code no longer assumesthe responsibility to obtain and close database resources, and does not support exception translation.Together with Spring's transaction management, its data access framework offers a flexible abstraction for working with data access frameworks. The Spring Framework doesn't offer a common data access API; instead, the full power of the supported APIs is kept intact. The Spring Framework is the only framework available in Java which offers managed data access environments outside of an application server or container. While using Spring for transaction management with Hibernate, the following beans may have to be configured.Transaction management framework Spring's transaction management framework brings an abstraction mechanism to the Java platform. Its abstraction is capable of working with local and global transactions (local transaction does not require an application server).working with nested transactions working with transaction safe points working in almost all environments of the Java platformIn comparison, JTA only supports nested transactions and global transactions, and requires an application server (and in some cases also deployment of applications in an application server).The Spring Framework ships a Platform Transaction Manager for a number of transaction management strategies:Transactions managed on a JDBC ConnectionTransactions managed on Object-relational mapping Units of Work Transactionsmanaged via the JTA Transaction Manager and User TransactionTransactions managed on other resources, like object databasesNext to this abstraction mechanism the framework also provides two ways ofadding transaction management to applications:Programmatically, by using Spring's Transaction TemplateConfiguratively, by using metadata like XML or Java 5 annotationsTogether with Spring's data access framework — which integrates the transaction management framework — it is possible to set up a transactional system through configuration without having to rely on JTA or EJB. The transactional framework also integrates with messaging and caching engines.The BoneCP Spring/Hibernate page contains a full example project of Springused in conjunction with Hibernate.Model-view-controller framework The Spring Framework features its own MVC framework, which wasn't originally planned. The Spring developers decided to writetheir own web framework as a reaction to what they perceived as the poor design ofthe popular Jakarta Struts web framework, as well as deficiencies in other available frameworks. In particular, they felt there was insufficient separation between the presentation and request handling layers, and between the request handling layer andthe model.Like Struts, Spring MVC is a request-based framework. The framework definesstrategy interfaces for all of the responsibilities which must be handled by a modernrequest-based framework. The goal of each interface is to be simple and clear so thatit's easy for Spring MVC users to write their own implementations if they so choose.MVC paves the way for cleaner front end code. All interfaces are tightly coupled tothe Servlet API. This tight coupling to the Servlet API is seen by some as a failure onthe part of the Spring developers to offer a high-level abstraction for web-basedapplications [citation needed]. However, this coupling makes sure that the features ofthe Servlet API remain available to developers while offering a high abstractionframework to ease working with said API.The Dispatcher Servlet class is the front controller of the framework and isresponsible for delegating control to the various interfaces during the executionphases of a HTTP request.The most important interfaces defined by Spring MVC, and their responsibilities,are listed below:Handler Mapping: selecting objects which handle incoming requests (handlers)based on any attribute or condition internal or external to those requests Handler Adapter: execution of objects which handle incoming requests Controller:comes between Model and View to manage incoming requests andredirect to proper response. It essentially is like a gate that directs the incoming information. It switches between going into model or view.View: responsible for returning a response to the client. It is possible to go straightto view without going to the model part. It is also possible to go through all three.View Resolver: selecting a View based on a logical name for the view (use isnot strictly required)Handler Interceptor: interception of incoming requests comparable but notequal to Servlet filters (use is optional and not controlled by Dispatcher Servlet).Locale Resolver: resolving and optionally saving of the locale of an individualuserMultipart Resolver: facilitate working with file uploads by wrapping incoming requestsEach strategy interface above has an important responsibility in the overall framework. The abstractions offered by these interfaces are powerful, so to allow for a set of variations in their implementations, Spring MVC ships with implementations ofall these interfaces and together offers a feature set on top of the Servlet API. However, developers and vendors are free to write other implementations. Spring MVC uses the Java java.util.Map interface as a data-oriented abstraction for the Model where keys are expected to be string values.The ease of testing the implementations of these interfaces seems one important advantage of the high level of abstraction offered by Spring MVC. Dispatcher Servlet is tightly coupled to the Spring Inversion of Control container for configuring the web layers of applications. However, applications can use other parts of the Spring Framework— including the container—and choose not to use Spring MVC.Because Spring MVC uses the Spring container for configuration and assembly, web-based applications can take full advantage of the Inversion of Control features offered by the container. This framework allows for multi layering. It allows for the code to be broken apart and used more effectively in segments, while allowing the mvc to do the work. It allows for back and forth transmission of data. Some designs are more linear without allowing a forward and backward flow of information. MVC is designed very nicely to allow this interaction. It is used more than just in web design, but also incomputer programming. It's very effective for web design. Basically allows a checks and balance system to occur where before being viewed it can be properly examined.Remote access framework Spring's Remote Access framework is an abstraction for working with various RPC-based technologies available on the Java platform both for client connectivity and exporting objects on servers. The most important feature offered by this framework is to ease configuration and usage of these technologiesas much as possible by combining Inversion of Control and AOP.The framework also provides fault-recovery (automatic reconnection after connection failure) and some optimizations for client-side use of EJB remotestateless session beans.Convention-Over-Configuration Rapid Application Development Spring Roo is Spring's Convention-over-configuration solution for rapidly building applications in Java. It currently supports Spring Framework, Spring Security and Spring Web Flow, with remaining Spring projects scheduled to be added in due course. Roo differs from other rapid application development frameworks by focusing on:The following diagram represents the Spring Framework Architecture2.2 Struts IntroductionApache Struts From Wikipedia, the free encyclopedia Jump to: navigation, search "Struts" redirects here. For the structural component, see strut. For other meanings, see strut (disambiguation).This article includes a list of references, but its sources remain unclear because it has insufficient inline citations.Please help to improve this article by introducing more precise citationswhere appropriate.Apache Struts is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model-view-controller (MVC) architecture. It was originally created by Craig McClanahan and donated to the Apache Foundation in May, 2000. Formerly located under the Apache Jakarta Project and known as Jakarta Struts, it became a top level Apache project in 2005.Design goals and over view in a standard Java EE web application, the client will typically submit information to the server via a web form. The information is then either handed over to a Java Servlet that processes it, interacts with a database and producesan HTML-formatted response, or it is given to a Java Server Pages (JSP) documentthat inter mingles HTML and Java code to achieve the same result. Both approachesare often considered inadequate for large projects because they mix application logic with presentation and make maintenance difficult.The goal of Struts is to separate the model (application logic that interacts with a database) from the view (HTML pages presented to the client) and the controller (instance that passes information between view and model). Struts provides the controller (a servlet known as ActionServlet) and facilitates the writing of templates for the view or presentation layer (typically in JSP, but XML/XSLT and Velocity are also supported). The web application programmer is responsible for writing the model code, and for creating a central configuration file struts-config.xml that binds together model, view and controller.Requests from the client are sent to the controller in the form of "Actions" defined in the configuration file; if the controller receives such a request it calls the corresponding Action class that interacts with the application-specific model code. The model code returns an "ActionForward", a string telling the controller what output page to send to the client. Information is passed between model and view in the form of special JavaBeans. A powerful custom tag library allows it to read and write the content of these beans from the presentation layer without the need for any embedded Java code.Struts is categorized as a request-basedweb application framework Struts also supports internationalization by web forms, and includes a template mechanism called "Tiles" that (for instance) allows the presentation layer to be composed from independent header, footer, and content components History The Apache StrutsProject was launched in May 2000 by Craig R. McClanahan to provide a standard MVC framework to the Java community. In July 2001, version 1.0 was released.Struts2 was originally known as WebWork 2. After having been developed separately for several years, WebWork and Struts were combined in 2008 to create Struts 2.Competing MVC frameworks Although Struts is a well-documented, mature, and popular framework for building front ends to Java applications, there are other frameworks categorized as "lightweight" MVC frameworks such as Spring MVC, Stripes, Wicket, Play!, and Tapestry. The new XForms standards and frameworksmay also be another option to building complex web Form validations with Struts inthe future.The WebWork framework spun off from Apache Struts aiming to offer enhancementsand refinements while retaining the same general architecture of the original Struts framework. However, it was announced in December 2005 that Struts would re-merge with WebWork. WebWork 2.2 has been adopted as Apache Struts2, which reached its first full release in February 2007.In 2004 Sun launched an addition to the Java platform, called Java Server Faces (JSF). Aside from the original Struts framework, the Apache project previously offered a JSF-based framework called Shale, which was retired in May 2009.In this section we will discuss about Architecture. Struts is famous for its robust Architecture and it is being used for developing small and big software projects.Struts is an open source framework used for developing J2EE web applications using Model View Controller (MVC) design pattern. It uses and extends the Java Servlet API to encourage developers to adopt an MVC architecture. Struts framework provides three key components:A request handler provided by the application developer that is used to mappedto a particular URI. A response handler which is used to transfer the control to another resource which will be responsible for completing the response.A tag library which helps developers to create the interactive form basedapplications with server pages Learn Struts 2.2.1 framework Struts provides you thebasic infrastructure infra structure for implementing MVC allowing the developers to concentrate on the business logic The main aim of the MVC architecture is to separatethe business logic and application data from the presentation data to the user.Here are the reasons why we should use the MVC design pattern They are resuable: When the problems recurs, there is no need to invent a new solution, we just have to follow the pattern and adapt it as necessary. They are expressive: By using the MVC design pattern our application becomes more expressive.1). Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware aboutthe presentation data and how that data will be displayed to the browser.2). View: The view represents the presentation of the application. The view object refers to the model. It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic. It remains same if thereis any modification in the business logic. In other words, we can say that it is the responsibility of the view's to maintain the consistency in its presentation when the model changes.3). Controller: Whenever the user sends a request for something then it alwaysgo through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In GUIs, the views and the controllers often work very closely together.The Struts framework is composed of approximately 300 classes and interfaces which are organized in about 12 top level packages. Along with the utility and helper classes framework also provides the classes and interfaces for working with controller and presentation by the help of the custom tag libraries. It is entirely on to us which model we want to choose. The view of the Struts architecture is given below: The Struts Controller Components Whenever a user request for something, then the request is handled by the Struts Action Servlet. When the ActionServlet receives the request, it intercepts the URL and based on the Struts Configuration files, it gives the handling of the request to the Action class. Action class is a part of the controller and is responsible for communicating with the model layer.The Struts View Components: The view components are responsible for presenting information to the users and accepting the input from them. They are responsible for displaying the information provided by the model components. Mostly we use the Java Server Pages (JSP) for the view presentation. To extend the capability of the view we can use the Custom tags, java script etc.The Struts model component The model components provides a model of the business logic behind a Struts program. It provides interfaces to databases or back- ends systems. Model components are generally a java class. There is not any such defined format for a Model component, so it is possible for us to reuse Java code which are written for other projects. We should choose the model according to our client requirement.2.3 Hibernate FrameWorkHibernate is an object-relational mapping (ORM) library for the Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database. Hibernate solves object-relational impedance mismatch problems。

JSP及其WEB技术毕业设计论文中英文资料对照外文翻译文献

JSP及其WEB技术毕业设计论文中英文资料对照外文翻译文献

中英文资料对照外文翻译文献JSP及其WEB技术. 1 JSP简介JSP(JavaServer Pages)是一种基于Java的脚本技术。

是由Sun Microsystems 公司倡导、许多公司参与一起建立的一种动态网页技术标准。

JSP技术有点类似ASP 技术,它是在传统的网页HTML文件(*.htm,*.html)中插入Java程序段(Scriptlet)和JSP标记(tag),从而形成JSP文件(*.jsp)。

用JSP开发的Web应用是跨平台的,即能在Linux下运行,也能在其他操作系统上运行。

在JSP 的众多优点之中,其中之一是它能将 HTML 编码从 Web 页面的业务逻辑中有效地分离出来。

用 JSP 访问可重用的组件,如 Servlet、JavaBean 和基于 Java 的 Web 应用程序。

JSP 还支持在Web 页面中直接嵌入 Java 代码。

可用两种方法访问 JSP 文件:浏览器发送 JSP 文件请求、发送至 Servlet 的请求。

JSP技术使用Java编程语言编写类XML的tags 和scriptlets,来封装产生动态网页的处理逻辑。

网页还能通过tags和scriptlets 访问存在于服务端的资源的应用逻辑。

JSP将网页逻辑与网页设计和显示分离,支持可重用的基于组件的设计,使基于Web的应用程序的开发变得迅速和容易。

Web服务器在遇到访问JSP网页的请求时,首先执行其中的程序段,然后将执行结果连同JSP文件中的HTML代码一起返回给客户。

插入的Java程序段可以操作数据库、重新定向网页等,以实现建立动态网页所需要的功能。

JSP与Java Servlet一样,是在服务器端执行的,通常返回该客户端的就是一个HTML文本,因此客户端只要有浏览器就能浏览。

JSP页面由HTML代码和嵌入其中的Java代码所组成。

服务器在页面被客户端请求以后对这些Java代码进行处理,然后将生成的HTML页面返回给客户端的浏览器。

毕业设计(论文)外文参考资料及译文

毕业设计(论文)外文参考资料及译文

英文原文:Java is a simple, object-oriented, distributed, interpreted, robust security, structure-neutral, portable, high performance, multithreaded dynamic language. The main advantage of Java language, Java applications across hardware platforms and operating systems for transplant - this is because the JVM is installed on each platform can understand the same byte code. Java language and platform scalability is very strong. At the low end, Java language is the first open standards technology support enterprise one, support the use of XML and Web service can not stride business lines to share information and applications Cheng Xu.There are three versions of Java platform, which makes software developers, service providers and equipment manufacturers can target specific market development:1. Java SE form applications. Java SE includes support for Java Web services development classes, and for the Java Platform, Enterprise Edition (Java EE) to provide a basis. Most Java developers use Java SE 5, also known as Java 5.0 or "Tiger".2. Java EE formerly known as J2EE. Enterprise Edition to help develop and deploy portable, robust, scalable and secure server-side Java applications. Java SE Java EE is built on the foundation, which provides Web services, component model, management and communication API, can be used to achieve enterprise-class service-oriented architecture and Web 2.0 applications.3. Java ME formerly known as J2ME. Java ME devices in mobile and embedded applications running on a robust and flexible environment. Java ME includes flexible user interfaces, robust security model, and many built-in network protocols and networking that can be dynamically downloaded and extensive support for offline applications. Java ME-based application specification only write once and can be used in many devices and can use the native features of each device.Java language is simple. Java language syntax and the C language and C ++ language is very close, Java discarded the C++, rarely used, hard to understand the characteristics, such as operator overloading, multiple inheritance, the mandatory automatic type conversion. Java language does not use pointers, and provides automated waste collection. Java is an object-oriented language. Java language provides classes, interfaces and inheritance of the original language, for simplicity, only supports single inheritance between classes, but support multiple inheritance between interfaces and support classes and interfaces to achieve between the mechanism (keyword implements) . Java language fully supports dynamic binding, and C ++ language used only for dynamic binding of virtual functions. In short, Java language is a pure object-oriented programming language. Java language is distributed. Java language support for Internet application development, Java's RMI (remote method activation) mechanism is also an important means of developing distributed applications. Java language is robust. Java's strong type system, exception handling, automated waste collection is an important guarantee robust Java programs. Java language is safe. Java is often used in network environment, this, Java provides a security mechanism to prevent malicious code attacks.Java language is portable. This portability comes from the architecture neutrality. Java system itself is highly portable. Java language is multi-threaded. In the Java language, the thread is a special object, it must Thread class or the son (Sun) class to create. Java language support simultaneous execution of multiple threads, and provide synchronization mechanisms between threads (keyword synchronized).Java language features make Java an excellent application of unparalleled robustness and reliability, which also reduced application maintenance costs. Java on the full support of object technology and Java Platform API embedded applications to reduce development time and reduce costs. Java's compile once, run everywhere feature can make it anywhere available to provide an open architecture and multi-platform, low-cost way of transmitting information between. Hibernate Hibernate is a lightweight JDBC object package. It is an independent object persistence framework, and the App Server, and EJB is no necessary link. Hibernate can use JDBC can be used in any occasion, such as Java application, database access code, DAO interface implementation class, or even access the database inside a BMP code. In this sense, Hibernate, and EB is not a category of things that did not exist either-or relationship.Hibernate and JDBC is a closely related framework, the Hibernate and JDBC driver compatibility, and databases have some relationship, but the Java program and use it, and the App Server does not have any relationship, there was no compatibility issues. 1614Hibernate provides two Cache, first-level cache is a Session-level cache, which cache belongs to the scope of services. This level of cache by the hibernate managed without the need for intervention under normal circumstances; second-level cache is SessionFactory-level cache, it belongs to the process of range or scope of the cache cluster. This level of cache can be configured and changed, and can be dynamically loaded and unloaded. Hibernate query results also provide a query cache, it depends on the second level cache.When an application called Session's save (), update (), saveOrUpdate (), get () or load (), and the query interface call list (), iterate () or filter () method, if the Session cache does not exist a corresponding object, Hibernate will put the object to the first level cache. When cleaning the cache, Hibernate objects according to the state of the cache changes to synchronize update the database. Session for the application provides two methods of managing the cache: evict (Object obj): removed from the cache parameters of the specified persistent object. clear (): Empty the cache of all persistent objects.Hibernate second-level cache strategy general process is as follows:1) The condition when a query is always issued a select * from table_name where .... (Select all fields) such as SQL statement to query the database, an access to all of the data object.2) all the data objects to be placed under the ID to the second level cache.3) When the Hibernate object-based ID to access the data, the first check from the Session a cache; finding out, if the configuration of the secondary cache, then the secondary cache from the investigation; finding out, and then query the database, the results in accordance with the ID into the cache.4) remove, update and increase the time data, while updating the cache. Hibernate second against the conditions of the Query Cache.Hibernate object-relational mapping for the delay and non-delay object initialization. Non-lazy when reading an object and the object will be all read out together with other objects. This sometimes results in hundreds (if not thousands of words) select statement when reading the object implementation. This problem sometimes occurs when using the two-way relationship, often leading to the databases to be read during the initialization phase out. Of course, you can take the trouble to examine each object and other objects of Guanxi, and to the most expensive of the Shan Chu, but in the last, we may therefore lose Le ORM tool this Xiangzai obtained Bian Li.A cache and secondary cache of comparison: the first level cache second level cache data stored in the form of interrelated persistent objects the object of bulk data cache range of the scope of services, each transaction has a separate first-level cache process range or scope of the cluster, the cache is the same process or cluster to share on all matters within the concurrent access policies because each transaction has a separate first-level cache, concurrency problem does not occur without the need to provide concurrent access policy will be a number of matters simultaneous access to the same second-level cache data, it is necessary to provide appropriate concurrent access policies, to ensure that a particular transaction isolation level data expiration policies did not provide data expiration policies. Object in a cache will never expire, unless the application explicitly clear the cache or clear a specific object must provide data expiration policies, such as memory cache based on the maximum number of objects, allowing objects in the cache of the most a long time, and allowing the object in the cache the longest idle time of physical memory and hard disk memory storage medium. First of all bulk data objects stored in the memory-based cache, when the number of objects in memory to data expiration policy specified limit, the remaining objects will be written on the hard disk cache. Caching software implementation of the Hibernate Session is included in the realization of the cache provided by third parties, Hibernate provides only a cache adapter (CacheProvider). Used to plug into a particular cache in Hibernate. Way cache enabled applications by as long as the Session interface implementation save, update, delete, data loading and query the database operations, Hibernate will enable first-level cache, the data in the database in the form of an object copied to the cache For batch updates and bulk delete operations, if you do not want to enable first-level cache, you can bypass the Hibernate API, JDBC API directly to perform that operation. Users can type in a single class or a single set of second-level cache size on the configuration. If the instance of the class are frequently read but rarely modified, you can consider using a second-level cache. Only for a class or set of second-level cache is configured, Hibernate will run when an instance of it to the second-level cache. User management means the first level cache of physical media for the memory cache, because the memory capacity is limited, must pass the appropriate search strategies and retrieval methods to limit the number of objects loaded. Session of the evit () method can explicitly clear the cache a specific object, but this method is not recommended. Second-level cache memory andthe physical media can be a hard disk, so the second-level cache can store large amounts of data, data expiration policy maxElementsInMemory property values can control the number of objects in memory. Second-level cache management mainly includes two aspects: Select to use the second-level cache of persistent classes, set the appropriate concurrency strategy: Select the cache adapter, set the appropriate data expiration policies.One obvious solution is to use Hibernate's lazy loading mechanism provided. This initialization strategy is only invoked in an object-to-many or many to many relationship between its relationship only when read out of the object. This process is transparent to the developer, and only had a few requests for database operations, it will be more obvious performance have open. This will be by using the DAO pattern abstracts the persistence time of a major problem. Persistence mechanisms in order to completely abstract out all of the database logic, including open or closed session, can not appear in the application layer. The most common is the realization of the simple interface of some DAO implementation class to encapsulate the database logic completely. A fast but clumsy solution is to give up DAO mode, the database connection logic to add the application layer. This may be an effective small applications, but in large systems, this is a serious design flaw, preventing the system scalability.Struts2Struts2 is actually not a stranger to the Web frameworks, Struts2 is Webwork design ideas as the core, absorb Struts1 advantages, so that the Struts2 is the product of the integration Struts1 and Webwork.MVC Description: Struts2 WebWork is compatible with the MVC framework Struts1 and since, that the MVC framework on the MVC framework will have to make a brief, limited to a brief, if want to learn more about MVC can view the related knowledge document, or to find a Struts1 books, I believe the above is not rare on the length of MVC. Closer to home, in fact, Java the present situation of these frameworks, its ultimate goal is to contact coupling, whether Spring, Hibernate or the MVC framework, are designed to increase contact with coupling reuse. MVC contact with the coupling between View and Model. MVC consists of three basic parts: Model, View and Controller, these three parts work together to minimize the coupling to increase the scalability of the program and maintainability. Various parts of the implementation technology can be summarized as follows:1) Model: JavaBean, EJB's EntityBean2) View: JSP, Struts in TagLib3) Controller: Struts the ActionServlet, ActionTo sum up the advantages of MVC mainly about aspects:1) corresponds to multiple views can be a model. By MVC design pattern, a model that corresponds to multiple views, you can copy the code and the code to reduce the maintenance amount, if model changes, but also easy to maintain2) model the data returned and display logic separate. Model data can be applied to any display technology, for example, use the JSP page, Velocity templates, or directly from Excel documents, etc.3) The application is separated into three layers, reducing the coupling between the layers, providing application scalability4) The concept of layers is also very effective, because it put the different models and different views together, to complete a different request. Therefore, the control layer can be said to include the concept of user requests permission5) MVC more software engineering management. Perform their duties in different layers, each layer has the same characteristics of the components is beneficial tool by engineering and production management of program codeStruts2 Introduction: Struts2 Struts1 development appears to come from, but in fact Struts1 Struts2 and design ideas in the framework of the above is very different, Struts2 WebWork's design is based on the core, why not follow the Struts1 Struts2 design ideas After all, Struts1 in the current enterprise applications market is still very big in the, Struts1 some shortcomings:1) support the performance of a single layer2) coupled with the Servlet API serious, this could be the Execute method from the Action Statement which you can see them3) The code depends Struts1 API, there are invasive, this can be written when the Action class and look out FormBean, Action Struts in Action class must implement The reason for Struts2 WebWork's design for the core point is the recent upward trend of WebWork and play WebWork not Struts1 above those shortcomings, more MVC design ideas, and more conducive to reuse the code. Based on the above description can be read out, Struts2 architecture and architecture Struts1 very different, Struts1 is to use the ActionServlet as its central processor, Struts2 is using an interceptor (FilterDispatcher) as its central processor, so One benefit is to make Action class and Servlet API was isolated.Struts2 simple process flow is as follows:1) browser sends a request2) the processor to find the corresponding file under struts.xml the Action class to process the request3) WebWork interceptor chain applications automatically request common functions, such as: WorkFlow, Validation functions4) If Struts.xml Method configuration file parameters, then call the corresponding Action Method parameters in the Method class method, or call the Execute method to deal with common user request5) Action class method returns the results of the corresponding response to the browserStruts2 and Struts1 contrast:1) Action class impleme achieve the time to achieve any classes and interfaces, while providing a ActionSupport class Struts2, however, not required.2) Struts1 the Action class is the singleton pattern, must be designed into the thread-safe, Struts2 was generated for each request for an instance3) Struts1 the Action class dependence and the Servlet API, execute the method from its signature can be seen, execute method has two parameters Servlet HttpServletRequest and HttpServletResponse, Struts2 is not dependent on the ServletAPI4) Struts1 depends on the Servlet API the Web elements, therefore, of Action Struts1 when testing is difficult, it needs with other testing tools, Struts2 in Action can be as testing a number of other classes as Service Model layer test5) Struts1 of Action and the View through the ActionForm or its sub-class of data transmission, although there LazyValidationForm this ActionForm appearance, but still can not like the other levels as a simple POJO data transfer, and Struts2 would like expect change becomes a reality6) Struts1 binding of the JSTL, the preparation of convenience for the page, Struts2 integrates ONGL, you can use JSTL, Therefore, Struts2 is more powerful expression language underCompared with Struts2 WebWork: Struts2 actually WebWork2.3, however, Struts2 WebWork, or with a little difference:1) Struts2 IOC no longer support the built-in containers, use Spring's IOC container2) Struts2 Ajax for Webwork features some of the label to use Dojo to be replacedServletServlet is a server-side Java application, platform and protocol independent features that can generate dynamic Web pages. Customer requests to play it (Web browser or other HTTP client) and server response (HTTP server, database or application) of the middle layer. Servlet Web server is located inside the server-side Java applications started from the command line with the traditional application of different Java, Servlet loaded by the Web server, the Web server must include the Java Virtual Machine to support Servlet.HTTP Servlet using a HTML form to send and receive data. To create an HTTP Servlet, need to extend the HttpServlet class, the class is a special way to handle HTML forms GenericServlet a subclass. HTML form is <FORM> and </ FORM> tag definition. Form typically includes input fields (such as text input fields, check boxes, radio buttons and selection lists) and a button for submitting data. When submitting information, they also specify which server should implement the Servlet (or other program). HttpServlet class contains the init (), destroy (), service () and other methods. Where init () and destroy () method is inherited.init () method: In the Servlet life period, only run once init () method. It is executed when the server load Servlet. You can configure the server to start the server or the client's first visit to Servlet fashion into the Servlet. No matter how many clients to access Servlet, will not repeat the init (). The default init () method is usually to meet the requirements, but can also use custom init () method to overwrite it, typically the management server-side resources. For example, you may write a custom init () to be used only once a load GIF images, GIF images and improve the Servlet returns with the performance of multiple clients request. Another example is to initialize the database connection. The default init () method sets the Servlet initialization parameters, and use it's ServletConfig object parameter to start the configuration, all covered by init () method of the Servlet should call super.init () to ensure that stillperform these tasks. In the call to service () method before, make sure you have completed the init () method.service () method: service () method is the core of Servlet. Whenever a client requests a HttpServlet object, the object of the service () method must be called, and passed to this method a "request" (ServletRequest) objects and a "response" (ServletResponse) object as a parameter. Already exists in the HttpServlet service () method. The default service function is invoked with the HTTP request method to do the corresponding functions. For example, if the HTTP request method is GET, the default on the call to doGet (). Servlet Servlet support should do HTTP method override function. Because HttpServlet.service () method checks whether the request method calls the appropriate treatment, unnecessary coverage service () method. Just do cover the corresponding method on it.Servlet response to the following types: an output stream, the browser based on its content type (such as text / HTML) to explain; an HTTP error response, redirect to another URL, servlet, JSP.doGet () method: When a client through the HTML form to send a HTTP GET request or when a direct request for a URL, doGet () method is called. Parameters associated with the GET request to the URL of the back, and send together with this request. When the server does not modify the data, you should use doGet () method. doPost () method: When a client through the HTML form to send a HTTP POST request, doPost () method is called. Parameters associated with the POST request as a separate HTTP request from the browser to the server. When the need to modify the server-side data, you should use the doPost () method.destroy () method: destroy () method is only executed once, that is, stop and uninstall the server to execute the method of Servlet. Typically, the Servlet as part of the process server to shut down. The default destroy () method is usually to meet the requirements, but can also cover it, and typically manage server-side resources. For example, if the Servlet will be accumulated in the run-time statistics, you can write a destroy () method is used in Servlet will not load the statistics saved in the file. Another example is to close the database connection.When the server uninstall Servlet, it will in all service () method call is completed, or at a specified time interval after the call to destroy () method. Running a Servlet service () method may have other threads, so make sure the call destroy () method, the thread has terminated or completed.GetServletConfig () method: GetServletConfig () method returns a ServletConfig object, which used to return the initialization parameters and ServletContext. ServletContext interface provides information about servlet environment. GetServletInfo () method: GetServletInfo () method is an alternative method, which provides information on the servlet, such as author, version, copyright.When the server calls sevlet of Service (), doGet () and doPost () of these three methods are needed "request" and "response" object as a parameter. "Request" object to provide the requested information, and the "response" object to provide a response message will be returned to the browser as a communications channel.javax.servlet packages in the relevant classes for the ServletResponse andServletRequest, while the javax.servlet.http package of related classes for the HttpServletRequest and HttpServletResponse. Servlet communication with the server through these objects and ultimately communicate with the client. Servlet through call "request" object approach informed the client environment, server environment, information and all information provided by the client. Servlet can call the "response" object methods to send response, the response is ready to send back to clientJSPJavaServerPages (JSP) technology provides a simple and fast way to create a display content dynamically generated Web pages. Leading from the industry, Sun has developed technology related to JSP specification that defines how the server and the interaction between the JSP page, the page also describes the format and syntax.JSP pages use XML tags and scriptlets (a way to use script code written in Java), encapsulates the logic of generating page content. It labels in various formats (HTML or XML) to respond directly passed back to the page. In this way, JSP pages to achieve a logical page design and display their separation.JSP technology is part of the Java family of technologies. JSP pages are compiled into a servlet, and may call JavaBeans components (beans) or EnterpriseJavaBeans components (enterprise beans), so that server-side processing. Therefore, JSP technology in building scalable web-based applications play an important role.JSP page is not confined to any particular platform or web server. JSP specification in the industry with a wide range of adaptability.JSP technology is the result of collaboration with industry, its design is an open, industry standards, and support the vast majority of servers, browsers and related tools. The use of reusable components and tags replaced on the page itself relies heavily on scripting languages, JSP technology has greatly accelerated the pace of development. Support the realization of all the JSP to Java programming language-based scripting language, it has inherent adaptability to support complex operations.JqueryjQuery is the second prototype followed by a good Javascrīpt framework. Its purpose is: to write less code, do more.It is lightweight js library (compressed only 21k), which is less than the other js library which, it is compatible CSS3, is also compatible with all browsers (IE 6.0 +, FF 1.5 +, Safari 2.0 +, Opera 9.0 +).jQuery is a fast, simple javaScript library, allowing users to more easily dealwith HTML documents, events, to achieve animation effects, and provide easy AJAX for interactive web site.jQuery also has a larger advantage is that it is all documented, and various applications are very detailed, as well as many mature plug-ins available.jQuery's html page to allow users to maintain separate code and html content, that is, no need to insert in the html inside a pile of js to call the command, and you can just define id.jQuery is the second prototype followed by a good Javascrīpt framework. On theprototype I use small, simple and understood. However, after using the jquery immediately attracted by her elegance. Some people use such a metaphor to compare the prototype and jquery: prototype like Java, and jquery like a ruby. In fact I prefer java (less contact with Ruby Bale), but a simple jquery does have considerable practical appeal ah! I put the project in the framework jquery as its the only class package. Use the meantime there is also a little bit of experience, in fact, these ideas, in the jquery documentation above may also be speaking, but still it down to stop notes.译文:Java是一种简单的,面向对象的,分布式的,解释型的,健壮安全的,结构中立的,可移植的,性能优异、多线程的动态语言。

JAVA毕业设计外文文献翻译

JAVA毕业设计外文文献翻译

THE TECHNIQUE DEVELOPMENT HISTORY OF JSPBy:Kathy Sierra and Bert BatesSource: Servlet&JSPThe Java Server Pages( JSP) is a kind of according to web of the script plait distance technique, similar carries the script language of Java in the server of the Netscape company of server- side JavaScript( SSJS) and the Active Server Pages(ASP) of the Microsoft. JSP compares the SSJS and ASP to have better can expand sex, and it is no more exclusive than any factory or some one particular server of Web. Though the norm of JSP is to be draw up by the Sun company of, any factory can carry out the JSP on own system.The After Sun release the JS P( the Java Server Pages) formally, the this kind of new Web application development technique very quickly caused the people's concern. JSP provided a special development environment for the Webapplication that establishes the high dynamic state. According to the Sun parlance, the JSP can adapt to include the Apache WebServer, IIS4.0 on themarket at inside of 85% server product.This chapter will introduce the related knowledge of JSP and Databases, and JavaBean related contents, is all certainly rougher introduction among them basic contents, say perhaps to is a Guide only, if the reader needs the more detailed information, pleasing the book of consult the homologous JSP.1.1 GENER ALIZEThe JSP(Java Server Pages) is from the company of Sun Microsystems initiate, the many companies the participate to the build up the together of the a kind the of dynamic the state web the page technique standard, the it have the it in the construction the of the dynamic state the web page the strong but the do not the especially of the function. JSP and the technique of ASP of the Microsoft is very alike. Both all provide the ability that mixes with a certain procedure code and is explain by the language engine to carry out the procedure code in the code of HTML. Underneath we are simple of carry on the introduction to it.JSP pages are translated into servlets. So, fundamentally, any task JSP pages can perform could also be accomplished by servlets. However, this underlying equivalence does not mean that servlets and JSP pages are equally appropriatein all scenarios. The issue is not the power of the technology, it is the convenience, productivity, and maintainability of one or the other. After all, anything you can do on a particular computer platform in the Java programming language you could also do in assembly language. But it still matters which youchoose.JSP provides the following benefits over servlets alone: • It is easier to write and maintain the HTML. Your static code is ordinary HTML: no extra backslashes, no double quotes, and no lurking Java syntax.• You can use standard Web-site development tools. Even HTML tools that know nothing about JSP can be used because they simply ignore the JSP tags. • You can divide up your development team. The Java programmers can work on the dynamic code. The Web developers can concentrate on the presentation layer. On large projects, this division is very important. Depending on the size of your team and the complexity of your project, you can enforce a weaker or stronger separation between the static HTML and the dynamic content. Now, this discussion is not to say that you should stop using servlets and use only JSP instead. By no means. Almost all projects will use both. For some requests in your project, you will use servlets. For others, you will use JSP. For still others, you will combine them with the MVC architecture . You want the apGFDGpropriate tool for the job, and servlets, by themselves, do not completeyour toolkit.1.2 SOURCE OF JSPThe technique of JSP of the company of Sun, making the page of Web develop the personnel can use the HTML perhaps marking of XML to design to turn the end page with format. Use the perhaps small script future life of marking of JSP becomes the dynamic state on the page contents.( the contents changesaccording to the claim of)The Java Servlet is a technical foundation of JSP, and the large Web applies the development of the procedure to need the Java Servlet to match with with the JSP and then can complete, this name of Servlet comes from the Applet, the local translation method of now is a lot of, this book in order not to misconstruction, decide the direct adoption Servlet but don't do any translation, if reader would like to, can call it as" small service procedure". The Servlet is similar to traditional CGI, ISAPI, NSAPI etc. Web procedure development the function of the tool in fact, at use the Java Servlet hereafter, the customer neednot use again the lowly method of CGI of efficiency, also need not use only the ability come to born page of Web of dynamic state in the method of API that a certain fixed Web server terrace circulate. Many servers of Web all support the Servlet, even not support the Servlet server of Web directly and can also pass the additional applied server and the mold pieces to support the Servlet. Receive benefit in the characteristic of the Java cross-platform, the Servlet is also a terrace irrelevant, actually, as long as match the norm of Java Servlet, the Servlet is complete to have nothing to do with terrace and is to have nothing to do with server of Web. Because the Java Servlet is internal to provide the service by the line distance, need not start a progress to the each claimses, and make use of the multi-threading mechanism can at the same time for several claim service, therefore the efficiency of Java Servlet is very high.But the Java Servlet also is not to has no weakness, similar to traditional CGI, ISAPI, the NSAPI method, the Java Servlet is to make use of to output the HTML language sentence to carry out the dynamic state web page of, if develop the whole website with the Java Servlet, the integration process of the dynamic state part and the static state page is an evil-foreboding dream simply. For solving this kind of weakness of the Java Servlet, the SUN released the JSP.A number of years ago, Marty was invited to attend a small 20-person industry roundtable discussion on software technology. Sitting in the seat next to Marty was James Gosling, inventor of the Java programming language. Sitting several seats away was a high-level manager from a very large software company in Redmond, Washington. During the discussion, the moderator brought up the subject of Jini, which at that time was a new Java technology. The moderator asked the manager what he thought of it, and the manager responded that it was too early to tell, but that it seemed to be an excellent idea. He went on to say that they would keep an eye on it, and if it seemed to be catching on, they would follow his company's usual "embrace and extend" strategy. At this point,Gosling lightheartedly interjected "You mean disgrace and distend." Now, the grievance that Gosling was airing was that he felt that this company would take technology from other companies and suborn it for their ownpurposes. But guess what? The shoe is on the other foot here. The Java community did not invent the idea of designing pages as a mixture of static HTML and dynamic code marked with special tags. For example, Cold Fusion did it years earlier. Even ASP (a product from the very software company of theaforementioned manager) popularized this approach before JSP came along and decided to jump on the bandwagon. In fact, JSP not only adopted the general idea, it even used many of the same special tags as ASP did.The JSP is an establishment at the model of Java servlets on of the expression layer technique, it makes the plait write the HTML to become more simple.Be like the SSJS, it also allows you carry the static state HTML contents and servers the script mix to put together the born dynamic state exportation. JSP the script language that the Java is the tacit approval, however, be like the ASP and can use other languages( such as JavaScript and VBScript), the norm of JSP alsoallows to use other languages.1.3JSP CHARACTERISTICSIs a service according to the script language in some one language of the statures system this kind of discuss, the JSP should be see make is a kind of script language. However, be a kind of script language, the JSP seemed to be too strong again, almost can use all Javas in the JSP.Be a kind of according to text originally of, take manifestation as the central development technique, the JSP provided all advantages of the Java Servlet, and, when combine with a JavaBeans together, providing a kind of make contents and manifestation that simple way that logic separate. Separate the contents and advantage of logical manifestations is, the personnel who renews the page external appearance need not know the code of Java, and renew the JavaBeans personnel also need not be design the web page of expert in hand, can use to take the page of JavaBeans JSP to define the template of Web, to build up a from have the alike external appearance of the website that page constitute. JavaBeans completes the data to provide, having no code of Java in the template thus, this means that these templates can be written the personnel by a HTML plait to support. Certainly, can also make use of the Java Servlet to control the logic of the website, adjust through the Java Servlet to use the way of the document of JSP to separate website of logic and contents.Generally speaking, in actual engine of JSP, the page of JSP is the edit and translate type while carry out, not explain the type of. Explain the dynamic state web page development tool of the type, such as ASP, PHP3 etc., because speed etc. reason, have already can't satisfy current the large electronic commerce needs appliedly, traditional development techniques are all at to edit and translate the executive way change, such as the ASP → ASP+;PHP3 → PHP4.In the JSP norm book, did not request the procedure in the JSP code part( be called the Scriptlet) and must write with the Java definitely. Actually, have some engines of JSP are adoptive other script languages such as the EMAC- Script, etc., but actually this a few script languages also are to set up on the Java, edit and translate for the Servlet to carry out of. Write according to the norm of JSP, have no Scriptlet of relation with Java also is can of, however, mainly lie in the ability and JavaBeans, the Enterprise JavaBeanses because of the JSP strong function to work together, so even is the Scriptlet part not to use the Java, edit and translate of performance code also should is related with Java.1.4JSP MECHANISMTo comprehend the JSP how unite the technical advantage that above various speak of, come to carry out various result easily, the customer must understand the differentiation of" the module develops for the web page of the center" and"the page develops for the web page of the center" first.The SSJS and ASP are all in several year ago to release, the network of that time is still very young, no one knows to still have in addition to making all business, datas and the expression logic enter the original web page entirely heap what better solve the method. This kind of model that take page as the center studies and gets the very fast development easily. However, along with change of time, the people know that this kind of method is unwell in set up large, the Web that can upgrade applies the procedure. The expression logic write in the script environment was lock in the page, only passing to shear to slice and glue to stick then can drive heavy use. Express the logic to usually mix together with business and the data logics, when this makes be the procedure member to try to change an external appearance that applies the procedure but do not want to break with its llied business logic, apply the procedure of maintenance be like to walk the similar difficulty on the eggshell. In fact in the business enterprise, heavy use the application of the module already through very mature, no one would like to rewrite those logics for their applied procedure.HTML and sketch the designer handed over to the implement work of their design the Web plait the one who write, make they have to double work- Usually is the handicraft plait to write, because have no fit tool and can carry the script and the HTML contents knot to the server to put together. Chien but speech, apply the complexity of the procedure along with the Web to promote continuously, the development method that take page as the center limits sex to become to get up obviously.At the same time, the people always at look for the better method of build up the Web application procedure, the module spreads in customer's machine/ server the realm. JavaBeans and ActiveX were published the company to expand to apply the procedure developer for Java and Windows to use to come to develop the complicated procedure quickly by" the fast application procedure development"( RAD) tool. These techniques make the expert in the some realm be able to write the module for the perpendicular application plait in the skill area, but the developer can go fetch the usage directly but need not control the expertise of this realm.Be a kind of take module as the central development terrace, the JSP appeared. It with the JavaBeans and Enterprise JavaBeans( EJB) module includes the model of the business and the data logic for foundation, provide a great deal of label and a script terraces to use to come to show in the HTML page from the contents of JavaBeans creation or send a present in return. Because of the property that regards the module as the center of the JSP, it can drive Java and not the developer of Java uses equally. Not the developer of Java can pass the JSP label( Tags) to use the JavaBeans that the deluxe developer of Java establish. The developer of Java not only can establish and use the JavaBeans, but also can use the language of Java to come to control more accurately in the JSP page according to the expression logic of the first floor JavaBeans.See now how JSP is handle claim of HTTP. In basic claim model, a claim directly was send to JSP page in. The code of JSP controls to carry on hour of the logic processing and module of JavaBeanses' hand over with each other, and the manifestation result in dynamic state bornly, mixing with the HTML page of the static state HTML code. The Beans can be JavaBeans or module of EJBs.Moreover, the more complicated claim model can see make from is request other JSP pages of the page call sign or Java Servlets.The engine of JSP wants to chase the code of Java that the label of JSP, code of Java in the JSP page even all converts into the big piece together with the static state HTML contents actually. These codes piece was organized the Java Servlet that customer can not see to go to by the engine of JSP, then the Servlet edits and translate them automatically byte code of Java.Thus, the visitant that is the website requests a JSP page, under the condition of it is not knowing, an already born, the Servlet actual full general that prepared to edit and translate completes all works, very concealment but again andefficiently. The Servlet is to edit and translate of, so the code of JSP in the web page does not need when the every time requests that page is explain. The engine of JSP need to be edit and translate after Servlet the code end is modify only once, then this Servlet that editted and translate can be carry out. The in view of the fact JSP engine auto is born to edit and translate the Servlet also, need not procedure member begins to edit and translate the code, so the JSP can bring vivid sex that function and fast developments need that you are efficiently. Compared with the traditional CGI, the JSP has the equal advantage. First, on the speed, the traditional procedure of CGI needs to use the standard importation of the system to output the equipments to carry out the dynamic state web page born, but the JSP is direct is mutually the connection with server. And say for the CGI, each interview needs to add to add a progress to handle, the progress build up and destroy by burning constantly and will be a not small burden for calculator of be the server of Web. The next in order, the JSP is specialized to develop but design for the Web of, its purpose is for building up according to the Web applied procedure, included the norm and the tool of a the whole set. Use the technique of JSP can combine a lot of JSP pages to become a Webapplication procedure very expediently.JSP的技术发展历史作者:Kathy Sierra and Bert Bates来源:Servlet&JSPJava Server Pages(JSP)是一种基于web的脚本编程技术,类似于网景公司的服务器端Java脚本语言——server-side JavaScript(SSJS)和微软的Active Server Pages(ASP)。

jsp网上商城系统毕业设计答辩外文文献及译文

jsp网上商城系统毕业设计答辩外文文献及译文

毕业设计说明书英文文献及中文翻译学生姓名:学号:学院:专业:指导教师:Struts——an open-source MVC implementationBy: Malcolm Davis.Source: Struts--an open-source MVC implementation[J].IBM Systems JournalThis article introduces Struts, a Model-View-Controller implementation that uses servlets and JavaServer Pages (JSP) technology. Struts can help you control change in your Web project and promote specialization. Even if you never implement a system with Struts,you may get some ideas for your future servlets and JSP page implementation.IntroductionKids in grade school put HTML pages on the Internet. However, there is a monumental difference between a grade school page and a professionally developed Web site. The page designer (or HTML developer) must understand colors, the customer, product flow, page layout, browser compatibility, image creation, JavaScript, and more. Putting a great looking site together takes a lot of work, and most Java developers are more interested in creating agreat looking object interface than a user interface. Java Server Pages (JSP) technology provides the glue between the page designer and the Java developer.If you have worked on a large-scale Web application, you understand the term change.Model-View-Controller (MVC) is a design pattern put together to help control change. MVC decouples interface from business logic and data. Struts is an MVC implementation that uses Servlets 2.2 and JSP 1.1 tags, from the J2EE specifications, as part of the implementation. Y ou may never implement a system with Struts, but looking at Struts may give you some ideas on your future Servlets and JSP implementations.Model-View-Controller (MVC)JSP tags solved only part of our problem. We still have issues with validation, flow control, and updating the state of the application. This is where MVC comes to the rescue.MVC helps resolve some of the issues with the single module approach by dividing theproblem into three categories:• ModelThe model contains the core of the application's functionality. The model encapsulates thestate of the application. Sometimes the only functionality it contains is state. It knows nothing about the view or controller.• View• The view provides the presentation of the model. It is the look of the application. The view can access the model getters, but it has no knowledge of the setters. In addition, it knows nothing about the controller. The view should be notified when changes to the model occur. ControllerThe controller reacts to the user input. It creates and sets the model.MVC Model 2The Web brought some unique challenges to software developers, most notably the stateless connection between the client and the server. This stateless behavior made it difficult for the model to notify the view of changes. On the Web, the browser has to re-query the server to discover modification to the state of the application.Another noticeable change is that the view uses different technology for implementation than the model or controller. Of course, we could use Java (or PERL, C/C++ or what ever) code to generate HTML. There are several disadvantages to that approach:• Java programmers should develop services, not HTML.• Changes to layout would require changes to code.• Customers of the service should be able to create pages to meet their specific needs.• The page designer isn't able to have direct involvement in page development.• HTML embedded into code is ugly.For the Web, the classical form of MVC needed to change.MVC Model 2 Struts, an MVC 2 implementation Struts is a set of cooperating classes, servlets, and JSP tags that make up a reusable MVC 2 design. This definition implies that Struts is a framework, rather than a library, but Struts also contains an extensive tag library and utility classes that work independently of the framework.• Client browserAn HTTP request from the client browser creates an event. The Web container will respond with an HTTP response.• ControllerThe Controller receives the request from the browser, and makes the decision where to send the request. With Struts, the Controller is a command design pattern implemented as a servlet. The struts-config.xml file configures the Controller.• Business logicThe business logic updates the state of the model and helps control the flow of the application.With Struts this is done with an Action class as a thin wrapper to the actual business logic.• Model stateThe model represents the state of the application. The business objects update the application state. ActionForm bean represents the Model state at a session or request level, and not at a persistent level. The JSP file reads information from the ActionForm bean using JSP tags.• ViewThe view is simply a JSP file. There is no flow logic, no business logic, and no model information -- just tags. Tags are one of the things that make Struts unique compared to other frameworks like V elocity.Struts detailsDisplayed in Figure 6 is a stripped-down UML diagram of the org.apache.struts.action package and shows the minimal relationships among ActionServlet (Controller), ActionForm (Form State), and Action (Model Wrapper).The ActionServlet classDo you remember the days of function mappings? Y ou would map some input event to a ointer to a function. If you where slick, you would place the configuration information into ale and load the file at run time. Function pointer arrays were the good old days of structured rogramming in C.Life is better now that we have Java technology, XML, J2EE, and all that. The Struts ontroller is a servlet that maps events (an event generally being an HTTP post) to classes. guess what -- the Controller uses a configuration file so you don_t have to hard-code the alues. Life changes, but stays the same.ActionServlet is the Command part of the MVC implementation and is the core of the ramework. ActionServlet (Command) creates and uses Action, an ActionForm, and ctionForward. As mentioned earlier, the struts-config.xml file configures the command. uring the creation of the Web project, Action and ActionForm are extended to solve the pecific problem space. The file struts-config.xml instructs ActionServlet on how to use the xtended classes. There are several advantages to this approach:• The entire logical flow of the application is in a hierarchical text file. This makes itasier to view and understand, especially with large applications.• The page designer does not have to wade through Java code to understand the flow of e application.• The Java developer does not need to recompile code when making flow changes. Command functionality can be added by extending ActionServlet.The ActionForm classActionForm maintains the session state for the Web application. ActionForm is anbstract class that is sub-classed for each input form model. When I say input form model, Im saying ActionForm represents a general concept of data that is set or updated by a HTML form. For instance, you may have a UserActionForm that is set by an HTML Form. The Struts framework will:• Check to see if a UserActionForm exists; if not, it will create an instance of the class.• Struts will set the state of the UserActionForm using corresponding fields from the HttpServletRequest. No more dreadful request.getParameter() calls. For instance, the Struts framework will take fname from request stream and call UserActionForm.setFname().• The Struts framework updates the state of the UserActionForm before passing it to the business wrapper UserAction.• Before passing it to the Action class, Struts will also conduct form state validation by calling the validation() method on UserActionForm. Note: This is not always wise to do. There might be ways of using UserActionForm in other pages or business objects, where the validation might be different. V alidation of the state might be better in the UserAction class.• The UserActionForm can be maintained at a session level.Notes:• The struts-config.xml file controls which HTML form request maps to which ActionForm. • Multiple requests can be mapped UserActionForm.• UserActionForm can be mapped over multiple pages for things such as wizards.The Action classThe Action class is a wrapper around the business logic. The purpose of Action class is to translate the HttpServletRequest to the business logic. To use Action, subclass and overwrite the process() method.The ActionServlet (Command) passes the parameterized classes to ActionForm using the perform() method. Again, no more dreadful request.getParameter() calls. By the time the event gets here, the input form data (or HTML form data) has already been translated out of the request stream and into an ActionForm class.Note: "Think thin" when extending the Action class. The Action class should control the flow and not the logic of the application. By placing the business logic in a separate package or EJB, we allow flexibility and reuse.Another way of thinking about Action class is as the Adapter design pattern. The purpose of the Action is to "Convert the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn_t otherwise because of incompatibility interface" (from Design Patterns - Elements of Reusable OO Software by Gof). The client in this instance is the ActionServlet that knows nothing about our specific business class interface. Therefore, Struts provides a business interface it does understand, Action. By extending the Action, we make our business interface compatible with Struts business interface. (An interesting observation is that Action is a class and not an interface. Action started as an interface and changed into a class over time. Nothing's perfect.)The Error classesThe UML diagram (Figure 6) also included ActionError and ActionErrors. ActionError encapsulates an individual error message. ActionErrors is a container of ActionError classes that the View can access using tags. ActionErrors is Struts way of keeping up with a list of errors.UML diagram of the relationship of the Command (ActionServlet) to the Model (Action) The ActionMapping classAn incoming event is normally in the form of an HTTP request, which the servlet Container turns into an HttpServletRequest. The Controller looks at the incoming event and dispatches the request to an Action class. The struts-config.xml determines what Action class the Controller calls. The struts-config.xml configuration information is translated into a set of ActionMapping, which are put into container of ActionMappings. (If you have not noticed it, classes that end with s are containers) The ActionMapping contains the knowledge of how a specific event maps to specific Actions. The ActionServlet (Command) passes the ActionMapping to the Action class via the perform() method. This allows Action to access the information to control flow.ActionMappingsActionMappings is a collection of ActionMapping objects.Struts pros Use of JSP tag mechanism The tag feature promotes reusable code and abstracts Java code from the JSP file. This feature allows nice integration into JSP-based development tools that allow authoring with tags.• Tag libraryWhy re-invent the wheel, or a tag library? If you cannot find something you need in the library, contribute. In addition, Struts provides a starting point if you are learning JSP tag technology.• Open sourceY ou have all the advantages of open source, such as being able to see the code and having everyone else using the library reviewing the code. Many eyes make for great code review.• Sample MVC implementationStruts offers some insight if you want to create your own MVC implementation.• Manage the problem spaceDivide and conquer is a nice way of solving the problem and making the problem manageable.中北大学2014届毕业设计英文文献译文Struts 一个开源的MVC实现作者:马尔科姆·戴维斯。

计算机专业毕业设计外文翻译--JSP内置对象

计算机专业毕业设计外文翻译--JSP内置对象

附录1 外文参考文献(译文)JSP内置对象有些对象不用声明就可以在JSP页面的Java程序片和表达式部分使用,这就是JSP 的内置对象。

JSP的内置对象有:request、response、session、application、out.response和request对象是JSP内置对象中较重要的两个,这两个对象提供了对服务器和浏览器通信方法的控制。

直接讨论这两个对象前,要先对HTTP协议—Word Wide Wed底层协议做简单介绍。

Word Wide Wed是怎样运行的呢?在浏览器上键入一个正确的网址后,若一切顺利,网页就出现了。

使用浏览器从网站获取HTML页面时,实际在使用超文本传输协议。

HTTP规定了信息在Internet上的传输方法,特别是规定吧浏览器与服务器的交互方法。

从网站获取页面时,浏览器在网站上打开了一个对网络服务器的连接,并发出请求。

服务器收到请求后回应,所以HTTP协议的核心就是“请求和响应”。

一个典型的请求通常包含许多头,称作请求的HTTP头。

头提供了关于信息体的附加信息及请求的来源。

其中有些头是标准的,有些和特定的浏览器有关。

一个请求还可能包含信息体,例如,信息体可包含HTML表单的内容。

在HTML表单上单击Submit 键时,该表单使用ACTION=”POST”或ACTION=”GET”方法,输入表单的内容都被发送到服务器上。

该表单内容就由POST方法或GET方法在请求的信息体中发送。

服务器发送请求时,返回HTTP响应。

响应也有某种结构,每个响应都由状态行开始,可以包含几个头及可能的信息体,称为响应的HTTP头和响应信息体,这些头和信息体由服务器发送给客户的浏览器,信息体就是客户请求的网页的运行结果,对于JSP 页面,就是网页的静态信息。

用户可能已经熟悉状态行,状态行说明了正在使用的协议、状态代码及文本信息。

例如,若服务器请求出错,则状态行返回错误及对错误描述,比如HTTP/1.1 404 Object Not Found。

jsp网站开发毕设外文翻译

jsp网站开发毕设外文翻译

jsp网站开发毕设外文翻译西安邮电大学外文文献翻译院 (系): 计算机学院专业: 计算机科学与技术班级:学生姓名: 导师姓名: 职称:起止时间:2011年 9月23日至 2012年 6月2日原文:Java and the InternetAlthough Java is very useful for solving traditional stand-alone programming problems, it is also important because it will solve programming problems on the World Wide Web.1. Client-side programmingThe Web’s initial server-browser design provided for interactive content, but the interactivity was completely provided by the server. The server produced static pages for the client browser, which would simply interpret and display them. Basic HTML contains simple mechanisms for data gathering: text-entry boxes, check boxes, radio boxes, lists and drop-down lists, as well as a button that can only be programmed to reset t he data on the form or “submit” the data on the form back to the server. This submission passes through the Common Gateway Interface (CGI) provided on all Web servers. The text within the submission tells CGI what to do with it. The most common action is to run a programlocated on the server in a directory that’s typically called “cgi-bin.” (If you watch the address window at the topof your browser when you push a button on a Web page, you can sometimes see “cgi-bin” within all thegobbledygook there.) These programs can be written in most languages. Perl is a common choice because it is designed for text manipulation and is interpreted, so it can be installed on any server regardless of processor or operating system.Many powerful Web sites today are built strictly on CGI, and you can in fact do nearly anything with it. However, Web sites built on CGI programs can rapidly become overly complicated to maintain, and there is also the problem of response time. The response of a CGI program depends on how much data must be sent, as well as the load on both the serverand the Internet. (On top of this, starting a CGI program tends to be slow.) The initial designers of the Web did not foresee how rapidly this bandwidth would be exhausted for the kinds of applications people developed. For example, any sort of dynamic graphing is nearlyimpossible to perform with consistency because a GIF file must becreated and moved from the server to the client for each version of the graph. And you’ve no doubt had direct ex perience with something as simple as validating the data on an input form. You press the submit button on a page; the data is shipped back to the server; the server starts a CGI program that discovers an error, formats an HTML page informing you of the error, and then sends the page back to you; youmust then back up a page and try again. Not only is this slow, it’s inelegant.The solution is client-side programming. Most machines that run Web browsers are powerful engines capable of doing vast work, and with the original static HTML approach they are sitting there, just idly waiting for the server to dish up the next page. Client-side programming means that the Web browser is harnessed to do whatever work it can, and the result for the user is a much speedier and more interactive experience at your Web site.The problem with discussions of client-side programming is that they aren’t very different fromdiscussions of programming in general. The parameters are almost the same, but the platform is different: a Web browser is like a limited operating system. In the end, you must still program, and this accounts for the dizzying array of problems and solutions produced by client-side programming. The rest of this section provides an overview of the issues and approaches in client-side programming. 2.Plug-insOne of the most significant steps forward in client-side programming is the development of the plug-in. This is a way for a programmer to add new functionality to the browser by downloading a piece of code that plugs itself into the appropriate spot in the browser. It tells the browser “from now on you can perform this new activity.” (You need to download the plug-in only once.) Some fast and powerfulbehavior is added to browsers via plug-ins, but writing a plug-in is not a trivial task, and isn’t somethingyou’d want to do as part of the process of building a particular site. The value of the plug-in forclient-side programming is that it allows an expert programmer to develop a new language and add that language to a browser without the permission of the browser manufacturer. Thus, plug-ins provide a “back door” that allows the creation of new client-side programming languages (although not alllanguages are implemented as plug-ins).3.Scripting languagesPlug-ins resulted in an explosion of scripting languages. With a scripting language you embed the source code for your client-side program directly into the HTML page, and the plug-in that interpretsthat language is automatically activated while the HTML page is being displayed. Scripting languages tend to be reasonably easy to understand and, because they are simply text that is part of an HTML page, they load very quickly as part of the single server hit required to procure that page. The trade-off is that your code is exposed for everyone to see (and steal). Generally, however, you aren’t doing amazingly sophisticated things with scripting languages so this is not too much of a hardship. This points out that the scripting languages used inside Web browsers are really intended to solve specific types of problems, primarily the creation of richer and more interactive graphical userinterfaces (GUIs). However, a scripting language might solve 80 percent of the problems encountered in client-side programming. Your problems might very well fit completely within that 80 percent, and sincescripting languages can allow easier and faster development, you should probably consider a scripting language before looking at a more involved solution such as Java or ActiveX programming. The most commonly discussed browser scripting languages are JavaScript (which has nothing to do with Java; it’s named that way just to grab some of Java’s marketing momentum), VBScript (whichlooks like Visual Basic), and Tcl/Tk, which comes from the popular cross-platform GUI-building language. There are others out there, and no doubt more in development.JavaScript is probably the most commonly supported. It comes builtinto both Netscape Navigatorand the Microsoft Internet Explorer (IE). In addition, there are probably more JavaScript books available than there are for the other browser languages, and some tools automatically create pages using JavaScript. However, if you’re already fluent in Visual Basic or Tcl/Tk, you’ll be mor e productive using those scripting languages rather than learning a new one. (You’ll have your hands full dealing with the Web issues already.)4.JavaIf a scripting language can solve 80 percent of the client-side programming problems, what about the other 20 percent—the “really hardstuff?” The most popular solution today is Java. Not only is it a powerful programming language built to be secure, cross-platform, and international, but Java is being continually extended to provide language features and libraries that elegantly handle problems that are difficult in traditional programming languages, such as multithreading, database access, network programming, and distributed computing. Java allows client-side programming via the applet. An applet is a mini-program that will run only under a Web browser. The applet is downloaded automatically as part of a Web page (just as, for example, a graphic is automatically downloaded).it provides you with a When the applet is activated it executes a program. This is part of its beauty—way to automatically distribute the client software from the server at the time the user needs the client software, and no sooner. The user gets the latest version of the client software without fail and without difficult reinstallation. Because of the way Java is designed, the programmer needs to create only a single program, and that program automatically works with all computers that have browsers with built-in Java interpreters. (This safely includes the vast majority of machines.) Since Java is a full-fledged programming language, you can do as much work as possible on the client before and after making requests of the server. For example, you won’t need to send a request form across the Internet todiscover that you’ve gotten a d ate or some other parameter wrong, and your client computer can quickly do the work of plotting data instead of waiting for the server to make a plot and ship a graphic image back to you. Not only do you get the immediate win of speed and responsiveness, but the general network traffic and load on servers can be reduced, preventing the entire Internet from slowing down. One advantage a Java applet has over a scripted program is that it’s in compiled form, so the sourcecode isn’t available to the client. O n the other hand, a Javaapplet can be decompiled without too much trouble, but hiding your code is often not an important issue. Two other factors can be important. As you will see later in this book, a compiled Java applet can comprise many modules and t ake multiple server “hits” (accesses) to download. (In Java 1.1 and higher this is minimized by Java archives, called JAR files, that allow all the required modules to be packaged together and compressed for a single download.) A scripted program will just be integrated into the Web page as part of its text (and will generally be smaller and reduce server hits). This could be important to the responsiveness of your Web site. Another factor is the all-important learning curve. Regardless of what you’ve heard, Java is not a trivial language to learn. If you’re a Visual Basic programmer, moving to VBScript will be your fastest solution, and since it will probably solve most typical client/server problems you might be hard pressed to justify learning Java. If yo u’re experienced with a scripting language you willcertainly benefit from looking at JavaScript or VBScript before committing to Java, since they might fit your needs handily and you’ll bemore productive sooner.to run its applets withi5.ActiveXTo so me degree, the competitor to Java is Microsoft’s ActiveX, although it takes a completely different approach. ActiveX wasoriginally a Windows-only solution, although it is now being developed via an independent consortium to become cross-platform. Effectively, ActiveX says “if yourprogram connects to its environment just so, it can be dropped into a Web page and run under a browser that supports ActiveX.” (IE directly supports ActiveX and Netscape does so using a plug-in.) Thus, ActiveX does not constrain you to a particular language. If, for example, you’re already an experienced Windows programmer using a language such as C++, Visual Basic, or Borland’s Delphi, you can create ActiveX components with almost no changes to your programming knowledge. ActiveX also provides a path for the use of legacy code in your Web pages.6.Internet vs. intranetThe Web is the most general solution to the client/server problem,so it makes sense that you can use the same technology to solve a subset of the problem, in particular the classic client/server problem within a company. With traditional client/server approaches you have the problemof multiple types of client computers, as well as the difficulty of installing new client software, both of which are handily solved with Web browsers and client-side programming. When Web technology is used for an information network that is restricted to a particular company, it is referred to as an intranet. Intranets provide much greater security than the Internet, since you can physically control access to the servers within your company. In terms of training, it seems that once people understand the general concept of a browser it’s much easier for them to deal with differences in the way pages and applets look, so thelearning curve for new kinds of systems seems to be reduced.The security problem brings us to one of the divisions that seems to be automatically forming in the world of client-side programming. If your program is running on the Internet, you don’t know what platform it will be working under, and you want to be extra careful that you don’t disseminate buggy code. You need something cross-platform and secure, like a scripting language or Java. If you’re running on an intranet, you might have a different set of constraints. It’s not uncommon that your machines could all be Intel/Windows platforms. On an intranet, you’re responsible for the quality of your own code and can repair bugs when they’re discovered. In addition, you might already have abody of legacy code that you’ve been using in a more traditional client/server approach, whereby you must physically install clientprograms every time you do an upgrade. The time wasted in installing upgrades is the most compelling reason to move to browsers, because upgrades are invisible and automatic. If you are involved in such an intranet, the most sensible approach to take is the shortest path that allows you to use your existing code base, rather than trying to recode your programs in a new language.When faced with this bewildering array of solutions to the client-side programming problem, the bestplan of attack is a cost-benefit analysis. Consider the constraints of your problem and what would be the shortest path to your solution. Since client-side programming is still programming, it’s always a good idea to take the fastest development approach for your particular situation. This is an aggressive stance to prepare for inevitable encounters with the problems of program development.翻译:Java和因特网Java除了可解决传统的程序设计问题以外,还能解决World Wide Web(万维网)上的编程问题。

计算机科学与技术专业JSP及其WEB技术大学毕业论文外文文献翻译及原文

计算机科学与技术专业JSP及其WEB技术大学毕业论文外文文献翻译及原文

毕业设计(论文)外文文献翻译文献、资料中文题目:SP及其WEB技术文献、资料英文题目:文献、资料来源:文献、资料发表(出版)日期:院(部):专业:班级:姓名:学号:指导教师:翻译日期: 2017.02.14外文翻译原文及译文JSP and WEB technolog1 JSP IntroductionJSP (JavaServer Pages) is a Java-based scripting technology. Is advocated by Sun Microsystems Inc., together with a number of companies involved in the establishment of a dynamic web page technology standards. JSP technology is somewhat similar to ASP technology, It is a traditional HTML page file (*. htm, *. html) to insert Java program segment (Scriptlet) and JSP tag (tag), To form the JSP file(*jsp). Web development with JSP is a cross-platform applications that can run under Linux, but also in other operating systems. In the JSP of the many advantages, one of which is that it will be HTML encoded Web page from the business logic separated effectively. JSP access with reusable components, such as Servlet, JavaBean and Java-based Web applications. JSP also supports directly in the Web page embedded Java code. JSP can be used two ways to access documents: JSP documents sent by the browser request, the request sent to the Servlet. JSP technology uses Java programming language, XML-type tags and scriptlets, to have a package deal with the logic of dynamic pages. Page tags and scriptlets can also exist in the server access to the resources of the application logic. JSP logic and Web page design and display isolated and support reusable component-based design, Web-based applications more quickly and easily developed.The Web server when meets visits the JSP homepage the request, first carries out segment, will then carry out the result code to return together with JSP in the document HTML for the customer. The insertion Java segment may operate the database, again the directional homepage and so on, realizes the function which the establishment dynamic homepage needs. JSP and Java Servlet are the same, is in the server end execution, usually returns to this client side is a HTML text, therefore client side, so long as has the browser to be able to glance over.The JSP page is composed of the HTML code and the inserting Java code. The server in the page by the client side was requested that later will carry on processing to these Java code, will then produce the HTML page will return gives the client side thebrowser. Java Servlet is the JSP technology base, moreover the large-scale Web application procedure's development needs Java Servlet and the JSP coordination can complete. JSP had the Java technology simply easy to use, complete object-oriented, had the platform independency, and safe reliable, mainly faced Internet's all characteristics.2 JSP computing techniqueTo carry on the dynamic website conveniently fast the development, JSP has made the improvement in the following several aspects, causes it to become builds the cross platform fast the dynamic website first choice plan.2.1 carries on the content production and the demonstration separatesWith the JSP technology, the Web page development personnel may use HTML or the XML marking design and the formatted final page, and uses the JSP marking or the tootsy produces on page's dynamic content originally. Production content's logic is sealed in marks and in the JavaBeans module, and ties up in the script, all scripts in server end movement. Because core logic is sealed in marks and in JavaBeans, therefore the Web administrative personnels and the page designer, can edit and use the JSP page, but does not affect the content the production. In the server end, the JSP engine explained that the JSP marking and the script, produce the content which requested, and (or XML) page's form transmits the result by HTML the browser. This both are helpful in the author protects own code, and can guarantee any based on the HTML Web browser's complete usability.2.2 may entrust with heavy responsibility the moduleThe overwhelming majority JSP page relies on may entrust with heavy responsibility, the cross platform module (JavaBeans or Enterprise the JavaBeans module) carries out complex processing which the application procedure requests. The development personnel can share and exchange the execution ordinary operation the module, or causes these modules uses for more users and the customer association. Has accelerated the overall development process based on module's method, and causes each kind of organization obtains balanced in their existing skill and in the optimized result development endeavor.2.3 uses markingThe Web page development personnel will not be the familiar script languageprogrammers. The JSP technology has sealed many functions, these functions are easy to use, marking to carry on the dynamic content production with JSP in the related XML to need. The standard JSP marking can visit and the instantiation JavaBeans module, the establishment or the retrieval module attribute, downloads Applet, as well as the execution difficulty with codes and the time-consuming function with other methods.2.4 adapts the platformNearly all platforms support Java, JSP+JavaBeans to be possible to pass unimpeded nearly under all platforms. Transplants from a platform to other platform, JSP and JavaBeans does not even need to translate, because the Java byte code is standard has nothing to do with the platform.2.5 database connectionIn Java connects the database the technology is the JDBC, Java procedure is connected through the JDBC driver and the database, operations and so on execution inquiry, extraction data. Sun Corporation has also developed JDBC-ODBC bridge, uses this technical Java procedure to be possible to visit has the ODBC driver database, at present the majority database systems have the ODBC driver, therefore the Java procedure can visit such as Oracle, Sybase, MS SQL Server and databases and so on MS Access. In addition, through the development marking storehouse, the JSP technology may further expand. The third party development personnel and other personnel may found their marking storehouse for the commonly used function. This enables the Web page development personnel to be able to use the familiar tool and to be similar to marking same carries out the specific function component to carry on the work. The JSP technology very easy conformity to many kinds of application architecture, to use the extant tool and the skill, and can expand to the support enterprise distributional application.3 Eclipse function synopsisMore and more Java development personnel already started the productivity which and the quality income appreciates Eclipse JDT to provide. It was the Java editor provides grammar Gao Liang to demonstrate that the formatting, the fold, the content were auxiliary, code template and so on many functions. It grows unceasingly available restructuring and the code generation function set permits you in a higher rank the operation code, andautomated usual code intensity duty and easy wrong duty. Moreover, in develops the code and uses JDT to compile and to carry out the JUnit test built-in support carries on the unit testing after the code, may use Eclipse the first-class Java debugger debugging when the movement meets any question. Besides JDT, Eclipse SDK- the most popular downloading - also contains Plug-in Development Environment(PDE). PDE used the specific function to expand JDT to construct the Eclipse plug-in unit - based on the Eclipse application procedure basic construction agglomeration. In fact, uses the tool which provides by Eclipse itself to be able to surmount the Java development, may expand the existing Eclipse application procedure, or even founds the brand-new application procedure.Eclipse by a script level constitution, contains in many functional modules or the Eclipse terminology so-called “the plug-in unit”. The plug-in unit is provides all functions in the Eclipse application procedure the module. They cooperate through its API to pay the final outcome together. In Eclipse, even the most foundation's function, for instance the search and the start installment's plug-in unit, seals in the plug-in unit. In order to expand the existing Eclipse function or carry on the construction in above, the plug-in unit the concrete expansion contribution for the expansion spot which will expose by other plug-in units. Usually, the plug-in unit concentrates the specific region responsibility, and gives through or a many expansion way other responsibility designation other plug-in units. For example, a plug-in unit allows you parallel to compare two documents visibly the contents, but it will not care how to read these documents even how to explain these document structure; This is other plug-in unit's work. When compared with two documents, this plug-in unit first inspects whether to have another plug-in unit to be possible to explain these document structure. If found one, it to the plug-in unit inquiry related file organization information which found, and used this information in the comparison process.May see that the modular construction was Eclipse has provided the huge flexibility, and provided one to be possible to support the massive application procedure platform which the original design has not expected.4 Structs function synopsisStruts is a MVC frame (Framework), uses in developing Java fast the Web application.Struts realizes the key point in C(Controller), Action which and we have custom-made including ActionServlet/RequestProcessor, was also V(View) provides a series of rows to have custom-made the label (Custom Tag). Spring is a light vessel (light-weight container), its core is the Bean factory (Bean Factory), with constructs M(Model) which we need. Above this foundation, Spring has provided AOP (Aspect-Oriented Programming, face stratification plane programming) realization, provides under the non-management environment with it to declare services and so on way business, security; Is more convenient to Bean factory expansion ApplicationContext we to realize the J2EE application; DAO/ORM realizes facilitates us to carry on the database the development; Web MVC and Spring Web have provided Java the Web application frame or carries on the integration with other popular Web frame. That is may a both use, achieve both own characteristic carries on supplementary.Structs is the kind which, servlet and the JSP mark a group cooperates mutually, they compose the MVC 2 designs which may entrust with heavy responsibility. This definition expressed that Struts is a frame, but is not a storehouse, but Struts has also contained the rich mark storehouse and the independence in this frame work utility program class.Client browser (customer browser), the request founds an event from customer browser's each HTTP. The Web vessel will use a HTTP response to make the response.Controller (controller), the controller receive from browser's request, and decided that sends out where this request. Speaking of Struts, the controller is an order design pattern which realizes by servlet. struts-config.xml document disposition controller.Service logic, the service logic renewal model's condition, and helps the control application procedure the flow. Speaking of Struts, this is through takes the actual service logic “thin” the packing Action kind to complete.Model (model) condition, model expression application procedure condition. Service object renewal application procedure condition. ActionForm bean in conversation level or request level expression model condition, but is not in the lasting level. The JSP document uses JSP to mark the read from the ActionForm bean information.View (view), the view is a JSP document. And does not have the flow logic, does not have the service logic, also does not have the model information -- Only then marks. The mark causes Struts is different with other frames (for example Velocity) one of factors.Just like the Struts controller is (event usually is HTTP post) maps the event kind of。

外文文献JSP中英文翻译

外文文献JSP中英文翻译

THE TECHNIQUE DEVELOPMENT HISTORY OF JSPBy:Kathy Sierra and Bert BatesSource:Servlet&JSPThe Java Server Pages( JSP) is a kind of according to web of the script plait distance technique, similar carries the script language of Java in the server of the Netscape company of server- side JavaScript( SSJS)and the Active Server Pages(ASP) of the Microsoft. JSP compares the SSJS and ASP to have better can expand sex,and it is no more exclusive than any factory or some one particular server of Web. Though the norm of JSP is to be draw up by the Sun company of,any factory can carry out the JSP on own system.The After Sun release the JSP(the Java Server Pages) formally,the this kind of new Web application development technique very quickly caused the peopl e’s concern.JSP provided a special development environment for the Web application that establishes the high dynamic state。

JSP技术概述与应用框架外文翻译毕业设计

JSP技术概述与应用框架外文翻译毕业设计
国际化:使JSP应用能够适应不同 国家和地区的语言和文化环境
国际化与本地化的重要性:提高 用户体验,增强市场竞争力
添加标题
添加标题
添加标题
添加标题
本地化:根据不同国家和地区的 语言和文化环境,对JSP应用进行 定制和优化
国际化与本地化的实现方法:使 用国际化框架,如i18n,进行国 际化和本地化处理
翻译质量要求
准确性:确保翻译内容与原文意思一致,无错译、漏译现象 流畅性:翻译语言通顺,符合目标语言的表达习惯 专业性:翻译内容涉及专业术语,需准确翻译,不得随意更改 格式规范:翻译后的文档格式应与原文保持一致,包括字体、字号、行距等
PART 6
毕业设计流程与规范
选题与开题报告撰写
选题:选择与专 业相关的课题, 确保具有研究价 值和实际意义
特点:Spring MVC具有清晰的分层结构,易于扩展和维护,支持RESTful风格,支持 多种视图技术。
核心组件:Spring MVC的核心组件包括DispatcherServlet、HandlerMapping、 Controller、ViewResolver等。
应用场景:Spring MVC广泛应用于Web开发中,如企业级应用、电子商务、社交网站等。
JSP可以与其他 Java技术(如 Servlet、 JDBC、JNDI等) 无缝集成,实现 强大的Web应 用程序开发。
JSP工作原理
JSP是一种服务器端的Java技术,用于创 建动态网页。
JSP页面由HTML、Java代码和JSP标签组 成。
JSP页面在服务器上被编译成Java Servlet,然后由Servlet引擎执行。
翻译质量:准色等
翻译时间:根据毕业设计进度, 合理安排翻译时间

JSP外文翻译

JSP外文翻译

毕业设计(论文)外文资料翻译题目: Struts——An Open-source MVC ImplementationStruts——一种开源MVC的实现院系名称:信息科学与工程学院专业班级:计算机科学与技术07级**班学生姓名:吕** 学号:2007414****指导教师:刘 * 教师职称:讲师起止日期:2011-03-01~2011-06-03地点: 莲花街校区附件: 1.外文资料翻译译文;2.外文原文。

指导教师评语:该生所译的“Struts——An Open-source MVC Implementation”一文与其毕业设计课题有一定的关联,译文整体较为准确,翻译后的文章符合中文的习惯。

但还有个别的词翻译的不够准确,个别的语句不够通顺。

总的来说此译文是一篇合格的译文。

签名: 2011 年 3 月 25 日指导教师评语:该生所译的“ Technology for Web Application”一文与其毕业设计课题有一定的关联,译文整体较为准确,翻译后的文章符合中文的习惯。

但还有个别的词翻译的不够准确,个别的语句不够通顺。

总的来说此译文是一篇合格的译文。

签名:2011 年 3 月25 日Struts——An Open-source MVC Implementation附件1:外文资料翻译译文Struts——一种开源MVC的实现这篇文章介绍Struts,一个使用servlet 和JavaServer Pages 技术的一种Model-View-Controller 的实现。

Struts 可以帮助你控制Web 项目中的变化并提高专业化。

即使你可能永远不会用Struts实现一个系统,你可以获得一些想法用于你未来的servlet 和JSP 网页的实现中。

简介在小学校园里的小孩子们都可以在因特网上发布HTML 网页。

然而,有一个重大的不同在一个小学生和一个专业人士开发的网站之间。

网页设计师(或者HTML开发人员)必须理解颜色、用户、生产流程、网页布局、浏览器兼容性、图像创建、JavaScript 等等。

关于JSP的介绍-本科生毕业设计(论文)外文翻译

关于JSP的介绍-本科生毕业设计(论文)外文翻译

xx 理工大学xx 学院毕业设计(论文)外文资料翻译系:计算机系专业:计算机科学与技术姓名:xxx学号:080601165外文出处:Anon .The Introduction Of JSP [EB/OL].(用外文写)(2009-01-13)[2011-12-20].http://nibiye.com/fy/wwfy/jsjw/2009/0113/1033.html.附件:1.外文资料翻译译文;2.外文原文。

注:请将该封面与附件装订成册。

附件1:外文资料翻译译文关于JSP的介绍Java2企业版(J2EE)已经把建立一个网上的乱中有律任务的存在现象进行了有效的改造,就是开发人员能使用Java有效创造多层次的服务器端应用程序。

今天,Java企业应用程序编程接口已经扩大,包括许多方面:远程方法调用与公共对象请求代理体系结构用来远程对象的处理,JDBC(Java数据库的连接)的数据库交互,JNDI(Java命名和目录接口)来访问命名和目录服务,为企业创造了可重复使用的JavaBeans业务组件、JMS(Java信息服务)消息中介软件,JAXP为XML(可扩展标示语言)处理和JTA(Java事务应用程序界面)为执行一个原子事务。

此外,J2EE也支持小型服务程序,极受欢迎的Java语言代替了公共网关接口脚本。

这些技术的结合,可以让程序员创造分布式业务解决方案中的各种任务。

早在在1999年末,Sun Microsystems(美国一家计算机公司)添加了一个新的精选的元素企业Java工具:Java动态服务器页面(JSP)。

Java动态服务器页面都是建立在Java的顶部小型服务器用来增进效率使程序员,甚至是非专业的程序员,都可以创建网页的内容。

那么什么是Java服务器页呢?我们来简洁明点,Java的动态服务器页面是一个运用科学技术发展的网页,其中是包括动态内容的。

不像一个HTML页面,只包含静态内容,总是保持不变的,一个JSP页面中可以改变它的内容基于任何数量的变项,包括用户的身份,用户的浏览器类型,用户信息的提供,或者由用户选择信息等等。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

外文原文The technique development history of JSPWriter:Bluce Rakel From: /zh-cn/magazine/cc163420.aspx The Java Server Pages( JSP) is a kind of according to web of the script plait distance technique, similar carries the script language of Java in the server of the Netscape company of server- side JavaScript( SSJS) and the Active Server Pages( ASP) of the Microsoft.JSP compares the SSJS and ASP to have better can expand sex, and it is no more exclusive than any factory or some one particular server of Web. Though the norm of JSP is to be draw up by the Sun company of, any factory can carry out the JSP on own system.The After Sun release the JSP( the Java Server Pages) formally, the this kind of new Web application development technique very quickly caused the people's concern.JSP provided a special development environment for the Web application that establishes the high dynamic state. According to the Sun parlance, the JSP can adapt to include the Apache WebServer, IIS4.0 on the market at inside of 85% server product.This chapter will introduce the related knowledge of JSP and Databases, and JavaBean related contents, is all certainly rougher introduction among them basic contents, say perhaps to is a Guide only, if the reader needs the more detailed information, pleasing the book of consult the homologous JSP.A. GeneralizeThe JSP(Java Server Pages) is from the company of Sun Microsystems initiate, the many companies the participate to the build up the together of the a kind the of dynamic the state web the page technique standard, the it have the it in the construction the of the dynamic state the web page the strong but the do not the especially of the function.JSP and the technique of ASP of the Microsoft is very alike. Both all provide the ability that mixs with a certain procedure code and is explain by the language engine to carry out the procedure code in the code of HTML. Underneath we are simple of carry on the introduction to it.C. JSP characteristicsIs a service according to the script language in some one language of the statures system this kind of discuss, the JSP should be see make is a kind of script language. However, be a kind of script language, the JSP seemed to be too strongagain, almost can use all Javas in the JSP.Be a kind of according to text originally of, take manifestation as the central development technique, the JSP provided all advantages of the Java Servlet, and, when combine with a JavaBeans together, providing a kind of make contents and manifestation that simple way that logic separate. Separate the contents and advantage of logical manifestations is, the personnel who renews the page external appearance need not know the code of Java, and renew the JavaBeans personnel also need not be design the web page of expert in hand, can use to take the page of JavaBeans JSP to define the template of Web, to build up a from have the alike external appearance of the website that page constitute. JavaBeans completes the data to provide, having no code of Java in the template thus, this means that these templates can be written the personnel by a HTML plait to support. Certainly, can also make use of the Java Servlet to control the logic of the website, adjust through the Java Servlet to use the way of the document of JSP to separate website of logic and contentses.Generally speaking, in actual engine of JSP, the page of JSP is the edit and translate type while carry out, not explain the type of. Explain the dynamic state web page development tool of the type, such as ASP, PHP3 etc., because speed etc. reason, have already can't satisfy current the large electronic commerce needs appliedly, traditional development techniques are all at to edit and translate the executive way change, such as the ASP → ASP+;PHP3 → PHP4.In the JSP norm book, did not request the procedure in the JSP code part( be called the Scriptlet) and must write with the Java definitely. Actually, have some engines of JSP are adoptive other script languageses, such as the EMAC- Script, WebL etc., but actually this a few script languages also are to set up on the Java, edit and translate for the Servlet to carry out of. Write according to the norm of JSP, have no Scriptlet of relation with Java also is can of, however, mainly lie in the ability and JavaBeans, the Enterprise JavaBeanses because of the JSP strong function to work together, so even is the Scriptlet part not to use the Java, edit and translate of performance code also should is related with Java.C. JSP mechanismTo comprehend the JSP how unite the technical advantage that above various speak of, come to carry out various result easily, the customer must understand the differentiation of" the module develops for the web page of the center" and" the page develops for the web page of the center" first.The SSJS and ASPses are all in several year agos to release, the network of that time is still very young, no one knows to still have in addition to making all business, datas and the expression logic enter the original web page entirely heap what better solve the method. This kind of model that take page as the center studies and gets the very fast development easily. However, along with change of time, the people know that this kind of method is unwell in set up large, the Web that can upgrade applies the procedure. The expression logic write in the script environment was lock in the page, only passing to shear to slice and glue to stick then can drive heavy use. Express the logic to usually mix together with business and the data logics, when this makes be the procedure member to try to change an external appearance that applies the procedure but do not want to break with its llied business logic, apply the procedure of maintenance be like to walk the similar difficulty on the eggshell. In fact in the business enterprise, heavy use the application of the module already through very mature, no one would like to rewrite those logics for their applied procedure.HTML and sketch the designer handed over to the implement work of their design the Web plait the one who write, make they have to double work- Usually is the handicraft plait to write, because have no fit tool and can carry the script and the HTML contentses knot to the server to put together. Chien but speech, apply the complexity of the procedure along with the Web to promote continuously, the development method that take page as the center limits sex to become to get up obviously.At the same time, the people always at look for the better method of build up the Web application procedure, the module spreads in customer's machine/ server the realm. JavaBeans and ActiveX were published the company to expand to apply the procedure developer for Java and Windows to use to come to develop the complicated procedure quickly by" the fast application procedure development" ( RAD) tool. These techniques make the expert in the some realm be able to write the module for the perpendicular application plait in the skill area, but the developer can go fetch the usage directly but need not control the expertise of this realm.Be a kind of take module as the central development terrace, the JSP appeared. It with the JavaBeans and Enterprise JavaBeans( EJB) module includes the model of the business and the data logic for foundation, provide a great deal of label and a script terraces to use to come to show in the HTML page from the contents of JavaBeans creation or send a present in return. Because of the property that regards the module as the center of the JSP, it can drive Java and not the developer of Java uses equally.Not the developer of Java can pass the JSP label( Tags) to use the JavaBeans that the deluxe developer of Java establish. The developer of Java not only can establish and use the JavaBeans, but also can use the language of Java to come to control more accurately in the JSP page according to the expression logic of the first floor JavaBeans.See now how JSP is handle claim of HTTP. In basic claim model, a claim directly was send to JSP page in. The code of JSP controls to carry on hour of the logic processing and module of JavaBeanses' hand over with each other, and the manifestation result in dynamic state bornly, mixing with the HTML page of the static state HTML code. The Beans can be JavaBeans or module of EJBs. Moreover, the more complicated claim model can see make from is request other JSP pages of the page call sign or Java Servlets.The engine of JSP wants to chase the code of Java that the label of JSP, code of Java in the JSP page even all converts into the big piece together with the static state HTML contentses actually. These codes piece was organized the Java Servlet that customer can not see to go to by the engine of JSP, then the Servlet edits and translate them automatically byte code of Java. Thus, the visitant that is the website requests a JSP page, under the condition of it is not knowing, an already born, the Servlet actual full general that prepared to edit and translate completes all works, very concealment but again and efficiently. The Servlet is to edit and translate of, so the code of JSP in the web page does not need when the every time requests that page is explain. The engine of JSP need to be edit and translate after Servlet the code end is modify only once, then this Servlet that editted and translate can be carry out. The in view of the fact JSP engine auto is born to edit and translate the Servlet also, need not procedure member begins to edit and translate the code, so the JSP can bring vivid sex that function and fast developments need that you are efficiently.Compared with the traditional CGI, the JSP has the equal advantage. First, on the speed, the traditional procedure of CGI needs to use the standard importation of the system to output the equipments to carry out the dynamic state web page born, but the JSP is direct is mutually the connection with server. And say for the CGI, each interview needs to add to add a progress to handle, the progress build up and destroy by burning constantly and will be a not small burden for calculator of be the server of Web. The next in order, the JSP is specialized to develop but design for the Web of, its purpose is for building up according to the Web applied procedure, included the normand the tool of a the whole set. Use the technique of JSP can combine a lot of JSP pages to become a Web application procedure very expediently.中文翻译JSP技术发展史作者:Bluce Rakel 出处:/zh-cn/magazine/cc163420.aspx Java Server Pages(JSP)是一种基于web的脚本编程技术,类似于网景公司的服务器端Java脚本语言——server-side JavaScript(SSJS)和微软的Active Server Pages(ASP)。

相关文档
最新文档