搜档网
当前位置:搜档网 › 外文翻译 外文资料和译文

外文翻译 外文资料和译文

外文翻译    外文资料和译文
外文翻译    外文资料和译文

(论文)译文

XX大学XXXXXXX

外文资料和译文

专业:软件工程

班级:软件XXXXX

姓名:XXXXX

学号:XXXXXXXXXXXXXX

指导教师:XXXXXXXX

2009 年 12 月 17 日

原文

1.1 A JSP technology overview

Let's begin by talking a little about how JSP pages work. We're going to keep it simple and focus on some of the basics. For more information, see Resources for links to additional JSP technology information.

In the traditional sense, JSP pages look very much like HTML pages, with a few extra tags. These tags allow the designer to embed Java code (not JavaScript) in the page itself. A Web application server, like the IBM WebSphere Application Server, will intercept requests for JSP pages. It's tipped off to their existence by the page's extension: .jsp (not .html). The Web application server then preprocesses the JSP page, taking out the JSP tags and any embedded Java code, leaving only the HTML. The extracted JSP tags and embedded Java code are used to build a Java servlet (JSP page servlet) that runs the code and inserts the results back into the original page where the JSP tags used to be. The result is pure HTML. The Java is stripped out and run on the server before the requesting browser sees any result.

We can apply the same principle to an XML page. Before the requester of the JSP page containing XML ever sees the XML (be it a browser or some other B2B application), the Java code is stripped out of the JSP page and used to generate additional content, which is inserted back into the page at the points where the JSP tags used to reside. This feature gives you the ability to control exactly where new content is to be inserted, down to the character.

We'll look at how to make this work in a minute. First, let's consider why you might want to create dynamic XML using JSP. Why not simply write a Java application or servlet to generate the entire document? Why bother with JSP at all? The most important reason, providing only portions of an XML document are dynamic, is that it makes sense not to regenerate that static content for every request. Using a JSP page, the static XML within the page acts as a template that is filled out by the dynamic content. Your Java code is tasked with generating only the content that might change over time -- a more efficient approach.

As a practical matter, JSP pages allow you to separate tasks for which different developers will be responsible. In particular, they allow you to better separate the data from the view, allowing you to add new presentations without affecting the logic. Imagine having one Java servlet that performs the business logic and redirects the resulting data to an appropriate JSP page based on the nature of the request. For example, a servlet might redirect data to a JSP page containing WML when it detects a WAP phone browser making the request. It could also redirect the data to a JSP page containing HTML for standard browser requests.

1.2 Benefits of JSP

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 appropriate in 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 you choose.

JSP provides the following benefits over servlets alone:1.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.2.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.3. 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 appropriate tool for the

job, and servlets, by themselves, do not complete your toolkit.

1.3 Advantages of JSP

Over Competing TechnologiesA 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 own purposes. 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, ColdFusion did it years earlier. Even ASP (a product from the very software company of the aforementioned 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.

So, the question becomes: why use JSP instead of one of these other technologies? Our first response is that we are not arguing that everyone should. Several of those other technologies are quite good and are reasonable options in some situations. In other situations, however, JSP is clearly better. Here are a few of the reasons.

1.3.1 Versus .NET and Active Server Pages (ASP).

NET is well-designed technology from Microsoft. https://www.sodocs.net/doc/503648271.html, is the part that directly competes with servlets and JSP. The advantages of JSP are twofold.

First, JSP is portable to multiple operating systems and Web servers; you aren't locked into deploying on Windows and IIS. Although the core .NET platform runs on a few non-Windows platforms, the ASP part does not. You cannot expect to deploy serious https://www.sodocs.net/doc/503648271.html, applications on multiple servers and operating systems. For some applications, this difference does not matter. For others, it matters greatly.

Second, for some applications the choice of the underlying language matters greatly. For example, although .NET's C# language is very well designed and is similar to Java, fewer programmers are familiar with either the core C# syntax or the many auxiliary libraries. In addition, many developers still use the original version of ASP. With this version, JSP has a clear advantage for the dynamic code. With JSP, the dynamic part is written in Java, not VBScript or another ASP-specific language, so JSP is more powerful and better suited to complex applications that require reusable components.

You could make the same argument when comparing JSP to the previous version of ColdFusion; with JSP you can use Java for the "real code" and are not tied to a particular server product. However, the current release of ColdFusion is within the context of a J2EE server, allowing developers to easily mix ColdFusion and servlet/JSP code.

1.3.2 Versus PHP

PHP (a recursive acronym for "PHP: 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 written 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 PHP.

1.3.3 Versus Pure 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 statements 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 the dynamic content indirectly by means of XML tags.Does this mean that you can just learn JSP and forget about servlets? Absolutely not! JSP developers need to 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 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 structure, 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.

1.3.4 Versus JavaScript

JavaScript, which is completely distinct from the Java programming language, is normally 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 normal 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.

It is also possible to use JavaScript on the server, most notably on Sun ONE

(formerly iPlanet), IIS, and BroadVision servers. However, Java is more powerful, flexible, reliable, and portable.Versus WebMacro or Velocity

JSP is by no means perfect. Many people have pointed out features that could be improved. This is a good thing, 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 these 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 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 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 number of servlets or JSP pages, but not to nonstandard resources. The same goes for Web application security settings.Besides, the tremendous industry support for JSP and servlet technology results in improvements that mitigate many of the criticisms of JSP. For example, the JSP Standard Tag Library and the JSP 2.0 expression language address two of the most well-founded criticisms: the lack of good iteration constructs and the difficulty of accessing dynamic results without using either explicit Java code or verbose jsp:useBean elements.

1.4 Misconceptions About JSP

Forgetting JSP Is Server-Side TechnologyHere are some typical questions Marty has received (most of them repeatedly).

? Our server is running JDK 1.4. So, how do I put a Swing component in a JSP

page?

? How do I put an image into a JSP page? I do not know the proper Java I/O commands to read image files.

? Since Tomcat does not support JavaScript, how do I make images that are highlighted when the user moves the mouse over them?

? Our clients use old er browsers that do not understand JSP. What should we do?

? When our clients use "View Source" in a browser, how can I prevent them from seeing the JSP tags?All of these questions are based upon the assumption that browsers know something about the server-side process. But they do not. Thus: ? For putting applets with Swing components into Web pages, what matters is the browser's Java version—the server's version is irrelevant. If the browser supports the Java 2 platform, you use the normal APPLET (or Java plug-in) tag and would do so even if you were using non-Java technology on the server.

? You do not need Java I/O to read image files; you just put the image in the directory for Web resources (i.e., two levels up from WEB-INF/classes) and output a normal IMG tag.

? You create images that change under the mouse by using client-side JavaScript, referenced with the SCRIPT tag; this does not change just because the server is using JSP.

? Browsers do not "support" JSP at all—they merely see the output of the JSP page. So, make sure your JSP outputs HTML compatible with the browser, just as you would do with static HTML pages.

? And, of course you need not do anything to prevent clients from seeing JSP tags; those tags are processed on the server and are not part of the output that is sent to the client.Confusing Translation Time with Request TimeA JSP page is converted into a servlet. The servlet is compiled, loaded into the server's memory, initialized, and executed. But which step happens when? To answer that question, remember two points:

? The JSP page is translated into a servlet and compiled only the first time it is accessed after having been modified.

? Loading into memory, initialization, and execution follow the normal rules for servlets.Table 1 gives some common scenarios and tells whether or not each step occurs in that scenario. The most frequently misunderstood entries are highlighted. When referring to the table, note that servlets resulting from JSP pages use the _jspService method (called for both GET and POST requests), not doGet or doPost. Also, for initialization, they use the jspInit method, not the init method.

中文翻译

1.1 JSP技术概述

让我们先对 JSP页面的工作方式作一些简单的讨论。我们将力求简单,只将注意力集中于一些基本的方面。有关详细信息,请参阅参考资料中到其他 JSP 技术信息的链接。

从传统意义上讲,JSP页面与 HTML页面很相似,只是多了一些标记。这些标记使设计人员能够将 Java代码(不是 JavaScript)嵌入到页面中。Web应用程序服务器(如 IBM WebSphere Application Server)将截取对 JSP页面的请求。页面的扩展名 .jsp(不是 .html)向应用程序服务器暗示了这些标记的存在。Web应用程序服务器随后对 JSP页面进行预处理,提取其中的 JSP标记和任何内嵌的 Java代码,而只保留 HTML。提取出来的 JSP标记和内嵌 Java代码用来构建 Java servlet(JSP页面 servlet),Java servlet运行该代码并将结果插入到原页面中 JSP标记所在的位置。得到的结果是纯 HTML。在请求浏览器看到任何结果之前,Java代码被剥离并在服务器上运行。

我们可以将同样的原理应用于 XML页面。在包含 XML的 JSP页面的请求者(可能是一个浏览器,也可能是某个企业对企业的应用程序)看到 XML之前,Java代码被剥离 JSP页面并用来生成其他内容,生成的内容被插入到 JSP标记原来所在的页面位置。这种特性使您能够精确地控制将新内容插入到什么位置,甚至可以精确到单个字符。

过一会儿我们将考虑如何使用以上的特性。首先,让我们考虑为什么您可能会想到用 JSP创建动态 XML。为什么不只是编写 Java应用程序或 servlet来生成整个文档?为什么要费心去使用 JSP呢?最重要的原因是无须为每个请求重新生成静态内容是有意义的(假定 XML文档只有部分内容是动态的)。通过使用 JSP页面,页面内的静态 XML就可以充当一个模板,该模板是用动态内容填充的。Java代码的任务仅仅是生成可能随时间变化的内容 --这是一种更有效的方法。

非常现实的一个问题是,JSP页面使您能够将不同开发人员负责的任务分开。特别是,它们允许您更好地将数据与视图分离开,从而允许您在不影响逻辑的情

况下添加新表示。设想这样一个 Java servlet,它执行业务逻辑,并根据请求的性质将生成的结果重定向到适当的 JSP页面。例如,当 servlet检测到 WAP 电话浏览器发出请求时,它就可以将数据重定向到一个包含 WML的 JSP页面。对于标准浏览器请求,它可以将数据重定向到包括 HTML的 JSP页面。

1.2 JSP的好处

JSP页面最终会转换成servler。因而,从根本上,JSP页面能够执行的任何任务都可以用servler来完成。然而,这种底层的等同性并不意味着servler 和JSP页面对于所有的情况都等同适用。问题不在于技术的能力,而是二者在便利性、生产率和可维护性上的不同。毕竟,在特定平台上能够用Java编程语言完成的事情,同样可以用汇编语言来完成,但是选择哪种语言依旧十分重要。和单独使用servler相比,JSP提供下述好处:1.JSP中HTML的编写与维护更为简单。JSP中可以使用常规的HTML:没有额外的反斜杠,没有额外的双引号,也没有暗含的Java语法。2.能够使用标准的网站开发工具。即使对那些对JSP一无所知的HTML工具,我们也可以使用,因为它们会忽略JSP标签(JSP tags)。3.可以对开发团队进行划分。Java程序员可以致力于动态代码。Web开发人员可以将经理集中在表示层(presentation layer)上。对于大型的项目,这种划分极为重要。依据开发团队的大小,及项目的复杂程度,可以对静态HTML和动态内容进行弱分离(weaker separation)和强分离(stronger separation)。在此,这个讨论并不是让您停止使用servlets,只使用JSP。几乎所有的项目都会同时用到这两种技术。针对项目中的某些请求,您可能会在MVC构架下组合使用这两项技术。我们总是希望用适当的工具完成相对应的工作,仅仅是servlet并不能填满您的工具箱。

1.3 JSP相对于竞争技术的优势

许多年前,Marty受到邀请,参加一个有关软件技术的小型(20个人)研讨会.做在Marty旁边的人是James Gosling--- Java编程语言的发明者。隔几个位置,是来自华盛顿一家大型软件公司的高级经理。在讨论过程中,研讨会的主席提出了Jini的议题,这在当时是一项新的Java技术.主席向该经理询问他的想法.他继续说,他们会持续关注这项技术,如果这项技术变得流行起来,他们会遵循公司的“接受并扩充(embrace and extend)”的策略.此时, Gosling随意地插话说

“你的意思其实就是不接受且不扩充(disgrace and distend)。”

在此, Gosling的抱怨显示出,他感到这个公司会从其他公司那里拿走技术,用于他们自己的目的.但你猜这次怎么样?这次鞋子穿在了另一只脚上。Java社团没有发明这一思想----将页面设计成由静态HTML和用特殊标签标记的动态代码混合组成.。ColdFusion多年前就已经这样做了。甚至ASP(来自于前述经理所在公司的一项产品)都在JSP出现之前推广了这种方式。实际上,JSP不只采用了这种通用概念,它甚至使用许多和ASP相同的特殊标签。因此,问题变成:为什么使用JSP,而不使用其他技术呢?我们的第一反应是我们不是在争论所有的人应该做什么。其他这些技术中,有一些也很不错,在某些情况下也的确是合情合理的选择.然而,在其他情形中,JSP明显要更好一些。下面给出几个理由。

1.3.1 与.NET和Active Server Pages (ASP)相比.

NET是Microsoft精心设计的一项技术。https://www.sodocs.net/doc/503648271.html,是与servlets和JSP直接竞争的技术。JSP的优势体现在两个方面。

首先,JSP可以移植到多种操作系统和Web服务器,您不必仅仅局限于部署在Windows 和IIS上尽管核心.NET平台可以在好几种非Windows平台上运行,但ASP这一部分不可以。您不能期望可以将重要的https://www.sodocs.net/doc/503648271.html,应用部署到多种服务器和操作系统。对于某些应用,这种差异没有什么影响。但有些应用,这种差异却非常重要。

其次,对于某些应用,底层语言的选择至关重要。例如,尽管.NET的C#语言设计优良,且和Java类似,但熟悉核心C#语法和众多工具库的程序员很少。此外,许多开发者依旧使用最初版本的ASP。相对于这个版本,JSP在动态代码方面拥有明显的优势。使用JSP,动态部分是用Java编写的,而非VBScript过其他ASP专有的语言,因此JSP更为强劲,更适合于要求组件重用的复杂应用。

当将JSP与之前版本的ColdFusion对比时,您可能会得到相同的结论。应用JSP,您可以使用Java编写“真正的代码”,不必依赖于特定的服务器产品。然而,当前版本的ColdFusion满足J2EE服务器的环境,允许开发者容易的混合使用ColdFusion和Servlet/JSP代码。

1.3.2 与PHP相比

PHP(“PHP:Hypertext Preprocessor”的递归字母缩写词)是免费的、开放源

代码的、HTML嵌入其中的脚本语言,与ASP和JSP都有某种程度的类似。JSP 的一项优势是动态部分用Java编写,而Java已经在联网、数据库访问、分布式对象等方面拥有广泛的API,而PHP需要学习全新的、应用相对广泛的语言。JSP 的第二项优势是,和PHP相比,JSP拥有极为广泛的工具和服务器提供商的支持。

与纯Servlet相比原则上,JSP并没有提供Servlet不能完成的功能。实际上,JSP文档在后台被自动转换成Servlet。但是编写(和修改)常规的HTML,要比无数println语句生成HTML要方便得多。另外,通过将表示与内容分离,可以为不同的人分配不同的任务:网页设计人员使用熟悉的工具构建HTML,要么为Servlet程序员留出空间插入动态内容,要么通过XML标签间接调用动态内容。这是否表示您只可以学习JSP,将Servlet丢到一边呢?当然不是!由于以下4种原因,JSP开发人员需要了解Servlet:

(1)JSP页面会转换成Servlet。不了解Servlet就无法知道JSP如何工作。(2)JSP由静态HTML、专用的JSP标签和Java代码组成。哪种类型的Java代码呢?当然是Servlet代码!如果不了解Servlet编程,那么就无法编写这种代码。

(3)一些任务用Servlet完成比用JSP来完成要好。JSP擅长生成由大量组织有序的结构化HTML或其他字符数据组成的页面。Servlet擅长生成二进制数据,构建结构多样的页面,以及执行输出很少或者没有输出的任务(比如重定向)。(4)有些任务更适合于组合使用Servlet和JSP来完成,而非单独使用Servlet 或JSP。

1.3.3与JavaScript相比

JavaScript和Java编程语言完全是两码事,前者一般用于在客户端动态生成HTML,在浏览器载入文档时构建网页的部分内容。这是一项有用的功能,一般与JSP的功能(只在服务器端运行)并不发生重叠。和常规HTML页面一样,JSP页面依旧可以包括用于JavaScript的SCRIPT标签。实际上,JSP甚至能够用来动态生成发送到客户端的JavaScript。因此,JavaScript不是一项竞争技术,它是一项补充技术。

JavaScript也可以用在服务器端,最因人注意的是SUN ONE(以前的iPlanet)、IIS和BroadVision服务器。然而,Java更为强大灵活、可靠且可移

植。

与WebMacro和Velocity相比JSP决非完美,许多人都曾指出过JSP中能够改进的功能。这是一件好事,JSP的优势之一是该规范由许多不同公司组成的社团控制。因此,在后续版本中,这项技术能够得到协调的改进。

但是,一些组织已经开发出了基于Java的替代技术,试图弥补这些不足。据我们的判断,这样做是错误的。使用扩充JSP和Servlet技术的第三方工具,如Apache Structs,是一种很好的思路,只要该工具带来的好处能够补偿工具带来的额外复杂性。但是,试图使用非标准的工具代替JSP则不理想。在选择一项技术时,需要权衡许多方面的因素:标准化、可移植性、集成性、行业支持和技术特性。对于JSP替代技术的争论几乎只是集中在技术特性上,而可移植性、标准化和集成性也十分重要。例如,Servlet和JSP规范为Web应用定义了一个标准的目录结构,并提供用于部署Web应用的标准文件(.war文件)。所有JSP 兼容的服务器必须支持这些标准。我们可以建立过滤器作用到任意树木的Servlet和JSP页面上,但不能用于非标准资源。Web应用安全设置也同样如此。

此外,业界对JSP和Servlet技术的巨大支持使得这两项技术都有了巨大的进步,从而减轻了对JSP的许多批评。例如,JSP标准标签库和JSP 2.0表达式语言解决了两种最广泛的批评:缺乏良好的迭代结构;不使用显式的Java代码或冗长的jsp:useBean元素难以访问动态结果。

1.4对JSP的误解

忘记JSP技术是服务器端技术下面是Marty收到的一些典型问题(大部分问题不止一次的出现)。我们的服务器正在运行JDK1.4。我如何将Swing组件用到JSP页面中呢?我如何将图像放到JSP页面中?我不知道读取图像文件应该使用哪些Java I/O命令。 Tomcat不支持JavaScript,当用户在图像上移动鼠标时,我如何使图像突出显示呢?我们的客户使用不理解JSP的旧浏览器。我应该怎么做?当我们的客户在浏览器中使用“View Source”(查看源代码)时,如何阻止他们看到JSP标签?

所有这些问题都基于浏览器对服务器端的过程在有所了解的假定之上。但事实上浏览器并不了解服务器端的过程。因此:如果要将使用Swing组件的applet 放到网页中,重要的是浏览器的Java版本,和服务器的Java版本无关。如果浏

览器支持Java 2平台,您可以使用正常的APPLET(或Java插件)标签,即使在服务器上使用了非Java技术也须如此。

您不需要Java I/O来读取图像文件,您只需将图像放在存储Web资源的目录中(即WEB-INF/classes向上两级的目录),并输出一个正常的IMG标签。

您应该用SCRIPT标签,使用客户端JavaScript创建在鼠标下会更改的图像,这不会由于服务器使用JSP而改变。浏览器根本不“支持”JSP----它们看到的只是JSP页面的输出。因此,如同对待静态HTML页面一样,只需确保JSP输出的HTML与浏览器兼容。当然,您不需要采取什么措施来阻止客户看到JSP标签,这些标签在服务器上进行处理,发送给客户的输出中并不出现。

混淆转换期间和请求期间JSP页面需要转换成servlet。Servlet在编译后,载入到服务器的内容中,初始化并执行。但是每一步发生在什么时候呢?要回答这个问题,要记住以下两点:

JSP页面仅在修改后第一次被访问时,才会被转换成servlet并进行编译;载入到内存中、初始化和执行遵循servlet的一般规则。表1列出一些常见的情形,讲述在该种情况下每一步是否发生。最常被误解的项已经突出标示出来。在参考该表时,要注意,由JSP页面生成的servlet使用_jspService方法(GET 和POST请求都调用该函数),不是doGet或doPost方法。同样,对于初始化,它们使用jspInit方法,而非init方法。

1外文文献翻译原文及译文汇总

华北电力大学科技学院 毕业设计(论文)附件 外文文献翻译 学号:121912020115姓名:彭钰钊 所在系别:动力工程系专业班级:测控技术与仪器12K1指导教师:李冰 原文标题:Infrared Remote Control System Abstract 2016 年 4 月 19 日

红外遥控系统 摘要 红外数据通信技术是目前在世界范围内被广泛使用的一种无线连接技术,被众多的硬件和软件平台所支持。红外收发器产品具有成本低,小型化,传输速率快,点对点安全传输,不受电磁干扰等特点,可以实现信息在不同产品之间快速、方便、安全地交换与传送,在短距离无线传输方面拥有十分明显的优势。红外遥控收发系统的设计在具有很高的实用价值,目前红外收发器产品在可携式产品中的应用潜力很大。全世界约有1亿5千万台设备采用红外技术,在电子产品和工业设备、医疗设备等领域广泛使用。绝大多数笔记本电脑和手机都配置红外收发器接口。随着红外数据传输技术更加成熟、成本下降,红外收发器在短距离通讯领域必将得到更广泛的应用。 本系统的设计目的是用红外线作为传输媒质来传输用户的操作信息并由接收电路解调出原始信号,主要用到编码芯片和解码芯片对信号进行调制与解调,其中编码芯片用的是台湾生产的PT2262,解码芯片是PT2272。主要工作原理是:利用编码键盘可以为PT2262提供的输入信息,PT2262对输入的信息进行编码并加载到38KHZ的载波上并调制红外发射二极管并辐射到空间,然后再由接收系统接收到发射的信号并解调出原始信息,由PT2272对原信号进行解码以驱动相应的电路完成用户的操作要求。 关键字:红外线;编码;解码;LM386;红外收发器。 1 绪论

外文翻译

Load and Ultimate Moment of Prestressed Concrete Action Under Overload-Cracking Load It has been shown that a variation in the external load acting on a prestressed beam results in a change in the location of the pressure line for beams in the elastic range.This is a fundamental principle of prestressed construction.In a normal prestressed beam,this shift in the location of the pressure line continues at a relatively uniform rate,as the external load is increased,to the point where cracks develop in the tension fiber.After the cracking load has been exceeded,the rate of movement in the pressure line decreases as additional load is applied,and a significant increase in the stress in the prestressing tendon and the resultant concrete force begins to take place.This change in the action of the internal moment continues until all movement of the pressure line ceases.The moment caused by loads that are applied thereafter is offset entirely by a corresponding and proportional change in the internal forces,just as in reinforced-concrete construction.This fact,that the load in the elastic range and the plastic range is carried by actions that are fundamentally different,is very significant and renders strength computations essential for all designs in order to ensure that adequate safety factors exist.This is true even though the stresses in the elastic range may conform to a recognized elastic design criterion. It should be noted that the load deflection curve is close to a straight line up to the cracking load and that the curve becomes progressively more curved as the load is increased above the cracking load.The curvature of the load-deflection curve for loads over the cracking load is due to the change in the basic internal resisting moment action that counteracts the applied loads,as described above,as well as to plastic strains that begin to take place in the steel and the concrete when stressed to high levels. In some structures it may be essential that the flexural members remain crack free even under significant overloads.This may be due to the structures’being exposed to exceptionally corrosive atmospheres during their useful life.In designing prestressed members to be used in special structures of this type,it may be necessary to compute the load that causes cracking of the tensile flange,in order to ensure that adequate safety against cracking is provided by the design.The computation of the moment that will cause cracking is also necessary to ensure compliance with some design criteria. Many tests have demonstrated that the load-deflection curves of prestressed beams are approximately linear up to and slightly in excess of the load that causes the first cracks in the tensile flange.(The linearity is a function of the rate at which the load is applied.)For this reason,normal elastic-design relationships can be used in computing the cracking load by simply determining the load that results in a net tensile stress in the tensile flange(prestress minus the effects of the applied loads)that is equal to the tensile strength of the concrete.It is customary to assume that the flexural tensile strength of the concrete is equal to the modulus of rupture of the

外文翻译范例

要求:选择一篇和自己论文或者自己专业相关的外文进行翻译,英文字符数在6000-7000字符(注:可以继续按原文的一部分)。排版格式按照下文 公司的核心竞争力 原文来源:The Core Competence of the Corporation, Research Report on Harvard Business Review,1990 至少有三种检验方法可以用来确定公司的核心竞争力。首先,核心竞争力能够为公司进入多个市场提供方便。举例来说,显示器系统方面的核心竞争力能够使一家公司涉足计算器、微型电视机、手提电脑显示屏以及汽车仪表盘等广泛的业务领域,这就是卡西欧公司进军手持式电视机市场不足为奇的原因。第二,核心竞争力应当对最终产品为客户带来的可感知价值有重大贡献。显然,本田公司的发动机专长满足了这个条件。 最后一点,核心竞争力应当是竞争对手难以模仿的。如果核心竞争力是各项技术和生产技能的复杂的融合,那么这项能力就难以被竞争对手模仿。竞争对手或许能够获得核心竞争力中的几种技术,但是要复制其内部协调与学习的整体模式却非常困难。在20世纪60年代初期,JVC决定致力于录像带技术方面的核心竞争力,这个核心竞争力就通过了我们上述的三项检验。20世纪70年代末美国的RCA公司决心开发以唱针为基础的视频转动式系统,这个项目则不能通过上述三项检验。 。。。。。。。。。。。 The Core Competence of the Corporation The Core Competence of the Corporation Research Report on Harvard Business Review,1990 The distinction we observed in the way NEC and GTE conceived of themselves a portfolio of competencies versus a portfolio of businesses was repeated across many industries. From 1980 to 1988, Canon grew by 264%, Honda by 200%. Compare that with Xerox and Chrysler. And if Western managers were once anxious about the low cost and high quality of Japanese imports, they are now overwhelmed by the pace at which Japanese rivals are inventing new markets, creating new products, and enhancing them. Canon has given us personal copiers; Honda has moved from motorcycles to four wheel off road buggies. Sony developed the 8mm camcorder, Yamaha, the digital piano. Komatsu developed an underwater remote controlled bulldozer, while Casio's latest gambit is a small screen color LCD television. Who would have anticipated the evolution of these vanguard markets? In more established markets, the Japanese challenge has been just as disquieting. Japanese companies are generating a blizzard of features and functional enhancements that bring technological sophistication to everyday products. Japanese car producers have been pioneering four wheel steering, four valve-per cylinder engines, in car navigation systems, and sophisticated

ASP外文翻译原文

https://www.sodocs.net/doc/503648271.html, https://www.sodocs.net/doc/503648271.html, 是一个统一的 Web 开发模型,它包括您使用尽可能少的代码生成企业级 Web 应用程序所必需的各种服务。https://www.sodocs.net/doc/503648271.html, 作为 .NET Framework 的一部分提供。当您编写 https://www.sodocs.net/doc/503648271.html, 应用程序的代码时,可以访问 .NET Framework 中的类。您可以使用与公共语言运行库 (CLR) 兼容的任何语言来编写应用程序的代码,这些语言包括 Microsoft Visual Basic、C#、JScript .NET 和 J#。使用这些语言,可以开发利用公共语言运行库、类型安全、继承等方面的优点的https://www.sodocs.net/doc/503648271.html, 应用程序。 https://www.sodocs.net/doc/503648271.html, 包括: ?页和控件框架 ?https://www.sodocs.net/doc/503648271.html, 编译器 ?安全基础结构 ?状态管理功能 ?应用程序配置 ?运行状况监视和性能功能 ?调试支持 ?XML Web services 框架 ?可扩展的宿主环境和应用程序生命周期管理 ?可扩展的设计器环境 https://www.sodocs.net/doc/503648271.html, 页和控件框架是一种编程框架,它在 Web 服务器上运行,可以动态地生成和呈现 https://www.sodocs.net/doc/503648271.html, 网页。可以从任何浏览器或客户端设备请求 https://www.sodocs.net/doc/503648271.html, 网页,https://www.sodocs.net/doc/503648271.html, 会向请求浏览器呈现标记(例如 HTML)。通常,您可以对多个浏览器使用相同的页,因为 https://www.sodocs.net/doc/503648271.html, 会为发出请求的浏览器呈现适当的标记。但是,您可以针对诸如 Microsoft Internet Explorer 6 的特定浏览器设计https://www.sodocs.net/doc/503648271.html, 网页,并利用该浏览器的功能。https://www.sodocs.net/doc/503648271.html, 支持基于 Web 的设备(如移动电话、手持型计算机和个人数字助理 (PDA))的移动控件。

毕业设计外文翻译附原文

外文翻译 专业机械设计制造及其自动化学生姓名刘链柱 班级机制111 学号1110101102 指导教师葛友华

外文资料名称: Design and performance evaluation of vacuum cleaners using cyclone technology 外文资料出处:Korean J. Chem. Eng., 23(6), (用外文写) 925-930 (2006) 附件: 1.外文资料翻译译文 2.外文原文

应用旋风技术真空吸尘器的设计和性能介绍 吉尔泰金,洪城铱昌,宰瑾李, 刘链柱译 摘要:旋风型分离器技术用于真空吸尘器 - 轴向进流旋风和切向进气道流旋风有效地收集粉尘和降低压力降已被实验研究。优化设计等因素作为集尘效率,压降,并切成尺寸被粒度对应于分级收集的50%的效率进行了研究。颗粒切成大小降低入口面积,体直径,减小涡取景器直径的旋风。切向入口的双流量气旋具有良好的性能考虑的350毫米汞柱的低压降和为1.5μm的质量中位直径在1米3的流量的截止尺寸。一使用切向入口的双流量旋风吸尘器示出了势是一种有效的方法,用于收集在家庭中产生的粉尘。 摘要及关键词:吸尘器; 粉尘; 旋风分离器 引言 我们这个时代的很大一部分都花在了房子,工作场所,或其他建筑,因此,室内空间应该是既舒适情绪和卫生。但室内空气中含有超过室外空气因气密性的二次污染物,毒物,食品气味。这是通过使用产生在建筑中的新材料和设备。真空吸尘器为代表的家电去除有害物质从地板到地毯所用的商用真空吸尘器房子由纸过滤,预过滤器和排气过滤器通过洁净的空气排放到大气中。虽然真空吸尘器是方便在使用中,吸入压力下降说唱空转成比例地清洗的时间,以及纸过滤器也应定期更换,由于压力下降,气味和细菌通过纸过滤器内的残留粉尘。 图1示出了大气气溶胶的粒度分布通常是双峰形,在粗颗粒(>2.0微米)模式为主要的外部来源,如风吹尘,海盐喷雾,火山,从工厂直接排放和车辆废气排放,以及那些在细颗粒模式包括燃烧或光化学反应。表1显示模式,典型的大气航空的直径和质量浓度溶胶被许多研究者测量。精细模式在0.18?0.36 在5.7到25微米尺寸范围微米尺寸范围。质量浓度为2?205微克,可直接在大气气溶胶和 3.85至36.3μg/m3柴油气溶胶。

土木外文翻译原文和译文

A convection-conduction model for analysis of the freeze-thaw conditions in the surrounding rock wall of a tunnel in permafrost regions Abstract Based on the analyses of fundamental meteorological and hydrogeological conditions at the site of a tunnel in the cold regions, a combined convection-conduction model for air flow in the tunnel and temperature field in the surrounding has been constructed. Using the model, the air temperature distribution in the Xiluoqi No. 2 Tunnel has been simulated numerically. The simulated results are in agreement with the data observed. Then, based on the in situ conditions of sir temperature, atmospheric pressure, wind force, hydrogeology and engineering geology, the air-temperature relationship between the temperature on the surface of the tunnel wall and the air temperature at the entry and exit of the tunnel has been obtained, and the freeze-thaw conditions at the Dabanshan Tunnel which is now under construction is predicted. Keywords: tunnel in cold regions, convective heat exchange and conduction, freeze-thaw. A number of highway and railway tunnels have been constructed in the permafrost regions and their neighboring areas in China. Since the hydrological and thermal conditions changed after a tunnel was excavated,the surrounding wall rock materials often froze, the frost heaving caused damage to the liner layers and seeping water froze into ice diamonds,which seriously interfered with the communication and transportation. Similar problems of the freezing damage in the tunnels also appeared in other countries like Russia, Norway and Japan .Hence it is urgent to predict the freeze-thaw conditions in the surrounding rock materials and provide a basis for the design,construction and

毕业设计外文翻译资料

外文出处: 《Exploiting Software How to Break Code》By Greg Hoglund, Gary McGraw Publisher : Addison Wesley Pub Date : February 17, 2004 ISBN : 0-201-78695-8 译文标题: JDBC接口技术 译文: JDBC是一种可用于执行SQL语句的JavaAPI(ApplicationProgrammingInterface应用程序设计接口)。它由一些Java语言编写的类和界面组成。JDBC为数据库应用开发人员、数据库前台工具开发人员提供了一种标准的应用程序设计接口,使开发人员可以用纯Java语言编写完整的数据库应用程序。 一、ODBC到JDBC的发展历程 说到JDBC,很容易让人联想到另一个十分熟悉的字眼“ODBC”。它们之间有没有联系呢?如果有,那么它们之间又是怎样的关系呢? ODBC是OpenDatabaseConnectivity的英文简写。它是一种用来在相关或不相关的数据库管理系统(DBMS)中存取数据的,用C语言实现的,标准应用程序数据接口。通过ODBCAPI,应用程序可以存取保存在多种不同数据库管理系统(DBMS)中的数据,而不论每个DBMS使用了何种数据存储格式和编程接口。 1.ODBC的结构模型 ODBC的结构包括四个主要部分:应用程序接口、驱动器管理器、数据库驱动器和数据源。应用程序接口:屏蔽不同的ODBC数据库驱动器之间函数调用的差别,为用户提供统一的SQL编程接口。 驱动器管理器:为应用程序装载数据库驱动器。 数据库驱动器:实现ODBC的函数调用,提供对特定数据源的SQL请求。如果需要,数据库驱动器将修改应用程序的请求,使得请求符合相关的DBMS所支持的文法。 数据源:由用户想要存取的数据以及与它相关的操作系统、DBMS和用于访问DBMS的网络平台组成。 虽然ODBC驱动器管理器的主要目的是加载数据库驱动器,以便ODBC函数调用,但是数据库驱动器本身也执行ODBC函数调用,并与数据库相互配合。因此当应用系统发出调用与数据源进行连接时,数据库驱动器能管理通信协议。当建立起与数据源的连接时,数据库驱动器便能处理应用系统向DBMS发出的请求,对分析或发自数据源的设计进行必要的翻译,并将结果返回给应用系统。 2.JDBC的诞生 自从Java语言于1995年5月正式公布以来,Java风靡全球。出现大量的用java语言编写的程序,其中也包括数据库应用程序。由于没有一个Java语言的API,编程人员不得不在Java程序中加入C语言的ODBC函数调用。这就使很多Java的优秀特性无法充分发挥,比如平台无关性、面向对象特性等。随着越来越多的编程人员对Java语言的日益喜爱,越来越多的公司在Java程序开发上投入的精力日益增加,对java语言接口的访问数据库的API 的要求越来越强烈。也由于ODBC的有其不足之处,比如它并不容易使用,没有面向对象的特性等等,SUN公司决定开发一Java语言为接口的数据库应用程序开发接口。在JDK1.x 版本中,JDBC只是一个可选部件,到了JDK1.1公布时,SQL类包(也就是JDBCAPI)

3英文文献及翻译格式示例

哈尔滨工业大学毕业设计(论文) 英文原文(原文也可以直接将PDF版打印) ASSESSING CREDIT OR DETERMINING QUANTITY? THE EVOLVING ROLE OF RATING AGENCIES Lynnette D. Purda* This version: April 21, 2011 Abstract Over the past ten years, credit rating agencies have come under intense criticism from both practitioners and academics, first for their failure to identify problems resulting in bankruptcies at Enron and Worldcom and second for providing overly optimistic ratings for structured finance products. While many investors question the value of rating agencies in light of these criticisms, they have proven remarkably resilient. This paper provides a brief background on how rating agencies secured competitive advantages in evaluating credit quality. It then reviews the empirical evidence on the information content of ratings given these advantages. I argue that the information content of ratings stems from two intertwined sources: 1) information related to credit quality and 2) information related to the firm’s ability to access debt. Based on this evidence, I suggest that the dominant role for ratings today is as a benchmark for financial contracting. In this way, ratings remain influential in establishing the supply and demand of debt securities. 译文 评级机构的发展的作用评估信用还是决定数量? 本文:2011.4.21 摘要 在过去的十年,信用评级机构一直处于来自实践者和学者的激烈的批评中,首先他们未能发现问题,导致安然和世通破产;其次对结构性金融产品提供过于乐观的评级。虽然许多投资者因为这些批评对评级机构的价值提出了质疑,但他们仍然被证明是相当有活力的。这篇文章首先在评估机构如何在信用评级质量中获得竞争优势提供一个简单地背景介绍,然后考虑到这些优势回顾了一些信息内容方面的评级经验证据。个人认为信息内容的评级来自两种交织在一起(错综复杂)的来源:1)和信贷质量相关的信息;2)和公司获取债务资本能力相关的信息。以此为据,我建议当前评级的主导作用是作为基准的金融收缩。以这种方式,在建立债券的供应和需求方面评级仍然是有效的。 - -1

毕业设计外文翻译原文.

Optimum blank design of an automobile sub-frame Jong-Yop Kim a ,Naksoo Kim a,*,Man-Sung Huh b a Department of Mechanical Engineering,Sogang University,Shinsu-dong 1,Mapo-ku,Seoul 121-742,South Korea b Hwa-shin Corporation,Young-chun,Kyung-buk,770-140,South Korea Received 17July 1998 Abstract A roll-back method is proposed to predict the optimum initial blank shape in the sheet metal forming process.The method takes the difference between the ?nal deformed shape and the target contour shape into account.Based on the method,a computer program composed of a blank design module,an FE-analysis program and a mesh generation module is developed.The roll-back method is applied to the drawing of a square cup with the ˉange of uniform size around its periphery,to con?rm its validity.Good agreement is recognized between the numerical results and the published results for initial blank shape and thickness strain distribution.The optimum blank shapes for two parts of an automobile sub-frame are designed.Both the thickness distribution and the level of punch load are improved with the designed blank.Also,the method is applied to design the weld line in a tailor-welded blank.It is concluded that the roll-back method is an effective and convenient method for an optimum blank shape design.#2000Elsevier Science S.A.All rights reserved. Keywords:Blank design;Sheet metal forming;Finite element method;Roll-back method

【最新推荐】应急法律外文文献翻译原文+译文

文献出处:Thronson P. Toward Comprehensive Reform of America’s Emergency Law Regime [J]. University of Michigan Journal of Law Reform, 2013, 46(2). 原文 TOWARD COMPREHENSIVE REFORM OF AMERICA’S EMERGENCY LAW REGIME Patrick A. Thronson Unbenownst to most Americans, the United States is presently under thirty presidentially declared states of emergency. They confer vast powers on the Executive Branch, including the ability to financially incapacitate any person or organization in the United States, seize control of the nation’s communications infrastructure, mobilize military forces, expand the permissible size of the military without congressional authorization, and extend tours of duty without consent from service personnel. Declared states of emergency may also activate Presidential Emergency Action Documents and other continuity-of-government procedures, which confer powers on the President—such as the unilateral suspension of habeas corpus—that appear fundamentally opposed to the American constitutional order.

引进外资外文翻译资料

河南科技学院新科学院 2013届本科毕业生论文(设计) 英文文献及翻译 Foreign capital inflows and welfare in an economy with imperfect competition 学生姓名:王艳杰 所在院系:经济系 所学专业:国际经济与贸易 导师姓名:侯黎杰 完成时间:2013年4月15日

Foreign capital inflows and welfare in an economy with imperfect competition Abstract:This paper examines the resource allocational and welfare effects of exogenous inflows of foreign capital in a general-equilibrium model with oligopolistic competition and unemployment. Although the welfare impact for the short run is ambiguous and dependent upon the strength of excess profits and scale economies relative to unemployment in manufacturing, in the long run additional inflows of foreign capital always improve national welfare with capital mobility. Hence, attracting foreign capital remains a sound policy for economies characterized by imperfect competition, scale economies,and regional unemployment. Keywords: International capital mobility; Imperfect competition; Welfare 1.Introduction The welfare effects of exogenous inflows of foreign capital in the presence of trade restrictions have been extensively studied. Brecher and Diaz Alejandro (1977) show that when imports are subject to tariffs, an introduction of fo reign capital inflows accentuates the tariff distortion and hence reduces national welfare if the import-competing sector is relatively capital-intensive. In contrast, Dei (1985) shows that when imports are restricted by quotas,foreign capital inflows in the presence of foreign-owned capital always improve welfare by depressing the rental and so lowering the payments to existing foreign-owned capital. Recently, Neary (1981), using a common framework for both tariffs and quotas, obtains more general results of foreign capital inflows; the welfare effect of such inflows depends crucially on whether foreign-owned capital exists initially in the home country. In addition, Khan (1982) and Grinols (1991) have examined the effects of foreign capital inflows for a generalized Harris-Todaro economy under tariff protection. Khan finds that the result by Brecher and Diaz Alejandro is still valid even in the presence of unemployment, whereas Grinols argues that increased foreign capital need not be detrimental to welfare if the opportunity costs of labor are sufficiently low. Noteworthy is that the models used by these authors are all based upon the premise of perfect competition along with constant returns-to-scale technology. Although perfect competition serves as a useful assumption in crystallizing theoretical insights, it nevertheless fails to depict many of the real-world phenomena. The real-world economy is characterized, to a large extent, by imperfect competition and economies of scale. The policy implications of imperfect competition and economies

毕业设计外文翻译格式实例.

理工学院毕业设计(论文)外文资料翻译 专业:热能与动力工程 姓名:赵海潮 学号:09L0504133 外文出处:Applied Acoustics, 2010(71):701~707 附件: 1.外文资料翻译译文;2.外文原文。

附件1:外文资料翻译译文 基于一维CFD模型下汽车排气消声器的实验研究与预测Takeshi Yasuda, Chaoqun Wua, Noritoshi Nakagawa, Kazuteru Nagamura 摘要目前,利用实验和数值分析法对商用汽车消声器在宽开口喉部加速状态下的排气噪声进行了研究。在加热工况下发动机转速从1000转/分钟加速到6000转/分钟需要30秒。假定其排气消声器的瞬时声学特性符合一维计算流体力学模型。为了验证模拟仿真的结果,我们在符合日本工业标准(JIS D 1616)的消声室内测量了排气消声器的瞬态声学特性,结果发现在二阶发动机转速频率下仿真结果和实验结果非常吻合。但在发动机高阶转速下(从5000到6000转每分钟的四阶转速,从4200到6000转每分钟的六阶转速这样的高转速范围内),计算结果和实验结果出现了较大差异。根据结果分析,差异的产生是由于在模拟仿真中忽略了流动噪声的影响。为了满足市场需求,研究者在一维计算流体力学模型的基础上提出了一个具有可靠准确度的简化模型,相对标准化模型而言该模型能节省超过90%的执行时间。 关键字消声器排气噪声优化设计瞬态声学性能 1 引言 汽车排气消声器广泛用于减小汽车发动机及汽车其他主要部位产生的噪声。一般而言,消声器的设计应该满足以下两个条件:(1)能够衰减高频噪声,这是消声器的最基本要求。排气消声器应该有特定的消声频率范围,尤其是低频率范围,因为我们都知道大部分的噪声被限制在发动机的转动频率和它的前几阶范围内。(2)最小背压,背压代表施加在发动机排气消声器上额外的静压力。最小背压应该保持在最低限度内,因为大的背压会降低容积效率和提高耗油量。对消声器而言,这两个重要的设计要求往往是互相冲突的。对于给定的消声器,利用实验的方法,根据距离尾管500毫米且与尾管轴向成45°处声压等级相近的排气噪声来评估其噪声衰减性能,利用压力传感器可以很容易地检测背压。 近几十年来,在预测排气噪声方面广泛应用的方法有:传递矩阵法、有限元法、边界元法和计算流体力学法。其中最常用的方法是传递矩阵法(也叫四端网络法)。该方

相关主题