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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "name-from-attribute doubt" Watch "name-from-attribute doubt" New topic
Author

name-from-attribute doubt

omi sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 489
How to use name-from-attribute in variable directive?
what should be the value of name-from-attribute?


SCJP, OCA 9i application developer, SCWCD 5.
When I was in hell someone told me to get heaven you need to do Java.
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: 4725

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


A good workman is known by his tools.
omi sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 489
thanks for your time and support
omi sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 489
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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: name-from-attribute doubt
 
Similar Threads
JSP Tags - Attributes passed returns NULL [SOS Please help]
Doubt on Listeners in HFSJ-Page 212
Connecting to MySql in JBOSS5.1.0.GA
Dependancy Injection when 2 Beans implement the same interface
Q:Action tag