Services for J2EE applications

EasyConf offers some services useful when developing J2EE applications. All services are implemented both as a Servlet and as a Struts action.

To have access to the Servlet services it is necessary to add the necessary configuration to the web.xml file of the application. It is strongly recommended that the apropriate permisions are specified to prevent unauthorized access to these services.

To have access to the Struts Action services it is necessary to add a mapping to the struts.xml file of the application.

Currently there is only one service, the refresh configuration service.

Refresh configuration service

New in version 0.9.0

Manually refresh the configuration of either one specific component or all the configuration components. This service can receive one parameter: componentName. If a parameter with that name is found it's configuration will be removed from the cache. If it does not existe the command is ignored.

If no parameter called componentName is found, all configurations will be deleted from the cache.

Note this service will delete cache entries and the configuration will actually be reloaded on a one by one basis the next time the applications asks for the configuration of some component.

Controlling the output

  • Struts action: The struts action returns SUCCESS as a forward always. It is left to you to create the JSP page that will create the HTML to be returned to the user when this action is called.
  • Servlet: The servlet returns a very basic HTML response to the user with a message in english. You can modify this response by subclassing the servlet and overriding the method writeSuccessResponse(HttpServletResponse response, String componentName)