Diff of /tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve/RemoteHostValveForm.java
Parent Directory
| Revision Log
| Patch
--- tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve/RemoteHostValveForm.java 2006/02/22 22:58:24 379957
+++ tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve/RemoteHostValveForm.java 2006/02/22 22:59:15 379958
@@ -20,7 +20,7 @@ import java.lang.IllegalArgumentExceptio
import javax.servlet.http.HttpServletRequest;
import org.apache.regexp.RE;
-import org.apache.struts.action.ActionError;
+import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
@@ -160,7 +160,7 @@ public final class RemoteHostValveForm e
if ((allow == null) || (allow.length() < 1)) {
if ((deny == null) || (deny.length() < 1)) {
errors.add("allow",
- new ActionError("error.allow.deny.required"));
+ new ActionMessage("error.allow.deny.required"));
}
}
}
@@ -168,14 +168,14 @@ public final class RemoteHostValveForm e
try {
allows = ValveUtil.precalculate(allow);
} catch (IllegalArgumentException e) {
- errors.add("allow", new ActionError("error.syntax"));
+ errors.add("allow", new ActionMessage("error.syntax"));
return errors;
}
try {
denies = ValveUtil.precalculate(deny);
} catch (IllegalArgumentException e) {
- errors.add("allow", new ActionError("error.syntax"));
+ errors.add("allow", new ActionMessage("error.syntax"));
return errors;
}
@@ -192,23 +192,23 @@ public final class RemoteHostValveForm e
if (denies[i].match(host)) {
if (allows.length < 1) {
errors.add("deny",
- new ActionError("error.denyHost"));
+ new ActionMessage("error.denyHost"));
}
for (int j = 0; j < allows.length; j++) {
if (!allows[j].match(host)) {
errors.add("deny",
- new ActionError("error.denyHost"));
+ new ActionMessage("error.denyHost"));
}
}
} else if (denies[i].match(ip)) {
if (allows.length < 1) {
errors.add("deny",
- new ActionError("error.denyHost"));
+ new ActionMessage("error.denyHost"));
}
for (int j = 0; j < allows.length; j++) {
if (!allows[j].match(ip)) {
errors.add("deny",
- new ActionError("error.denyHost"));
+ new ActionMessage("error.denyHost"));
}
}
}
@@ -227,7 +227,7 @@ public final class RemoteHostValveForm e
}
if (!allowMatch) {
- errors.add("allow", new ActionError("error.allowHost"));
+ errors.add("allow", new ActionMessage("error.allowHost"));
}
return errors;