<%@ page import="java.util.*,java.util.zip.*"%> <%-- JSP Declaration --%> <%! public int getColor( String s ) { int c; try { c = Integer.parseInt( s ); } catch( Exception e ) { c = 0; } return c; } %> <%-- Scriptlet --%> <% int r = getColor( request.getParameter("r") ); int g = getColor( request.getParameter("g") ); int b = getColor( request.getParameter("b") ); %> Background Color <%-- Some JSP Expressions --%>

The background color is (<%= r %>, <%= g %>, <%= b %>).