[jsr369-experts] Re: [SERVLET_SPEC-16] Proposal: Programmatic equivalent to jsp-file

From: Edward Burns <edward.burns_at_oracle.com>
Date: Mon, 30 Jan 2017 15:03:01 -0800

>>>>> On Mon, 30 Jan 2017 12:58:21 -0800, Shing Wai Chan <shing.wai.chan_at_oracle.com> said:

SW> So, I suggest to add a new method to ServletContext, which is
SW> parallel to #addServlet as follows:

SW> ServletRegistration.Dynamic addJspFile(String jspName, String jspfile);

SW> The following example illustrates the usage of the new API:
SW> @WebListener()
SW> public class NewServletListener implements ServletContextListener {

SW> @Override
SW> public void contextInitialized(ServletContextEvent sce) {

SW> final ServletContext servletContext = sce.getServletContext();
SW> final ServletRegistration.Dynamic dynamic = servletContext.addJspFile(myjsp, /myjsp.jsp");
SW> dynamic.addMapping(/newjsp);
SW> ...
SW> }
SW> }

SW> Please let me know your comment.

I like this a lot better as well. Thanks for your counter proposal.

Shing-wai, I've assigned SERVLET_SPEC-16/GLASSFISH-21666 to you. Please
assign them back to me if you'd like me to implement them.


| edward.burns_at_oracle.com | office: +1 407 458 0017
| 26 business days until planned start of JSF 2.3 Final Approval Ballot
| 16 business days until DevNexus 2017
| 41 business days until JavaLand 2017