Bookmark Topic Watch Topic
  • New Topic

JSP Taglib - default namespace is not specified

 
Vin Maxie
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Pie
Posts: 64994
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
    Bookmark Topic Watch Topic
  • New Topic