"logic:notEmpty" in strut 1.2.9 does not work

J

Jenny

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)
 
T

Tim Slattery

Jenny said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top