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
- Open Jdk6 project.
- Press Ctrl+Alt+Shift+S to open Project Setting:
- Use the
+
button to Add SDK:
- Navigate to your jdk6 folder and Press
OK
:
- Choose project’s Language level to SDK default:
Install Tomcat6
Ensure Tomcat and TomcatEE plugin is installed.
PressCtrl+Shift+A
and type inPlugins
↵ to open Setting.
Add new configuration from left upper
+
button, and clickLocal
belowTomcat Server
:
Dependency
Add necessary libraries to the project configuration.
- Press
Ctrl
+Alt
+Shift
+S
to open Project Setting.
- Choose the library, and click
OK
.
- 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.
- Press
Ctrl
+Alt
+Shift
+S
to open Project Setting. - 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
- Press
Ctrl
+Alt
+Shift
+S
to open Project Setting.
Adding Web Application Archive:
- PmbMgr:war is the archive artifact:
- Menubar: Build -> Build Artifacts…:
Choose PmbMgr:web -> Build:
Hot Swap/Load
This post is licensed under CC BY 4.0 by the author.