It's not a secret anymore!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes tag file doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "tag file doubt" Watch "tag file doubt" New topic
Author

tag file doubt

Parth Twari
Ranch Hand

Joined: Jan 20, 2010
Posts: 163
source : Marcus

Tag files cannot access parameters from the calling JSP page.
true/false?

Answer :false

how can tag file access parameters from calling JSP page?


Parth Tiwari
| Pursuing Bachelor of Engineering | OSUM Club Leader | SCJP 6 | SCWCD 5 |...
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

By using the variable directive in the tag file.


[My Blog]
All roads lead to JavaRanch
Parth Twari
Ranch Hand

Joined: Jan 20, 2010
Posts: 163
Ok I will try to do it...
thanks
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1662
    
  25

By using the variable directive in the tag file.

Hi Christophe,

I thought that it was like this:

from jsp to tag-file: <%@ attribute %>
from tag-file to jsp: <%@ variable %>

Regards,
Frits
Parth Twari
Ranch Hand

Joined: Jan 20, 2010
Posts: 163
So Frits ,
you mean for a tag file to access the parameters of a JSP page the parameters must be added as the attributes for the tag file?

and if there is some info in tag file then it can be sent to the jsp by using the variable directive?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Frits Walraven wrote:
Hi Christophe,

I thought that it was like this:

from jsp to tag-file: <%@ attribute %>
from tag-file to jsp: <%@ variable %>

Regards,
Frits


Yes, you're right Frits. I got confused here.
 
Consider Paul's rocket mass heater.
 
subject: tag file doubt