{"id":22753146,"url":"https://github.com/shockwavemk/tomcat-debug-template-app","last_synced_at":"2026-04-13T19:32:41.604Z","repository":{"id":69942765,"uuid":"90949470","full_name":"shockwavemk/tomcat-debug-template-app","owner":"shockwavemk","description":"Demo application for debugging a docker driven tomcat java web application","archived":false,"fork":false,"pushed_at":"2017-06-12T11:44:27.000Z","size":5499,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T11:07:37.058Z","etag":null,"topics":["container","debug","debugger","docker","docker-compose","dockercon","intellij","java","macos","mysql","tomcat","tutorial"],"latest_commit_sha":null,"homepage":"https://www.martin-kramer.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shockwavemk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-11T07:17:04.000Z","updated_at":"2020-03-28T13:03:21.000Z","dependencies_parsed_at":"2023-03-05T23:30:16.416Z","dependency_job_id":null,"html_url":"https://github.com/shockwavemk/tomcat-debug-template-app","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shockwavemk/tomcat-debug-template-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockwavemk%2Ftomcat-debug-template-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockwavemk%2Ftomcat-debug-template-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockwavemk%2Ftomcat-debug-template-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockwavemk%2Ftomcat-debug-template-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shockwavemk","download_url":"https://codeload.github.com/shockwavemk/tomcat-debug-template-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockwavemk%2Ftomcat-debug-template-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31768637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["container","debug","debugger","docker","docker-compose","dockercon","intellij","java","macos","mysql","tomcat","tutorial"],"created_at":"2024-12-11T06:09:08.749Z","updated_at":"2026-04-13T19:32:41.585Z","avatar_url":"https://github.com/shockwavemk.png","language":"Java","readme":"# Debug a docker driven tomcat java web application\n\nThis repository is built as shown on \n\n    https://blog.docker.com/2016/09/java-development-using-docker/\n\n## Installation steps (on mac, with docker toolbox)\n\n### Install Java\n\nInstall the Java SE Development Kit to your local machine in order to build source code.\n\n    http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html\n\n![](./docs/2.png)\n\nAn alternative could be to use a docker container for compiling:\n\n    https://hub.docker.com/_/openjdk/\n\n### Download IntelliJ IDEA\n\nhttps://www.jetbrains.com/idea/download/#section=mac\n\n![](./docs/1.png)\n\n### Install Docker/Docker-Compose\n\nInstall either docker toolbox or docker for mac.\n\nhttps://docs.docker.com/compose/install/\n\nFor better access on mounted filesystem install docker-machine-nfs:\n\nhttps://github.com/adlogix/docker-machine-nfs\n\n### Create a host entry\n\n```bash\nsudo nano /etc/hosts\n```\n\nAdd another entry like (docker toolbox)\n\n```\n192.168.99.100  dev.project.io\n```\n\nor \n\n```\n127.0.0.1  dev.project.io\n```\n\n### Clone this project\n\n```bash\ncd /your/projects/folder\n\ngit clone git@github.com:shockwavemk/tomcat-debug-template-app.git\n```\n\n## Startup of project\n\nStart up intelliJ IDEA and open your cloned folder:\n\n![](./docs/3.png)\n\n### Docker\n\nOpen the terminal,\n\n![](./docs/4.png)\n\nand start docker containers with:\n\n```\ndocker-compose build\ndocker-compose up -d\n```\n\nIf not yet started, docker will notice to startup docker machine:\n\n```\ndocker-machine start\neval \"$(docker-machine env default)\"\n```\n\nThe following ports are used in this project:\n\n- 80 for tomcat webserver\n- 8000 for debug\n- 3306 for mysql\n\n### Build the project\n\nBuild the project (Build \u003e Build Project)\n\n![](./docs/7.png)\n\n### Configure remote debugging\n\nGo to Run \u003e Debug,\n\n![](./docs/8.png)\n\nand configure a new \"remote\" entry:\n\n![](./docs/6.png)\n\nMost needed configurations are already inserted by IntelliJ IDEA, but two values have to be changed:\n\n- Change host to: dev.project.io\n- Change port to: 8000\n\n![](./docs/5.png)\n\n### Database edit in IntelliJ IDEA\n\nOpen the database window:\n\n![](./docs/20.png)\n\nAdd a new entry,\n\n![](./docs/17.png)\n\ndownload the missing driver for mysql,\n\n![](./docs/18.png)\n\nand configure the mysql docker container bound to localhost / docker-machine:\n\n![](./docs/21.png)\n\nCurrent docker-container config reveals the username/password:\n\n![](./docs/19.png)\n\n\n\n## Debug the project\n\nStart the debugging session with a click onto the green bug:\n\n![](./docs/11.png)\n\nA new tool window should appear with a \"connected\" message:\n\n![](./docs/12.png)\n\nOpen your web-browser to open the web-application:\n\n    http://dev.project.io/manager/html\n    \n![](./docs/9.png)\n\nThe docker-application is hosted behind the a sub-path called /UserSignup.\nA click onto the link will lead you to the start window of the demo-application:\n\n![](./docs/10.png) \n\nIn the code editor window open the controller class \"UserController\".\nMark the line 27 with a breakpoint:\n\n![](./docs/13.png) \n\n\nNavigate to the address \n\n    http://dev.project.io/UserSignup/signup.html\n\nin your web-browser:\n\n![](./docs/14.png) \n\nThe application execution should stop at breakpoint, IntelliJ IDEA should show breakpoint details and active variables.\n\n## Hints\n\nTemplate changes are not immediately done in web-site, even on execution of \"build\".\nAll assets are saved in a file called UserSignup.war.\n\n![](./docs/15.png) \n\nThis file can be recompiled by Build \u003e Build Artifacts ... \u003e All artifacts\n\n![](./docs/16.png) ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshockwavemk%2Ftomcat-debug-template-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshockwavemk%2Ftomcat-debug-template-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshockwavemk%2Ftomcat-debug-template-app/lists"}