aspose file tools*
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
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: 574
    
    1

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


Back to Java , again.
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: 574
    
    1

thanks for your time and support
Bobby Sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 574
    
    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