Issue #356 (Element error-page/location must start with a '/')
Signed-off-by: Mehtab Singh Mann <mehtabsinghmann@gmail.com>
This commit is contained in:
parent
bede684cac
commit
23bbbaf8c1
|
@ -1113,6 +1113,8 @@ public class StandardDescriptorProcessor extends IterativeDescriptorProcessor
|
||||||
code=Integer.valueOf(error);
|
code=Integer.valueOf(error);
|
||||||
|
|
||||||
String location = node.getString("location", false, true);
|
String location = node.getString("location", false, true);
|
||||||
|
if (!location.startsWith("/"))
|
||||||
|
throw new IllegalStateException("Missing leading '/' for location: " + location);
|
||||||
ErrorPageErrorHandler handler = (ErrorPageErrorHandler)context.getErrorHandler();
|
ErrorPageErrorHandler handler = (ErrorPageErrorHandler)context.getErrorHandler();
|
||||||
String originName = "error."+error;
|
String originName = "error."+error;
|
||||||
switch (context.getMetaData().getOrigin(originName))
|
switch (context.getMetaData().getOrigin(originName))
|
||||||
|
|
Loading…
Reference in New Issue