Turn off 'restartApplication' param

Hi,

How to turn off ‘restartApplication’ param? When the user enter the http://host/webapp/?restartApplication, it will do nothing.

Thanks.

I think you can do that by overriding the findApplicationInstance() method. Extend ApplicationServlet, override the method, copy+paste the original implementation from AbstractApplicationServlet, and remove the restartApplication handling.

To use the custom application servlet class, use it in your web.xml instead of the normal ApplicationServlet.

Oops, findApplicationInstance() is private, you can’t override it…

I think could override the service() method and use a different method there in place of the findApplicationInstance(). Perhaps you could also override it, remove the parameter from the request object, and then call the default implementation. Then you wouldn’t need to copy the entire default implementation.

It gets a bit messy. I’m not 100% sure that there is no easier way, but the parameter looks rather hard-coded.

Thank you.