Forums Register Login

SendRedirect() Method dosn't work in portal jsp file ....?

+Pie Number of slices to send: Send
I am new to portlets development(WebSphere Portal). I am trying to use redirect Method in jsp file in portal to another URL (www.any.com).
I have written the following code in jsp file

class="com.zak.moi.knet.paymentgatway.e24PaymentPipe" scope="request" />
String payID =e24PaymentPipe.getPaymentId();
String payURL =e24PaymentPipe.getPaymentPage();
response.sendRedirect( payURL + "?PaymentID=" + payID );
this code dosn't work and didn't give me any exception and portal page
appear empty without any thing .

please any body help me.....!
+Pie Number of slices to send: Send
Amr,

do you use JSR 168 or the IBM API (WebSphere portal provides two programming models)?

In JSR 168 a redirect is only possible in the action phase of the life cycle, i.e. if a the processAction method is called.

javax.portlet.ActionResponse.sendRedirect(String location)

In a JSP, which is included during a render call, you can't send a redirect (even if the implicit object "request" within the JSP allows you to call that method). This is because more than one portlet may be located on the portal page. If some of them send a redirect during the render phase it is not clear what should happen to the clients browser.

I am not sure, but I assume the situation is similar to the old IBM portlet API.

Greetings from Hamburg,
Stefan
[ January 05, 2006: Message edited by: Stefan Zoerner ]
I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 4701 times.
Similar Threads
assigning a java variable to a table value
upload files to CMS using portal controllers
A question about Tomcat in IIS,The Session is not effect!! Please help!
need Help
Need help
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:31:10.