Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 253787

Summary: JSP Syntax Validator: Syntax error on token "}", delete this token
Product: [WebTools] WTP Source Editing Reporter: Phillip DuLion <phillip>
Component: jst.jspAssignee: jst.jsp <jst.jsp-inbox>
Status: RESOLVED DUPLICATE QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Working example project - Needs Spring jars none

Description Phillip DuLion CLA 2008-11-04 16:42:09 EST
Build ID: M20080911-1700

Steps To Reproduce:
1. Create a Dynamic Web Project (Apache-Tomcat-6.0.18, Dynamic Web Module version 2.5, Default Configuration for Apache Tomcat v6.0)
2. Add SpringFramework and tag libraries v2.5.6 or v2.5.5(jstl.jar, spring-beans.jar, spring-context.jar, spring-core.jar, spring-web.jar, spring-webmvc.jar, standard.jar)
3. Create New JSP File (html)
4. Add Spring form taglib reference <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
5. Add Srping form tags:
<form:form>
  <form:select path="searchType">
    <form:option value="starts" label="Starts With" />
    <form:option value="contains" label="Contains" />
    <form:option value="exact" label="Exactly Matches" />
  </form:select>
</form:form>
6. The following errors should appear:
Syntax error on token "}", delete this token
Syntax error on token "catch", Identifier expected
Syntax error, insert "Finally" to complete TryStatement

More information:
Tomcat compiles and displays the page fine when integrated with a controller page.  The error messages can be made to disappear by removing all three <form:option> tags or turning off JSP Syntax Validators.
Comment 1 Phillip DuLion CLA 2008-11-04 16:48:30 EST
Created attachment 117014 [details]
Working example project - Needs Spring jars

The following Spring Framework jars need to be added for this project to work:
jstl.jar
spring-beans.jar
spring-context.jar
spring-core.jar
spring-web.jar
spring-webmvc.jar
standard.jar
Comment 2 Nitin Dahyabhai CLA 2008-11-05 00:27:56 EST

*** This bug has been marked as a duplicate of bug 249799 ***