facebook

JSP Scriptlet Validation is not recognized as error

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #543200 Reply

    filan
    Participant

    Hello dear members,

    consider following code in a JSP

    <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%><%! 
    
    static class VDataSet
    {
    	public static <T> T get()
    	{
    		return (T) "hallo";
    	}
    }
    %><%
    out.print(VDataSet.get());
    
    %><%= VDataSet.get() %>

    MyEclipse is saying for the line

    out.print(VDataSet.get());

    The method print(boolean) is ambiguous for the type JspWriter

    which is correct behaviour (only if you have JDT Compiler >= 4.5.1 and Java 1.8 dependency)

    but the line

    <%= VDataSet.get() %>

    is also incorrect, because it gets translated by the compiler to the same output as the first mentioned line.

    The problem is that MyEclipse won’t say that this is also an error. But it actually is

    We have tried turning on ALL the Validation/Warnings/Errors options in the configuration of MyEclipse but still no luck

    Since we want to update to a newer Tomcat with newer JDT Compiler (MyEclipse already has new JDT Compiler), this is causing all of our JSPs (which uses JSP-Scriptlets for out.print for generic methods) not to be compiled, and there are really a lot of them

    Is there anything I can tell MyEclipse to recognize this as an error?

    • This topic was modified 6 years, 12 months ago by filan.
    Attachments:
    You must be logged in to view attached files.
    #543364 Reply

    support-swapna
    Moderator

    filan,

    Sorry that you are seeing this issue. Thank you for the code snippet and the screenshot. I could replicate the problem at my end. The dev team is looking into it and will get back to you soon.

    If you are working with a release older than MyEclipse 2017 CI 8, then please share with us the MyEclipse version details.

    Apologies for inconvenience caused.

    –Swapna
    MyEclipse Support

    #543519 Reply

    filan
    Participant

    We are always using the latest MyEclipse, in this case it is indeed 2017 CI 8

    #543998 Reply

    Brian Fernandes
    Moderator

    Filan,

    Just wanted to let you know that we’ll be adding this to our investigation queue for the 2017 CI 10 release. Will keep you posted on updates.

    #595507 Reply

    support-tony
    Keymaster

    Filan,

    I’m afraid the fix for this issue didn’t make it to 2017 CI 10, as you probably realize, but is in our MyEclipse CI 2018.8.0 release, available from our download page. Note that this release is based on eclipse Photon and so will need to be installed separately from MyEclipse 2017.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: JSP Scriptlet Validation is not recognized as error

You must be logged in to post in the forum log in