RE: problem in getHeader()

2001-06-18 Thread Randy Layman


Uhh, headers don't work that way.  You send headers to help the
browser and network know what they are working with.  The browser sets the
headers for the new request to help you and the network deal with the
request.  One set of headers has no bearing on any others.

Randy

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 18, 2001 2:18 AM
 To: A mailing list about Java Server Pages specification and reference
 Cc: A mailing list for discussion about Sun Microsystem's Java Servlet
 API Technology.; [EMAIL PROTECTED]
 Subject: problem in getHeader()
 
 
 i can't  get headers in second  page set in first page .
 i am  using  tomact 3.2.2 .
 
 
 this is my detail problem
 this is first.jsp
 response.setHeader(Cache-Control, no-cache);
  response.setHeader(Pragma, no-cache);
  response.setDateHeader(max-age, 0);
  response.setDateHeader(Expires, 0);
 
 this is second.jsp
 
  Enumeration e = request.getHeaderNames();
 
  while(e.hasMoreElements()){
   String  = (String) e.nextElement();
   System.out.println(Header is  = ++  = +
 request.getHeader());
 
 
  }
 
  System.out.println( Our Header is  = +
 request.getDateHeader(max-age));
  System.out.println( Our Header is  =  +
 request.getDateHeader(Expires));
 
 i can't get  headers in second.jsp  what  i set in first.jsp .
 i am  using  tomact 3.2.2
 



Re: Problem with getHeader(Referer)

2001-01-18 Thread Dan Eppinghoff

I'm going to the page via a link, not dialing direct.  Both methods leave with with
a result of null;

[EMAIL PROTECTED] wrote:

 Are you direct dialing the page or are you clicking a link to see it?  i.e.
 {page1}
 ... a href="page2.jsp"foo/a ...

 {page2}
 ... % if (request.getHeader("referer") != null)
out.println(request.getHeader("referer"));
   else
   out.println("Referer == null Dig-it!");
 % ...
 Going from page1 to page2 should result in "page1.yourextension" being written
 to the screen.
 Hitting ^L (YMMV) or typing page2.jsp into your address bar will result in the
 second message.
 Does that help?
 /bill

 Dan Eppinghoff [EMAIL PROTECTED] on 01/17/2001 10:02:27 PM

 Please respond to [EMAIL PROTECTED]

 To:   [EMAIL PROTECTED]
 cc:(bcc: Bill Fellows/MO/americancentury)
 Subject:  Problem with getHeader("Referer")

 Hello all,
I have a problem getting the "Referer" header from the request object in a
 JSP.  The
 only value I get for it is null.  I printed a list of the available headers (via
 getHeaderNames()) and this is the list I got:
 User-Agent
 Cookie
 Accept
 Host
 Accept-Encoding
 Accept-Language
 Connection

 Does anyone have an idea why I can't get "Referer"?

 Sincerely,
 Dan

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Problem with getHeader(Referer)

2001-01-18 Thread Dan Eppinghoff

I've tried it with IE 5.5, Netscape 4.7, and Netscape 6.  All 3 give the same
result (null).
Any other ideas?  Is there any kind of config option in tomcat that would effect
this?

Dan


Kief Morris wrote:

 Dan Eppinghoff typed the following on 11:02 PM 1/17/2001 -0500
 Hello all,
I have a problem getting the "Referer" header from the request object in
 a JSP.  The
 only value I get for it is null.  I printed a list of the available headers
 (via
 getHeaderNames()) and this is the list I got:
 User-Agent
 Cookie
 Accept
 Host
 Accept-Encoding
 Accept-Language
 Connection
 
 Does anyone have an idea why I can't get "Referer"?

 Which browser? Some versions of IE (5?) don't set the referer.

 Kief

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Problem with getHeader(Referer)

2001-01-18 Thread Bill_Fellows/MO/americancentury



If they're not large, I'd like to see what the code is (sending and receiving
pages.)  If they're big, don't clutter the group but send 'em my way.

[EMAIL PROTECTED]





Dan Eppinghoff [EMAIL PROTECTED] on 01/18/2001 07:30:15 AM



Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Bill Fellows/MO/americancentury)
Subject:  Re: Problem with getHeader("Referer")



I'm going to the page via a link, not dialing direct.  Both methods leave with
with
a result of null;

[EMAIL PROTECTED] wrote:

 Are you direct dialing the page or are you clicking a link to see it?  i.e.
 {page1}
 ... a href="page2.jsp"foo/a ...

 {page2}
 ... % if (request.getHeader("referer") != null)
out.println(request.getHeader("referer"));
   else
   out.println("Referer == null Dig-it!");
 % ...
 Going from page1 to page2 should result in "page1.yourextension" being written
 to the screen.
 Hitting ^L (YMMV) or typing page2.jsp into your address bar will result in the
 second message.
 Does that help?
 /bill

 Dan Eppinghoff [EMAIL PROTECTED] on 01/17/2001 10:02:27 PM

 Please respond to [EMAIL PROTECTED]

 To:   [EMAIL PROTECTED]
 cc:(bcc: Bill Fellows/MO/americancentury)
 Subject:  Problem with getHeader("Referer")

 Hello all,
I have a problem getting the "Referer" header from the request object in a
 JSP.  The
 only value I get for it is null.  I printed a list of the available headers
(via
 getHeaderNames()) and this is the list I got:
 User-Agent
 Cookie
 Accept
 Host
 Accept-Encoding
 Accept-Language
 Connection

 Does anyone have an idea why I can't get "Referer"?

 Sincerely,
 Dan

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Problem with getHeader(Referer)

2001-01-18 Thread Craig O'Brien

Are you linking to the page or typing it in.  There is no referer if you
type it in;

I use:  request.getHeader(referer)   (Note that referer is all lowercase)
and get the referer fine in tomcat 3.2.1

Good luck,
Craig

-Original Message-
From: Dan Eppinghoff [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 5:32 AM
To: [EMAIL PROTECTED]
Subject: Re: Problem with getHeader("Referer")


I've tried it with IE 5.5, Netscape 4.7, and Netscape 6.  All 3 give the
same
result (null).
Any other ideas?  Is there any kind of config option in tomcat that would
effect
this?

Dan


Kief Morris wrote:

 Dan Eppinghoff typed the following on 11:02 PM 1/17/2001 -0500
 Hello all,
I have a problem getting the "Referer" header from the request object
in
 a JSP.  The
 only value I get for it is null.  I printed a list of the available
headers
 (via
 getHeaderNames()) and this is the list I got:
 User-Agent
 Cookie
 Accept
 Host
 Accept-Encoding
 Accept-Language
 Connection
 
 Does anyone have an idea why I can't get "Referer"?

 Which browser? Some versions of IE (5?) don't set the referer.

 Kief

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Problem with getHeader(Referer)

2001-01-17 Thread Bill_Fellows/MO/americancentury



Are you direct dialing the page or are you clicking a link to see it?  i.e.
{page1}
... a href="page2.jsp"foo/a ...

{page2}
... % if (request.getHeader("referer") != null)
   out.println(request.getHeader("referer"));
  else
  out.println("Referer == null Dig-it!");
% ...
Going from page1 to page2 should result in "page1.yourextension" being written
to the screen.
Hitting ^L (YMMV) or typing page2.jsp into your address bar will result in the
second message.
Does that help?
/bill






Dan Eppinghoff [EMAIL PROTECTED] on 01/17/2001 10:02:27 PM



Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Bill Fellows/MO/americancentury)
Subject:  Problem with getHeader("Referer")



Hello all,
   I have a problem getting the "Referer" header from the request object in a
JSP.  The
only value I get for it is null.  I printed a list of the available headers (via
getHeaderNames()) and this is the list I got:
User-Agent
Cookie
Accept
Host
Accept-Encoding
Accept-Language
Connection

Does anyone have an idea why I can't get "Referer"?

Sincerely,
Dan



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Problem with getHeader(Referer)

2001-01-17 Thread Kief Morris

Dan Eppinghoff typed the following on 11:02 PM 1/17/2001 -0500
Hello all,
   I have a problem getting the "Referer" header from the request object in 
a JSP.  The
only value I get for it is null.  I printed a list of the available headers 
(via
getHeaderNames()) and this is the list I got:
User-Agent
Cookie
Accept
Host
Accept-Encoding
Accept-Language
Connection

Does anyone have an idea why I can't get "Referer"?

Which browser? Some versions of IE (5?) don't set the referer.

Kief


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]