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 I'm really confused because it is unclear how the mapping from an HTML to the particular JSP ( which is a servlet eventually) done
Like in Servlet mapping it is very evident from the web.xml viz. through <servlet-name> , <url-pattern> and <servlet-class>
But the same transperency is not with the JSPs. So my point is how the HTML finds/maps the servlet that is generated from the JSP?
truly saying , i didn't understand you question. making some points clear to you
1> Html never finds or maps a servlet or a jsp . its the container who finds it.
2> container finds the correct servlet or jsp based on matching url-patterns. and for url pattern it doesn't matter whether it is a jsp file or just a servlet.
for jsp file it is:
i don't see any difference here . a html form just gives the information about the url pattern (action) nothing else and url pattern is related to servlet name not to the type of servlet,package etc
Joined: Oct 03, 2009
I apologize if I was unable to putforth my point clearly.
i can understand now .
the point is for jsp there is no need of mapping to be done in web.xml it can work without mapping but its not like, we can't do it.
it depends upon the need of the application. you can still write the action="go" or "/go" and it will work.