-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Maurizio,
On 5/29/2009 3:05 AM, Maurizio Rottin wrote: > <bean:define id="abst" name="news" property="abstr" /> > <bean:define id="title" name="news" property="title"/> [snip] > "ERROR [TP-Processor40] - Servlet.service() for servlet jsp threw exception > javax.servlet.jsp.JspException: Define tag cannot set a null value > at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:272) > etc. etc." Check the documentation for the bean:define tag: http://struts.apache.org/1.2.x/userGuide/struts-bean.html#define It says: " USAGE NOTE - If you use another tag to create the body content (e.g. bean:write), that tag must return a non-empty String. An empty String equates to an empty body or a null String, and a new scripting variable cannot be defined as null. Your bean must return a non-empty String, or the define tag must be wrapped within a logic tag to test for an empty or null value. " So, <bean:define> is basically calling news.getAbstr() (or news.getTitle()) and it is returning null, which throws an error. I suspect that either your news object is null, or the title or abstract of the news item is null. My guess is that 'news' is null. Maybe you mistyped "news" as "nzews"? > <logic:iterate scope="request" id="nzews" name="limitNewsList" > length="2" offset="0"> ?? > if i comment this line "request.setAttribute("limitNewsList" , > limitNewsList );", the page is shown without errors. That's because you change the flow of execution to avoid your <bean:define>. It doesn't fix the problem: it only masks it. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkogoioACgkQ9CaO5/Lv0PDkNQCgkSvCCMjObJyYGdWCfuVrAzPz yuMAn3wblRqQuJ/KndSFGsAFPvVKyuhU =ABmk -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org