in your jsp your reference to struts tags associates prefix 's' to  uri 
"struts-tags"
<%...@taglib prefix="s" uri="/struts-tags" %>

<!-- then in /META-INF/struts-tags.tld you have defined tag name and attributes 
with associated class-name as illustrated below -->

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 
1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd";>
<taglib>
  <tlib-version>2.2.3</tlib-version>
  <jsp-version>1.2</jsp-version>
  <short-name>s</short-name>
  <uri>/struts-tags</uri>
  <display-name>"Struts Tags"</display-name>
  <description><![CDATA["To make it easier to access dynamic data;
                    the Apache Struts framework includes a library of custom 
tags.
                    The tags interact with the framework's validation and 
internationalization features;
                    to ensure that input is correct and output is localized.
                    The Struts Tags can be used with JSP FreeMarker or 
Velocity."]]></description>
..................................
  <tag>
    <name>textfield</name>
    <tag-class>org.apache.struts2.views.jsp.ui.TextFieldTag</tag-class>
    <body-content>JSP</body-content>
    <description><![CDATA[Render an HTML input field of type 
text]]></description>
    <attribute>
      <name>accesskey</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html accesskey attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>cssClass</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[The css class to use for element]]></description>
    </attribute>
    <attribute>
      <name>cssStyle</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[The css style definitions for element to 
use]]></description>
    </attribute>
    <attribute>
      <name>disabled</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html disabled attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[id for referencing element. For UI and form tags it 
will be used as HTML id attribute]]></description>
    </attribute>
    <attribute>
      <name>key</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the key (name, value, label) for this 
particular component]]></description>
    </attribute>
    <attribute>
      <name>label</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Label expression used for rendering a element 
specific label]]></description>
    </attribute>
    <attribute>
      <name>labelposition</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Define label position of form element 
(top/left)]]></description>
    </attribute>
    <attribute>
      <name>maxLength</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Deprecated. Use maxlength instead.]]></description>
    </attribute>
    <attribute>
      <name>maxlength</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[HTML maxlength attribute]]></description>
    </attribute>
    <attribute>
      <name>name</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[The name to set for element]]></description>
    </attribute>
    <attribute>
      <name>onblur</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[ Set the html onblur attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>onchange</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html onchange attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>onclick</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html onclick attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>ondblclick</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html ondblclick attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>onfocus</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html onfocus attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>onkeydown</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html onkeydown attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>onkeypress</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html onkeypress attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>onkeyup</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html onkeyup attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>onmousedown</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html onmousedown attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>onmousemove</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html onmousemove attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>onmouseout</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html onmouseout attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>onmouseover</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html onmouseover attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>onmouseup</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html onmouseup attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>onselect</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html onselect attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>readonly</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Whether the input is readonly]]></description>
    </attribute>
    <attribute>
      <name>required</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[If set to true, the rendered element will indicate 
that input is required]]></description>
    </attribute>
    <attribute>
      <name>requiredposition</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Define required position of required form element 
(left|right)]]></description>
    </attribute>
    <attribute>
      <name>size</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[HTML size attribute]]></description>
    </attribute>
    <attribute>
      <name>tabindex</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html tabindex attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>template</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[The template (other than default) to use for 
rendering the element]]></description>
    </attribute>
    <attribute>
      <name>templateDir</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[The template directory.]]></description>
    </attribute>
    <attribute>
      <name>theme</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[The theme (other than default) to use for rendering 
the element]]></description>
    </attribute>
    <attribute>
      <name>title</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the html title attribute on rendered html 
element]]></description>
    </attribute>
    <attribute>
      <name>tooltip</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the tooltip of this particular 
component]]></description>
    </attribute>
    <attribute>
      <name>tooltipConfig</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Set the tooltip configuration]]></description>
    </attribute>
    <attribute>
      <name>value</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
      <description><![CDATA[Preset the value of input element.]]></description>
    </attribute>
  </tag>
.........
</taglib>

--end STRUTS-TAG.TLD

in your struts-tag-tld
verify these textfield contains 
class="org.apache.struts2.views.jsp.ui.TextFieldTag"
the class org.apache.struts2.views.jsp.ui.TextFieldTag is contained in 
struts2-core--<version>.jar is in WEB-INF/lib

example:
<s:form action="Login">
    <s:textfield key="username"/>
    <s:password key="password" />
    <s:submit/>
</s:form>

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung / Disclaimer and confidentiality note 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
This message is confidential and may be privileged. If you are not the intended 
recipient, we kindly ask you to  please inform the sender. Any unauthorised 
dissemination or copying hereof is prohibited. This message serves for 
information purposes only and shall not have any legally binding effect. Given 
that e-mails can easily be subject to manipulation, we can not accept any 
liability for the content provided.






> Subject: Struts 2 tags not translated to html when using tiles 
> Date: Thu, 19 Mar 2009 11:14:15 -0500
> From: ak...@allstate.com
> To: user@struts.apache.org
> 
> Struts 2 tags are not translate into HTML when I add tile to my application. 
> When I use View source of my browser, I still can see the struts 2 tags in 
> the page so it is not correctly rendered.
> Without tiles the application is working fine.
> 
> Below is what I see in the page source.
> ----------------------- snip -------------------------
> <tr>
>                                               <td align="right" 
> width="181"><span class="textboldblue">First
>                                               Name</span></td>
> 
>                                               <td width="330"><s:textfield 
> name="firstName" required="true"
>                                                       size="20" 
> maxlength="75" /><span class="asterisk">*</span></td>
>                                       </tr>
>                                       <tr>
>                                               <td align="right" 
> width="181"><span class="textboldblue">Last
>                                               Name</span></td>
> 
>                                               <td width="330"><s:textfield 
> name="lastName" required="true"
>                                                       size="20" 
> maxlength="75" /><span class="asterisk">*</span></td>
>                                       </tr>
> 
> ------------------------------------------- snip 
> -----------------------------------------------------------------------------------------------------
> 
> Any idea?
> 
> Thanks
> 
> Aimé Kra
> 
> 

_________________________________________________________________
Express your personality in color! Preview and select themes for Hotmail®. 
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme

Reply via email to