Reputation: 1179
I have created a jsp page which run fine when executed in tomcat.But when i change the extension of my file to .html it show nothing. Is there any way where i can run .jsp with .html file extension
Upvotes: 5
Views: 9249
Reputation: 31
The accepted answer didn't work for me. I did get something working for a specific html page though (index.html)
<servlet>
<servlet-name>IndexServlet</servlet-name>
<jsp-file>/index.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>IndexServlet</servlet-name>
<url-pattern>/index.html</url-pattern>
</servlet-mapping>
Upvotes: 0
Reputation: 1179
add
<servlet-mapping> <servlet-name>jsp</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
in web.xml
Upvotes: 8