Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
Page forward from one page to another page
Migrateduser
Hi I need to forward response from one page to another page , for that we are using
return new Http302ForwardAction(new FullUrlTarget(page)); in controller component.
but this is causing HTTP 302 response on CDN(amazon webservice) which dont accept HTTP 302, I am trying to replace Http302ForwardAction with RequestDispatcherForwardAction, not able to get the correct syntax.
I was trying as below, but it is giving HTTP 404 on livesite when it try to redirects to second page. Page it is trying to redirect is /en_TH/search.page, which is not there, it should instead redirect to /en_TH/search/search.page. Below is the method used.
public ForwardAction forwardToPicoSearch(RequestContext context)
{
BaseRequestContext baseContext = (BaseRequestContext) context;
String page = context.getPageLink("search/search");
System.out.println("Controller=>forwardToSearch page url:" +page.toString() );
return new RequestDispatcherForwardAction(new ContextRelativeTarget(new FullUrlTarget(baseContext.getRequest(), new ServerRelativeTarget(page))));
}
Let me is this is the correct syntax?
Thanks in advance
Find more posts tagged with
Comments
There are no comments yet