Hi Guys,

  I am facing one problem : I am using Tomcat, in my JSP page when i tried
to read a file say usersearch.xml like below

  File file = new
File("u:/karthikeyan/karthik/datewatch/xml/usersearch.xml");
  FileReader reader = new FileReader(file);

  I am not getting any problem but when i tried to give relative path i am
getting 404 error in my jsp file.  This i need it because when i am going to
upload to my server online i might not know the full path.

  File file = new File("/samples/xml/usersearch.xml");
  FileReader reader = new FileReader(file);

  samples - here samples is context name.
  xml - is the root folder name
  Here's the context info in the server.xml file

  ---------------------------------
        <Context path="/samples"
                 docBase="u:/karthikeyan/karthik/datewatch"
                 crossContext="false"
                 debug="0"
                 reloadable="true" >
        </Context>
  -----------------------------------

  I also tried this in desparate mesures

  File file = new File("../xml/usersearch.xml");

  But i am getting the same 404 error

  You guys have any solution to this problem.

  Waiting for yours earliest reply,

  With Regards,

b.karthikeyan.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to