JSP Hosting
 

HostingServicesSupportOrderAbout UsSoftwareHome


Even experts read the manuals. Our tech support staff has most of the books that are out on a wide variety of web topics. Here are some of their top picks. We think you'll find them useful and informative as well.



A Simple JSP

At the simplest end of the spectrum, Java code embedded in Java Server Pages can be used to compute a number or to print information. The following simple example shows the current date and the visitor's IP address:

<%@page language="java" import="java.util.*"%>
Today is: <%= new java.util.Date() %><BR>
Your IP: <%= request.getRemoteAddr() %>

 

In addition, conditional code can be included to change the page display depending on any factor. For example,

<%@page language="java" import="java.lang.*"%>
<% String color = request.getParameter("color") %>
<% if (color.equals("red")) { %>
Your selected color is RED
<% } %>

 

JSP Examples

 

Note: MMA technical support staff cannot provide troubleshooting of problems with third-party CGI scripts including but not limited to: Perl scripts, C/C++ binaries, PHP or web/database integration unless these services are specifically contracted. For these services, please see our Quote Request Form.



Copyright © 1995-2012
Motivational Marketing Associates, LLC
All Rights Reserved.