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.
Now I want the old link to be automatically redirected to the new link. I want to use <servlet-mapping> and here is how I tried -- <servlet> <servlet-name>MyServlet</servlet-name> <servlet-class>Myservlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>MyServlet</servlet-name> <url-pattern>/servlet/MyServlet</url-pattern> </servlet-mapping>
Frank, you are not misspelling MyServlet as Myservlet by any chance, are you? You may want to post more details of what 'does not work' in this case mean. For example, whether you get a 404 error or some other exception or a blank page or whatever.
first of all, there is no misspelling problem although I might make some typo here. Secondly the error msg was "File Not found". Now I guess I know what's going on --- Since this web.xml is contained in this "myapp", there is no way that I can map the "/myapp/servlet/MyServlet" to "/servlet/MyServlet", right ?