The Tomcat Servlet Container.ppt
《The Tomcat Servlet Container.ppt》由会员分享,可在线阅读,更多相关《The Tomcat Servlet Container.ppt(28页珍藏版)》请在麦多课文档分享上搜索。
1、The Tomcat Servlet Container,About Tomcat,A “servlet container” is like a mini server, but only for serving html, jsp and servlets. Many servlet containers could be used for this course. Some may even be easier to configure than tomcat, but tomcat provides an easy-to-use development/deployment tool
2、and also complies with the servlet specification best of all containers. Tomcat is from Apache and is open-source. Tomcat can be used as a stand-alone servlet container. You can install the Apache server with Tomcat, and then proceed to configure each for their individual purposes. (The server would
3、 relay servlet requests to Tomcat.),About these notes,Two texts & many of my own examples were used to compile servlet notes. The texts referenced are Jason Hunters Servlet book and Core Servlets Vol 1 by Hall & Brown. Both excellent books.,Asides: XML,XML stands for eXtensible-markup-language and i
4、s a SGML. Unlike older HTML, XML can be validated. XHTML, for example, is HTML that is XML compliant. XML is widely used in internet programming. Some technologies - like SOAP - are based on XML. Many files on Tomcat are XML. In the past Ive taught XML as a full component of this course. I am not do
5、ing that this semester. There are websites with tutorials. I have links to a whole text of xml content at http:/employees.oneonta.edu/higgindm/internet%20programming/xmllinks.html,More Asides,Case sensitivity Java, C, C+ and Ruby are all case-sensitive languages. At times my notes and ppts will be s
6、loppy and incorrectly show case, but in your work you cant be sloppy. JAR files, classpath, batch files, environment variables, even WAR files: We are likely to use all of these.,Download tomcat at http:/tomcat.apache.org/,Apache recommends downloading the newest version, although the core servlets
7、text was written with Tomcat 5.Download the appropriate zip and extract the files to a directory named, for example, jakarta-tomcat-5.0.28 (or whatever the version is) The Core Servlets text maintains a site with tips for configuring different versions of Tomcat at http:/. This site has a preconfigu
8、red version of Tomcat which I used.,Servlets API,Links to servlet API are on the texts web site You should bookmark the servlet API for reference purposes: http:/tomcat.apache.org/tomcat-5.5-doc/servletapi/ The servlet class files also need to be on your classpath. These are part of java EE but not
9、part of java SE. I downloaded them and put mine in a c:servlets directory. You may instead include the jar file “copy” from the servers library on your classpath. This would be something like C:tomcatdircommonlibservlet.jar,Classpaths & Environment variables,Classpaths are where the java compiler lo
10、oks to find classes needed to perform compilation. On your machine, to successfully compile java servlets, packages, and so on, you will have to create an autoexec file to set classpaths, use a special batch file for compilation, or edit the classpath environment variables. The classpath setting may
11、 need editing whenever you create a package with new classes in it, but should be ok otherwise. Text site has some suggestions of what it should look like. Mine is: C:javasdkjdkbin;c:myclasses;.;C:apache-tomcat-6.0.10libservlet-api.jar;C:apache-tomcat-6.0.10libjsp-api.jar;C:apache-tomcat-6.0.10libel
12、-api.jar Add ;newdir to the end of this when you add a new classpath. You may need to define environment variable CATALINA_HOME. Got to control panel and select system, then select advanced and then environment variables. Select new (or edit) and add these (one at a time) along with their paths. For
13、 CATALINA_HOME, point to the jakarta-tomcat-v# directory. For JAVA_HOME point to the jdk directory,Servlets+JSP,This directory came in a pre-configured tomcat version on the Core Servlets books site which I installed. It unzipped into the tomcat directory but I moved it up to c:,Test tomcat installa
14、tion,Startup tomcat (click the bat file in tomcat/bin) and open http:/localhost in a browser window. Some tomcat stuff should display. If you dont see this there could be many reasons. Probably Tomcat is not configured properly, but you might try http:/localhost:8080 because some versions of Tomcat
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- THETOMCATSERVLETCONTAINERPPT
