Annotation Type InitMethod


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface InitMethod
    Designates a method corresponding to the portlet API init method. The annotated method must have the following signature:

    public void <methodName>(PortletConfig) throws PortletException

    where the method name can be freely selected.

    the init method is called by the portlet container to initialize the portlet when it is being placed into service.

    The portlet container calls the init method exactly once after instantiating the portlet. The init method must complete successfully before the portlet can receive any requests.

    The portlet container cannot place the portlet into service if the init method

    1. Throws a PortletException
    2. Does not return within a time period defined by the portlet container.
    Since:
    3.0
    See Also:
    Portlet.init(jakarta.portlet.PortletConfig)
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String value
      The portlet name for the annotated method.
    • Element Detail

      • value

        String value
        The portlet name for the annotated method.
        Returns:
        The portlet name