1 / 26

Apache Tomcat Web Server

Apache Tomcat Web Server. MOHD NORFAIZI MIHSANY (A91391). Web Server. Used application server locate at technician room. 202.185.47.240. Architecture. Server Setup Step by Step. Download and install the Java Software Development Kit (SDK). Download Server Configure the Server

karim
Download Presentation

Apache Tomcat Web Server

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Apache Tomcat Web Server MOHD NORFAIZI MIHSANY (A91391)

  2. Web Server • Used application server locate at technician room. • 202.185.47.240

  3. Architecture

  4. Server Setup Step by Step • Download and install the Java Software Development Kit (SDK). • Download Server • Configure the Server • Set up Development Environment • Test

  5. Download and Install Java Software Development Kit (SDK) • http://java.sun.com/j2se/1.4.2/index.jsp • Download the setup. • Install the SDK.

  6. Download a Server • Apache Tomcat, Macromedia JRun, Jetty, Microsoft IIS, iPlanet/Sun ONE Server and Apache Server. • Apache Tomcat 4.0 (http://jakarta.apache.org/tomcat) was used for this project. • Apache Tomcat 4.0 is the official reference implementation for Servlet 2.3 and JSP 1.2. • It’s entirely free and has complete source code available.

  7. Configuring Apache Tomcat • Setting the JAVA_HOME variable. • Specifying the server port. • Enabling servlet reloading. • Enabling the ROOT context. • Turning on the invoker servlet. • Increasing DOS memory limits (older windows). • Setting CATALINA_HOME (optional).

  8. Setting the JAVA_HOME Variable • Right click My Computer. • Select Properties. • Select Advance. • Select Environment Variable. • Add JAVA_HOME value and click OK. • Another way by edit install_dir/bin/catalina.bat and insert this line set JAVA_HOME=C:\J2sdk1.4.0

  9. Specifying the Server Port • By default, Apache Tomcat used port 8080. • Modifying the port number involves editing install_dir/conf/server.xml.

  10. The original element will look something like this : <Connector className=“org.apache.coyote.tomcat4.CoyoteConnector” port=“8080” minProcessors=“5” maxProcessors=“75” …. /> After <Connector className=“org.apache.coyote.tomcat4.CoyoteConnector” port=“80” minProcessors=“5” maxProcessors=“75” …. />

  11. Enabling Servlet Reloading • To turn on servlet reloading, edit install_dir/conf/server.xml. • Find <!-- Define properties for each web application. … …. --> • Insert following line just below it <DefaultContext reloadable=“true” />

  12. Enabling the ROOT Context • Edit install_dir/conf/server.xml. • Uncomment the following line <Context path=“” docBase=“ROOT” debug=“0” />

  13. Turning On the Invoker Servlet • Edit install_dir/conf/web.xml. • Uncomment following line <servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping>

  14. Increasing DOS Memory Limits • For old version of Windows like windows 98. • Right click install_dir/bin/startup.bat. • Select properties. • Select memory and change the Initial Environment from Auto to at least 2816.

  15. Setting CATALINA_HOME • Right click My Computer. • Select Properties. • Select Advance. • Select Environment Variable. • Add CATALINA_HOME value and click OK.

  16. Test your Setup • Double click on install_dir/bin/startup.bat. • Open browser and enter Http://localhost

  17. Using The Default Web Application • Packageless Servlet code : install_dir/webapps/ROOT/WEB-INF/classes URL : http://host:port/servlet/ServletName • Packaged Servlet code : install_dir/webapps/ROOT/WEB-INF/ classes/packagename URL : http://host:port/servlet/packageName.ServletName

  18. Using The Default Web Application • Packaged Beans and Utility Classes install_dir/webapps/ROOT/WEB-INF/ classes/packageName • JAR Files install_dir/webapps/ROOT/WEB-INF/lib

  19. Using The Default Web Application • HTML and JSP (Not In Subdirectories) code : install_dir/webapps/ROOT URL : http://host:port/filename • HTML and JSP (In Subdirectories) code : install_dir/webapps/ROOT/directoryName URL : http://host:port/directoryNme/filename

  20. Servlet and JSP APIs • Install_dir/webapps/tomcat-docs/servletapi/index.html

  21. CLASSPATH • Set CLASSPATH in Environment Variable. • Have it include installdir/common/lib/servlet.jar. • For compile Servlet application.

  22. Traceroute • http://mips.myloca.com/trace

  23. Reference • Marty Hall, Larry Brown. 2004. Core Servlets and JavaServer Pages. Second Edition. U.S.A: Prentice Hall. • Marty Hall. 2005. Apache Tomcat Tutorial.(online) http://www.coreservlets.com/Apache-Tomcat-Tutorial (10 March 2005)

More Related