2012-05-12 2 views

답변

4

jsp의 리다이렉션은 아래의 jsp- 파싱이 아래의 단계를 렌더링하고이 단계가 내용을 표시하기 때문에 개념적으로 적절하지 않습니다.

반면에 조치 단계에서 아래로 리디렉션하면 여기에서 포틀릿이 다음에 수행 할 작업을 결정할 수 있습니다. 따라서 http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/understanding-the-two-phases-of-portlet-execution

, 포틀릿의 processAction 메도에서 리디렉션을 넣어 :

은 포틀릿의 두 단계를 이해하고 더 나은이 튜토리얼 읽기 그렇지

@Override 
public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException { 
    //defaultLandingPage = ... 
    actionResponse.sendRedirect(defaultLandingPage); 
}; 

을, 당신은 정말이 내부를 수행하려는 경우

<liferay-util:include page="second.jsp" /> 
0

response.sendRedirect ("");

경로는 상대 경로이거나 절대 경로이거나 서버 루트와 관련 될 수 있습니다. 또한 응답이 이미 커밋 된 경우에는 작동하지 않습니다.

2
<portlet:renderURL var="other"> 
    <portlet:param name="jspPage" value="/jsp/b.jsp"/> 
    </portlet:renderURL> 
    <a href="<%=other%>">other</a> 
: JSP, 첫 번째 JSP에서 두 번째 JSP를 포함 할 수 있습니다
관련 문제