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

Bug 125366

Summary: AT_BEGIN variables don't work properly
Product: [WebTools] WTP Source Editing Reporter: Vladimir Nicolici <vladnc>
Component: jst.jspAssignee: Nitin Dahyabhai <thatnitind>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: klum
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 211528    
Attachments:
Description Flags
Sample project that shows the problem none

Description Vladimir Nicolici CLA 2006-01-26 13:30:44 EST
[Using Eclipse 3.1.1, build M20050929-0840, JST 1.0.0]

If a tag has a variable declared with <scope>AT_BEGIN</scope>, the variable should have a scope from the open tag to the end of the document. So if tag <foo> creates a variable called bar, this code should work:

<foo></foo>
<%= bar %>

But eclipse doesn't see variable "bar" after the closing tag.

The only way to make it work is to use the short form for the foo tag, like this:

<foo />
<%= bar %>

This works. But there is no workaround if the tag really needs a body to work properly, like this:

<foo>Required Body <%= bar %></foo>
<%= bar %>

In this case, the first "bar" usage is accepted, but the second usage is rejected.
Comment 1 Vladimir Nicolici CLA 2006-01-26 13:32:30 EST
Created attachment 33660 [details]
Sample project that shows the problem

The web project containts 2 JSPs (test1.jsp and test2.jsp). Both work properly when deployed, but Eclipse shows errors in test1.jsp.
Comment 2 David Williams CLA 2006-03-28 03:24:23 EST
Mass transfer from pa to dw. Needs more triage. 
Comment 3 Nitin Dahyabhai CLA 2006-09-11 14:39:24 EDT

*** This bug has been marked as a duplicate of 87143 ***
Comment 4 John Lanuti CLA 2006-11-28 15:51:06 EST
This is part of a mass update to close out all stale WTP bugs which are in the resolved state without an appropriate targeted version.  If you feel this bug was closed inappropriately, please reopen.