This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 : modify response header

 
Sam Rakshit
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I modify an already set response header?

This is required for an application which behaves like this -

Client C talks to server A in a different syntax and server A sends the request to server S ( struts2 server) . Now after a successful login, i am using a actionRedirect to take the user to the Home page whose URL is like this : http:/mywebserver.com/secure/home . So, struts2 sets the Location header to this URL. But, server A expects us to write the URL in the form >> Location: widget:secure/home or Location: http://mobileapp.com/secure/home

So, I want to edit the header by replacing the mywebserver.com with mobilesite.com and keep the rest of the value intact.

How can I do that in struts? what sort of interceptor I must use? Or is it possible at all?
 
M Turner
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if this will work for you, but here's an example from one blogger on how to modify the response object by using a custom interceptor:

http://omkarp.blogspot.com/search/label/Struts%202

Good Luck
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic