spring-framework / org.springframework.mock.web / MockServletContext / setDefaultServletName

setDefaultServletName

open fun setDefaultServletName(defaultServletName: String): Unit

Set the name of the default Servlet.

Also unregisters the current default RequestDispatcher and replaces it with a MockRequestDispatcher for the provided defaultServletName.

Parameters

defaultServletName - the name of the default Servlet; never null or empty

See Also
#getDefaultServletName