Home Jsp Create a greeting in jsp



Create a greeting in jsp
Posted on: July 11, 2008 at 12:00 AM
This is sample jsp code that creates a sample Birthday Greeting in jsp. In the code given below we have used an image with some text message.

Create a greeting in jsp

     

This is sample jsp code that creates a sample Birthday Greeting in jsp. In the code given below we have used an image with some text message. To show image we have used a html tag <img src="" alt="">. Here 'alt' attribute is used to set the text message which is shown if image can not be shown for any reason.

 

 

 

 

 

greeting_jsp.jsp

<HTML>
  <HEAD>
    <TITLE>Creating a Greeting</TITLE>
  </HEAD>
  <BODY bgcolor="#F8E0F7">
    <H1><Font color="#088A08">B'Dy Greeting only 4 u.....</Font></H1>
	 <img src="funny.gif" alt="Big Boat">
	 <br>
	 <b>created by: </b>
	  <%
	        //Display the greeting
		out.println("www.roseindia.net");
		
     %>        
  </BODY>
</HTML> 

Save this code as a .jsp file named "greeting_jsp.jsp" in your application directory ('user' in our example) in tomcat and run this jsp page with url http://localhost:8080/user/greeting_jsp.jsp in address bar of the browser.

Download Source Code

Related Tags for Create a greeting in jsp:
cimagejsptextsedthismessagebirtcreatejstexsamplewithextbieituseiminmsagejesagemedaysssaspsoeeessatisirhaivmplgreeacodcodertsaxtssamssamthavbelohatmagepleplodeomo


More Tutorials from this section

Ask Questions?    Discuss: Create a greeting in jsp   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.