Java-Forum.org  
Zurück   Java-Forum.org > >

Allgemeines EE: jsp error "only a type can be imported"

Allgemeines EE Forum.

Thema geschlossen    
Themen-Optionen Thema durchsuchen Ansicht
Alt 24.11.2005, 20:55   #1
Gaston
 
jsp error "only a type can be imported" - Standard jsp error "only a type can be imported"

Hi, also ich habe ein simples Test.jsp Script dass das lucene.jar benötigt.Mein Provider gewährt mir jsp Unterstützung, jedoch werden die Files im public_html ordner gespeichert, sprich es es gibt keinen typischen webapps bzw webapp ordner mit der bekannten struktur (WEB-INF,META-INF etc.). nun liegt das benötigte lucene.jar im selben ordner wie das
test jsp skript welches dieses lucene.jar benötigt. Nun bekomme ich eine Fehlerlaufzeitmeldung wie:

Zitat:
org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:
Only a type can be imported. org.apache.lucene.analysis.Analyzer resolves to a package

Generated servlet error:
Only a type can be imported. org.apache.lucene.analysis.standard.StandardAnalyzer resolves to a package

Generated servlet error:
Only a type can be imported. org.apache.lucene.document.Document resolves to a package

Generated servlet error:
Only a type can be imported. org.apache.lucene.document.Field resolves to a package

Generated servlet error:
Only a type can be imported. org.apache.lucene.index.IndexWriter resolves to a package

An error occurred at line: 3 in the jsp file: /serverindex.jsp
Generated servlet error:
Analyzer cannot be resolved or is not a type

An error occurred at line: 3 in the jsp file: /serverindex.jsp
Generated servlet error:
StandardAnalyzer cannot be resolved or is not a type

An error occurred at line: 3 in the jsp file: /serverindex.jsp
Generated servlet error:
IndexWriter cannot be resolved or is not a type

An error occurred at line: 3 in the jsp file: /serverindex.jsp
Generated servlet error:
IndexWriter cannot be resolved or is not a type

An error occurred at line: 3 in the jsp file: /serverindex.jsp
Generated servlet error:
Document cannot be resolved or is not a type

An error occurred at line: 3 in the jsp file: /serverindex.jsp
Generated servlet error:
Document cannot be resolved or is not a type

An error occurred at line: 3 in the jsp file: /serverindex.jsp
Generated servlet error:
Field cannot be resolved


org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


Mein jsp Script

Code:
<%@ page import=" javax.servlet.*, javax.servlet.http.*,java.io.*,org.apache.lucene.analysis.Analyzer,org.apache.lucene.analysis.standard.StandardAnalyzer,org.apache.lucene.document.Document,org.apache.lucene.document.Field,org.apache.lucene.index.IndexWriter" %>
<%



		try
		{
		String[] text = { "Indexierung mit Lucene", "Suche mit Lucene" };
		String indexDir = "/home/sn/public_html/";
		Analyzer analyzer = new StandardAnalyzer();
		boolean create = true;

		IndexWriter writer = new IndexWriter(indexDir, analyzer, create);
		out.println("hmmmmmmmm.........");
		for (int i = 0; i < text.length; i++)
		{
			Document document = new Document();
			document.add(Field.Text("textfeld", text[i]));
			writer.addDocument(document);
			out.println("Es klappt");
		}
		
		writer.close();
		
		}catch(Exception e)
		{}

%>

Bin für jeden Tip dankbar wo der Fehler liegen könnte..


Danke im Vorraus


Gaston
 
Alt 25.11.2005, 07:44   #2
 
jsp error "only a type can be imported" - Standard AW: jsp error "only a type can be imported"

Zitat:
Only a type can be imported. org.apache.lucene.analysis.Analyzer resolves to a package
Sieth so aus als ob das Package org.apache.lucene.analysis.analyzer heist..
 
Alt 26.11.2005, 00:33   #3
Gaston
Themenstarter
 
jsp error "only a type can be imported" - Standard problem gelöst

mein anliegen hat sich erledigt weil mein webprovider mir entsprechende verzeichnisse eingerichtet hat.


Gruß

Gaston
 
Thema geschlossen    

Zurück   Java-Forum.org > >

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Ähnliche Themen: jsp error "only a type can be imported"
Eclipse "Selection does not contain a main type"
Eclipse "Selection does not contain a main type": Hallo, ich bin gerade von BlueJ auf Eclipse...
Kompletter Pfad aus "input type=file" auslesen
Kompletter Pfad aus "input type=file" auslesen: Hallo zusammen, das Problem was ich lösen möchte...
enum Fehlermeldung "The public type Day must be defined in its own file"
enum Fehlermeldung "The public type Day must be defined in its own file": Hallo Forum! ich habe folgendene Datei...
Eclipse zeigt "undefined type" an, obwohl alles fu
Eclipse zeigt "undefined type" an, obwohl alles fu: hallo zusammen, folgendes problem habe ich: ...
<input type="file"> Problem
<input type="file"> Problem: Hi, hab mal wieder ein Problem. Bei neuen...


Sie betrachten gerade jsp error "only a type can be imported"


Powered by vBulletin® Version 3.8.7 (Deutsch)
Copyright ©2000 - 2014, vBulletin Solutions, Inc.