Adding Servlets Redux

Hi Nick , I'm trying to Make MyServlet for First Time but i get error when use "addServlet" Method ,it dosen't work can you help!?

{ Moved to a new topic. Nick hasn't been doing anything with Ignition for a few years--and the topic was even older. }

The error you are getting suggest that your Servlet class doesn't extend HttpServlet. Show your servlet class.

Also, now-a-days, that method is no longer in the context interface. Here's a snippet from my Image Streamer module:

context.getWebResourceManager().addServlet("streamer", StreamerServlet.class);

Thanks Phil I'll try that

And this is my servlet class to print just "HelloWorld"

You're trying to call context.addServlet, and if you look at Phil's example you should be calling context.getWebResourceManager().addServlet instead.

1 Like