We're updating the issue view to help you get more done. 

PluginServlet.java_support_registering_servlets_programmatically.patch

Description

I don't think that the current way of parsing a subset of the web.xml allows for good dependency injection on the servlets and nice error detection during a plugin's initialization.
This patch adds support for registering servlet programmatically from plugins.

The followg snippet is an example of how I am using this:
MyServlet servlet = new MyServlet();
servlet.setMyPlugin(this);
this.publicUrl = PluginServlet.registerServlet(manager, this,
servlet, THE_URL);
servlet.setUrl(this.publicUrl);
servlet.init();
AuthCheckFilter.addExclude(this.publicUrl);

Environment

Linux

Acceptance Test - Entry

None

Activity

Show:
Daryl Herzmann
February 13, 2014, 9:52 PM

Assigning to next release in hopes of a code review.

Daryl Herzmann
April 27, 2014, 5:13 PM

Hi Tom, Would you kindly provide some comments on this patch? Thanks

Tom Evans
April 28, 2014, 5:12 PM

Seems pretty straightforward, not a significant departure from what we already allow via configuration (web.xml).

Tom Evans
April 28, 2014, 5:39 PM

Applied patch as provided.

Assignee

Tom Evans

Reporter

Andrea Ratto

Labels

Expected Effort

None

Ignite Forum URL

None

Components

Fix versions

Affects versions

Priority

Minor
Configure