Martin wrote:
Dimitris
Congratulations..I think You found a bug

/WEB-INF/struts-config.xml
/WEB-INF/classes/ApplicationResources.properties
prompt.search=Search
prompt.Greece=Greece
prompt.advanced.search=AdvancedSearch

<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" value="01-01-1970"/>
<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>

displays properly..if I change
----- Original Message ----- From: "Dimitris Mouchritsas" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Tuesday, June 24, 2008 9:17 AM
Subject: Re: Closing tag for html:hidden


Dimitris Mouchritsas wrote:
Well, one solution is to move the tld's to a directory and define them in web.xml. This seems to be working. However I've got some strange problems. For example in a tile I render a link for advanced search:

<%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean"%>

<%--<bean:define id="currentDate" name="java.util.Date" type="java.util.Date" />--%>
<jsp:useBean id="curDate" class="java.util.Date" />
<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><!-- Search -->

and I get

javax.servlet.jsp.JspException: ServletException in '/WEB-INF/jsp/common/search.jsp': null at org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:927) at org.apache.struts.tiles.taglib.InsertTag.doEndTag(InsertTag.java:465)
    at _web_2d_inf._jsp._common._layout._jspService(_layout.java:133)
    [SRC:/WEB-INF/jsp/common/layout.jsp:80]

I know it's the link, because if I comment it out I get an exception on a different jsp and
the tile shows up.
I've also testet <bean:message> outside the link and it works.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

BTW is there an option in struts-config.xml (for v.1.3.8 at least) or somewhere else to notify struts to use xhtml compatible elements
everywhere? So as to avoid having <html:xhtml /> in every jsp?

Dimitris

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

The bug report already exists and it's from last year, see: https://issues.apache.org/struts/browse/STR-3015

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to