I have added the dependency in pom.xml
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
but when i update maven dependencies and import the EscapeStringUtils
using
import org.apache.commons.lang3.StringEscapeUtils;
i get it red underlined and error which states :
The import org.apache.commons.lang3.StringEscapeUtils cannot be resolved
Jar file is there (downloaded) now how can i fix it, i have no idea. Kindly help me.
Thanks
public class StringEscapeUtils extends Object. Escapes and unescapes String s for Java, Java Script, HTML and XML. #ThreadSafe# This code has been adapted from Apache Commons Lang 3.5.
@user3871754 No, it is deprecated in the org. apache. commons.
escapeHtml. Escapes the characters in a String using HTML entities and writes them to a Writer .
Thanks for all replies, i solved it by downloading manually the .jar file from the following link and overwrite the existing jar downloaded by maven. (i don't know why it started working after manual download, but after all, its working)
http://commons.apache.org/proper/commons-lang/download_lang.cgi
If you sure that jar file includes StringEscapeUtils in the classpath you should clean the project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With