You can install this archetype locally and then use it by
-
Command line with maven previously installed:
- Remember to change
DgroupId
andDartifactId
for your actual ones.
- Remember to change
mvn archetype:generate \
-DgroupId=com.example\
-DartifactId=jee-simple-test\
-DarchetypeGroupId=com.ehlui\
-DarchetypeArtifactId=jee-simple\
-DarchetypeVersion=1.0 -DinteractiveMode=false
- Or just by your favourite IDE/text editor
- If you want to use tomcat from a container (docker)
- Execute the
deploy.sh
in the root . Remeber this tomcat is in8.5 version
- Execute the
- If not, you will have the wars (after packaging the app) in the
/wars
file from root (for use it wherever you want to).
Default Endpoints from the Artifact
If you deployed the tomcat from the script:
After deploying (deploy.sh) you should have the following endpoints available
- Warning: If you have this port in use you can change it from the script
- Default one (root)
http://localhost:8585/artifactId/
- Using a servlet
http://localhost:8585/artifactId/servlet1
├── Dockerfile.tomcat
├── deploy.sh
├── pom.xml
├── src
│ ├── main
│ │ ├── java
│ │ │ └── YourGroupId
│ │ │ └── App.java
│ │ ├── resources
│ │ └── webapp
│ │ ├── META-INF
│ │ │ └── context.xml
│ │ ├── WEB-INF
│ │ │ └── web.xml
│ │ ├── index.html
│ │ └── index.jsp
│ └── test
│ ├── java
│ │ └── YourGroupId
│ │ └── App.java
│ └── resources
└── wars