This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

read from httpRequest put into httpResponse in Filter?

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • 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 ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 Redhat VI Editor
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic