Share on Google+Share on Google+

Display "Hello JSP" using Jsp expression

Advertisement
In this section, We will simply output "Hello JSP" in a web browser using Jsp expression.

Display "Hello JSP"  using Jsp expression

In this section, We will simply output "Hello JSP"  in a web browser using Jsp expression. JSP expressions insert values directly into the output. The syntax to include a JSP expressions in the JSP file is:  

<%=     expression      %>.

In JSP page, we can use both, static HTML with dynamically-generated HTML. In this program, we produce output "hello Jsp" using this tag :

<%= "Hello World!"  %>

 All the other content except this is simple HTML code.

Code of this program :

 
<html>
	<head><title>Hello World JSP Page.</title></head>  
	<body>
		<font size="10"><%="Hello JSP!" %></font>
	</body>
</html>
 

Output :

Advertisements

Advertisement

Posted on: June 10, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

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.