Hello all... i am not sure where to put this question tho...

Well i got a web app which has a simple search feature, but while running the code i got this error from tomcat:


XML Code:
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/lucene/analysis/Analyzer
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:534)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:442)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/lucene/analysis/Analyzer
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:911)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:840)
	org.apache.jsp.index_jsp._jspService(index_jsp.java:90)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

java.lang.NoClassDefFoundError: org/apache/lucene/analysis/Analyzer
	org.apache.jsp.index_jsp._jspService(index_jsp.java:68)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

java.lang.ClassNotFoundException: org.apache.lucene.analysis.Analyzer
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
	org.apache.jsp.index_jsp._jspService(index_jsp.java:68)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

and the code that causes this error is below, whenever I instanciate an object from this class, i got the error above

XML Code:
package lucene;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import org.apache.lucene.analysis.*;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.util.Version;

public class Indexer {
	
	private IndexWriter writer; 
	
	public Indexer(String indexDir,String dataDir) throws Exception{
			
		try {
		
			Directory dir = FSDirectory.open(new File(indexDir));
			
			writer = new IndexWriter(dir,new StandardAnalyzer(Version.LUCENE_30),IndexWriter.MaxFieldLength.UNLIMITED);
			
		 } catch (IOException e) {
			
			e.printStackTrace();
			
		}
		
		File[] files = new File(dataDir).listFiles();
		for(File f : files){
			indexFile(f);
		}
		System.out.println("Indexing is over");

	}
	public void indexFile(File f) throws Exception {
		Document doc = new Document ();
		doc.add(new Field("contents",new FileReader(f)));
		doc.add(new Field("filename", f.getName(),Field.Store.YES,Field.Index.NOT_ANALYZED));
		doc.add(new Field("path",f.getCanonicalPath(),Field.Store.YES,Field.Index.NOT_ANALYZED));
		writer.addDocument(doc);
	}

}
i have tried many things but all i got is nothing... any ideas?