Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > servlet redirect

Reply
Thread Tools

servlet redirect

 
 
Bob
Guest
Posts: n/a
 
      05-23-2006
when you use a redirect in a servlet is there some way to get the address of
the page it redirected from.


 
Reply With Quote
 
 
 
 
SMC
Guest
Posts: n/a
 
      05-23-2006
On Tue, 23 May 2006 11:57:45 +1000, Bob wrote:

> 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")

--
Sean


 
Reply With Quote
 
 
 
 
Oliver Wong
Guest
Posts: n/a
 
      05-24-2006

"SMC" <(E-Mail Removed)> wrote in message
news(E-Mail Removed).. .
> On Tue, 23 May 2006 11:57:45 +1000, Bob wrote:
>
>> 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")


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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Offending class: javax/servlet/Servlet.class chamikara Java 1 06-19-2004 05:42 AM
Basic Q - Response.Redirect, all redirect to first Response.Redirect statement Sal ASP .Net Web Controls 1 05-15-2004 03:46 PM
Servlet question(Tomcat, web.xml, servlet-class, servlet-name) circuit_breaker Java 2 04-04-2004 03:26 AM
Tomcat: POST from one servlet or internal class to another servlet Sean Clarke Java 1 01-07-2004 02:22 PM
how to get my servlet configuration before the servlet is initialised Andy Fish Java 4 12-17-2003 09:47 PM



Advertisments