servlet redirect

B

Bob

when you use a redirect in a servlet is there some way to get the address of
the page it redirected from.
 
S

SMC

when you use a redirect in a servlet is there some way to get the address of
the page it redirected from.

You could check the Referer header:

request.getHeader("Referer")
 
O

Oliver Wong

SMC said:
You could check the Referer header:

request.getHeader("Referer")

Note though that this info comes from the client, who can lie to you. So
don't count on it for security purposes; only use it to provide a convenient
but non-critical feature to the user.

- Oliver
 

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,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top