Deploying a WAR in Tomcat / Eclipse

后端 未结 4 2047
广开言路
广开言路 2021-02-08 15:29

I use Tomcat 6.0 and Eclipse 3.0 under Linux and I try to deploy a WAR in Tomcat. The problem is that the server is managed by Eclipse and I have some Eclipse project deployed.

4条回答
  •  死守一世寂寞
    2021-02-08 16:04

    This is old but is one of the first answers in google search.

    You can import the war file:

    A Web Archive (WAR) file is a portable, packaged Web application that you can import into your workspace.

    Before importing a WAR file, you should first determine if the WAR file contains needed Java™ source files. When importing a WAR file into an existing Web project, the imported Web deployment descriptor files are either not changed or overwritten by the ones included in the imported WAR file, based on your response to the prompt that is provided. In either case, this action does not represent a merging of the two sets of deployment descriptors.

    To import the Web project resources in a WAR file into your workspace, complete the following steps:

    1. Select File > Import .
    2. In the Import dialog, select WAR file and then click Next.
    3. Locate the WAR file that you want to import using the Browse button.
    4. The wizard assumes you want to create a new Web project with the same name as the WAR file. If you accept this choice, the project will be created with the same servlet version as specified by the WAR file and in the same location. If you want to override these settings, you can click New and specify your new settings in the Dynamic Web Project wizard.
    5. Click Finish to populate the Web project.

    Source: http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.wst.webtools.doc.user%2Ftopics%2Ftwimpwar.html

提交回复
热议问题