Hallo,

I know my topic is a little bit out of topic. but I am trying and trying to do something without no effort. I have a very simple application.I tested this application on my homepc with tomcat 3.3.2 and it worked. But on the the server off my webhosting agency it does not work. I putted the jar in the right directory and so on and so I have no idea why it doesn't work. Perhaps somebody out of you had the same problem and has a hint for my, what the reason for my failure can be.

My code:
<%@ page import="java.io.*,javax.servlet.*, javax.servlet.http.*,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 = application.getRealPath("/")+"myindex";
       Analyzer analyzer = new StandardAnalyzer();
       boolean create = true;
IndexWriter writer = new IndexWriter(indexDir, analyzer, create);
       out.println(indexDir);
       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();
       out.println("hallozwei");
       }
       catch(IOException e)
       {
       e.printStackTrace();
       }
       catch(Exception e)
       {
       e.printStackTrace();
       }

%>

Error:

http://gasizwei.meintestaccount.de:9080/gagamodi/indexaufserver.jsp


Thank you in advance.

Greetings

Gaston

P.S. I asked this in j2ee forums but the answers I get didn't help me.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to