Java Programming Projects
Servlets - Java Server Pages
The following lines show simple examples of dynamic content generated by jsp tags. Parts of the tags are shown below the examples.
This page, with its .jsp extension, is the source for a web application, which is compiled as a war and deployed on a Glassfish server.
As with all the other examples, the page style is consistent with the rest of the site and html code allows for navigation between Glassfish and non-Glassfish pages.
Dynamically calculate the length of a stringUsing the jsp standard tag library we can take the entered string and calculate the number of characters in it.
String: Enter your text here!
String Length: 21
The date today is: Thu Oct 01 13:24:14 UTC 2020
<%= (new java.util.Date())%>
Show network data
Your IP address is: 188.8.131.52
<% out.println(request.getRemoteAddr()); %>