开发者

How to get URL of a running app inside ServletContextListener?

I'm inside ServletContextListener, and need t开发者_运维技巧o get a URL of the application in full format, including protocol, server, port, and path. How can I do this?


You can't because it isn't unique. The container could have any number of aliases; it could be listening to any number of ports; and it could be listening on any specific port either HTTP or HTTPS.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜