Author
scriptlets in html:option
Ritu varada
Ranch Hand
Joined: Sep 08, 2004
Posts: 117
posted Mar 21, 2005 16:13:00
0
I am trying to using a constants file while using the options tag in html library. I am not able to figure out the syntax. I am saying <html ption value= "<%= Constants.STATUS_CD_DUP %>" >DUPLICATE</html ption> I have imported the neccessary class but I am having trouble with the syntax. Is there a better way to do this ? Thanks.
SCJP,SCWCD(1.4)
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26218
Ritu, The syntax is correct. What error message do you get? A better way to do this would be to put the names/values in a List and access that through the Struts tags.
[Blog ] [JavaRanch FAQ ] [How To Ask Questions The Smart Way ] [Book Promos ]
Blogging on Certs: SCEA Part 1 , Part 2 & 3 , Core Spring 3 , OCAJP , OCPJP beta , TOGAF part 1 and part 2
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
When using scriptlets inside html:xxxx tags, it does make a difference which version you use. In some cases, I was unable to get them to work with Version 1.1, but version 1.2 is much better about this.
Merrill
Consultant, Sima Solutions
sreenath reddy
Ranch Hand
Joined: Sep 21, 2003
Posts: 415
hi ritu The syntax is very much fine and it works in all the versions starting from 1.0 version.let us know whats the error u r getting
Ritu varada
Ranch Hand
Joined: Sep 08, 2004
Posts: 117
posted Mar 21, 2005 20:22:00
0
I am actually getting a parser error. Let me try that once more and let you guys know. Thanks a lot for your help.
Ritu varada
Ranch Hand
Joined: Sep 08, 2004
Posts: 117
posted Mar 22, 2005 08:51:00
0
I had a closing tag missing and I thought that the syntax was wrong. But, good to know that I was right on the syntax. Thank you guys
subject: scriptlets in html:option