Skip to content

Hello world web application with Maven + Java + Servlets + Tomcat

License

Notifications You must be signed in to change notification settings

kkothapelly/java-servlet-hello

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-servlet-hello

Hello world web application with Maven + Java + Servlets + Tomcat

Compile app

mvn clean install

The compiled file will been stored in target folder as hello.war

Run app

mvn tomcat7:run

The servlet can be executed in browser by path http://localhost:8081/hello

Run in docker

After compile app just run next

docker run -i --rm --name hello-app -p 8081:8080 \
  -v ${PWD}/target/hello.war:/usr/local/tomcat/webapps/hello.war \
  tomcat:9.0-jre8-alpine

And for opening the Servlet run in browser http://localhost:8081/hello/hello

About

Hello world web application with Maven + Java + Servlets + Tomcat

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%