Foren

ActionResponse.sendRedirect always shows 404 Error

Ravi Kiran, geändert vor 11 Jahren.

ActionResponse.sendRedirect always shows 404 Error

Junior Member Beiträge: 53 Beitrittsdatum: 08.04.12 Neueste Beiträge
The ActionResponse.sendRedirect always shows 404 Error


public class SatPortlet extends MVCPortlet {

public void addBook(ActionRequest request, ActionResponse response) throws IOException {

if(true)
{

response.sendRedirect("/html/satportlet/view2.jsp");
}

else
{
response.sendRedirect("/html/satportlet/error.jsp");
}

}
}




I have this pages present inside the docroot where this view.jsp is present .

<init-param>
<name>view-jsp</name>
<value>/html/satportlet/view.jsp</value>
</init-param>


Also present in tomcat webapps context path .

But every time it enters the MVCPortlet Action class and the condition is matched i displays this 404 .
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: ActionResponse.sendRedirect always shows 404 Error

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
So do you have /html/satportlet/view2.jsp file? or am I missing the point of your question?
Ravi Kiran, geändert vor 11 Jahren.

RE: ActionResponse.sendRedirect always shows 404 Error

Junior Member Beiträge: 53 Beitrittsdatum: 08.04.12 Neueste Beiträge
Yes i do have that and i checked that , and also added this action-url-redirect to true also . .