• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP Attribute

 
Jerson Chua
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On page 41 of the JSP specification, it says that
the following line shows an illegal attribute values.
<mytags:tag value="<%= "hi!" %>" />
I tried the code and the output was
<mytags:tag value="hi!" />
I didn't get any translation or runtime error.
Why did the spec says that the line has an illegal attribute value?
[ May 31, 2002: Message edited by: Jerson Chua ]
 
adous
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Different vendors implement Jsp spec in different way, not all points inside Jsp spec will be supported by individual product, follow Jsp spec for exam, but follow vendors doc and implementation for your working

Regards
adous
 
Jerson Chua
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone please clarify this?
I still think that the attribute value is valid. I know that there won't be an error in any application server.
Thanks,
Jerson
 
Tong Chen
Ranch Hand
Posts: 1011
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Sun's Spec is right.
You need to change your code to
<mytags:tag value='<%= "hi!" %>'/>
Otherwise, you WILL get the compile error.
 
Jerson Chua
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to both of you. It's now clear to me.
Jerson
[ June 06, 2002: Message edited by: Jerson Chua ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic