JSPs are internally translated to Java Servlets and their mapping is similar to that of Servlets. JSP mapping is not required (it is optional) and used to set JSP Initialization Parameters
<web-app ...>
...
<servlet>
<servlet-name>hello</servlet-name>
<jsp-file>/hello.jsp</jsp-file>
<init-param>
<param-name>p1</param-name>
<param-value>v1</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/hello.jsp</url-pattern>
</servlet-mapping>
...
</web-app>
No comments:
Post a Comment