rocket mass heater kickstarter
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes name-from-attribute doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "name-from-attribute doubt" Watch "name-from-attribute doubt" New topic
Author

name-from-attribute doubt

Bobby Sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 583
    
    1

How to use name-from-attribute in variable directive?
what should be the value of name-from-attribute?


Most of the programming problems can't be solved because you don't know what the exact problem is.
Defining your problem correctly leads you to the right solution.
Kumar Garlapati
Ranch Hand

Joined: Feb 04, 2008
Posts: 38
http://java.sun.com/products/jsp/syntax/2.0/syntaxref2013.html


Regards,<br />Kumar
Kumar Garlapati
Ranch Hand

Joined: Feb 04, 2008
Posts: 38
Example:

varAttr.tag
------------
<%@ attribute name="v" required="true" %>
<%@ variable name-from-attribute="v"
variable-class="java.lang.Long"
alias="a" scope="AT_END" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="a" value="${123}"/>
<p> TAG: ${v} = ${a} </p>

varAttr.jsp
-------------
<%@ taglib prefix="demo" tagdir="/technology/WEB-INF/tags/demo" %>
<demo:varAttr v="x"/>
<p> JSP: x = ${x} </p>

output:
--------
TAG:x = 123
JSP:x = 123

Reference : http://www.oracle.com/technology/pub/articles/cioroianu_tagfiles.html
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

That's not in the SCWCD exam, by the way.


A good workman is known by his tools.
Bobby Sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 583
    
    1

thanks for your time and support
Bobby Sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 583
    
    1

Originally posted by Marc Peabody:
That's not in the SCWCD exam, by the way.


LOL, thanks for information.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: name-from-attribute doubt