Take the 2-minute tour ×

How can I use Guava for my web application? I want to use it e.g. for testing instead of JUnit. Is that possible? What other uses can I have from Guava if I'm building webapps with JSP and servlets?

share|improve this question
You mean Google Guava? There is a wiki has whole lot of info code.google.com/p/guava-libraries/w/list –  Nishant Aug 8 '12 at 6:34
Related: stackoverflow.com/questions/3924479/… –  RC. Aug 8 '12 at 6:34

2 Answers 2

up vote 6 down vote accepted

Please read https://code.google.com/p/guava-libraries/wiki/GuavaExplained?tm=6

Guava is not a replacement of JUnit.

share|improve this answer
Guava is sort of extension for the JDK. It can't replace a specialized library like JUnit or servlet-api, but it can help with a lot of things. Whatever you do, it's quite probable you find something useful there. –  maaartinus Aug 8 '12 at 17:41
@maaartinus You should transform your comment in a response –  RC. Aug 8 '12 at 17:53

I was not aware that Guava was a unit testing framework. Therefore this part of the question does not make sense to me.

Guava is a general purpose Java helper library. You will find all sorts of nice things in there, but nothing is specific to JSPs and servlets. It’s like asking: What uses has Apache Commons for webapps? What uses has the Java collection framework for JSPs?

share|improve this answer

Your Answer


