Contact Us
   
   
 
   
   
 
     
 
 
JSP Tutorial
 
 
 

Simple JSP Example with Syntax

AddThis Social Bookmark Button          AddThis Feed Button
 
 
Print   Email
 
     
 

 

In tomcat, all JSP code should be copied (Deployed) into webapps folder and create own folder in webapps e.g jsp, in jsp folder copy all your jsp files. Remember, Java is case sensitive language.

1. JSP Example Simple Print on browser

jspExample1.jspOutput
 

<html>
<body>
<%
 out.print("Hello World!");
%>
</body>
</html>

2. JSP Example Expression base print on browser

jspExample2.jspOutput

 
<html>
<body>
<%="Hello World!"%>
</body>
</html>

3. JSP Example Current date print on browser

jspExample3.jspOutput

 
<%@ page  language="java" import="java.util.*" errorPage="" %>
<html>
<body>
Current Date time: <%=new java.util.Date()%>
</body>
</html>

In above example, we need to add package of date import=”java.util.*”

Run this jsp file on browser with URL path

http://localhost:8080/jsp/jspExample1.jsp

 

 

 

 
If You Like this Article, share this

 
 
     
   
  Host Forum Post  
 
Optimization of SQL queries for better performance
Example of Between in mysql
Example of sorting in mysql table
Example of join in mysql
Example of subquery in mysql
union join in mysql with example
error too many connection in mysql
calculate second highest salary
How to use select queries with array in mysql
Radio button pre selected in struts
Exception in thread "main" java.lang.NoClassDefFoundError
tree view in jsp
SSL implement in tomcat and java certificate
WARNING: Internal error flushing the buffer in release()
DynaForm validation problem in struts not working
Accessing JavaBean in servlet or servlet in javaBean.
 
 
>> Tomcat Clustering
Clustering is technique to improve the performance, high scalability, and failover of web-server or any servers. Number of users increase with increase load on the servers
 
     
 
>> Implementation of tomcat clustering
Simple steps to do tomcat clustering with code
 
     
 
>> Tomcat Installation & Configuration
Tomcat installation on windows, environment system variables setting in Visual mode for easy installation and configuration of web.xml other servlet invoker setting
 
     
 
>> Apache Tomcat integration with mod_jk
Integrate Apache web server with tomcat web server with mod_jk
 
     
 
>> Java Servlet Examples
Tomcat installation on windows, environment system variables setting in Visual mode for easy installation and configuration of web.xml other servlet invoker setting
 
     
 
>> Apache installation
Apache installation on windows and linux
 
     
 
>> Mysql Installation
Mysql installation on windows, Port setting,installing mysql tools query browser, connecting to database,creating database, creating tables
 
     
 
>> Apache PHP MySql integration
 
 
     
     
     
     
     
 
Powered by Web4Bharat   Privacy Policy