[go: up one dir, main page]

Menu

#50 JSP syntax highlighting errors

colorer-take5
closed-fixed
nobody
5
2004-11-16
2004-09-15
Anonymous
No

The JSP syntax highlighting does not support the
standard J2EE taglib syntax, for example:

<%@ taglib uri="/mytags" prefix="tag" %>

<a href="<tag:myLinkTag param="test"/>">Test</a>

All closing brackets following the first custom tag in
a file are incorrectly highlighted in red.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I have also experienced the second problem list here (using the Eclipse
    Plugin v0.6.0). In the following, the highlighter stops at the > of the
    nested tag:
    <script language="Javascript" src="<html:rewrite
    forward='validatorJavascript'/>"></script>

    This error does not occur with just > in the attribute's value. It only
    seems to occur when a JSP tag is nested inside of an HTML tag.

     
  • Igor Russkih

    Igor Russkih - 2004-09-28

    Logged In: YES
    user_id=313042

    There are some problems with complex jsp syntax. I'll take a
    look into them.

     
  • Igor Russkih

    Igor Russkih - 2004-09-28
    • milestone: --> colorer-take5
    • status: open --> open-accepted
     
  • Nobody/Anonymous

    Logged In: NO

    A followup to my comment from yesterday.

    I have noticed that the following works:
    <link rel="stylesheet" type="text/css" href="<html:rewrite
    forward='baseStyle'/>">

    as does:
    <a id='activityLeadLink' href='<html:rewrite page="/xxxx.do?
    action=display&id="/><bean:write name="xxxx" property="xxxx.id"/>'>

    But this does not:
    <script language="Javascript" src="<html:rewrite
    forward='validatorJavascript'/>"></script>

    In all the cases for me where the nesting of the JSP tag in the HTML does
    not work are in <script> tags. Unlike the original poster, my JSP tags
    nested in <a> parse/highlight just fine. I hope this helps diagnose the
    problem.

    Thanks.

    Keep up the awesome work,
    Kim

     
  • Igor Russkih

    Igor Russkih - 2004-11-16
    • status: open-accepted --> closed-fixed
     
  • Igor Russkih

    Igor Russkih - 2004-11-16

    Logged In: YES
    user_id=313042

    Fixed, although this is a very complex construction for HRC
    parser, there could be other problems.

    Index: html.hrc

    =====================
    RCS file: d:/e3035c/projects/cvs-cail/colorer/hrc/inet/html.hrc,
    v
    retrieving revision 1.13
    diff -r1.13 html.hrc
    417c417
    < (?{htmlString} perlscript [\d\.]*) \p{q}
    [^&gt;]*) \%?~1 &gt;) /ix"
    ---
    > (?{htmlString} perlscript [\d\.]*) \p{q}
    [^&gt;]*) [\%\/]?~1 &gt;) /ix"
    421c421
    < (?{htmlString} j(ava)?script [\d\.]*) \p{q}
    [^&gt;]*) \%?~1 &gt;) /ix"
    ---
    > (?{htmlString} j(ava)?script [\d\.]*) \p{q}
    [^&gt;]*) [\%\/]?~1 &gt;) /ix"
    425c425
    < (?{htmlString} vbscript [\d\.]*) \p{q}
    [^&gt;]*) \%?~1 &gt;) /ix"
    ---
    > (?{htmlString} vbscript [\d\.]*) \p{q}
    [^&gt;]*) [\%\/]?~1 &gt;) /ix"
    427c427
    < <block start="/ (&lt;(script .*?) \%?~1 \&gt; ) /ix"
    ---
    > <block start="/ (&lt;(script .*?) [\%\/]?~1 \&gt; ) /ix"

     
  • Nobody/Anonymous

    Logged In: NO

    I have patched the version of html.hrc and created a new common.jar for
    my 0.6.1 version of the plugin and it is working great.

    Thanks,
    Kim

     

Log in to post a comment.