Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3627146
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:51:05+00:00 2026-05-18T23:51:05+00:00

I have the following exception at the time of running JSF program. org.apache.jasper.JasperException: An

  • 0

I have the following exception at the time of running JSF program.

    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)

What is the meaning of this exception and how can I resolve this?


Update: My code is below,

public HtmlForm getInitForm() {
    validateSession();
    return initForm;
}

The validate session method is

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();
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T23:51:05+00:00Added an answer on May 18, 2026 at 11:51 pm

    It’s thus coming from the following line:

    <h:form id="internalServerErrorPageForm" binding="#{ServerErrorBean.initForm}">
    

    You’ve bound the form to the bean for some unknown reason. The exception indicates that this component has a parent, but that this is actually not a parent at all as per the component tree in the JSP page. This in turn indicates that you’re doing something like the following in the bean before or during the call of getInitForm() method:

    form.setParent(someComponent);
    

    If this is true, then you should remove this line.


    Update: another possible cause is that you’re forgotten to put a <f:view> around the HTML with the JSF components.


    Update 2: one more cause is that you’re binding multiple and physically different <h:form> components to one and same bean property. They should each be bound to their own unique property (or in this particular case, not be bound at all, this can be done better, see below).


    Unrelated to the problem, as to your validateSession method, the entire method can be simplified to the following single EL expression in the view:

    rendered="#{not empty user.name}"
    

    assuming that SessionAttributes.USER_LOGIN_NAME equals to user.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following simple JSP running in Tomcat 7. Nothing else in the
I have following exception in the foreach loop Unable to cast object of type
I have seen the following exception case several times public SomeClass(IEnumerable<T> someValues) { if
I have the following error Exception in thread main javax.naming.NameNotFoundException: CounterBean not bound trying
I am getting the following exception: Nullable object must have a value Everything was
I have a custom sharepoint web part that is throwing the following exception: System.Security.SecurityException:
I have this timer function, it gives me following exception. Collection was modified; enumeration
I have created mock: GuiExHandler mockGuiEx = EasyMock.createMock(MockedClass.class); And Im getting following exception: Testcase:
when i run my application, i get following exception. I have no problem with
I have the following text, I need to extract the exception name and the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.