Announcement Announcement Module
Collapse
No announcement yet.
HttpServletBean init() question Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HttpServletBean init() question

    In HttpServletBean class line 84 init() method:
    Code:
    catch (BeansException ex) {
        logger.error("Failed to set bean properties on servlet '" + getServletName() + "'", ex);
        throw ex;
    }
    The BeansException ex is thrown again. If I misconfig a jar file, this will bomb out without sending any message to the screen(a blank screen), I am wondering whether this ex should be converted to something that servlet containers would know and thus send a proper message to the screen, rather than a blank screen.

    My case was that I was trying to remove some unnecessary jar files.

    Thanks,
    Rick

  • #2
    The BeansException is thrown at servlet-startup time, so you should see it in your console or error log. Do you mean that any request to the servlet that failed starting up will generate a blank screen now, not showing any exception?

    Comment


    • #3
      I didn't load spring servlet during startup...

      I didn't load the servlet during startup, only load it when a req comes in, that's when a blank page is shown.

      Comment


      • #4
        Does that mean you're happy with preloading the servlet? I usually like to initialize as much as possible when starting the server to know upfront when thing fail.

        Alef

        Comment


        • #5
          I have no problem to make the servlet loaded during startup. Just report this scenario. A servlet error should be informed to the servlet container, so a 500 error could be generated to the client, rather than a blank page instead. But it's just my view, I am not picking on something, just try to make it better.

          Comment


          • #6
            How did you configure the HttpServletBean?
            I can't get the init method to be called and am unable to find any documentation about how to configure this class.
            thx

            Comment

            Working...
            X