@Override
public int doStartTag() throws JspTagException {
AbstractParameterTag sTag = (AbstractParameterTag) findAncestorWithClass(this, AbstractParameterTag.class);
if (sTag == null)
throw new JspTagException("ParamTag not inside a ServiceTag.");
if (mode != null && !mode.equals("IN") && !mode.equals("OUT") && !mode.equals("INOUT"))
throw new JspTagException("Invalid mode attribute. Must be IN/OUT/INOUT.");
if (mode != null && (mode.equals("OUT") || mode.equals("INOUT")))
sTag.addOutParameter(name, (alias != null ? alias : name));
if (mode == null || mode.equals("IN") || mode.equals("INOUT")) {
Object value = null;
if (attribute != null) {
if (map == null) {
value = pageContext.findAttribute(attribute);
if (value == null)
value = pageContext.getRequest().getParameter(attribute);
} else {
try {
Map<String, Object> mapObject = UtilGenerics.cast(pageContext.findAttribute(map));
value = mapObject.get(attribute);
} catch (Exception e) {
throw new JspTagException("Problem processing map (" + map + ") for attributes.");
}
}
}
if (value == null && paramValue != null) {
value = paramValue;