if(s.contains(sv.getTag()))
s = s.replace(sv.getTag(),sv.getValue());
}
} catch (Exception ex) {
throw new ServerVariableException("Error while inserting Servervariable." + ex.getMessage());
}
//required params
while(s.contains("@param:")){
String name = "";
int firstDelimiter = s.indexOf("@param:");
int nextDelimiter = s.indexOf("@",firstDelimiter+1);
if(nextDelimiter>=0)
if(ignoreMissingParams)
s = s.replace(s.substring(firstDelimiter,nextDelimiter+1),"");
else{
name = s.substring(firstDelimiter+7,nextDelimiter);
throw new ServerVariableException("Parameter '" + name + "' was not supplied");
} else
throw new ServerVariableException("Error while inserting Servervariables: Missing closing '@' in at least one '@param:' tag");
}
//optional params. Leave blank if not supplied
while(s.contains("@optionalparam:")){
String name = "";
int firstDelimiter = s.indexOf("@optionalparam:");