• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scriptlets in html:option

 
Ritu varada
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
378
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic