how to know the directory from which a jsp was requested
Gaurav Kalra
Greenhorn
Joined: Mar 13, 2001
Posts: 27
posted
0
From inside the jsp code, i want to know what directory it was requested from. How can i do that. Does the getServletContext() provides for it. Gaurav
maha anna
Ranch Hand
Joined: Jan 31, 2000
Posts: 1467
posted
0
Gaurav, Assuming this file getRealPath.jsp is stored under C:\jakarta-tomcat\webapps\MISApp\Login\getRealPath.jsp and you invoke it from browser as http://localhost/MISApp/Login/getRealPath.jsp we will get the real path which is C:\jakarta-tomcat\webapps\MISApp\Login\getRealPath.jsp displayed at the browser. Is this what you wanted ?
regds maha anna
[This message has been edited by maha anna (edited April 05, 2001).]
Gaurav Kalra
Greenhorn
Joined: Mar 13, 2001
Posts: 27
posted
0
Thanx maha anna, u've been a great source of inspiration for me. I would like to thank u for answering my question as u r the only one who always reply to my questions. I've got one more question for which i've not been able to find the answer. Because u r a SCJ2P, can u please guide me how can i see my result on the internet. I've got my candidate ID and registration ID. I know that this doesn't belongs to this thread, but i think u'll never mind. Thanx for all the help Gaurav