reading a file thru servlet

Discussions

Web tier: servlets, JSP, Web frameworks: reading a file thru servlet

  1. reading a file thru servlet (1 messages)

    hi
      how to read afile thru servlet. I tried using config.initparameter. I have defined the parameter in tomcat web.xml file. suppose i have txt file in d:\tomcat\webapps\examples\web-inf\classes\init.txt. what path i have to give relative or absolute.
    Its retruning the init parameter as null.

    How to read? help
    regards
    sundar
  2. reading a file thru servlet[ Go to top ]

    try to get the servlet context when it init, or in any of doPost, doGet method.