Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problem with HTML:FORM tag

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I am writing an application with JSPs and I am using the struts framework. I am also using Struts JSP Tags in my JSP. I am having a problem with the <html:form> tag. I have a do/while loop embedded in my JSP as a scriplet. Ths scriplet is inside my <html:form> tags and it is giving me the following 3 errors:
'try' without 'catch' or 'finally'. if (_jspx_th_html_form_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)

'while' expected. } finally {

'finally' without 'try'. } finally {

If I take the form's closing tag and put it before the end of the loop, then I do not get the error. However I must have it after the loop. So it seems that the </html:form> tag has problems with loops in scriplets. Has anyone experienced this before?
Hope someone can help
Thanks,
Chris.
Here is the relevant portion of my JSP code. Thanks

</tr> </table> <% x++; }while(iter.hasNext()); %> </br> <table width="20%" border="0" align="center"> <tr> <td width="48%"> <div align="center"> <html:submit title="Vote"/> </td> </tr> </table> </td> </tr> </html:form></table>
 
author
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the entire <html:form>....</html:form> with the do while loop
Thanks,
Srikanth
Author: Struts Survival Guide - Basics to Best Practices
 
Brian Boyle
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I fixed this. I had started my do/while loop before my <html:form> tag. So basically, I should have had my entire loop inside my form, and thats what was causing the problem.
Thanks,
B
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic