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



Home Quickguide Tomcat Writing First Hello World application in JSP

Related Tutorials


 
 

Share on Google+Share on Google+

Writing First Hello World application in JSP

Advertisement
JSP simply application that work with Java inside HTML pages. Now we can take any existing HTML page and we change its extension to "hello.jsp" instead of "hello.html".

Create your first  hello world web page with jsp

     

In this example we will show you how to create first web page on tomcat server. JSP simply application that work with Java inside HTML pages. Now we can take any existing HTML page and we change its extension to "hello.jsp" instead of "hello.html". This one the simply exercise for your first application JSP. Just modify file extension from ".html" to ".jsp" as you used to do in case of designing html pages. Then the application load the new file, with the "Hello.jsp" extension, in your browser. 


Following example will really help you understand a jsp page. 

In this example we are going to print the String "HELLO World" on to a web page.
Start the tomcat server, open a browser window and type the URL : Start the tomcat server, open a browser window and type the URL http://localhost:8080/hello.jsp

The code of the hello.jsp is given below:

<html>
<body bgcolor="white">
<h1>
HELLO World
</h1>
</body>
</html>

The output of the program is given below:

Download Source Code

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 8, 2008

Related Tutorials

Discuss: Writing First Hello World application in JSP  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:1
Sidheshwar Prasad
December 9, 2011
ModificationRequired

Hi, I m going to comit about jsp but some days earlier when i wanted to learn page designing with gwt then i found that ur tutorial is not helped anything so can u provide tutorial for page designing with gwt(google web toolkit). Rest of things are ok infact i learnt complete servlet with ur tutorial and now i m learning jsp. thanks. Sidheshwar
DMCA.com