خطوات تركيب Apache Tomcat server على جهازك

8.2/10 (193 أصوات )

الترجمة الالية للوصف

خطوات تركيب Apache Tomcat server على جهازك تحميل كتاب Apache Tomcat 7 Essentials

 

1. قم بتنزيل ال jdk تستطيع الحصول على النسخة المناسبة لنظامك من هنا

http://java.sun.com/j2se/1.4.2/download.html

يفضل تنزيلها على c ليسهل كتابة ال setting بعد ذلك

2.قم بتنزيل Tomcat 4.0 من

http://mirrors.xtria.com/apache/jakarta/to...-4/v4.1.30/bin/

وقم باختيار : jakarta-tomcat-4.1.30-LE-jdk14.zip

وقم بتنزيله أيضا على ال c

3.افتح مجلد ال Tomcat 4.0 وافتح منه مجلد conf

C:Program FilesApache GroupTomcat 4.1conf

ستجد ملف اسمه server.xml فيه الكثير من ال setting المفروض تغييرها

للسهوله قم باستبداله بالصفحة الموجود على العنوان http://www.moreservlets.com/server.xml

واكتشف الفروقات السبع على مهلك

4.اذهب الى Control Panel ثم System واختر Advanced ثم زر Environment Variables انظر الجزء المعنون ب system variables اضغط new اكتب

Variable name : CATALINA_HOME

Variable value : C:Program FilesApache GroupTomcat 4.1

ثم OK

5. قم بنفس الخطوه 4 من أجل القيم

Variable name : JAVA_HOME

Variable value : C:j2sdk1.4.2_05

6. افتح مجلد ال Tomcat 4.0 وافتح منه مجلد bin

واضفط على الملف startup.bat

7. لا تغلق النافذة السوداء الناتجة وافتح متصفح الانترنت الخاص بك واكتب في مربع ال Address كلمة localhost

ملاحظة : ليس ضروريا ان يكون الانترنت مفتوحا لتشغيل السيرفر

8. اذا ظهرت لك صفحة ترحيب تكون قد ركبت السرفر بنجاح وهو جاهز للعمل




  • مرات التنزيل: 12
  • متطلبات التشغيل: Operating Systems Windows 2000/XP/2003/Vista/7
  • الحجم: 8.66MB
  • الترخيص: Free
  • الاصدار : 0
  • اضيف في: 17/08/2016
  • اخر تحديث: 17/08/2016
  • الموقع علي الانترنت:



استخدام البرامج التي تم تنزيلها من موقعنا يجب أن يكون وفقاً للقوانين في بلدك.لا نوصي باستخدام برامج تنتهك القوانين في بلدك.،اذا كنت تري ان هذا المحتوي لا يتوافق مع حقوق الملكية الفكرية برجاء ابلاغنا بالضغط هنا
شاهد ايضا
  • برنامج Apache Tomcat
  • تحميل برنامج Apache Tomcat لتشغيل تطبيقات الويب | عالم البرا
  • تحميل كتاب Apache Tomcat 7 Essentials
  • تحميل برنامج Apache Tomcat 8.5.3 / 9.0.0 M8 (Apache License
  • Apache Tomcat



  • Description

    Installing Tomcat

    This is a brief "how-to" for installing Tomcat on a Windows PC.

    Installing Java

    Tomcat requires java in order to run. If your computer already has java installed, you can probably skip this step. However, make sure you have a recent version of java. Here I provide instructions for installing version 1.4.2 of the Java 2 Platform, Standard Edition (J2SE).

    Steps for installing java

    1. Go to the download page of J2SE Version 1.4.2.
    2. Select the version for Windows and click through the license acceptance. After two pages, you will be able to download the EXE file for installing java on windows. Look for the SDK version.
    3. Download and run the EXE installation program.
    4. You will need to accept the license agreement again.
    5. Use the suggested directory for installing java (C:j2sdk1.4.2_01).
    6. You may use the remaining default settings for the installation.

    Setting the Java Environment Variable

    Tomcat will need to know where you have installed java. To do this, you will need to set the environment variable JAVA_HOME to C:j2sdk1.4.2_01 (where you installed java).

    Here are the steps for setting the environment variable on my computer (Windows XP Professional). The steps will probably be similar for other Windows computers.

    1. Open the control panel under the start menu.
    2. Double-click on System.
    3. Click on the Advanced tab.
    4. Click on the Environment Variables button.
    5. Under System Variables, click on the New button.
    6. For variable name, type: JAVA_HOME
    7. For variable value, type: C:j2sdk1.4.2_01
    8. Continue to click OK to exit the dialog windows.

    Installing Tomcat

    After setting the JAVA_HOME environment variable, you can install tomcat.

    1. Go to the Tomcat Web page.
    2. Click on Binaries under the Download label on the left side of the page.
    3. Scroll down until you see Tomcat 4.1.x. (x will be some number greater than 10).
    4. Click on the link ending with exe (e.g. 4.1.27 exe).
    5. Download and run the exe file.
    6. I suggest you install Tomcat at c:tomcat4
    7. Use the default settings and provide a password that you will remember.
    8. now assume that your tomcat are installed at c:tomcat4

    Running Tomcat

    Here are the steps to see if Tomcat has been successfully installed

    1. Start Tomcat by finding its start program in the Programs Menu (located in the Start menu). Look under Apache Tomcat 4.1 and select "Start Tomcat".
    2. Open a Web browser and type in the following URL:
      • http://localhost:8080/

    At this point, you should see the Tomcat home page, which is provided by the Tomcat Web server running on your computer. Note: if your computer has an internet name or an IP number, you may access your Tomcat server anywhere on the internet by substituting localhost with the full name or IP number.

    To shut down your server and remove the Console window, select "Stop Tomcat" in the same menu of where you selected "Stop Tomcat".

    . Set Your CLASSPATH

    Since servlets and JSP are not part of the Java 2 platform, standard edition, you have to identify the servlet classes to the compiler. The server already knows about the servlet classes, but the compiler (i.e., javac) you use for development probably doesn't. So, if you don't set your CLASSPATH, attempts to compile servlets, tag libraries, or other classes that use the servlet and JSP APIs will fail with error messages about unknown classes. Here are the standard Tomcat locations:

    Tomcat 4: c:tomcat4commonlibservlet.jar

    in addition to the servlet JAR file, you also need to put your development directory in the CLASSPATH. Although this is not necessary for simple packageless servlets, once you gain experience you will almost certainly use packages. Compiling a file that is in a package and that uses another class in the same package requires the CLASSPATH to include the directory that is at the top of the package hierarchy. In this case, that's the development directory I just discussed. Forgetting this setting is perhaps the most common mistake made by beginning servlet programmers!

    Finally, you should include "." (the current directory) in the CLASSPATH. Otherwise, you will only be able to compile packageless classes that are in the top-level development directory.

    Here are two representative methods of setting the CLASSPATH. They assume that your development directory is C:Servlets+JSP. Replace install_dir with the actual base installation location of the server. Also, be sure to use the appropriate case for the filenames, and enclose your pathnames in double quotes if they contain spaces.

    • Windows 98/Me. Use the autoexec.bat file.
      • Tomcat 4
        • Sample code: (Note that this all goes on one line with no spaces--it is broken here only for readability.)
          set CLASSPATH=.; C: Tomcat4commonlibservlet.jar
        • Sample file to download and modify: autoexec.bat

    Note that these examples represent only one approach for setting the CLASSPATH. Many Java integrated development environments have a global or project-specific setting that accomplishes the same result. But these settings are totally IDE-specific and won't be discussed here. Another alternative is to make a script whereby -classpath ... is automatically appended onto calls to javac.

    • Windows NT/2000/XP. You could use the autoexec.bat file as above, but a more common approach is to use system settings. On WinXP, go to the Start menu and select Control Panel, then System, then the Advanced tab, then the Environment Variables button. On Win2K/WinNT, go to the Start menu and select Settings, then Control Panel, then System, then Environment. Either way, enter the CLASSPATH value from the previous bullet.

    Enable the Invoker Servlet

    The invoker servlet lets you run servlets without first making changes to your Web application's deployment descriptor (i.e., the WEB-INF/web.xml file). Instead, you just drop your servlet into WEB-INF/classes and use the URL http://host/servlet/ServletName (or http://host/webAppName/servlet/ServletName once you start using your own Web applications). The invoker servlet is extremely convenient when you are learning and even when you are doing your initial development. To enable the invoker servlet, uncomment the following servlet-mapping element in c:tomcat4confweb.xml. Also, do not confuse this Apache Tomcat-specific web.xml file with the standard one that goes in the WEB-INF directory of each Web application. Finally, remember to make a backup copy of the original version of this file before you make the changes.

              <servlet-mapping>
                  <servlet-name>invoker</servlet-name>
                  <url-pattern>/servlet/*</url-pattern>
              </servlet-mapping>

    Create a simple web application

    Here are the steps for running the class examples discussed on the first day.

    1. Goto the following location on your computer:  C:Tomcat 4webapps  
      • Create a directory “webdir” under C: Tomca4webapps, which will be your home directory for your assignment.  
      • Crate a directory “WEB-INF” under C: Tomcat4webapps webdir
      • Crate a directory “classes” under C: Tomcat4webappswebdirWEB-INF, which will hold your servlet class files.
    2. Goto http://127.0.0.1:8080/examples/servlets/helloworld.html, copy the java code and paste it into a blank file in your editor (such as notepate), and save it as

    c: Tomcat4webappswebdirWEB-INFclassesHelloWorld.java

    1. Open a “Command Prompt” windows, and goto c: Tomcat4webappswebdirWEB-INFclasses
    2. try “javac HelloWorld.java”
    3. you will get a HelloWorld.class
    4. Stop and restart Tomcat.
    5. You can access the first example with the following URL:
      • http://localhost:8080/webdir/servlet/HelloWorld
    6.  You can work at your own project based on webdir directory, and use some IDEs for programming, such as Jcreator or EditPlus.

    Note: this note is copied partly from http://facweb.cs.depaul.edu/cmiller/ect433/tomcatInstall.html

    From someone who want to how to config tomcat, please refer to:

    http://www.coreservlets.com/Apache-Tomcat-Tutorial/

    Moshax.com only provide legal software, please help us keeping pur site legal, if you think this page is violating copyrights please let us know by clicking here Here
    صور خطوات تركيب Apache Tomcat server على جهازك
    خطوات تركيب Apache Tomcat server على جهازك





    التعليقات علي خطوات تركيب Apache Tomcat server على جهازك
    اضافة تعليق

    تعليقات الفيسبوك

    تعليقات الموقع