Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 package com.opensymphony.webwork.dispatcher.multipart; 2 3 import com.opensymphony.xwork.ActionContext; 4 import com.opensymphony.xwork.util.OgnlValueStack; 5 6 import javax.servlet.http.HttpServletRequest ; 7 import javax.servlet.http.HttpServletRequestWrapper ; 8 9 19 public class WebWorkRequestWrapper extends HttpServletRequestWrapper { 20 public WebWorkRequestWrapper(HttpServletRequest req) { 21 super(req); 22 } 23 24 public Object getAttribute(String s) { 25 Object attribute = super.getAttribute(s); 26 27 boolean alreadyIn = true; 28 Boolean b = (Boolean ) ActionContext.getContext().get("__requestWrapper.getAttribute"); 29 if (b != null) { 30 alreadyIn = b.booleanValue(); 31 } 32 33 if (alreadyIn && attribute == null && s.indexOf("#") == -1) { 36 try { 37 ActionContext.getContext().put("__requestWrapper.getAttribute", Boolean.TRUE); 39 OgnlValueStack stack = ActionContext.getContext().getValueStack(); 40 if (stack != null) { 41 attribute = stack.findValue(s); 42 } 43 } finally { 44 ActionContext.getContext().put("__requestWrapper.getAttribute", Boolean.FALSE); 45 } 46 } 47 return attribute; 48 } 49 } 50
| Popular Tags
|