Runner to display useful message
This commit is contained in:
parent
6f674599da
commit
88df2961bd
2 changed files with 7 additions and 0 deletions
|
|
@ -549,6 +549,12 @@ public class AlbumServlet
|
||||||
|
|
||||||
|
|
||||||
lastCacheFlushTime = System.currentTimeMillis();
|
lastCacheFlushTime = System.currentTimeMillis();
|
||||||
|
|
||||||
|
Object baseUrl = getServletContext().getAttribute("album.baseurl");
|
||||||
|
String url = (baseUrl != null ? String.valueOf(baseUrl) : "http://localhost:8080/photo")
|
||||||
|
+ "/" + getServletConfig().getServletName() + "/"
|
||||||
|
+ rootNames.stream().findFirst().orElse("photos") + ".album";
|
||||||
|
System.out.println("Visit " + url);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void log4jInit(String resource) {
|
private void log4jInit(String resource) {
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ public class Runner {
|
||||||
context.setContextPath("/photo");
|
context.setContextPath("/photo");
|
||||||
context.setParentLoaderPriority(true);
|
context.setParentLoaderPriority(true);
|
||||||
|
|
||||||
|
context.setAttribute("album.baseurl", "http://localhost:8080/photo");
|
||||||
server.setHandler(context);
|
server.setHandler(context);
|
||||||
|
|
||||||
server.start();
|
server.start();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue