Home Jsp Simple-jsp-example Creating a String
Questions:Ask|Latest

 
 

Share on Google+Share on Google+

Creating a String

Advertisement
A simple example that explains how to create string in Java server pages (JSP).

Creating a String

        

In jsp we create a string as we does in a java. In jsp we can declare it inside the declaration directive or a scriptlet directive.

 

The code of the program is given below:

 

 

 

 

 

<html>
  <head>
    <title>How To Create a String</title>
  </head>
  <body>
    <h1>We are creating a String</h1>
    <%
        String create = "We have create a String";
		%>
        <h2><%out.println(create);%></h2>
  </body>
</html>

The output of the program is given below:

Download this example.

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: March 22, 2005

Related Tutorials

Ask Questions?    Discuss: Creating a String   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
Alexandru
March 15, 2012
This is a great site!

Thank you a lot for providing this examples. This is a great site! Success!
kalpesh
March 29, 2012
example

this is way to learn it.
anil kumar
June 29, 2012
regarding jsp programming

what is the purpose of <%= %>?
DMCA.com