JSPs & Servlets
Jsp & Servlet are core Java technologies that are used in web development. To start of web development we will need the following tools:
JSP is a HTML page where java code can be embedded onto it.
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<!-- Expression Tag -->
<%= "Hello Wolrd" %>
</body>
</html>
Steps to do :
Jsp & Servlet are core Java technologies that are used in web development. To start of web development we will need the following tools:
- Application Server - Apache Tomcat
- An IDE - Eclipse, Netbeans or IntellijIdea ()
- Java Runtime Environment (JRE)
- Basic Java knowledge
- HTML (Preferred)
JSP is a HTML page where java code can be embedded onto it.
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<!-- Expression Tag -->
<%= "Hello Wolrd" %>
</body>
</html>
Steps to do :
- Create a web project
- Add a new JSP Page under the Web Content Directory of the project
- Copy & Paste the above code
- Save & Select the JSP
- Run the JSP
- Assuming that you use Eclipse IDE to run your project.