Results 1 to 1 of 1
Thread: getHeader('referer') question
- 08-07-2014, 06:46 PM #1Member
- Join Date
- Aug 2014
- Rep Power
I have a servlet survey application I have been working on. My problem is that request.getHeader('referer') is not getting the right referal url the first time it access the application.
However the second time(or any other time) it does get the correct one.
The first time the application requires a user to take a survey, and then redirects them to the resource url. The second time it only redirects the user to the resource, since they have already taken the survey. I have 2 java files handling the take.survey logic, and the second one just redirecting and logging information (survey.logic)
Both routine files use request.getHeader('referer'). The first time the user is required to take the survey(take.survey).
As I said before, the app will record on the database the target url, instead of the referral url. The second time it runs smoothly, and gets the correct referral information.
I am calling the app from a page with the following address:
refering page: thispage.com
The app resides at:
The following link is inserted into thispage.com to access the app:
1st time of clicking link it records: app/take.survey?url=http://google.com
2nd time of clicking link it gets the right value: thispage.com
3rd time correct value,and so.
Again, both files use: request.getHeader('referer') to get the referral value.
Last edited by albertozurita; 08-07-2014 at 06:49 PM.
- By pseeburger in forum Suggestions & FeedbackReplies: 2Last Post: 05-25-2012, 04:00 PM
- By Fubarable in forum New To JavaReplies: 2Last Post: 11-18-2011, 02:14 AM
- By jeremy.wilson in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 05-19-2011, 12:44 PM
- By berkdulger in forum Java ServletReplies: 1Last Post: 07-17-2007, 04:59 PM
- By berkdulger in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 07-17-2007, 01:25 PM