By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,798 Members | 1,349 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,798 IT Pros & Developers. It's quick & easy.

HttpServletResponse doesn't set the header

P: n/a


I'm using Jetty(version 4.2.19). In my servlet I put following lines:

System.out.println("before: " + resp.containsHeader("aaa"));

resp.setHeader(
"aaa",
"test" );
System.out.println("after: " + resp.containsHeader("aaa"));

and I don't understand why I get the following output:

before: false
after: false
it means that header hasn't been set:/ Has anyone had similar problem?
and it would be great you knew the solution :D
thanks in advance for reponse...
--
regards,
Jakub Pawlowski
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Jakub Pawlowski" <qo****@poczta.onet.pl> wrote in message
news:cb**********@news.onet.pl...


I'm using Jetty(version 4.2.19). In my servlet I put following lines:

System.out.println("before: " + resp.containsHeader("aaa"));

resp.setHeader(
"aaa",
"test" );
System.out.println("after: " + resp.containsHeader("aaa"));

and I don't understand why I get the following output:

before: false
after: false
it means that header hasn't been set:/ Has anyone had similar problem?
and it would be great you knew the solution :D
thanks in advance for reponse...
--
regards,
Jakub Pawlowski


For questions about Jetty go to the Jetty mailing lists. You will get any
information you want from the people who know the internals.

Silvio Bierman
Jul 17 '05 #2

P: n/a
hi Jakub ,
If I am right the resp header is set by jetty after your servlet has
executed. So i dont think it will be available to you in the context
of the execution of the servlet.

- Karthik
"Silvio Bierman" <sb******@idfix.nl> wrote in message news:<40***********************@news.xs4all.nl>...
"Jakub Pawlowski" <qo****@poczta.onet.pl> wrote in message
news:cb**********@news.onet.pl...


I'm using Jetty(version 4.2.19). In my servlet I put following lines:

System.out.println("before: " + resp.containsHeader("aaa"));

resp.setHeader(
"aaa",
"test" );
System.out.println("after: " + resp.containsHeader("aaa"));

and I don't understand why I get the following output:

before: false
after: false
it means that header hasn't been set:/ Has anyone had similar problem?
and it would be great you knew the solution :D
thanks in advance for reponse...
--
regards,
Jakub Pawlowski


For questions about Jetty go to the Jetty mailing lists. You will get any
information you want from the people who know the internals.

Silvio Bierman

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.