"logic:notEmpty" in strut 1.2.9 does not work

Discussion in 'Java' started by Jenny, Nov 21, 2008.

  1. Jenny

    Jenny Guest

    My application uses Struts 1.2.9. And I try to use the
    "logic:notEmpty" tag in my JSP file. My codes are like the following:


    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

    <logic:notEmpty name="approvalLetterForm"
    property="participantAddress2">
    <bean:write name="approvalLetterForm"
    property="participantAddress2" /><br>
    </logic:notEmpty>

    And I got the following error. Why?


    HTTP Status 500 -

    --------------------------------------------------------------------------------
    exception:

    org.apache.jasper.JasperException: /jsp/app/EditApprovalLetter.jsp
    (198,3) No tag "notEmpty" defined in tag library imported with prefix
    "logic"
    org.apache.jasper.compiler.DefaultErrorHandler.jspError
    (DefaultErrorHandler.java:40)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch
    (ErrorDispatcher.java:407)
     
    Jenny, Nov 21, 2008
    #1
    1. Advertising

  2. Jenny

    Tim Slattery Guest

    Jenny <> wrote:

    >My application uses Struts 1.2.9. And I try to use the
    >"logic:notEmpty" tag in my JSP file. My codes are like the following:
    >
    >
    ><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    >
    > <logic:notEmpty name="approvalLetterForm"
    >property="participantAddress2">
    > <bean:write name="approvalLetterForm"
    >property="participantAddress2" /><br>
    > </logic:notEmpty>
    >
    >And I got the following error. Why?
    >
    >
    >HTTP Status 500 -
    >
    >--------------------------------------------------------------------------------
    >exception:
    >
    >org.apache.jasper.JasperException: /jsp/app/EditApprovalLetter.jsp
    >(198,3) No tag "notEmpty" defined in tag library imported with prefix
    >"logic"


    Look in web.xml and see where you've got /WEB-INF/struts-logic.tld
    pointing to. Maybe you're aiming it at the wrong file.

    Better yet, write your taglib statement like this:

    <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
    prefix="logic" %>

    and delete the taglib bits in web.xml.

    --
    Tim Slattery

    http://members.cox.net/slatteryt
     
    Tim Slattery, Nov 21, 2008
    #2
    1. Advertising

  3. Jenny

    Jenny Guest

    Thank you very much, Tim. I got a good clue from you. :)


    On Nov 21, 1:12 pm, Tim Slattery <> wrote:
    > Jenny <> wrote:
    > >My application uses Struts 1.2.9. And I try to use the
    > >"logic:notEmpty" tag in my JSP file. My codes are like the following:

    >
    > ><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

    >
    > >                        <logic:notEmpty name="approvalLetterForm"
    > >property="participantAddress2">
    > >                                <bean:write name="approvalLetterForm"
    > >property="participantAddress2" /><br>
    > >                        </logic:notEmpty>

    >
    > >And I got the following error. Why?

    >
    > >HTTP Status 500 -

    >
    > >--------------------------------------------------------------------------­------
    > >exception:

    >
    > >org.apache.jasper.JasperException: /jsp/app/EditApprovalLetter.jsp
    > >(198,3) No tag "notEmpty" defined in tag library imported with prefix
    > >"logic"

    >
    > Look in web.xml and see where you've got /WEB-INF/struts-logic.tld
    > pointing to. Maybe you're aiming it at the wrong file.
    >
    > Better yet, write your taglib statement like this:
    >
    > <%@ taglib  uri="http://jakarta.apache.org/struts/tags-logic"
    > prefix="logic" %>
    >
    > and delete the taglib bits in web.xml.
    >
    > --
    > Tim Slattery
    > ://members.cox.net/slatteryt- Hide quoted text -
    >
    > - Show quoted text -
     
    Jenny, Nov 22, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TB
    Replies:
    2
    Views:
    3,789
  2. Joe
    Replies:
    3
    Views:
    4,520
    Sudsy
    Dec 5, 2003
  3. Vineet Jain
    Replies:
    9
    Views:
    469
    Fredrik Lundh
    Apr 16, 2004
  4. cyberaishu
    Replies:
    0
    Views:
    320
    cyberaishu
    Aug 8, 2008
  5. Phi!
    Replies:
    1
    Views:
    209
Loading...

Share This Page