The first step of JavaEE[1]

來源:互聯網
上載者:User
                                         J2EE Technology
Lab 1. Tomcat Setup and Configuration, Deploy a
Simple Servlet Application
Lab Works:
(All the applications should be downloadable from the FTP server)
1. Install the Java development environment, including:
     a) j2sdk1.5 (D:/jdk1.5.0_09)
2. Tomcat Web Container setup
     Install the tomcat version 5.0.19 to D:/tomcat
     Environment variables setup
         JAVA_HOME: <where the Java JDK installed> i.e. D:/jdk1.5.0_09
         (for previous version only!)$CATALINA_HOME: <where the tomcat
         installed> i.e. D:/tomcat
         Add D:/tomcat/common/lib/servlet-api.jar to CLASSPATH
3. Develop, deploy and run TestingServlet
     Follow the instructions in Chapter 3 in the textbook and run TestingServlet
         Deploy TestingServelt.class and web.xml
         Open up web.xml under <tomcat install directry>/conf, and uncomment
         the following part:
     <servlet>
                <servlet-name>invoker</servlet-name>
                <servlet-class>
                   org.apache.catalina.servlets.InvokerServlet
                </servlet-class>
               Lab 1. Tomcat Setup and Configuration, Deploy a Simple Servlet Application -1-
                                       J2EE Technology
              <init-param>
                     <param-name>debug</param-name>
                     <param-value>0</param-value>
              </init-param>
              <load-on-startup>2</load-on-startup>
         </servlet>
         ......
    <servlet-mapping>
              <servlet-name>invoker</servlet-name>
              <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
        Start tomcat
        Test your servlet using:
        http://localhost:8080/myApp/servlet/TestingServlet
        http://localhost:8080/myApp/test
4. Install MS SQL Server 2000
    Install MS SQL Server 2000 - Make sure that you use combined user
authentication, and use user name “sa” and password “sa”
    Install MS SQL Server 2000 Driver
    Copy the driver files mssqlserver.jar, msbase.jar and msutil.jar into
D:/tomcat/common/lib or add the full path of three files to CLASSPATH
5. Installing Stored Procedures for JTA for MS SQL Server
             Lab 1. Tomcat Setup and Configuration, Deploy a Simple Servlet Application -2-
                                        J2EE Technology
1. Copy the file sqljdbc.dll from the SQL Server 2000 Driver for JDBC
    installation directory to the SQL_Server_Root/binn directory of the database
    server for SQL Server.
2. From the server, use the ISQL utility to run the instjdbc.sql script. The system
    administrator should back up the master database before running
    instjdbc.sql.
At a command prompt, use the following syntax to run instjdbc.sql:
ISQL -Usa -Psa_password -Sserver_name -ilocation/instjdbc.sql
where:
sa_password is the password of the system administrator.
server_name is the name of the server on which SQL Server resides.
location is the full path to instjdbc.sql. This script is located in the SQL Server
2000 Driver for JDBC installation directory.
6. Restore database – Library
Use provided “library” to restore the database named Library into SQL server
2000 database.
7. Install Websphere Application Developer 5.0
              Lab 1. Tomcat Setup and Configuration, Deploy a Simple Servlet Application -3-
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.