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

Bug 156034

Summary: EL validator incorrectly marks quoted values as warnings
Product: [WebTools] WTP Source Editing Reporter: Riyad Kalla <rkalla>
Component: jst.jspAssignee: Ian Tewksbury <itewksbu>
Status: RESOLVED DUPLICATE QA Contact: David Williams <david_williams>
Severity: normal    
Priority: P3 CC: emoranchel, nsand.dev
Version: 1.5   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Example JSP page with a few EL expressions that are marked as warnings none

Description Riyad Kalla CLA 2006-09-02 10:36:54 EDT
Examples:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro7.html#wp77083

I've noticed that all the examples I have tried where an EL piece of code uses quotes (single or double) the EL validators marks them as warnings "EL Syntax Error". I have attached a sample JSP page that includes a few that you can quickly import into your workspace and check out.

For convenience, copied below:
------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>My JSP 'MyJsp.jsp' starting page</title>
	</head>
	<body>
		This is my JSP page.
		<br>

		This should be some valid EL
		<br>
		This passes validation
		<br>
		${'This is a string literal in EL'}
		<br>
		Here we extract the host property from the header. Jsp editor tells me
		this is an el syntax error but it's not.
		<br>
		${header['host']}
		<br>
		Maybe it will work with double quotes
		<br>
		${header["host"]}
		<br>
		Nope it doesn't
		<br>
		This should work too:
		<br>
		${'hip' gt 'hit'} 
		<br>
		${requestScope['javax.servlet.forward.servlet_path']}
	</body>
</html>
Comment 1 Riyad Kalla CLA 2006-09-02 10:37:41 EDT
Created attachment 49294 [details]
Example JSP page with a few EL expressions that are marked as warnings
Comment 2 David Williams CLA 2006-09-07 12:46:03 EDT
Nitin, I'm assigning to you based on Summary ... feel free to re-route if I've inferred too much. 

Comment 3 Taro App CLA 2008-12-12 02:55:28 EST
Looks like this has been fixed in WTP 3.0.3. (See bug#136795)
Comment 4 Ian Tewksbury CLA 2009-06-15 10:26:40 EDT

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