Also, if we're talking about a JSP taglib tag (which it sounds like we
are), something like this:

> inc= "<%= path %>/jsp/dd/inc/"

isn't allowed.  In fact, I'm kind of surprised that compiles.  When an
attribute is a rtexprvalue, the *whole* thing needs to be a runtime
expression.  You can't mix a runtime expression with static text as in
the above.  You'll need to rewrite the attribute like this:

inc='<%= path + "/jsp/dd/inc" %>'

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


> -----Original Message-----
> From: Jeff [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, September 25, 2002 3:16 PM
> To: Tomcat Users List
> Subject: Re: Setting Tag Attribute Value
> 
> 
> OK, quick question... is <%= path %> ***itself*** null, or it 
> simply being ---interpreted--- by Tomcat as null in the 
> context of a tag attribute?
> 
> An easy way to check is to stick a copy somewhere inside a 
> html comment adjacent to the tag where you're using it so you 
> can launch the page and see for sure. For example...
> 
> <!-- VALUE of path = '<%= path %>' -->
> ... inc="<%= path %>/jsp/dd/inc" ...
> 
> if <%= path %> is itself null and is itself supposed to be 
> set by another tag either wrapping it or coming earlier in 
> the page, it's probably a problem with that tag's TEI file.
> 
> On the other hand, if <%= path %> is non-null, check the 
> tag's .tld file and make sure that the "inc" attribute has 
> <rtexprvalue>true</rtexprvalue>
> 
> "rtexprvalue" tells the compiler whether it can save time and 
> hardcode the current value of <%= path %> at ***compile 
> time***, or whether it needs to stop and fetch the current 
> value of <%= path %> at ---runtime---. If rtexprvalue is 
> false, it's using path's value at compile time... which more 
> likely than not, is null.
> 
> ----- Original Message -----
> From: "Sundar Chakravarthy" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Wednesday, September 25, 2002 1:23 PM
> Subject: Setting Tag Attribute Value
> 
> 
> Hi,
> 
> I am on Tomcat 4.0.x , jdk1.4,win2K.
> 
> When I try to set a tag attribute value using
> a jsp script varaible like below ,
> 
> inc= "<%= path %>/jsp/dd/inc/"
> 
> the value of path shows up as null . Why ?
> 
> Thanks
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to