PDA

View Full Version : servlets: getHeader("Referer")



posterise
03-12-2007, 09:14 PM
if i have an html-page and want to define how user got to that page(by typing URL into address bar or from another page), i have to use request.getHeader("Referer") in a servlet, BUT how do i link this page with that servlet ? :confused:

Alex_3112
03-13-2007, 10:28 AM
if i have an html-page and want to define how user got to that page(by typing URL into address bar or from another page), i have to use request.getHeader("Referer") in a servlet, BUT how do i link this page with that servlet ? :confused:
What do you mean "link"? You want to map a URL into a servlet, programmatically?

posterise
03-13-2007, 03:36 PM
What do you mean "link"? You want to map a URL into a servlet, programmatically?

I mean "connect", "reference", svyazat`, like when you connect form and servlet through action="..."

Calling the Referer can be done only in servlet as I understand, in doGet or doPost methods, but these can not be called at the time when page is loaded. So, how am I going to get to those doGet, doPost methods on page load ? without any Javascripts.

Or, may be call to referer should be done somewhere else ? :confused: i don't understand....

Olezhik
03-16-2007, 08:42 PM
I mean "connect", "reference", svyazat`, like when you connect form and servlet through action="..."

Calling the Referer can be done only in servlet as I understand, in doGet or doPost methods, but these can not be called at the time when page is loaded. So, how am I going to get to those doGet, doPost methods on page load ? without any Javascripts.

Or, may be call to referer should be done somewhere else ? :confused: i don't understand....
Хватит страдать, занимайся своими прямыми обязаностями, а не самодетельностью.

posterise
03-16-2007, 10:17 PM
Хватит страдать, занимайся своими прямыми обязаностями, а не самодетельностью.

я задала нормальный вопрос, причем тут самодеятельность и кто страдает ? если не знаете как ответить так и скажите

Olezhik
03-17-2007, 04:22 PM
я задала нормальный вопрос, причем тут самодеятельность и кто страдает ? если не знаете как ответить так и скажите
Какой вопрос, такой ответ....

posterise
03-19-2007, 12:09 AM
Какой вопрос, такой ответ....

whatever....... :grum:
:evillaugh