From request you can only getAttributes. You can setAttribute to response. Isn't it ?
And if you want to check from which page this request originated, just include a hidden field in every page and set it's value with something unique to that page (page name?).
And in servlet, check the value of that hidden field.