This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What's the problem

 
Gaurav Kalra
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
Gaurav Kalra
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic