An embedded tomcat utilities that can enable faster development and testing of your Java web based applications.
Usage:
-
Create maven war project.
-
Add the Maven dependency .
<dependency>
<groupId>com.jalalkiswani</groupId>
<artifactId>smart-cloud-standalone</artifactId>
<version>4.0.6</version>
<scope>provided</scope>
</dependency>
-
Create Main class as follows:
package com.app;
import com.jk.web.embedded.JKWebApplication;
public class Main {
public static void main(String[] args) {
JKWebApplication.run(8080);
}
}
And thats, it, running this class will run your war application.
This feature is for development and debugging purposes only, for production, consider a full-fledged tomcat or heroku webapp-runner. |
Run your application using webapp-runner:
-
call mvn package on your war project to create your war file.
-
Download webapp-runner.jar from here.
-
call the following command on your app (assuming your app final name is app.war):
java -jar webapp-runner-8.5.47.2.jar app.war