jsp - mapping java servlet and action form -
I follow the tutorial in this. Instead of using Web.xml, I am using the annotation @ webserverlate ("/ coffee sauce"). However, I have trouble understanding servlet mapping between Form Action and Java Servlet. It's weird but sometimes, I can run the code successfully, but occasionally, I get 404 emails. If anybody can discuss some articles about sublet mapping, then I am very much appreciated (I did not find any good resources about this).
If you are using a plain servlet, you will see one of the actions in the form & Lt; Url-pattern & gt;
Defined for servlet ( / CoffeeSelect
in your code). You can see that 404 errors are usually due to using relative URIs from nested pages in folder structure. Check out this link.
It makes you a bit more complex when you use web framework like JSF, Straits etc., but this is a different story.
Comments
Post a Comment