----------------------------------------------------
Please read the FAQ at <http://java.apache.org/faq/>
It does have a search feature!

We cannot guess what you are trying to do:
#1. Include version numbers for all software.
#2. Include relevant configuration settings.
#3. Include full descriptions of the problem.

Got Linux? Seeing lots of java processes?
<http://java.apache.org/faq/?file=274>
----------------------------------------------------

Sorry but as I am still having troubles I thought I'd send the whole code
which give the error.  I have changed just a few things in config but not
much, still no go.

Reading is the crux of our servlet but I/O seems a no go please if anyone
can pick the fault in our setup we'd appreciate it grately.

STU


At 12:02  10/10/99 +1000, you wrote:
>----------------------------------------------------
>Please read the FAQ at <http://java.apache.org/faq/>
>It does have a search feature!
>
>We cannot guess what you are trying to do:
>#1. Include version numbers for all software.

Running Apache 1.3.9
         JServ 1.0
         JSSI 1.1.2
>#2. Include relevant configuration settings.

jserv.conf

ApJServProperties /jbod/data/cseeweb/apache/jserv/servlets/jserv.properties
ApJServMount /servlets ajpv11://localhost:8007/servlets
ApJServAction .jhtml /servlets/org.apache.servlet.ssi.SSI

jserv.properties

wrapper.bin=/data/cseeweb/jdk/bin/java
wrapper.class=org.apache.jserv.JServ
wrapper.classpath=/jbod/data/cseeweb/apache/jserv/src/java/ApacheJServ.jar
wrapper.classpath=/jbod/data/cseeweb/apache/Jssi/src/java/ApacheJSSI.jar
wrapper.classpath=/data/cseeweb/jsdk/lib/jsdk.jar
wrapper.classpath=/data/cseeweb/jdk/lib/classes.zip
zones=servlets

servlets.properties

repositories=/jbod/data/cseeweb/apache/jserv/servlets,/jbod/data/cseeweb/apa
che/JSSI/src/java/ApacheJSSI.jar
serverlet.org.apache.ssi.SSI.initArgs=SSISiteRoot=/jbod/data/cseeweb/htdocs,
expires=-1000

All else is as it comes in the distribution.

>#3. Include full descriptions of the problem.

import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class filecreate extends HttpServlet {
        
 public void init (ServletConfig config) throws ServletException {
          super.init(config);
 }
        
 public void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException {
PrintWriter out = res.getWriter();
        res.setContentType("text/plain");

         out.println("Starting file write...");
         String blah = System.getProperty("user.dir");
         out.println(blah);
   FileWriter fileWriter = new FileWriter("/test_this_bitch.txt");
         BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
         bufferedWriter.write("hrrrm");
         bufferedWriter.close();
         fileWriter.close();
        
         out.println("Done!");
 }

 public void doPost (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
                // shove it over to doGet
                doGet(req, res);
                
  }

}

When trying to write a file as we thought the problem was placement of our
txt file we received an error like:
[11/10/1999 13:48:12:632] (ERROR) ajp11: Servlet Error:
java.io.FileNotFoundException: /test_this_bitch.txt: /test_this_bitch.txt
[11/10/1999 13:48:12:633] (ERROR) an error returned handling request via
protocol "ajpv11"

I have looked through the FAQs but don't seem to see something like our
difficulty.
==================//==================
Stuart Fraser
Email: [EMAIL PROTECTED]
Phone: +61 7 38127010
==================//==================



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to