struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty (JIRA)" <j...@apache.org>
Subject [jira] Created: (WW-2695) <bean:define tag does not accept id name and value
Date Tue, 24 Jun 2008 15:26:05 GMT
<bean:define tag does not accept id name and value
--------------------------------------------------

                 Key: WW-2695
                 URL: https://issues.apache.org/struts/browse/WW-2695
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - Tags
    Affects Versions: 2.0.11.2
         Environment: TC 5.5.17 Struts-2.0.11
            Reporter: Martin Gainty
            Priority: Minor


/WEB-INF/classes/ApplicationResources.properties:
prompt.search=Search
prompt.Greece=Greece
prompt.advanced.search=AdvancedSearch

/WEB-INF/struts-config.xml contains the following message-resources definition
    <message-resources parameter="ApplicationResources"/>

<html>
<head>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
</head>
<body>
<bean:define id="curDate" name="curDate" value="01-01-1970"/>
<!-- jsp:useBean id="currentDate" class="java.lang.String" / -->
<div id="Search">
   <p class="Time">
       <bean:message key="prompt.Greece" />
       <bean:write name="curDate" format="HH:mm:ss zz" />
   </p>
   <form action="#">
   <p>
        <label for="SearchSelect"><bean:message key="prompt.search"/>:</label>
           <select name="SearchSelect" id="SearchSelect">
               <option selected="selected">Select...</option>
           </select>
           <input type="text" name="SearchInput" id="SearchInput" class="Text" />
           <input type="submit" name="SearchBTN" id="SearchBTN" class="SearchBTN" value="Search"
/>
           <html:link action="prepareAdvancedSearch">
               <bean:message key="prompt.advanced.search" />
           </html:link>
           <a href="#">Advanced Search</a>
       </p>
   </form>
</div>
</body>
</html>

produces error
org.apache.jasper.JasperException: Define tag can contain only one of name attribute, value
attribute, or body content for bean with id: curDate

changing bean:define to 
<bean:define id="curDate" value="01-01-1970"/>
bean:define now cleanly renders page

originally reported by dimitris.mouchritsas@eurodyn.com
MCG 24 June 2008
	

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message