




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、.北京化工大学北方学院毕业设计(论文)外文文献原稿和译文外文文献原稿和译文原 稿JSPJSP (JavaServer 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 docum
2、ent (*. 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 l
3、anguage prepared by the category of XML tags and scriptlets, to produce dynamic pages package processing logic. Page also visit bytags 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 desi
4、gn, 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 programmi
5、ng 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
6、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 nee
7、ds 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. JavaScript, which is completely distinct from the Java programming language, is normally used to
8、 dynamically generate HTML on the client, building parts of the Web page as the browser loads the document. This is a useful capability and does not normally overlap with the capabilities of JSP (which runs only on the server). JSP pages still include SCRIPT tags for JavaScript, just as normal HTML
9、pages do. In fact, JSP can even be used to dynamically generate the JavaScript that will be sent to the client. So, JavaScript is not a competing technology; it is a complementary one.It is also possible to use JavaScript on the server, most notably on Sun ONE (formerly iPlanet), IIS, and BroadVisio
10、n servers. However, Java is more powerful, flexible, reliable, and portable.JSP (a recursive acronym for "JSP: Hypertext Preprocessor") is a free, open-source, HTML-embedded scripting language that is somewhat similar to both ASP and JSP. One advantage of JSP is that the dynamic part is wr
11、itten in Java, which already has an extensive API for networking, database access, distributed objects, and the like, whereas PHP requires learning an entirely new, less widely used language. A second advantage is that JSP is much more widely supported by tool and server vendors than is JSP.Versus P
12、ure Servlets.JSP doesn't provide any capabilities that couldn't, in principle, be accomplished with servlets. In fact, JSP documents are automatically translated into servlets behind the scenes. But it is more convenient to write (and to modify!) regular HTML than to use a zillion println st
13、atements to generate the HTML. Plus, by separating the presentation from the content, you can put different people on different tasks: your Web page design experts can build the HTML by using familiar tools and either leave places for your servlet programmers to insert the dynamic content or invoke
14、the dynamic content indirectly by means of XML tags.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 a
15、ny 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, info
16、rmation processing, a server to numerous servers, Java shows a tremendous Vitality. (4)diversification 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
17、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 clas
18、s 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.
19、 Know servlets for four reasons:1.JSP pages get translated into servlets. You can't understand how JSP works without understanding servlets.2.JSP consists of static HTML, special-purpose JSP tags, and Java code. What kind of Java code? Servlet code! You can't write that code if you don't
20、 understand servlet programming.3.Some tasks are better accomplished by servlets than by JSP. JSP is good at generating pages that consist of large sections of fairly well structured HTML or other character data. Servlets are better for generating binary data, building pages with highly variable str
21、ucture, and performing tasks (such as redirection) that involve little or no output.4.Some tasks are better accomplished by a combination of servlets and JSP than by either servlets or JSP alone. Versus JavaScriptJavaScript, which is completely distinct from the Java programming language, is normall
22、y used to dynamically generate HTML on the client, building parts of the Web page as the browser loads the document. This is a useful capability and does not normally overlap with the capabilities of JSP (which runs only on the server). JSP pages still include SCRIPT tags for JavaScript, just as nor
23、mal HTML pages do. In fact, JSP can even be used to dynamically generate the JavaScript that will be sent to the client. So, JavaScript is not a competing technology; it is a complementary one.JSP is by no means perfect. Many people have pointed out features that could be improved. This is a good th
24、ing, and one of the advantages of JSP is that the specification is controlled by a community that draws from many different companies. So, the technology can incorporate improvements in successive releases.However, some groups have developed alternative Java-based technologies to try to address thes
25、e deficiencies. This, in our judgment, is a mistake. Using a third-party tool like Apache Struts that augments JSP and servlet technology is a good idea when that tool adds sufficient benefit to compensate for the additional complexity. But using a nonstandard tool that tries to replace JSP is a bad
26、 idea. When choosing a technology, you need to weigh many factors: standardization, portability, integration, industry support, and technical features. The arguments for JSP alternatives have focused almost exclusively on the technical features part. But portability, standardization, and integration
27、 are also very important. For example, the servlet and JSP specifications define a standard directory structure for Web applications and provide standard files (.war files) for deploying Web applications. All JSP-compatible servers must support these standards. Filters can be set up to apply to any
28、number of servlets or JSP pages, but not to nonstandard resources. The same goes for Web application security settings.JSP six built-in objects: request, response, out, session, application, config, pagecontext, page, exception. ONE.Request for: The object of the package of information submitted by
29、users, by calling the object corresponding way to access the information package, namely the use of the target users can access the information. TWO.Response object: The customer's request dynamic response to the client sent the data. THREE.session object 1.What is the session: session object is
30、 a built-in objects JSP, it in the first JSP pages loaded automatically create, complete the conversation of management. From a customer to open a browser and connect to the server, to close the browser, leaving the end of this server, known as a conversation. When a customer visits a server, the se
31、rver may be a few pages link between repeatedly, repeatedly refresh a page, the server should be through some kind of way to know this is the same client, which requires session object. 2.session object ID: When a customer's first visit to a server on the JSP pages, JSP engines produce a session
32、 object, and assigned a String type of ID number, JSP engine at the same time, the ID number sent to the client, stored in Cookie, this session objects, and customers on the establishment of a one-to-one relationship. When a customer to connect to the server of the other pages, customers no longer a
33、llocated to the new session object, until, close your browser, the client-server object to cancel the session, and the conversation, and customer relationship disappeared. When a customer re-open the browser to connect to the server, the server for the customer to create a new session object. FORE.a
34、plication target 1.What is the application: Servers have launched after the application object, when a customer to visit the site between the various pages here, this application objects are the same, until the server is down. But with the session difference is that all customers of the application
35、objects are the same, that is, all customers share this built-in application objects. 2.application objects commonly used methods: (1)public void setAttribute (String key, Object obj): Object specified parameters will be the object obj added to the application object, and to add the subject of the d
36、esignation of a keyword index. (2)public Object getAttribute (String key): access to application objects containing keywords for. FIVE.out targets out as a target output flow, used to client output data. out targets for the output data. SIX.Cookie 1.What is Cookie: Cookie is stored in Web server on
37、the user's hard drive section of the text. Cookie allow a Web site on the user's computer to store information on and then get back to it. For example, a Web site may be generated for each visitor a unique ID, and then to Cookie in the form of documents stored in each user's machine. If
38、you use IE browser to visit Web, you will see all stored on your hard drive on the Cookie. They are most often stored in places: c: windows cookies (in Window2000 is in the C: Documents and Settings your user name Cookies) Cookie is "keyword key = value value" to preserve the format of the
39、 record. 2.Targets the creation of a Cookie, Cookie object called the constructor can create a Cookie. Cookie object constructor has two string parameters: Cookie Cookie name and value. Cookie c = new Cookie ( "username", "john"); 3.If the JSP in the package good Cookie object to
40、 send to the client, the use of the response.addCookie () method. Format: response.addCookie (c) 4.Save to read the client's Cookie, the use of the object request getCookies () method will be implemented in all client came to an array of Cookie objects in the form of order, to meet the need to r
41、emove the Cookie object, it is necessary to compare an array cycle Each target keywords.译 文JSPJSP(JavaServer Pages)是由Sun Microsystems公司倡导、许多公司参与一起建立的一种动态网页技术标准。JSP技术有点类似ASP技术,它是在传统的网页HTML文件(*.htm,*.html)中插入Java程序段(Scriptlet)和JSP标记(tag),从而形成JSP文件(*.jsp)。 用JSP开发的Web应用是跨平台的,即能在Linux下运行,也能在其他操作系统上运行。JSP
42、技术使用Java编程语言编写类XML的tags和scriptlets,来封装产生动态网页的处理逻辑。网页还能通过tags和scriptlets访问存在于服务端的资源的应用逻辑。JSP将网页逻辑与网页设计和显示分离,支持可重用的基于组件的设计,使基于Web的应用程序的开发变得迅速和容易。 Web服务器在遇到访问JSP网页的请求时,首先执行其中的程序段,然后将执行结果连同JSP文件中的HTML代码一起返回给客户。插入的Java程序段可以操作数据库、重新定向网页等,以实现建立动态网页所需要的功能。 JSP与Java Servlet一样,是在服务器端执行的,通常返回该客户端的就是一个HTML文本,因此
43、客户端只要有浏览器就能浏览。JSP页面由HTML代码和嵌入其中的Java代码所组成。服务器在页面被客户端请求以后对这些Java代码进行处理,然后将生成的HTML页面返回给客户端的浏览器。Java Servlet 是JSP的技术基础,而且大型的Web应用程序的开发需要Java Servlet和JSP配合才能完成。JSP具备了Java技术的简单易用,完全的面向对象,具有平台无关性且安全可靠,主要面向因特网的所有特点。 JavaScript,这是完全不同于Java的编程语言,通常用于在客户机上动态生成HTML,构建部分的Web页面作为浏览器加载文档。这是一个有用的功能,并且通常与JSP(仅运行在服务
44、器上)的功能不重叠。JSP页面还包括对JavaScript脚本标签处理,就像正常的HTML页面做的。事实上,JSP甚至可以被用来动态地生成JavaScript,将被发送到客户端。因此,JavaScript并不是一个竞争的技术,它是互补的。还可以使用JavaScript在服务器上,最显著的是在sun一(原iPlanet) ,IIS,BroadVision服务器。并且,Java将更强大、灵活、可靠、轻便。JSP(递归缩写“JSP:超文本预处理器”)是一个免费的、开源的、html嵌入式脚本语言,有点类似于ASP。JSP动态的部分是用Java编写的,它已经有了一个广泛的API,用于网络、数据库访问、分
45、布式对象,等等,而PHP需要学习一种全新的,更少的广泛使用的语言。第二个好处是, 与纯servlet相比,JSP是更广泛的支持,工具和服务器供应商。JSP提供任何原则上servlet可完成的功能。事实上,在幕后JSP文件会自动翻译成servlet。但是它更方便的写(和修改!)普通HTML比使用一个庞大的数字println语句来生成HTML。另外,通过将表示从内容,你可以把不同的人分配在不同的任务:你的网页设计专家可以构建HTML通过使用熟悉的工具,你的servlet程序员间接通过XML标签插入动态内容或调用动态内容。JSP技术的强势(1)一次编写,到处运行。在这一点上Java比PHP更出色,除
46、了系统之外,代码不用做任何更改。(2)系统的多平台支持。基本上可以在所有平台上的任意环境中开发,在任意环境中进行系统部署,在任意环境中扩展。相比ASP/PHP的局限性是显而易见的。 (3)强大的可伸缩性。从只有一个小的Jar文件就可以运行Servlet/JSP,到由多台服务器进行集群和负载均衡,到多台Application进行事务处理,消息处理,一台服务器到无数台服务器,Java显示了一个巨大的生命力。 (4)多样化和功能强大的开发工具支持。这一点与ASP很像,Java已经有了许多非常优秀的开发工具,而且许多可以免费得到,并且其中许多已经可以顺利的运行于多种平台之下。 JSP技术的弱势:(1)
47、与ASP一样,Java的一些优势正是它致命的问题所在。正是由于为了跨平台的功能,为了极度的伸缩能力,所以极大的增加了产品的复杂性。 (2) Java的运行速度是用class常驻内存来完成的,所以它在一些情况下所使用的内存比起用户数量来说确实是“最低性能价格比”了。从另一方面,它还需要硬盘空间来储存一系列的.java文件和.class文件,以及对应的版本文件。需要了解Servlet:(1)JSP页面会转换成Servlet。不了解Servlet就无法知道JSP如何工作。(2)JSP由静态HTML、专用的JSP标签和Java代码组成。哪种类型的Java代码呢?当然是Servlet代码!如果不了解Se
48、rvlet编程,那么就无法编写这种代码。 (3)一些任务用Servlet完成比用JSP来完成要好。JSP擅长生成由大量组织有序的结构化HTML或其他字符数据组成的页面。Servlet擅长生成二进制数据,构建结构多样的页面,以及执行输出很少或者没有输出的任务(比如重定向)。(4)有些任务更适合于组合使用Servlet和JSP来完成,而非单独使用Servlet或JSP。 与JavaScript相比JavaScript和Java编程语言完全是两码事,前者一般用于在客户端动态生成HTML,在浏览器载入文档时构建网页的部分内容。这是一项有用的功能,一般与JSP的功能(只在服务器端运行)并不发生重叠。和常
49、规HTML页面一样,JSP页面依旧可以包括用于JavaScript的SCRIPT标签。实际上,JSP甚至能够用来动态生成发送到客户端的JavaScript。因此,JavaScript不是一项竞争技术,它是一项补充技术。JSP绝不是完美的。许多人指出,可以改进。这是一件好事,优点之一是,该规范是JSP由社区,吸引了来自许多不同的公司。因此,这种技术可以将改善连续版本。然而,一些组织已经开发出替代基于java技术来试图解决这些缺陷。这一点,在我们的判断,是一个错误。使用第三方工具像Apache Struts,增强JSP和servlet技术是一个好主意当工具添加足够的好处来弥补额外的复杂性。但是使用一个非标准的工具,试图取代JSP是一个坏主意。当选择一个技术,你需要权衡许多因素:标准化、可移植性、集成、行业的支持,和技术特点。对于JSP的参数选择已经几乎只关注技术特征的部分。但可移植性、标准化和集成也很重要。例如,servlet和JSP规范定义一个标准为Web应用程序的目录结构,并提供标准的文件(.war文件部署Web应用程序)。所有jsp兼容的服务器必须支持这些标准。过滤器可以设置适用于任意数量的servlet或JSP页面,但不非标准的资源。同样适用于Web应用程序的安全设置。JSP六
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 公司环保巡查管理制度
- 小区重点人员管理制度
- 租房合同协议书直播间
- 互联网金融财务担保合同负债监管细则
- 文化产业股权投资及版权运营合作协议
- 标准砖与烧结砖出口贸易合同
- 知识产权策划保护服务合同
- 中学班主任教学与学生辅导聘用合同
- 住宅区拆迁补偿安置合同
- 财务人员财务责任担保合同
- 高考前在学校高三班主任对学生的最后一课教育课件
- 摩托车交通事故分析报告
- JC/T 929-2003叶腊石行业标准
- 国家职业技术技能标准 6-18-01-01 车工 人社厅发2018145号
- 人教版小学五年级数学下册第三单元测试卷(含答案)
- 小儿急乳蛾的护理查房
- 胸骨后甲状腺肿课件
- 公司差旅费报销单
- 如何撰写高水平的博士论文
- 三班两倒排班表
- 制冷车间及冷库日常隐患排查表
评论
0/150
提交评论