facebook

Tag (base) should be an empty-element tag.

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

    ess_stegra
    Participant

    This is minor but I always get the

    Tag (base) should be an empty-element tag.

    warning in my JSP pages. I searched the forums and someone reported the same problem back in 2007, but nothing after that. Here is a sample code snippet:

    
    <%@ page language="java" pageEncoding="ISO-8859-1"%>
    
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://"
                + request.getServerName() + ":" + request.getServerPort()
                + path + "/";
    %>
    <?xml version="1.0" encoding="iso-8859-1"?>
    <?xml-stylesheet type="text/xsl" href="copy.xsl"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
              "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
        <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
        <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
        <%@ taglib uri="http://com.tec/component" prefix="tec"%>
    
        <f:view>
            <f:loadBundle basename="com.tec.bundle.MessageBundle" var="bundle" />
            <head>
                <base href="<%=basePath%>">
    
                <title><h:outputText
                        value="#{bundle.title} - #{bundle['admin.pageTitle']}" />
                </title>
    
            </head>
    

    Here is my installation summary:
    *** Date:
    Sunday, July 6, 2014 5:23:56 PM MDT

    ** System properties:
    OS=Windows2003
    OS version=5.2.0
    Java version=1.6.0_12

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 8.5
    Build id: 8.5-20100319

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 8.5
    Build id: 8.5-20100319

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    C:\Program Files\Genuitec\MyEclipse 8.5\myeclipse.exe
    -name
    Myeclipse
    –launcher.library
    C:\Program Files\Genuitec\MyEclipse 8.5\../Common/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll
    -startup
    C:\Program Files\Genuitec\MyEclipse 8.5\../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
    -install
    C:/Program Files/Genuitec/MyEclipse 8.5
    -configuration
    configuration
    -vm
    C:/Program Files/Genuitec/Common/binary/com.sun.java.jre.win32.x86_1.6.0.012/bin/client/jvm.dll

    #350157 Reply

    ess_stegra
    Participant

    I also get a similar error with the meta tag. See code below.

    
    <meta http-equiv="pragma" content="no-cache">
    
    #350172 Reply

    Steven,

    ‘Base’ and ‘Meta’ tags are empty elements, so they should have closing tag in it. For XHTML 1.0 DOCTYPE, you need to add ‘/>’ at the end of these tags.

    <base href=”<%=basePath%>” />
    <meta http-equiv=”pragma” content=”no-cache” />

    Our latest version is MyEclipse 2015 CI, based on Eclipse Luna (4.4). I strongly recommend you download MyEclipse 2015 to take advantage of many bug fixes and enhancements we made since the MyEclipse 8.x release. If you are currently holding a license for MyEclipse, then the same license can be used for MyEclipse 2015 too, as our licenses are time based not version based. Please take a look at this link for more information on MyEclipse 2015.

    Let us know if you see any issues in MyEclipse.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Tag (base) should be an empty-element tag.

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