Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running .jsp as .html file

Tags:

jsp

tomcat

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

like image 593
jan5 Avatar asked Feb 13 '12 05:02

jan5


People also ask

Can we convert JSP to HTML?

Jsp files are meant to serve dyanamic content. But you cant do that with html . Apart from that, It provides support for taglibs jstl , EL.

How do I run a .JSP file?

Copy your file to CATALINA_HOME/webapps/ROOT , e.g., c:/Tomcat8/webapps/ROOT . Start the Tomcat server. Start your browser if it is not already running. In the address area of the browser, type http://localhost:8080/DateJSP.jsp and submit that address to the browser.

Is JSP same as HTML?

JSP is a technology which is used to create dynamic web applications. HTML is a standard markup language which is used to create the structure of web pages. JSP allow to place the custom tag or third party tag. It does not allow to place the custom tag or third party tag.


1 Answers

add

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

in web.xml

like image 181
jan5 Avatar answered Sep 21 '22 13:09

jan5