File: easy.jsp

package info (click to toggle)
eclipse-jdt-ui 4.29-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 93,280 kB
  • sloc: java: 831,977; xml: 14,578; jsp: 33; makefile: 5
file content (29 lines) | stat: -rw-r--r-- 614 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<%@ page contentType="text/html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<html>
  <head>
    <title>JSP is Easy</title>
  </head>
  <body bgcolor="white">
  <jsp:useBean id="clock" class="Date2" />
 
  <%! int globalCounter= 0; %> 
 
    <h1>JSP is as easy as ...</h1>

    <%-- Calculate the sum of 1 + 2 + 3 dynamically --%>
    1 + 2 + 3 = <c:out value="${1 + 2 + 3}" />
    
    <% int i= 4;
       i= i+1; %>
       
	<% if (clock.getHours() < 12) { %>
		Good morning!
	<% } else if (clock.getHours() < 17) { %>
		Good day!
	<% } else { %>
		Good evening!
	<% } %>
 
  </body>
</html>