how can we compile the jsp file in dos command prompt. when i enter the jspc filename.jsp in cmd i got the error like
'jspc' is not recognized as an internal or external command, operable program or batch file.
how can we create the batch file and tell me the procedure for to create the batch file to my file and compilation for the jsp file
JSP does not run on console. It is always run on JSP.
We are proving you the steps to run a simple jsp page:
1)Go to the Control Panel>>System>>Environment Variable And the set the variable CATALINA_HOME and put the path of your apache tomcat as a value like: C:\apache-tomcat-6.0.16.
2)Like that create another variable classpath and put the path of apache-tomcat lib as a value like C:\apache-tomcat-6.0.16\lib.*;
3)Also put the servlet-api.jar file inside the lib folder.
4)Now create a jsp file:'hello.jsp'
<%@page language="java"%> <%String st="Hello World"; %> Message is <%=st%>
5)Put this jsp file inside the apache-tomcat>>webapps>>web application folder.
6)You have to give appropriate name to web application folder like examples and put jsp file into it.
7)Then start the tomcat server by clicking startup.bat from the bin folder of your tomcat.
8)Open your browser and type the following url:
http://localhost:8080/examples/hello.jsp and press enter.
9)You jsp program will then display the output on the browser.
For more information, visit the following link: