getting a referring url?

T

tiewknvc9

Hi!

Im simply trying to do a security check by ensuring that the user
accessed my servlet from within my domain. (yes I know, it is a poor
choice, but I have others in place, and feel that every little bit
helps).

So... how can I retrieve the referring url?

I assume it would be part of the request... but I know little of
servlets, and am just finalizing some functionality.

THanks!!!
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

tiewknvc9 said:
Im simply trying to do a security check by ensuring that the user
accessed my servlet from within my domain. (yes I know, it is a poor
choice, but I have others in place, and feel that every little bit
helps).

So... how can I retrieve the referring url?

I assume it would be part of the request... but I know little of
servlets, and am just finalizing some functionality.

Try:

request.getHeader("referrer")

Arne
 
R

Rogan Dawes

Arne said:
Try:

request.getHeader("referrer")

Arne

You have spelled that correctly, but it is incorrect! ;-)

request.getHeader("referer")

The folks that wrote the RFC spelled it incorrectly, and now it is cast
in stone . . . .

Rogan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top