File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes taglib c:out tag problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "taglib c:out tag problem" Watch "taglib c:out tag problem" New topic
Author

taglib c:out tag problem

seenu kris
Greenhorn

Joined: Mar 11, 2005
Posts: 4
Hello all,

as i am facing problem to display the value inside the table. following are the flow files of my code.

my jsp page............

<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>

<tr>
<td> </td>
<td nowrap><b>Client</b></td>
<td><c ut value="${ConstantDeclarations.ATTR_CMB_CLIENT.strClientName}" default="value is null" escapeXml="true"/></td>
<!--<td><label for="<%=ConstantDeclarations.ATTR_CMB_CLIENT%>"><%=strClientName%></label></td>-->
<td> </td>
</tr>


my c.tld file.....................


<tag>
<description>
Like <%= ... >, but for expressions.
</description>
<name>out</name>
<tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>
Expression to be evaluated.
</description>
<name>value</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Default value if the resulting value is null.
</description>
<name>default</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Determines whether characters <,>,&,'," in the
resulting string should be converted to their
corresponding character entity codes. Default value is
true.
</description>
<name>escapeXml</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>


so i am trying to display the value ConstantDeclarations.ATTR_CMB_CLIENT.strClientName in the table which is taking from the class file ProjectVO.class. in which getClientName is returning the value of strClientName. as shown below

public class ProjectVO extends ValueObjectImpl implements SearchableEntity{


............

public String getClientName(){
return strClientName;
}


}


i have tried different types like

ProjectVo.ATTR_CMB_CLIENT.strClientName
ProjectVO.getClientName.strClientName



so please refer the code and if u have any solution for this reply to me.

with regards
seenu
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
ConstantDeclarations.ATTR_CMB_CLIENT.strClientName will translate to request.getAttribute("ConstantDeclarations").getATTR_CMB_CLIENT().getStrClientName(); which is unlikely to be what you want.

Put a VO in the request (for example as "vo") and do <cut value="${vo.clientName}"/>


42
seenu kris
Greenhorn

Joined: Mar 11, 2005
Posts: 4
hello sir,

thank you very much for ur reply.I tried with the thing as u said, but it is not working even , so please let me know the solution in clear. as i have given complete my problem so please. analyse once again , i hope you have a very good knowledge about taglib. so please help me in this reagard,

with regards
seenu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: taglib c:out tag problem
 
Similar Threads
Problems making Struts/JSTL 1.2 site work with JSTL 2.0
Problem with JSTL
Custom JSP Tag - Unrequired-Fields not cleared
Custom tag not evaluating ${} expressions
Custom tag parameter