How does import and export of .war files to a deployed tomcat instance work?
How do I import and alternately export a .war file within Eclipse and also, how is the imported .war file configurable within Eclipse?
Tagged:
0
Answers
-
**In general Eclipse has a native .war file import that you can use…** [
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.wst.webtools.doc.user%2Ftopics%2Ftwimpwar.html][1]
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. And a native export feature: [
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.wst.webtools.doc.user%2Ftopics%2Ftwcrewar.html][2]
**To export a WAR file from a Web project, do the following:**
1. Right click on a Web project folder and select Export from the pop-up menu. Then select WAR file in the Export window and then select Next.
2. Specify the Web project you want to export (this field is primed if you used the pop-up menu to open the wizard), and specify a location for the new WAR file.
3. Optionally, supply WAR export Options, such as whether or not to include Java™ source files in the WAR, and whether to overwrite any existing resources during the export process. Source files are not usually included in a WAR file, because they are not necessary for the server to run the web application. 4. Click Finish. **However, if you want to simply spin up the war file without creating a new project use the following steps:** **How to deploy a Tomcat instance of a webapp from a war file within eclipse.** 5. Create a new empty server in Eclipse and name it appropriately. Do not add any local eclipse project to the server.
6. Run the new server once (with no project added) to create the appropriate directories, likely at the following location:{path to workspace}\{project name}\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
Note that the new location would be the highest number in the org.eclipse.wst.server.core directory [ tmp1, tmp2, tmp3 etc.]. I will use tmp1 as an example in this case.
7. Copy the your new war file or unzipped war directory into the webapps folder located at: {path to workspace}\{project name}\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\webapps
8. Select Open Launch Configuration for the new server. In the Arguments tab, add the following to the existing VM arguments. You may need to add other VM arguments if the project requires those.
-DapplicationProperties="{path to workspace}\{project name}\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\webapps\{Your war file name without extension}\WEB-INF\classes\{yourProject.properties}”
``Run the new server and test [1]:
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.wst.webtools.doc.user%2Ftopics%2Ftwimpwar.html [2]:
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.wst.webtools.doc.user%2Ftopics%2Ftwcrewar.html1
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛