Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


Anoop
Java Program
2 Answer(s)      3 years and 8 months ago
Posted in : JSP-Servlet


A Simple program of JSP to Display message, with steps to execute that program


Advertisement
View Answers

December 23, 2010 at 12:51 PM


Hi Friend,

Follow these steps:

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-5.5.

2)Like that create another variable classpath and put the path of

apache-tomcat lib as a value like C:\apache-tomcat-5.5\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:

JSP Tutorials

Thanks



December 23, 2010 at 12:51 PM


Hi Friend,

Follow these steps:

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-5.5.

2)Like that create another variable classpath and put the path of

apache-tomcat lib as a value like C:\apache-tomcat-5.5\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:

JSP Tutorials

Thanks



Related Tutorials/Questions & Answers:
 

 

 

DMCA.com