Anonymous committed 58d55f2

added ServletConfig into the action context, to allow access to ServletContext via ServletActionContext


Comments (0)

Files changed (1)


 package com.opensymphony.webwork.validators;
 import com.opensymphony.util.TextUtils;
+import com.opensymphony.webwork.dispatcher.ServletDispatcher;
 import com.opensymphony.webwork.views.util.TextUtil;
 import com.opensymphony.xwork.*;
 import com.opensymphony.xwork.config.entities.ActionConfig;
             Action a = null;
             HashMap ctx = new HashMap();
             ctx.put(ActionContext.PARAMETERS, params);
+            ctx.put(ServletDispatcher.SERVLET_CONFIG, getServletConfig());
             ValidatorActionProxy proxy = new ValidatorActionProxy(namespace, action, ctx);
             a = proxy.getAction();
     public static class ValidatorActionProxy extends DefaultActionProxy {
         protected ValidatorActionProxy(String namespace, String actionName, Map extraContext) throws Exception {
-            super(namespace, actionName, extraContext, false);
+            super(namespace, actionName,extraContext,false);
         protected void prepare() throws Exception {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.