aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes could not understand an example in head first servlet (dynamic attribute in tag file) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply locked New topic
Author

could not understand an example in head first servlet (dynamic attribute in tag file)

himani jangid
Greenhorn

Joined: Jul 04, 2013
Posts: 18
<%@ tag body-content='empty' dynamic-attributes='tagAttrs'
%>
<%@ attribute name='optionsList' type='java.util.List'
required='true' rtexprvalue='true' %>
<%@ attribute name='name' required='true' %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<select name='${name}'
<c:forEach var="attrEntry" items="${tagAttrs}">
${attrEntry.key}='${attrEntry.value}'
</c:forEach>
>

<c:forEach var="option" items="${optionsList}">
<option value='${option}'> ${option} </option>
</c:forEach>
</select>

so in this example from where we are getting the tagAttrs var.
its an haspmap but who sets the values in this. and how it help in checking the correct values of attritbutes

and also when i am pasting this code in eclipse i am getting an error on line
<c:forEach var="attrEntry" items="${tagAttrs}">

error is: isValid()==false
what is this, i have never this type of error.

and i remove this from <select , it is working fine but in this select tag it is giving this error
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60059
    
  65

Please do not post the same question more than once.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: could not understand an example in head first servlet (dynamic attribute in tag file)
 
Similar Threads
could not understand an example in head first servlet (dynamic attribute in tag file)
Java Simple Tag Handler
dynamic list - javax.el.PropertyNotFoundException
Dynamic attribute in Tag File
Doubt in JSP Custom tags (Simple Tag) in Dynamic Drop Down