Dear all,

  I would like to ask how to get the web virtual path
of a specified project in tomcat. 
 
  E.g. I got a project APPLE which are placed all
source in /webapp/APPLE. 

  By default, this project can be accessed by
Http://localhost:8080/APPLE/

  Assume I am running a servlet called 'EAT.class' ,
then the path should be something like that
Http://localhost:8080/APPLE/servlet/EAT .

  How can EAT.class know this path when running INIT()
function ?

  I know that we can get some parameters from web.xml
by using getInitParameter() function. I also know that
we can get the virtual path by using
request.getRequestURI() inside doPost()/doGet()
function. But I don't know how to get it inside INIT()
function. 

  Thank you for your help! 
  
M.T.
==================================================================
�s���K�O�q�l�H�c  http://sinamail.sina.com.hk





__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Reply via email to