wood burning stoves
The moose likes Servlets and the fly likes What's the problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "What Watch "What New topic

What's the problem

Gaurav Kalra

Joined: Mar 13, 2001
Posts: 27
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
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
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
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).]
Gaurav Kalra

Joined: Mar 13, 2001
Posts: 27
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: What's the problem
It's not a secret anymore!