# Adding Servlets Redux

**URL:** <https://forum.inductiveautomation.com/t/adding-servlets-redux/65570>\
**Category:** Module Development\
**Created:** [October 23, 2022, 1:22am UTC](https://forum.inductiveautomation.com/t/adding-servlets-redux/65570 "2022-10-23T01:22:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmed\_mohamed](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ahmed_mohamed/32/53025_2.png) [@Ahmed\_mohamed](https://forum.inductiveautomation.com/u/Ahmed_mohamed)\
**Post date:** [October 23, 2022, 1:22am UTC](https://forum.inductiveautomation.com/t/adding-servlets-redux/65570/1 "2022-10-23T01:22:36Z")

</div>

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!?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/2/72ce1562acb1a3f494e9219e7c62ed989bedb3fe.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 23, 2022, 1:53am UTC](https://forum.inductiveautomation.com/t/adding-servlets-redux/65570/2 "2022-10-23T01:53:41Z")

</div>

{ 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:

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

```

---

<div class="post-metadata">

**Author:** ![Ahmed\_mohamed](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ahmed_mohamed/32/53025_2.png) [@Ahmed\_mohamed](https://forum.inductiveautomation.com/u/Ahmed_mohamed)\
**Post date:** [October 23, 2022, 1:58am UTC](https://forum.inductiveautomation.com/t/adding-servlets-redux/65570/3 "2022-10-23T01:58:36Z")

</div>

Thanks Phil I'll try that

---

<div class="post-metadata">

**Author:** ![Ahmed\_mohamed](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ahmed_mohamed/32/53025_2.png) [@Ahmed\_mohamed](https://forum.inductiveautomation.com/u/Ahmed_mohamed)\
**Post date:** [October 23, 2022, 2:07am UTC](https://forum.inductiveautomation.com/t/adding-servlets-redux/65570/4 "2022-10-23T02:07:10Z")

</div>

> [@pturmel](#):
>
> Also, now-a-days, that method is no longer in the conte

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

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/5/456c1da775b2e990b6f1410e3db534db052a3de3.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 23, 2022, 10:37am UTC](https://forum.inductiveautomation.com/t/adding-servlets-redux/65570/5 "2022-10-23T10:37:39Z")

</div>

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