I'm facing the problem with apache tomcat webserver. I create a directory and the directory gets created in the tomcat root directory, instead of the directory where the class file resides. Please help me regarding what's wrong. Also i need a free host providing jsp support along with ms access. If i don't get ms access support, which is the other best alternative. Thanx in advance gaurav
Joined: Jan 31, 2000
Gaurav, we have to use getServletContext().getRealPath("WEB-INF/classes"); to go to exact classes dir of your web appln in server machine. I tested this following code. Cut and paste this as mkdir.jsp in your .../yourappln/mkdir.jsp and call from browser as http://localhost/yourAppln/mkdir.jsp or http://localhost:8080/yourAppln/mkdir.jsp This will create a new physical dir called TestDir under your web-appn's "web-inf/classes" dir. Change this code according to your needs.
[This message has been edited by maha anna (edited April 01, 2001).]
Joined: Mar 13, 2001
Thanx Maha anna for u'r help. it has helped a lot. But the real problem is that the class files generated by tomcat are stored in a directory called work under the tomcat root directory, while the code given by u creates a directory under web-inf\classes, which is not helping. Please help me if there is something wrong with the configuration. Gaurav