This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi Ranchers.... I have servlet, lets name it as MyPath, and I put this servlet under context : MyContext. There are 3 possibilites about the path for this servlet : 1. http:\\localhost:8080\MyContext\servlet\MyPath (My opinion this is an absolute path) 2. \servlet\MyPath (This is canonical path, relative to context, because it starts with "\") 3. MyPath (This is relative path to current page) Am I right ? If I am wrong please correct me. My next question is, I read book, tutorial and some notes that always said absolute and relative path. For example : public RequestDispatcher ServletContext.getRequestDispatcher(String path)- accepts only absolute path, and not relative path.. what is the meaning absolute path here ? (Is it point 1 & 2 ? or point 2 only ?) And also what is the meaning relative here ? (point 3 only ?) Thank you for the help. Michael
I think as per SUN guys ..absolute path means relative path which get translated in to absolute path. I mean if path is "/somepage.jsp" it will be resolved in to http://myServer/myContext/somepage.jsp which is absolute path. and if path is "somePage.jsp" then it will w.r.t current page i.e. if currnet page is http://myServer/myContext/someDir/dir02/page01.jsp then "somePage.jsp" must be in directory "dir02". CMIW HTH [ June 23, 2002: Message edited by: Ravish Kumar ]
"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh