tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jann VanOver <Jann.VanO...@loudeye.com>
Subject Strangeness with request.getHeader("User-Agent")
Date Mon, 14 May 2001 21:04:16 GMT
I can use request.getHeader() in my JSP scriptlet (Tomcat 3.2.1) and it
works just fine:

<% String myUserAgent = request.getHeader("User-Agent"); %>
User-Agent = <%= myUserAgent %><br>
<jsp:setProperty
	name="userAgent" 
	property="userAgent" 
	value="<%= myUserAgent %>"   /> 

But when I try to use it directly in a jsp:setProperty statement, I get an
error:

<jsp:setProperty
	name="userAgent" 
	property="userAgent" 
	value="<%= request.getHeader("User-Agent") %>"   /> 
 
... Attribute User-Agent has no value

Any idea why? 

Mime
View raw message