This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
But the firefox doesnt recognize this and gives this error :
File not found
Firefox can't find the file at /C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/beer/selectbeer.do.
Check the file name for capitalization or other typing errors.
Check to see if the file was moved, renamed or deleted.
And this HTML file is located in the root of your web application? Because the action "selectbeer.do" is relative to the current HTML file, and to match it with /selectbeer.do the HTML file must be located in the root as well.
I was going to suggest changing the form action to "/selectbeer.do". I thought the action just had to match the url-mapping. I didn't realize there was a mapping relationship between the calling page and the servlet.
Or maybe I just haven't had enough coffee yet this morning...
Jk Robbins wrote:I didn't realize there was a mapping relationship between the calling page and the servlet.
But there shouldn't be. Any URL that is page-relative will be relative to the URL of the current page. That's poor and fragile. Rather, server-relative URLs that begin with the context path never change and are not affected by the URL of the current page.