473,499 Members | 1,591 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HttpServletResponse doesn't set the header



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
2 3939

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1343
by: ensnare | last post by:
Anyone know why this code just deletes random messages and not ALL the messages? $this->headers is simply imap_headers() $i=0; foreach ($this->headers as $header){ #Trim the header $header...
4
16032
by: Eric West | last post by:
Greetings- I have a web application that has a form that triggers a server process that I would like to provide a "Searching..." page for. My strategy was to send the browser the "top half" of...
1
3306
by: Naresh Agarwal | last post by:
Hi I'm developing a webapp using servlets, which processes a HTTP Post request and sent back MIME message (multipart/related - essentially SOAP message with Attachments). I'm constructing the...
0
2984
by: Naresh Agarwal | last post by:
Hi I want HTTPServletResponse to *close* the socket after sending the response. For this I'm closing the OutputStream after writing the data. But still socket is not closed and client keeps on...
1
27752
by: Java script Dude | last post by:
I am investigating a solution to build all pages sent from my application servlet in UTF-8 encoding. From what I understand, I should be using HttpServletResponse.setCharacterEncoding("UTF-8"). The...
14
2072
by: Tom.PesterDELETETHISSS | last post by:
Hi, I think this question requires an in depth understanding of how a browser cache works. I hope I can reach an expert here. I may have found a quirk in the asp.net documentation or I don't...
16
2892
by: a | last post by:
Hi everybody, My config: Win XP (or 2003), Apache 2.0.54, PHP 5.1.2. I have been trying to handle the case of a lenghty opearation on the server while providing the user with feedback and...
2
2164
by: JRough | last post by:
I have this code that switches templates depending on if the user fills in a form with a request. The request asks for the $mark & $number. If that request gets input then it displays a list...
2
2014
by: xinariscy | last post by:
Hello everyone! I have a webpage with a form with two text boxes and the action of the form it's a servlet. I know how to get the HttpServletResponse response from a servlet like this: .......
0
7130
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
295
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.