1 16 17 package org.apache.commons.latka.jelly; 18 19 import org.apache.commons.jelly.TagSupport; 20 import org.apache.commons.jelly.XMLOutput; 21 22 import org.apache.commons.latka.http.Request; 23 24 29 public class RequestHeaderTag extends TagSupport { 30 31 protected String _headerName = null; 32 protected String _headerValue = null; 33 34 40 public void doTag(XMLOutput xmlOutput) { 41 Request request = (Request) JellyUtils.getInstance().findParentRequest(this); 42 request.addHeader(_headerName,_headerValue); 43 } 44 45 50 public void setHeaderName(String headerName) { 51 _headerName = headerName; 52 } 53 54 59 public void setHeaderValue(String headerValue) { 60 _headerValue = headerValue; 61 } 62 63 } 64 | Popular Tags |