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.CredentialsImpl; 23 import org.apache.commons.latka.http.Request; 24 25 30 public class CredentialsTag extends TagSupport { 31 32 protected String _userName = null; 33 protected String _password = null; 34 35 41 public void doTag(XMLOutput xmlOutput) { 42 Request request = (Request) JellyUtils.getInstance().findParentRequest(this); 43 request.setCredentials(new CredentialsImpl(_userName,_password)); 44 } 45 46 51 public void setUserName(String userName) { 52 _userName = userName; 53 } 54 55 60 public void setPassword(String password) { 61 _password = password; 62 } 63 64 } 65 | Popular Tags |