Skip to content

Add clickable server URL to dev mode port info output - #529

Merged
venmanyarun merged 4 commits into
OpenLiberty:mainfrom
venmanyarun:port-info-clickable-url
Aug 13, 2026
Merged

Add clickable server URL to dev mode port info output#529
venmanyarun merged 4 commits into
OpenLiberty:mainfrom
venmanyarun:port-info-clickable-url

Conversation

@venmanyarun

Copy link
Copy Markdown
Contributor

Fixes #528

When dev mode starts or the user presses 'p', print a clickable URL alongside each HTTP/HTTPS port line so users can navigate directly to the running server.

When dev mode starts or the user presses 'p', print a clickable URL
alongside each HTTP/HTTPS port line so users can navigate directly to
the running server.
@venmanyarun

venmanyarun commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Screen Recording of new Port info
We can see that Host Openliberty server page link is coming as a clickable link when server is being started in dev mode.
Also if user presses "p" keyboard shortcut, port info is again displayed, which also contains local host URL

Screen.Recording.2026-08-11.at.1.56.37.PM.mov

checked in dev container mode as well

Screen.Recording.2026-08-11.at.1.56.37.PM.mov

In container mode (devc), Liberty runs inside the container. The hostname Liberty binds to and reports in CWWKT0016I is the container's internal hostname or IP (e.g. 172.17.0.2) — which is only reachable from within the container network, not from the developer's machine.

What the developer actually accesses is localhost: — the port that Docker/Podman maps from the container to the host machine (e.g. -p 9080:9080). That mapped host port is what gets stored in httpPort via findLocalPort().

So for liberty:devc, the container URL will have localhost hardcoded

@cherylking

Copy link
Copy Markdown
Member

@venmanyarun Please add a screenshot of the new info. It is difficult to see/read in the video when pausing.

Comment thread src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java Outdated
@venmanyarun

Copy link
Copy Markdown
Contributor Author

@venmanyarun Please add a screenshot of the new info. It is difficult to see/read in the video when pausing.

dev mode starting

image

hot keypress "p"
image

dev container starting
image

keypress "p" in container mode

image

Comment thread src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java Outdated
@cherylking

Copy link
Copy Markdown
Member

As discussed at the meeting today, let's go with Liberty welcome page: for the label. Also, since the developer owns the configuration where enableWelcomePage=false may have been set, we think it is ok to display the url even if it does not go to a valid page. It would give the developer an easy way to test that their configuration worked.

@venmanyarun

Copy link
Copy Markdown
Contributor Author

Screenshots with label Liberty welcome page:

Dev Mode
image

image

Dev container mode

image image

@venmanyarun
venmanyarun requested a review from cherylking August 13, 2026 09:10
Comment thread src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java
@venmanyarun
venmanyarun merged commit c45c248 into OpenLiberty:main Aug 13, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add shortcut key to terminal to open Liberty welcome page directly when running Liberty in dev mode

3 participants