Re: specifying path for file to be read by servlet with Tomcat

From: Andrew Thompson (SeeMySites_at_www.invalid)
Date: 02/08/04


Date: Sun, 08 Feb 2004 05:34:45 GMT

Yang Xiao wrote:
> Hi everybody,
> I'm trying to read a txt file to be used by a servlet

You might investigate..
request.getRealPath("Topics.txt");

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology


Relevant Pages

  • Re: jsp wont compile...
    ... |> JSP's are 'translated by the servlet container to servlets, ... Hi Frances, ... Programs that have duplicated logic are hard to modify. ...
    (comp.lang.java.help)
  • Re: calling a stylesheet from a servlet..
    ... Andrew Thompson wrote: ... from where servlet is... ... >>dir where servlet is and where css sheet is and called css sheet from ... >>this test html and it worked fine.. ...
    (comp.lang.java.help)
  • Re: jsp wont compile...
    ... Andrew Thompson wrote: ... > JSP's are 'translated by the servlet container to servlets, ... running fine on my tomcat at home but when I upload it to my webhosting ...
    (comp.lang.java.help)
  • Re: Request parameters missing
    ... wraps HttpServletRequest. ... And when a multipartrequest is received in a ... servlet, request.getParameter will be null. ... Andrew Thompson ...
    (comp.lang.java.programmer)
  • Re: Split group?
    ... Andrew Thompson wrote: ... "Why my servlet throw NPE?" ... Yes - there will be overlap with the normal ...
    (comp.lang.java.programmer)