关于论文英语翻译

来源:百度知道 编辑:UC知道 时间:2024/05/29 15:03:33
当用户的http请求无法匹配任何一个servlet 的时候,该 servlet被执行。处理一个web应用程序的匿名servlet。当一个servlet被编写并编译放入/web-inf/classes/ 中,却没有在 /web-inf/web.xml中定义的时候,该servlet 被调用,把匿名 servlet映射成/servlet/ClassName 的形式。传统上这个servlet的url被映射为”/servlet/” 。当请求的是一个jsp 页面的时候,(*.jsp)将调用该 jsp页面的 servlet。它说明将客户端请求的 jsp页面首先编译成为servlet ,然后在执行。这种方式也就是 Tomcat对jsp 页面提供支持的机制。其实所有的 web服务器对jsp 的工作机制都是一样的,即jsp 会被jsp/servlet 服务器首先自动编译成 ,然后以 servlet的方式工作。
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
设定网站索引文件的优先级,当客户端的请求没有指定是访问哪一个页面文件的时候,默认首先返回 index.htm文件,其次是index.htm 文件 最后是index.jsp 文件。
如果希望默认最先返回的页面索引文件是 index.jsp则只需要将index.jsp 的位置放在第一个 welcome-file的位置上即可。
最后描述一下 tomcat服务器处理一个 http请求的全过程:
假设来自客户的请求为:
http://localhost:8080/chart/chart_index

When a user requests the http not match any of a servlet, the servlet be executed. Application procedures for dealing with a web of anonymous servlet. When a servlet Add to be prepared and compiled / web-inf/classes /, but not in / web-inf/web.xml in the definition of the time, the servlet is called, the anonymous servlet-mapping / servlet / ClassName in the form of . Traditionally, this servlet be mapped to the url "/ servlet /". When a request is a jsp pages of time, (*. jsp) will call the jsp pages of the servlet. It shows the client will request the first jsp pages compiled a servlet, and then in the implementation. This is the jsp pages Tomcat support mechanism. In fact, all the web servers jsp on the working mechanism are the same, that is, jsp will be jsp / servlet server automatically compiled as the first, and then to work the way servlet.
<welcome-file-list>
<welcome-file> index.html </ welcome-file>
<welcome-file> index.