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.
How did you map the URL to your Servlet? Can you post your Annotations you used on your Servlet or you web.xml file? Have you also verified that your Servlet's .class file is in the proper location for your web app?
Another way would be to use the c:url tag in JSTL to create your URLs.
This code is a little cleaner and it give you the option to reuse the url later in the page is you want. TO enable JSTL all you have to do is copy the JSTL jar files into you lib directory.
The reason your previous code was not working was that the URL did not include your web app name. Your Servlet's real url is www.host:8080/yourProjectName/ProdGoalsServlet , but your code was omitting the ProdGoalsServet part and linking to www.host:8080/ProdGoalsServlet.
...leave out that critical detail? Is it the way they map the servlets?
Sorry for questions that seem to have obvious answers, but this is all part of my process of learning JSTL and EL. I inherited a boatload of ugly scriptlet code, so as I'm making changes and additions I'm writing it all with "real" jsp and an MVC model with servlets and DAOs. The webserver here had NO servlets running at all. It makes for a long, steep learning curve, but I'll prevail...eventually.
Thanks again. This site is an invaluable resource. I'm learning the fastest way to find an answer with google is with "site:coderanch.com".
Here's the Ranch FAQ entry on that specific question: RelativeLinks. I wish I had read it before writing a web application, now I have a whole lot of places where the context name is hard-coded in my links. Cleaning that up is high in my list of refactoring issues.