JSF 프로그램을 실행할 때 다음 예외가 있습니다.java.lang.IllegalStateException : 부모가 null이 아니지만이 구성 요소와 관련이 없음
org.apache.jasper.JasperException: An exception occurred processing JSP page /pages/general/internalServerErrorPage.jsp at line 44
41: <link rel="shortcut icon" href="<%=request.getContextPath()%>/resources/images/infomindzicon.ico" type="image/x-icon" />
42: </head>
43: <body id="sscmsMainBody">
44: <h:form id="internalServerErrorPageForm" binding="#{ServerErrorBean.initForm}">
45: <rich:page id="richPage" theme="#{LayoutSkinBean.layoutTheme}"
46: width="#{LayoutSkinBean.layoutScreenWidth}"
47: sidebarWidth="0">
Caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: java.lang.IllegalStateException: Parent was not null, but this component not related
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
at org.apache.jsp.pages.general.internalServerErrorPage_jsp._jspService(internalServerErrorPage_jsp.java:207)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
이 예외의 의미는 무엇이며 어떻게 해결할 수 있습니까?
업데이트 : 내 코드는 다음과 같습니다, 유효성 검증 세션 방법이
public HtmlForm getInitForm() {
validateSession();
return initForm;
}
private void validateSession() {
HttpSession session = null;
try {
FacesContext facesContext = FacesContext.getCurrentInstance();
actionPanelRendered = false;
if (facesContext != null) {
session = (HttpSession) facesContext.getExternalContext().getSession(false);
if (session != null) {
if (session.getAttribute(SessionAttributes.USER_LOGIN_NAME.getName()) != null) {
actionPanelRendered = true;
}
}
}
} catch(Exception e) {
logger.info("Exception arise in server error bean");
e.printStackTrace();
}
}
그것은 따라서 다음 줄에서오고
안녕 Baluc, 귀하의 빠르고 멋진 답장을 보내 주셔서 감사합니다. 내 getInitformvalidate 세션, 아래 코드를 추가했습니다 –
대답 업데이트 참조하십시오. – BalusC
Hi BalusC, 업데이트 해 주셔서 감사합니다. 이미 양식에 f : view 태그를 추가했습니다. 다른 이유가 있습니까? –