Hi,
I am new to Jersey. I tried a lot with the following problem but could not resolve it. May be it is naïve for you people.
Requirement:
I have a resource class with 2 methods. One method has an annotation of @Get and another method @Post.
The URI of the of GET method will be
http://................../42341.
The last number 42341 is treated as PathParam in the method. This method returns an XML object. This XML is then showed in the browser.
Now with respect second method @Post, I send 4 parameters as @FormParam. Some logic is executed.
In this logic, I am trying to a build a number lets say 4555. Then I need to call 1st method.
For this I am a contructing a URI like
http://...................................../4555.
The execution is then should be redirected. The request in redirected to the first method with input as 4555.
Now the final XML object / schema shows up on the screen.
Issue:
The issue lies in the last part, that is, trying to redirect. I tried with following code. Both did not work.
Option1 :
After contructing the URI, Response.temporaryRedirect(uri).build();
Option 2:
Using ResponseBuilder.contentLocation() then ResponseBuilder.Build()
Could any one please let me how to do redirect without informing the user
Regards and thanks,
Muruganandan
'When you want something badly enough, the whole world conspires to give it to you'
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com