You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Susmita Pati <SP...@alsysinc.com> on 2002/12/12 20:34:24 UTC

Tomcat Tries to look For the specified file in the Bin Directory

Hi Folks

Am not able to Retrieve the XML file that i have in my conf directory.
If i just give the location as {String location = "logonconfig.xml"; } It
points to the 
Apache Tomcat 4.0 /bin directory.If i give the location as {String location
= "..\\webapps\\Dynapro4.3\\web-inf\\conf\\logonconfig.xml";}  Then it
points to the Apache Tomcat 4.0
/bin/webapps/Dynapro4.3/web-inf/conf/logonconfig.xml"


Here is the code where in i am trying to pick up the xml file.


  Element root = null;
	    try {
		  	Document doc = null;
		  	String location = "logonconfig.xml";
			//String location =
"..\\webapps\\Dynapro4.3\\web-inf\\conf\\logonconfig.xml";
	        DocumentBuilderFactory docBuilderFactory =
DocumentBuilderFactory.newInstance();
	        DocumentBuilder parser =
docBuilderFactory.newDocumentBuilder();

	  		doc = parser.parse(new File(location));
	        root = doc.getDocumentElement();
 
	    }


Thanks in Advance
Susmita

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>