Browse Source

jfinal 3.5

James 7 years ago
parent
commit
78e6cd6b80
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/main/java/com/jfinal/render/ErrorRender.java

+ 3 - 0
src/main/java/com/jfinal/render/ErrorRender.java

@@ -32,6 +32,7 @@ public class ErrorRender extends Render {
 	protected static final String html404 = "<html><head><title>404 Not Found</title></head><body bgcolor='white'><center><h1>404 Not Found</h1></center><hr>" + version + "</body></html>";
 	protected static final String html500 = "<html><head><title>500 Internal Server Error</title></head><body bgcolor='white'><center><h1>500 Internal Server Error</h1></center><hr>" + version + "</body></html>";
 	
+	protected static final String html400 = "<html><head><title>400 Bad Request</title></head><body bgcolor='white'><center><h1>400 Bad Request</h1></center><hr>" + version + "</body></html>";
 	protected static final String html401 = "<html><head><title>401 Unauthorized</title></head><body bgcolor='white'><center><h1>401 Unauthorized</h1></center><hr>" + version + "</body></html>";
 	protected static final String html403 = "<html><head><title>403 Forbidden</title></head><body bgcolor='white'><center><h1>403 Forbidden</h1></center><hr>" + version + "</body></html>";
 	
@@ -70,6 +71,8 @@ public class ErrorRender extends Render {
 			return html404;
 		if (errorCode == 500)
 			return html500;
+		if (errorCode == 400)
+			return html400;
 		if (errorCode == 401)
 			return html401;
 		if (errorCode == 403)