www.webdeveloper.com
Results 1 to 1 of 1

Thread: [RESOLVED] Struts Beginner - Need help debugging an error

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Location
    Bellevue, WA area
    Posts
    28

    resolved [RESOLVED] Struts Beginner - Need help debugging an error

    I am going through what are for the most part simple Struts examples and tutorials on my company's Intranet.

    I am however running into an error with the following block of code and I am hoping for help in determining where I have gone astray.

    Code:
    <&#37;@ page contentType="text/html; charset=UTF-8" %>
    <%@ taglib uri="/tlds/marketmaker.tld" prefix="dr" %>
    <%@ taglib uri="/tlds/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/tlds/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/tlds/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/tlds/jdo.tld" prefix="jdo" %>
    <%@ taglib uri="/tlds/string.tld" prefix="str" %>
    
    <abc:page>
    	<h3>logic:if</h3>
    	  <logic:if name="calendarBean" property="month" op="equal" value="June">
    	  <logic:or name="calendarBean" property="year" op="lessEqual" value="2012"/> <!-- Note self-closing -->
    	  <logic:or name="calendarBean" property="day" op="equal" value="Friday"/>
    	    <logic:then>
    		  <p>At least one condition above is true.</p>
    		</logic:then>
    		<logic:else>
    		  <p>None of the conditions are true.</p>
    		</logic:else>
    	  </logic:if>
    </abc:page>
    I'm getting at error at line 11, just before the first <logic:if> tag and I presume it is because a bean must be properly defined.

    I tried the following three variations of <bean:define and keep coming up with the same error.
    Code:
    <bean:define id="myCalendarBean" name="calendarBean" />
    <bean:define id="myCalendarBean" name="calendarBean" />
    <bean:define id="calendarBean" name="myCalendarBean" />
    <bean:define id="calendarBean" />
    So I guess this boils down to two questions.

    1) Am I right about defining a bean first and 2) what am I doing incorrectly in the previous four <bean:define> declarations listed above?
    Last edited by jeremybwilson; 03-28-2012 at 11:58 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles