facebook

Custom tag issue (Double quotes not allowed?)

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #198690 Reply

    Son Dang
    Member

    Hi,

    I have a custom tag with an attribute that allows free text for the attribute’s value. For example:
    <_tag:mytag myattr=”some text here” />

    If I do not have a double quote in the attribute value, the jspc does not complain (like above). But, if I put a double quote in the attribute value with an escape character, the jspc complains. For example:
    <_tag:mytag myattr=”he said \”Hi.\”” />

    ERROR: Syntax error on token “Hi”, “)” expected

    I have no problem when this jsp page is executed with tomcat 4.1.27. Is there a different if your jspc versus tomcat? Is this a bug in one of the jspc?

    Son

    #198699 Reply

    Scott Anderson
    Participant

    Son,

    Is there a different if your jspc versus tomcat? Is this a bug in one of the jspc?

    Yes, our jspc is different than the one used by Tomcat. This is also a known problem in our JSP compiler that has already been fixed internally and will be available in the next service release.

    Thanks for bringing it to our attention. Taking the time to do things like this makes our product better for everyone.

    –Scott
    MyEclipse Support

    #198700 Reply

    mvhegde
    Member

    Hi

    JSP code completion works great!! Thanks a lot.
    But I have two issues.

    1.
    I have several jsps outside my webroot. But why should myeclipse
    bother with them? It should not try to compile or parse those jsps, or it
    should be an option. If we have our own ant build process which copies
    the jsps to some staging folder, my eclipse tries to compile them too and
    complains :

    Error /eclipse/workspace/myweb/src/MyJsp.jsp) not in base path (C:/eclipse/workspace/myweb/web/) MyJsp.jsp myweb/src line 0

    My view is that it should not go beyond webroot!!

    2.
    The output folder issue: I have a java project with lot of java files and it
    has classes as output folder. I have lot of jsps also in a sub folder. So I
    tried to use myeclipse and tried to web enable by selecting
    “Web Project Configuration….” dialog box.
    Now it takes forever to compile those jsps. I have to kill eclipse.
    Then when I look at the project properties ->Build Path the output path of
    the entire project is changed to webroot/WEB-INF/classes and since I have
    huge # of java files, it seems eclipse tries to recomplie them again into the
    new output folder along with jsps which is not good behaviour. I think
    “Web Project Configuration….” should ask for “web src folder” too.

    myeclipse 2.6.2 (latest 9/10/2003)
    eclipse 2.1.1
    java 1.3.1_08 on Windos 2000

    Thanks
    Mvhegde

    #198703 Reply

    No Operation
    Member

    <_tag:mytag myattr=”he said \”Hi.\”” />

    JSP spec says:

    Following the XML specification, attribute values always appear quoted. Both single and double quotes can be used. The entities ' and " are available to describe single and double quotes.

    and the XML spec says:

    AttValue ::= ‘”‘ ([^<&”] | Reference)* ‘”‘ | “‘” ([^<&’] | Reference)* “‘”

    => The jspcc correctly marks that error ❗

    I have no problem when this jsp page is executed with tomcat 4.1.27.

    => tomcat does not follow the spec ❗

    Try this and be happy

    
    <_tag:mytag myattr="he said "Hi."" /> 
    

    NOP

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Custom tag issue (Double quotes not allowed?)

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