Depends on the intended purpose and the rest of the surrounding code.
Mark Wa
Ranch Hand
Joined: May 29, 2009
Posts: 122
posted
0
Its intended to redirect to the url contained within the string. Nothing else is being done with the response object. I dont understand how that could work though
Mark Wa wrote:Its intended to redirect to the url contained within the string. Nothing else is being done with the response object. I dont understand how that could work though
Again, it depends on what else is done with it, the surrounding HTML, etc.
Mark Wa wrote:Its intended to redirect to the url contained within the string. Nothing else is being done with the response object. I dont understand how that could work though
Again, it depends on what else is done with it, the surrounding HTML, etc.
@Hebert: Huh?
Trying to be sure that he is doing nothing more with the attribute. I don't know with method he is inside or what is he using.
Just to check the ending of the code! [=
It displays the url in the browser (ff) display pane. Yet when I switch it to response.sendRedirect() it works. but that is only on my local server. My colleague is adamant it works on the production server. Is there anyway this could work in some browsers? Perhaps IE is trying to be clever and realises as there's a response of only a URL, go there?
Mark Wa
Ranch Hand
Joined: May 29, 2009
Posts: 122
posted
0
@herbet: the only thing after wrting to the response is "return null;"
That's not a servlet. In any case, since the action is returning null, I would expect nothing more than the URL string to show up in the response. It's trivial to test why that isn't happening on the prod machine (if it really isn't) by making the request through a logging proxy and seeing what, precisely, is being sent, and what's coming back.
But since it's Struts, there could be something in a custom request processor as well: this is why details are *important*.
Mark Wa
Ranch Hand
Joined: May 29, 2009
Posts: 122
posted
0
Thanks for the reply David.
Its not possible to test on the production server as the part of the app here is post-payment. However locally it's possible to spoof the payment. I will try to get it tested in firebug/fiddler. There is no custom request processor.
That is what I expected too. I just wanted to confirm that this was a strange and maybe not the best way of forwarding. I also dont understand how it could be working unless the browser is interpreting as a redirect, to which it is not.
@Hebert: what the code is doing is clear. What is not clear is how it's working once the response is on the wire.
Mark Wa
Ranch Hand
Joined: May 29, 2009
Posts: 122
posted
0
Looks like the request was not coming from the user's browser, but from a 3rd party server. Solved. The third party server is recieving the response and re-directing the users browser.