Home Jsp Simple-jsp-example Creating a String



Creating a String
Posted on: March 22, 2005 at 12:00 AM
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.

Related Tags for Creating a String:


More Tutorials from this section

Ask Questions?    Discuss: Creating a String   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.