The is the base reusable implementation for Apache Stuts2
type tech stacks used to create a complete Java web app using its Model-View-Controller architecture.
The stack includes:
- This framework is uses an MVC design pattern for creating modern Java web applications. It favors convention over configuration and is extensible using a plugin architecture.
- An object–relational mapping tool for the Java programming language. It provides a framework for mapping an object-oriented domain model to a relational database
- Unit testing framework for Java
Along with what is supported by the parent tech stack (.java.tech.stack)
, the following are overridden and additional capabilities:
- A customer pom.xml to invoke Spark via Maven plugin
- Templates for creating form and list JSP (Java Server Pages) files for each applicable entity discovered in the model, along with other standard application JSP files (header, footer, login, logoff, etc..)
- Custom web.xml to handle leveraging the Stuts2 Servlet implementation
- Per Struts2 architecture, contains a single template file used to create an XML file containing all routing declarations.
If using a CI/CD platform such as CircleCI, AWS Codebuild, Jenkins, etc.., it is best to refer to the Pipeline YAML file generated for that platform.
If not using a CI/CD platform refer to the instructions below on how to use the generated project.
To get started manually
Whichever of the following methods you choose, the database selected during project generation should be running and accessible to the application.
Using Apache Tomcat
In the root directory of the generated project is a generated Maven pom.xml file that contains the declarations and dependencies to build a single WAR file containing the generated application.
This resulting WAR will be located in the target
subdirectory, You can copy this file to a compliant Java Servlet engine such as Apache Tomcat. When you start the servlet engine, the application will be available at:
Using Built-in Jetty Engine
To quickly build and execute the application using Maven’s Jetty plug-in, issue the following:
mvn package jetty:run