Hi, My servlet is supposed to read the contents of a file stored in the root of my webapp. I need to set it up so that the file can be found on both Linux and windows systems. But no matter what path I type in or where I put the file, the servlet isn't able to find it. What do I need to change? Have I missed a config file? Below is a code snippet from the servlet:
package com.pixelfiend.linespeed; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class LineTest2 extends HttpServlet { ... public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); byte fileIn[] = new byte[500000]; FileInputStream fis = new FileInputStream("junk.txt"); // here's the filename int status = fis.read(fileIn); String fiftyK = new String(fileIn); ... Thanks in advance for any hints, Garann Rose Means ____________________________________________________________________________ ____________________________________________________________________________ ___________________________________________ ITAS2 - Washington State Dept. of Corrections (360) 570-3407 406 Legion Way SE MS 41142 Olympia, WA 98504 =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com