• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

read from httpRequest put into httpResponse in Filter?

 
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post
I am looking to understand how I can read something from a httprequest and then add the same parameter to that request httpresponse.
Is it possible to put my own parameters into http header using this way?

for example request A come for filter F and then in filter F I read parameter p from the request A, request will go into endpoint servlet and come back, when it come back I put PP into the response header which is going toward client.

Thanks
[ December 03, 2007: Message edited by: Bear Bibeault ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Parameters and headers are two separate things.
Can you explain, exactly what you are trying to do?
There might be a more standard way of doing it.
 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Thank you for reply.
I want to interpert each request to see whether an specefic httpRequest header attribute like request-number is present or not. if it is present I want to store the number and then let the request go to servlet. when the response of this request come back from the servlet I want to increment request-number and let the response go to client.
before i increment the request-number I will check to see what is inside the response.

Thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Again form/querystring parameters and HTTP request headers are two different things.

Headers, for the most part, are something that we, as application developers, don't get too involved with. They're generally treated as a low level part of the HTTP protocol.

What are you using for a client? A web browser?
Or have you written something custom?
 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for reply.
I do not want to use QueryString or add changes to real content of the response, But I exchange some values between client (an specific client, it is not a browser) and the server.

The scenario or this exchange is like what I explained in my first post.


Thanks for your time.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
reply
    Bookmark Topic Watch Topic
  • New Topic