Forums Register Login

simple doubt

+Pie Number of slices to send: Send
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>
+Pie Number of slices to send: Send
There's an extra "<" at the beginning of the next-to-last line.
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 652 times.
Similar Threads
compiling jsp
JavaMail won't send mail
Search using Hibernate criteria querry
JSP makes me headache
Using a method to retrieve a cookie
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:59:51.