Merge pull request #394 from mehtabsinghmann/master

Issue #356 (Element error-page/location must start with a '/')
This commit is contained in:
Simone Bordet 2016-03-04 15:45:23 +01:00
commit 9e75fa1fb9
1 changed files with 2 additions and 0 deletions

View File

@ -1113,6 +1113,8 @@ public class StandardDescriptorProcessor extends IterativeDescriptorProcessor
code=Integer.valueOf(error);
String location = node.getString("location", false, true);
if (!location.startsWith("/"))
throw new IllegalStateException("Missing leading '/' for location: " + location);
ErrorPageErrorHandler handler = (ErrorPageErrorHandler)context.getErrorHandler();
String originName = "error."+error;
switch (context.getMetaData().getOrigin(originName))