Foros de discusión

ActionResponse.sendRedirect always shows 404 Error

Ravi Kiran, modificado hace 11 años.

ActionResponse.sendRedirect always shows 404 Error

Junior Member Mensajes: 53 Fecha de incorporación: 8/04/12 Mensajes recientes
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, modificado hace 11 años.

RE: ActionResponse.sendRedirect always shows 404 Error

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
So do you have /html/satportlet/view2.jsp file? or am I missing the point of your question?
Ravi Kiran, modificado hace 11 años.

RE: ActionResponse.sendRedirect always shows 404 Error

Junior Member Mensajes: 53 Fecha de incorporación: 8/04/12 Mensajes recientes
Yes i do have that and i checked that , and also added this action-url-redirect to true also . .