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

Bug 126381

Summary: [translation] JSP includes within javascript tags are ignored
Product: [WebTools] WTP Source Editing Reporter: chily <chilydev>
Component: jst.jspAssignee: Sarika Sinha <sarika.sinha>
Status: RESOLVED WORKSFORME QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: howbizr, itewksbu, nsand.dev, thatnitind
Version: 1.0   
Target Milestone: 3.2 M7   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Project file none

Description chily CLA 2006-02-03 13:10:07 EST
In the following code, the include is ignored, causing validation errors in subsequent JSP scriptlets: "[variable] cannot be resolved".

<script>
	<%@ include file="myinclude.jspf"%>
</script>


Simple HTML code should never have any influence on the validation of jsp tags anyways.
Comment 1 Phillip Avery CLA 2006-02-03 13:22:34 EST
changing component/owner.
Comment 2 David Williams CLA 2006-03-28 03:24:09 EST
Mass transfer from pa to dw. Needs more triage. 
Comment 3 chily CLA 2006-11-06 09:33:10 EST
This simple (and very annoying) Bug is still not fixed, 9 months later...?
Comment 4 Kathy Hale CLA 2008-07-03 10:23:44 EDT
I have Eclipse 3.2.2, Web Standard Tools Project 2.0.2 and I believe I'm still experiencing this error when I have HTML & JSP validation enabled:

My first file has:
  <%ProjectForm pform = null;%>  

... and then later on in this file:

  <%@ include file="/app/project_page_parts/parts/project_nav_bar.jsp" %>

Code in project_nav_bar.jsp references the instance "pform" and gives the 'cannot be resolved' error. 

  <%= pform.getInst_symbol_encoded() %>

In practice, these pages render correctly. Unfortunately, errors like this are sprinkled all over, causing enough overhead on the project that I usually just have to turn off validation all together. :(
Comment 5 Nitin Dahyabhai CLA 2008-07-08 08:02:17 EDT
Believed to be fixed in 3.0, although missing file fragments aren't reported as problems in those locations.
Comment 6 Nitin Dahyabhai CLA 2008-07-23 19:53:18 EDT
Last part fixed in HEAD.
Comment 7 Nitin Dahyabhai CLA 2008-12-17 15:10:22 EST
Reopening.  Fails verification in M4.
Comment 8 Ian Tewksbury CLA 2010-01-21 12:30:59 EST
This is still an issue in 3.2
Comment 9 Sarika Sinha CLA 2010-03-29 02:08:26 EDT
If I type "<%= pF %>" and do content assist, it suggests pForm, after selecting it if I press a dot it suggests properly the methods. But If I directly type fForm and press a dot, it is not able to resolve pForm. 
Investigating further.
Comment 10 Sarika Sinha CLA 2010-03-29 02:58:42 EDT
Created attachment 163227 [details]
Project file
Comment 11 Sarika Sinha CLA 2010-03-29 03:01:45 EDT
(In reply to comment #9)
> If I type "<%= pF %>" and do content assist, it suggests pForm, after selecting
> it if I press a dot it suggests properly the methods. But If I directly type
> fForm and press a dot, it is not able to resolve pForm. 
> Investigating further.


I have attached a project file where it looks working,let me know if I am missing something. in fragment file, there is an error for variable not resolved but that looks correct as the variable has not been declared there. But in the header, the variable declared in fragment is correctly recognized.

I am getting content assist even if I type pForm as one stop as well(not sure why i din't get the first time)
Comment 12 Sarika Sinha CLA 2010-05-04 05:02:06 EDT
Not recieved any comment so resolving.