将.jsp作为.html文件运行 [英] Running .jsp as .html file

查看:213
本文介绍了将.jsp作为.html文件运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个jsp页面,该页面在tomcat中执行时运行良好.但是当我将文件的扩展名更改为.html时,它什么也没有显示. 有什么办法可以用.html文件扩展名运行.jsp

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

推荐答案

添加

         <servlet-mapping> <servlet-name>jsp</servlet-name>
         <url-pattern>*.html</url-pattern>
          </servlet-mapping> 

在web.xml中

这篇关于将.jsp作为.html文件运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆