<% // begin scriptlet String name = request.getParameter( "firstName" ); if ( name != null ) { %> <%-- end scriptlet to insert fixed template data --%>

Hello <%= name %>,
Welcome to JavaServer Pages!

<% // continue scriptlet } // end if else { %> <%-- end scriptlet to insert fixed template data --%>

Type your first name and press Submit

<% // continue scriptlet } // end else %> <%-- end scriptlet --%>