On 9/11/07, aarthy <[EMAIL PROTECTED]> wrote:
>
> I am stuckup in this issue for a week.Please somebody help me on this please.
>
>
> Frank W. Zammetti wrote:
> >
> > Something is wrong in your JSP... looks like that stack trace was cut off,
> > but your beyond the AJAX parts at this point, you need to find the error
> > in your JSP.
As Frank said, you have issues with your JSP. If you literally
cut/pasted your JSP logic into the email, then I can see at least two
separate problems with this snippet that would fail at compile time of
the JSP when converting it into a servlet.
You have scriptlet logic to start the for-loop and no matching
scriptlet logic to close the for loop. Even worse, your for-loop
iteration logic is totally whack. I am not saying this will fix it,
but, the for-loop will at least be properly closed and reasonably
defined when this snippet is changed from this:
<select name="TVShowSelect">
<%int i = 0;
ArrayList ch = (ArrayList)
request.getSession().getAttribute("characters");
String[] s = new String[ch.size()];
ch.toArray(s);
for (Iterator it = s.length; it.hasNext();) {
String name = (String)it.next();
%>
<option><%=name%></option>
</select>
To this:
<select name="TVShowSelect">
<% ArrayList ch = (ArrayList)
request.getSession().getAttribute("characters");
String[] s = new String[ch.size()];
ch.toArray(s);
for (int i = 0; i < s.length; i++) {
String name = s[i];
%>
<option><%=name%></option>
<% }
%>
</select>
I don't recommend this kind of scriptlet logic in the JSPs. If you are
going to do this though, you could at least try compiling the
scriptlet code in a test Java file first or use an IDE like IntelliJ
IDEA that will detect obvious compile issues with your scriptlet logic
in JSP files.
Good Luck, Van
--
Mike "Van" Riper
[EMAIL PROTECTED]
http://weblogs.java.net/blog/van_riper/
Silicon Valley Web Developer JUG
https://sv-web-jug.dev.java.net
JUGs International MAP
http://tinyurl.com/ynktb2
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]