留言板

ActionResponse.sendRedirect always shows 404 Error

Ravi Kiran,修改在11 年前。

ActionResponse.sendRedirect always shows 404 Error

Junior Member 帖子: 53 加入日期: 12-4-8 最近的帖子
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,修改在11 年前。

RE: ActionResponse.sendRedirect always shows 404 Error

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
So do you have /html/satportlet/view2.jsp file? or am I missing the point of your question?
Ravi Kiran,修改在11 年前。

RE: ActionResponse.sendRedirect always shows 404 Error

Junior Member 帖子: 53 加入日期: 12-4-8 最近的帖子
Yes i do have that and i checked that , and also added this action-url-redirect to true also . .