facebook

JSP validation flags scriptlets/taglibs as unknown attribute

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

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

    henk
    Member

    Eclipse 3.2rc6 / MyEclipse 5.0rc2 / Java5u6 / WinXP SP2

    As another problem with running validation on JSP pages, I noticed that it flags usage of scriptlets and taglib tags inside HTML tags as an “undefined attribute name” warning.

    E.g.

    
    <option value="<c:out value="${user.id}"/>" 
        <c:choose>
            <c:when test="${userMngr.currentID == user.id}">
                SELECTED
            </c:when>
        </c:choose>
    >
    

    This is marked as warning, and the following message is given:

    Undefined attribute name ( <c:choose>
    <c:when test=”${userMngr.currentID == user.id}”>
    SELECTED
    </c:when>
    </c:choose> ).

    The same happens when I use scriptlets inside HTML tags. As a result, my problems view now shows no less than 3446 warnings. No I know the example code I tested isn’t in the best shape, but this seems a bit over the top doesn’t it? 😉

    #253821

    Riyad Kalla
    Member

    henk,
    I can’t reproduce this, here’s my sample page:

    
    <%@ page language="java" pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://"
                + request.getServerName() + ":" + request.getServerPort()
                + path + "/";
    %>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
        <head>
            <base href="<%=basePath%>">
    
            <title>My JSF 'MyJsp.jsp' starting page</title>
    
            <meta http-equiv="pragma" content="no-cache">
            <meta http-equiv="cache-control" content="no-cache">
            <meta http-equiv="expires" content="0">
            <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
            <meta http-equiv="description" content="This is my page">
            <!--
        <link rel="stylesheet" type="text/css" href="styles.css">
        -->
    
        </head>
    
        <body>
            <f:view>
                <c:choose>
                    <c:when test="${userMngr.currentID == user.id}">
                         SELECTED
                    </c:when>
                </c:choose>
            This is my JSF JSP page. <br>
            </f:view>
        </body>
    </html>
    
    
    #253897

    karnokd
    Member

    Hi!

    The same problem as above:

    
    <html>
    <body>
        <button <%= session.getCreationTime() %>></button> 
    </body>
    </html>
    

    It marks the <%= session.getCreationTime() %> as unknown attribute.
    My settings are:

    *** Date: Mon Jun 26 17:47:11 CEST 2006

    *** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_05

    *** MyEclipse details:
    MyEclipse Enterprise Workbench

    Version: 5.0 Milestone 1
    Build id: 20060515-5.0-M1

    *** Eclipse details:
    Eclipse Platform

    Version: 3.2.0
    Build id: I20060602-1317

    Eclipse Platform

    Version: 3.2.0.v20060609m-7gOexn6feIewyBO
    Build id: I20060602-1317

    Eclipse Java Development Tools

    Version: 3.2.0.v20060609m-F7snq1fxia-Z4XP
    Build id: M20060609-1217

    Eclipse Graphical Editing Framework

    Version: 3.2.0.v20060616
    Build id: 20060616-1254

    Eclipse RCP

    Version: 3.2.0.v20060609m-SVDNgVrNoh-MeGG
    Build id: M20060609-1217

    Eclipse Plug-in Development Environment

    Version: 3.2.0.v20060609m——6zXJJzJzJq
    Build id: M20060609-1217

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    C:\DD\Eclipse32\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    b04_70
    -vm
    c:\jdk1.5.0_05\bin\javaw.exe

    #253899

    Riyad Kalla
    Member

    What kind of file are you editing? Is it an HTML file by chance?

    #254817

    tutton
    Member

    I am experiencing the same problem.

    I think this has been reported as a bug, and there is a patch is here:
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=143209

    But the patch is Java source code. I don’t know how to apply it.

    Can someone please tell me/us how to apply this patch?

    Thanks,
    JT

    #254961

    karnokd
    Member

    This message has not been recovered.

    #254998

    Riyad Kalla
    Member

    This message has not been recovered.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: JSP validation flags scriptlets/taglibs as unknown attribute

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