• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem using jstl

 
Stein Vom
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can somebody tell me why i'm getting null in this case?

<%
response.addHeader("foo", "foo");
%>
${header.foo}


Or am i not using it the right way?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is "header.foo" a data structure in your web app somewhere? I'm asking because you can't get at the response headers like that. In fact, you can't get at response headers at all (aside from checking whether they have been set already).

I don't think JSTL has anything for working with request or response headers.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "header" implicit object of EL allows you to access headers from the request, but you are setting a new header in the response
 
Stein Vom
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf, i got it.
 
Stein Vom
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Satou.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic