Skip to content

Commit 76f53d4

Browse files
committed
better frontpage
1 parent 6c7464a commit 76f53d4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/main/java/org/cip4/jdfutility/server/JettyServer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ public void runServer() throws Exception
305305
final Sequence handlers = createHandlerList();
306306
final Sequence handlerbase = createBaseCollection(handlers);
307307
server.setHandler(handlerbase);
308+
server.setDefaultHandler(new RedirectHandler());
308309
server.start();
309310
log.info("completed starting new server: " + toString());
310311
}

src/main/java/org/cip4/jdfutility/server/MyResourceHandler.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ public String toString()
114114
@Override
115115
public boolean handle(final Request request, final Response response, final Callback callback) throws Exception
116116
{
117+
final String context = request.getContext().getContextPath();
118+
if (StringUtil.isEmpty(context))
119+
return false;
117120
final HttpURI uri = request.getHttpURI();
118121
final String uriString = update(uri.asString());
119122
if (uriString == null)

0 commit comments

Comments
 (0)