Post

Open Jdk6 Java Web Project in IDEA

Open Jdk6 Java Web Project in IDEA

Download 2021.3.3 for Jdk6

Choose Version 2021.3.3 in the Offical Download page.

Setting SDK

  1. Open Jdk6 project.
  2. Press Ctrl+Alt+Shift+S to open Project Setting:
  3. Use the + button to Add SDK:
  4. Navigate to your jdk6 folder and Press OK:
  5. Choose project’s Language level to SDK default:

Install Tomcat6

  1. Ensure Tomcat and TomcatEE plugin is installed.
    Press Ctrl+Shift+A and type in Plugins ↵ to open Setting.

  2. Choose Run from menu bar, and click Edit Configuration

  3. Add new configuration from left upper + button, and click Local below Tomcat Server:

  4. Choose Tomcat6 folder like we did in NetBeans:

Dependency

Add necessary libraries to the project configuration.

  1. Press Ctrl+Alt+Shift+S to open Project Setting.
  2. Choose the library, and click OK.
  3. IDEA would popup to ask to set this library to the module. Choose OK.
    library:

Set the module

Before we deploy to Tomcat, we need to: Add web module.

  1. Press Ctrl+Alt+Shift+S to open Project Setting.
  2. Click + to add Web module in the Mudules Section:
    And there would a warning:
    By clicking the Create Artificat, IDEA would create Facet and Artificat for us.
    Facet:
    Artifact:
    By clicking the Fix button, IDEA would popup to ask how to import the library:
    Choose Add all missing dependencies…:

Deploy to Tomcat

Click the menubar: Run -> Edit Configuration, and click Deployment tab in the configurations window: By clicking the Artifact, IDEA whould include the artifact which we just created.
Remember to erase the string: _Web_exploded in Applcation context field.

From now on, we could start tomcat with our project.

Packing war

  1. Press Ctrl+Alt+Shift+S to open Project Setting.
    Adding Web Application Archive:
  2. PmbMgr:war is the archive artifact:
  3. Menubar: Build -> Build Artifacts…:
    Choose PmbMgr:web -> Build:

Hot Swap/Load

  1. Menubar: Run -> Edit Configuration
    On ‘Update’ action: choose Update classes and resources
  2. Start tomcat in DEBUG MODE
This post is licensed under CC BY 4.0 by the author.