tomcat下是应该把自己编写的类放在web-inf/classes中吧,为什么却提示说找不到类呢?
org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 33 in the jsp file: /search.jsp
EngCLIR2 cannot be resolved to a type
30: Analyzer analyzer = null;
31:
32: if(lang.equals("En")){
33: EngCLIR2 engclir = new EngCLIR2();
34: engclir.setQuery(sEng);
35: hits = engclir.search("C:\\tomcat\\Tomcat 5.0\\webapps\\clir\\NTCIR3ChnIndex");
36: destquery = engclir.destquery;
An error occurred at line: 33 in the jsp file: /search.jsp
EngCLIR2 cannot be resolved to a type
30: Analyzer analyzer = null;
31:
32: if(lang.equals("En")){
33: EngCLIR2 engclir = new EngCLIR2();
34: engclir.setQuery(sEng);
35: hits = engclir.search("C:\\tomcat\\Tomcat 5.0\\webapps\\clir\\NTCIR3ChnIndex");
36: destquery = engclir.destquery;
An error occurred at line: 38 in the jsp file: /search.jsp
ChnAnalyzer cannot be resolved to a type
35: hits = engclir.search("C:\\tomcat\\Tomcat 5.0\\webapps\\clir\\NTCIR3ChnIndex");
36: destquery = engclir.destquery;
37: query = engclir.query;
38: analyzer = new ChnAnalyzer();
39: if(hits != null)
40: System.out.println("jieguowei"+hits.length());
41: }
An error occurred at line: 44 in the jsp file: /search.jsp
LuceneQuery cannot be resolved to a type
41: }
42:
43: if(lang.equals("Ch")){
44: LuceneQuery lq = new LuceneQuery("chn");
45: lq.search(sEng);
46: hits = lq.hits;
47: destquery = sEng;
An error occurred at line: 44 in the jsp file: /search.jsp
LuceneQuery cannot be resolved to a type
41: }
42:
43: if(lang.equals("Ch")){
44: LuceneQuery lq = new LuceneQuery("chn");
45: lq.search(sEng);
46: hits = lq.hits;
47: destquery = sEng;
An error occurred at line: 49 in the jsp file: /search.jsp
ChnAnalyzer cannot be resolved to a type
46: hits = lq.hits;
47: destquery = sEng;
48: query = lq.query;
49: analyzer = new ChnAnalyzer();
50:
51: }
52:
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:319)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
急需解决,在线等哦!
org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 33 in the jsp file: /search.jsp
EngCLIR2 cannot be resolved to a type
30: Analyzer analyzer = null;
31:
32: if(lang.equals("En")){
33: EngCLIR2 engclir = new EngCLIR2();
34: engclir.setQuery(sEng);
35: hits = engclir.search("C:\\tomcat\\Tomcat 5.0\\webapps\\clir\\NTCIR3ChnIndex");
36: destquery = engclir.destquery;
An error occurred at line: 33 in the jsp file: /search.jsp
EngCLIR2 cannot be resolved to a type
30: Analyzer analyzer = null;
31:
32: if(lang.equals("En")){
33: EngCLIR2 engclir = new EngCLIR2();
34: engclir.setQuery(sEng);
35: hits = engclir.search("C:\\tomcat\\Tomcat 5.0\\webapps\\clir\\NTCIR3ChnIndex");
36: destquery = engclir.destquery;
An error occurred at line: 38 in the jsp file: /search.jsp
ChnAnalyzer cannot be resolved to a type
35: hits = engclir.search("C:\\tomcat\\Tomcat 5.0\\webapps\\clir\\NTCIR3ChnIndex");
36: destquery = engclir.destquery;
37: query = engclir.query;
38: analyzer = new ChnAnalyzer();
39: if(hits != null)
40: System.out.println("jieguowei"+hits.length());
41: }
An error occurred at line: 44 in the jsp file: /search.jsp
LuceneQuery cannot be resolved to a type
41: }
42:
43: if(lang.equals("Ch")){
44: LuceneQuery lq = new LuceneQuery("chn");
45: lq.search(sEng);
46: hits = lq.hits;
47: destquery = sEng;
An error occurred at line: 44 in the jsp file: /search.jsp
LuceneQuery cannot be resolved to a type
41: }
42:
43: if(lang.equals("Ch")){
44: LuceneQuery lq = new LuceneQuery("chn");
45: lq.search(sEng);
46: hits = lq.hits;
47: destquery = sEng;
An error occurred at line: 49 in the jsp file: /search.jsp
ChnAnalyzer cannot be resolved to a type
46: hits = lq.hits;
47: destquery = sEng;
48: query = lq.query;
49: analyzer = new ChnAnalyzer();
50:
51: }
52:
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:319)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
急需解决,在线等哦!
<%@ page contentType="text/html; charset=gb2312" import="java.util.*,java.sql.*"%>
引入的类文件写在import=""里,引入多个类用逗号隔开.
<%@ page import="analyzer.*"%>
<%@ page import="org.apache.lucene.analysis.*"%>
<%@ page import="org.apache.lucene.queryParser.*"%>
<%@ page import="org.apache.lucene.search.*"%>
<%@ page import="org.apache.lucene.document.*"%>
<%@ page import="org.apache.lucene.analysis.standard.*"%>
<%@ page import="Search.*"%>
<%@ page import="java.util.*"%>
<%@ page import="org.apache.lucene.search.highlight.*"%>
+webroot
----WEB-INF
--------classes
--------lib