I'm using a Tomcat 9 server in a Docker container to deploy locally a webapp for development purposes. I can connect to my Tomcat using http://localhost:8080/ But I can't find my webapp URL anywhere. My Docker container is deployed from IntelliJ, and I have no URL field in the configuration of the Container.
Does anyone know where to find/set the URL ?
There is no URL to be set, at least not explicitly.
Once you have your application started in a container (either started through IntelliJ IDEA , Docker Desktop (for) , command line...) with the port binding configuration (the Bind ports config section in your screenshot), you are only left with the application as if it was started on the host on the mapped port (the first section before the colon :
in the port binding).
Which means you can simply access your application on:
http://localhost:8080
following the pattern for a URL: (protocol)://(host)(:port)
where:
protocol
is HTTP since you mentioned using Tomcat as a web server host
being you local station where the docker daemon is running on port
being the port you chose to map to the started container port
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.