public static void check() throws JspTagException {
if (commonsLangChecked)
{
return;
}
try
{
// Do they have commons lang ?
Class stringUtils = Class.forName("org.apache.commons.lang.StringUtils"); //$NON-NLS-1$
try
{
// this method is new in commons-lang 2.1
stringUtils.getMethod("splitPreserveAllTokens", new Class[]{String.class}); //$NON-NLS-1$
}
catch (NoSuchMethodException ee)
{
throw new JspTagException(Messages.getString("DependencyChecker.lib.incompatible", //$NON-NLS-1$
new Object[]{"commons-lang", "2.1", "http://jakarta.apache.org/commons/lang"} //$NON-NLS-1$ //$NON-NLS-1$
));
}
}
catch (ClassNotFoundException e)
{
throw new JspTagException(Messages.getString("DependencyChecker.lib.missing", //$NON-NLS-1$
new Object[]{"commons-lang", "2.1", "http://jakarta.apache.org/commons/lang"} //$NON-NLS-1$ //$NON-NLS-1$
));
}
commonsLangChecked = true;
}
Displaytag requires commons-lang 2.x or better; it is not compatible with earlier versions. |