%-- WORKSHOP: Include Part 2 This JSP is the file whose output is included in the first JSP: include1.jsp --%> <% //Get parameter String strName = request.getParameter("Name"); //If parameter not provided then use default value if((strName==null)||(strName.equals(""))) strName = "Parameter not provided"; %>
<%
//Get length of string
int intLength = strName.length();
for(int i=0; i < intLength; i++)
{
out.println(strName + "
");
//Get first character
char chrFirst = strName.charAt(0);
//Move first character to end of string
strName = strName.substring(1) + chrFirst;
}
%>