aspose file tools*
The moose likes JSP and the fly likes JSP Taglib - default namespace is not specified Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

JSP Taglib - default namespace is not specified

Vin Maxie
Greenhorn

Joined: Apr 04, 2005
Posts: 4
Hello,

I am trying to populate a simple combo box on a jsp page using custom tags.

This jsp code works fine:

<rectag:SpecTableRecTag recName="rName" castClass="SpecTableRecord[]">
<select name="jType" >
<option value="-1">---select---</option>
<%for (int i=0; i< rName.length; i++){ %>
<option value="<%=rName[i].getRecId()%>"/><%=rName[i].getRname()%></option>
<% } %>
</select>
</rectag:SpecTableRecTag>

I am using Tomcat 5.5, I have set up my taglibs and jar files (version 1.1 - jsp/jstl) according to instructions and the examples are working fine. Additionally I have modified 'var' in the 'core' forEach tag to accept rtexprvalue = true.

However when I change the code to use c:forEach ...

<% int i = 0; %>

<rectag:SpecTableRecTag recName="rName" castClass="SpecTableRecord[]">
<select name="jType" >
<option value="-1">---select---</option>
<c:forEach var="<%=i%>" begin="0" end="<%=rName.length%>" step="1">
<option value="<c ut value="${<%=rName[i].getRecId()%>}" /> "/> <c ut value="${<%=rName[i].getRname()%>}" /> </option>
</c:forEach>
</select>
</rectag:SpecTableRecTag>

... I get the following error message: 'The function getRecId must be used with a prefix when a default namespace is not specified'

I cannot find anything so far in my on line searches explaining what the error message is really trying to tell me. Can anyone tell me what I am missing to make this work?

Thanks tremendously for your insights
yann luppo
Greenhorn

Joined: Oct 29, 2008
Posts: 26
Vin Maxie wrote:... I get the following error message: 'The function getRecId must be used with a prefix when a default namespace is not specified'


Any luck with that? I'm getting the same error message?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61222
    
  66

yann lupo, this post is over 3 years old. I'm going to close this and let you post a new topic with the details of your own issue.

Please read this for more information.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP Taglib - default namespace is not specified