Community
Participate
Working Groups
Usually, application entrypoints should be available at a certain path. Currently, for an entrypoint to be available at the path "/context/dashboard" (with "/context" being the application's path), it has to be registered like this: public void configure( ApplicationConfiguration configuration ) { configuration.addEntryPoint( "default", EntryPoint.class ); configuration.addBranding( new AbstractBranding() { public String getServletName() { return "dashboard"; } } ); } I think that the registration path is more a matter of the entrypoint registration than of the branding. Therefore, I would propose to change the semantics of the addEntryPoint methods to accept the path as their first parameter: void addEntryPoint( String path, Class<? extends IEntryPoint> entryPointType ); void addEntryPoint( String path, IEntryPointFactory entryPointFactory ); This would reduce the above code to: public void configure( ApplicationConfiguration configuration ) { configuration.addEntryPoint( "dashboard", EntryPoint.class ); } If we follow this proposal, this would render some methods in AbstractBranding obsolete. I'd suggest to address this in a separate bug.
Changed ApplicationConfiguration to accept *paths instead of names* in registerEntryPoint(). The paths must follow the same pattern as used in HttpService's register methods. They must begin with a slash, but not end with a slash. Currently, neither the root path ("/") nor nested paths are supported. Here's an example of registering an entry point to be accessible at http://host/dashboard : public void configure( ApplicationConfiguration configuration ) { configuration.addEntryPoint( "/dashboard", DashboardEntryPoint.class ); } Added a "path" attribute to the entrypoint extension point and deprecated the old "parameter" attribute. With these changes in place, entry points should not be registered by name anymore (see also bug 371935).