hi,
iam was trying out a simple example where iam trying to display the multiple choices in a list box with jsp....it gives the following error
Generated servlet error:
[javac] Compiling 1 source file
C:\Tomcat 5.0\work\Catalina\localhost\murach\org\apache\jsp\email4\show_005fmusic_005fchoices_jsp.java:60: illegal start of expression
<
^
1 error
this is the JSP code...i cant figure out where the mistake is...the string array variable and the syntax seems to be correct
<body>
<%
String firstName = request.getParameter("firstName");
String lastName = request.getParameter("lastName");
String emailAddress = request.getParameter("emailAddress");
%>
<h1>Thanks for joining our email list <%=firstName%></h1>
<%
String[] musicchoice = request.getParameterValues("music");
for(int i = 0; i < musicchoice.length; i++)
{
%>
<%= musicchoice[i] %> <br>
<%
}
<%>
</body>
iam was trying out a simple example where iam trying to display the multiple choices in a list box with jsp....it gives the following error
Generated servlet error:
[javac] Compiling 1 source file
C:\Tomcat 5.0\work\Catalina\localhost\murach\org\apache\jsp\email4\show_005fmusic_005fchoices_jsp.java:60: illegal start of expression
<
^
1 error
this is the JSP code...i cant figure out where the mistake is...the string array variable and the syntax seems to be correct
<body>
<%
String firstName = request.getParameter("firstName");
String lastName = request.getParameter("lastName");
String emailAddress = request.getParameter("emailAddress");
%>
<h1>Thanks for joining our email list <%=firstName%></h1>
<%
String[] musicchoice = request.getParameterValues("music");
for(int i = 0; i < musicchoice.length; i++)
{
%>
<%= musicchoice[i] %> <br>
<%
}
<%>
</body>