Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > "logic:notEmpty" in strut 1.2.9 does not work

Reply
Thread Tools

"logic:notEmpty" in strut 1.2.9 does not work

 
 
Jenny
Guest
Posts: n/a
 
      11-21-2008
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.jsp Error
(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatc h
(ErrorDispatcher.java:407)

 
Reply With Quote
 
 
 
 
Tim Slattery
Guest
Posts: n/a
 
      11-21-2008
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
 
Reply With Quote
 
 
 
 
Jenny
Guest
Posts: n/a
 
      11-22-2008
Thank you very much, Tim. I got a good clue from you.


On Nov 21, 1:12*pm, Tim Slattery <Slatter...@bls.gov> wrote:
> Jenny <zhej...@gmail.com> 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
> Slatter...@bls.govhttp://members.cox.net/slatteryt- Hide quoted text -
>
> - Show quoted text -


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
exception while developing an app in strut 2 framework cyberaishu Java 0 08-08-2008 02:47 PM
STRAY CATS STRUT FOR THE 20D ! Annika1980 Digital Photography 2 08-19-2006 02:38 AM
MS work around on text wrapping in a datagrid does not work TB ASP .Net 2 02-22-2006 10:34 PM
Webservice works once and then DOES NOT seem to work even though program does not crash Phi! ASP .Net Web Services 1 04-23-2004 08:42 AM
Advantage and DisAdvantage of Jakarta Strut Joe Java 3 12-05-2003 03:23 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57