<%@ page session="true" %> <%! public static final String LIGHT_YELLOW = "#d6d6ad"; %> <%! public static final String VIOLET = "#6d6dda"; %> Implicit objects <% out.println("Query String: " + request.getQueryString()); %>
You got mail, i got <% String milk = request.getParameter("milk"); if ( milk != null ) { %> MILK : )~~~ <% } else { %> Nothing : ( <% } %>

<% String bgColor = (String) session.getValue("bgColor"); if (bgColor == null) { bgColor = LIGHT_YELLOW; } %>
bgColor=<%= bgColor %> SessionId = <%= session.getId() %>
<% if (bgColor.equals(LIGHT_YELLOW)) { bgColor = VIOLET; } else { bgColor = LIGHT_YELLOW; } session.putValue("bgColor", bgColor); %>