Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java tag library

 
Anasapurapu Lakshmi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I would like to know, what are the prerequisites to pass a java variable to a tag as a variable.
The tag is not accepting the java variable in <%= %> tags.
The tag variable accepts the hardcoded value in ""
String strUserid="lakshmi";
eg userid="lakshmi" but not as userid="<%=strUserid%>"
java variable.
thanx
lakshmi
 
Jane Griscti
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anasapurapu,
Are you trying to pass a variable value to another application? Not sure why you are trying to use a 'tag' otherwise
I'm going to move this over to Java in General - Beginning as it's not directly related to SCJP Study.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice try Jane, but I believe that this is a JavaServerPage question.
Sorry about the musical chairs but I think that you will get a better response in Serlets and JSPS.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18156
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right you are. It sounds like you haven't defined the tag in question to work with variable substitution. It's an option in the Tag Library Description (tld) file, which is the XML file that describes the tag properties and what Java classes implement them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic