File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

variable element

 
tony wang
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In DTD there's <!ELEMENT variable ( (name-given | name-from-attribute), variable-class?, declare?, scope?, description?) >
Does the element define a variable used in a tag?
<a:b ..>
<%= a_var.getX()%> <% String s=a_var2;%> ..
</a:b>
a_var & a_var2 are scripting variable defined in variable element. Right?
Thanks,
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the DTD for the TLD defines this and the purpose is correct. However, I have never used them. And I understand that we must use them through the TEI (Tag Extra Info) class. I have never used them so I don't have an example handy, right now.
Anyone else, please....
regds.
- madhav
 
Dani Mazzuca
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is better to use "variable" instead of TEI (if you can). You can use it por example in:
<tt:lookup id="tx" type="UserTransaction" name="java:comp/UserTransaction" />
<% tx.begin(); %>

See the j2ee tutorial for more explanations.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic