Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ravi Kiran
ActionResponse.sendRedirect always shows 404 Error
April 14, 2012 1:22 PM
Answer

Ravi Kiran

Rank: Junior Member

Posts: 53

Join Date: April 7, 2012

Recent Posts

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 .
Hitoshi Ozawa
RE: ActionResponse.sendRedirect always shows 404 Error
April 15, 2012 4:17 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

So do you have /html/satportlet/view2.jsp file? or am I missing the point of your question?
Ravi Kiran
RE: ActionResponse.sendRedirect always shows 404 Error
April 15, 2012 11:12 AM
Answer

Ravi Kiran

Rank: Junior Member

Posts: 53

Join Date: April 7, 2012

Recent Posts

Yes i do have that and i checked that , and also added this action-url-redirect to true also . .