facebook

Compiler complains about double quotes in attributes [Bug]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #200044 Reply

    tisc
    Member

    Hi there,

    I’ve just given MyEclipse a try and unfortunately, it doesn’t compile most of our JSPs.

    We use the following construct very often:

    <tag attribute="<%=function(\"argument\") %>" />

    Unfortunately, the compiler doesn’t grok this, although the pages work fine with Tomcat 4.x as well as 5.x.

    This issue also seems to prevent us from source-level debugging. I get the well-known message from Eclipse that the source for …class cannot be found.

    My environment:
    – JDK 1.4.2 on Linux
    – Eclipse 2.1.1
    – MyEclipse 2.6.4
    – Tomcat 5.0.14

    Any help is appreciated.

    Tino.

    #200070 Reply

    support-michael
    Keymaster

    I have entered a the \” problem into our issues tracking system. I expect it will be resolved in the next release (late Nov).

    Regarding the JSP debugger not being able to locate JSP source, I don’t believe this has any relationship to the JSP validation problem you are experiencing.

    1) How are you deploying your web project, e.g., exploded/packaged archive, context-root, custom ant script or MyEclipse deployer, …?
    2) What is the name of the source file being search for?

    Michael
    MyEclipse Support

    #200212 Reply

    tisc
    Member

    @support wrote:

    I have entered a the \” problem into our issues tracking system. I expect it will be resolved in the next release (late Nov).

    […]

    Michael
    MyEclipse Support

    This is good news. I’ll do another post for the last issue we’d like to have
    solved before ordering.

    Bye, Tino.

    #200680 Reply

    tisc
    Member

    What’s the state of affairs with the bug explained above?

    Is the compiler bug fixed?

    #200685 Reply

    Scott Anderson
    Participant

    Yes it is fixed. It will be part of the 2.7 release, scheduled for later today. Thanks for your patience. Once you’ve had a chance to test the new version, we’d appreciate a follow-up post to let us know if it addressed all the issues you experienced.

    –Scott
    MyEclipse Support

    #201035 Reply

    tisc
    Member

    I’ll give it a try if the Linux version of 2.7 is available.

    Actually, we’re only hesitating to order 5 to 10 licenses because of this bug.

    #201042 Reply

    Riyad Kalla
    Member

    Community: if its any consolation I have a few pages that use code like that and it worked fine. It didn’t work for me when I didn’t escape the quotes:

    
    <tag attribute="<%=function("argument") %>" />
    

    but once I escaped the quotes it worked… and it seems this is what you and your team are doing anyway.

    P.S.> If you have a windows machine to test this on, you could verify it. We even had one person in here that installed ME on windows, ripped it out manually and put it on his Linux installation and it worked fine. (you have to do some manual work though)

    #201048 Reply

    No Operation
    Member

    <tag attribute=”<%=function(\”argument\”) %>” />

    Whether this quoting is correct or not, depends (unfortunately – thank you SUN) on the tag, since there were changes during the evolution I refer to the (latest?) spec jsp-2_0-pfd3-spec.pdf.
    (Note that the JSP1.2 spec is not clear enough howto handle it, on the one side, escape rules are defined, on the other side runtime attributes could be regarded as attributes containing expressions. JSP2.0 defines kind of a grammar.)

    1. The tag is a StandardAction ( <jsp:… ) or a CustomAction ( <foo:… and foo introduced as taglib):
    The JSP2.0 syntax defines “<%= … %>” and ‘<%= … %>’ to be runtime attribute values which require the above quoting.

    
    <custom:tag attribute="<%=function(\"argument\") %>" />
    

    2. All other tags:
    Since these parts are just template text, there is no attribute to resolve and the JSP2.0 syntax defines <%= … %> to be a scriptlet expression.

    
    <tag attribute="<%=function("argument") %>" />
    

    The result might look like:

    
    ...
      <table width="<%=percent("mainTable")%>%"> 
      <%-- percent(...) -> 80 -> width="80%" --%>
      <tr><th>
      <foo:tag attribute="<%=percent(\"mainTable\") + \"%\" %>" /></th></tr>
      <%-- since it is not possible to insert a % behind the expression, it is added within --%>
    ...
    

    no clue why this was made so … inconsistent :(, well:

    The quoting conventions are different from those of XML. See Chapter JSP.5.

    indeed different.

    NOP

    #201099 Reply

    tisc
    Member

    @rkalla wrote:

    Community: if its any consolation I have a few pages that use code like that and it worked fine. It didn’t work for me when I didn’t escape the quotes:

    
    <tag attribute="<%=function("argument") %>" />
    

    but once I escaped the quotes it worked… and it seems this is what you and your team are doing anyway.

    Well, the problem is that the MyEclipse compiler chokes on the escaped quotes and therefore doesn’t allow me to debug the affected files (which are quite a lot, if not every file).

    @rkalla wrote:

    P.S.> If you have a windows machine to test this on, you could verify it. We even had one person in here that installed ME on windows, ripped it out manually and put it on his Linux installation and it worked fine. (you have to do some manual work though)

    This would certainly be possible… though it might be tricky to get things right and straight. (The release notes also talk about some QA problems, so I might be disappointed after all – so I’ll rather wait for the official release…)

    #201107 Reply

    No Operation
    Member

    Well, the problem is that the MyEclipse compiler chokes on the escaped quotes and therefore doesn’t allow me to debug the affected files (which are quite a lot, if not every file).

    still with 2.7 RC1?

    NOP

    #201431 Reply

    tisc
    Member

    Hi there,

    I’m happy that the above problem seems to be solved with 2.7RC2.
    Now, there’s only a simple problem left, which I’ll address in another post.

    Bye, Tino.

    #201434 Reply

    SeJo
    Member

    Is there a release also for Eclipse 3M or higher (like 3.6.4 but then a newer version)…

    i have that problem also, and i was hoping to see that resolved soon 😀

    #201440 Reply

    support-michael
    Keymaster
Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: Compiler complains about double quotes in attributes [Bug]

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