4 Replies Latest reply: Feb 13, 2013 2:14 AM by RMishra RSS

    c:out tag error  in jsp

    967909
      Hi guys

      while using the below code in jsp file

      <!doctype html>
      <%@ page isELIgnored="false" %>
      <%@ taglib prefix="dsp" uri="/dspTaglib" %>
      <%@ taglib prefix="c" uri="/c" %>
      <dsp:page>
      <html>
      <body>
      <c:set var="name" value="mahesh"></c:set>
      <c:out value="${name}"/>
      </body>
      </html>
      </dsp:page>

      i am getting the errot in weblogic

      test.jsp:9:8: Static attribute must be a String literal, its illegal to specify an expression.
      <c:out value="${name}"/>
      ^---^

      please resolve my problem
        • 1. Re: c:out tag error  in jsp
          Nooruddin Shaik
          I do not see any issue with this page:
          This is what I tried:

          <!doctype html>
          <%@ page isELIgnored="false" %>
          <%@ taglib prefix="dsp" uri="http://www.atg.com/taglibs/daf/dspjspTaglib1_1" %>
          <dsp:page>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
          <html>
          <body>
          <c:set var="name" value="mahesh"></c:set>
          <c:out value="${name}"/>
          </body>
          </html>
          </dsp:page>


          Check if you are point to right c taglibs/tld.
          Otherwise try the above fragment.

          Peace
          Shaik
          • 2. Re: c:out tag error  in jsp
            Rajeev_R
            The problem is with your tag library, check what version you are using it locally and make sure that you are using jstl 1.1 or later versions.
            If you are using URL, use <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

            Cheers
            R
            • 3. Re: c:out tag error  in jsp
              967909
              after that i am getting the followng error

              test.jsp:5:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
              <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
              ^----^
              c tag is workign properly but while using the expession language then only is is showing an error in weblogic
              • 4. Re: c:out tag error  in jsp
                RMishra
                after that i am getting the followng error
                test.jsp:5:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
                <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
                ----
                c tag is workign properly but while using the expession language then only is is showing an error in weblogic>
                It seems your tld files version and web.xml version is miss matching.
                What version of ATG are you using?
                Also can you please check web.xml for:
                <web-app ...................... version="2.5">
                Above web.xml version is 2.5.
                Can you check your web.xml and share?
                If your web-app deployment descriptor (web.xml) is declared for spec version 2.4 so you should be using JSTL 1.1 which is compatible for 2.4 and you should be using correct URI for JSTL 1.1 as below:
                <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

                Below threads are also related to tld version issue:
                Can we use  <include-prelude>...</include-prelude> in ATG9.1??

                include-prelude issue with ATG 10.1.1

                -RMishra

                Edited by: RMishra on Feb 13, 2013 1:44 PM