"HelloWorld" servlet

Hi

I tryed to deploy a simple “Hello World” servlet without success. How do I configure the web.xml file and where should I put my HelloWorld.class file?

Thanks

Hi Franck,

I have no idea why you want to deploy a HelloWorld servlet in Openfire, but you could create a plugin as described in Openfire Plugin Developer Guide with a servlet.

LG

Because that’'s help me to understand how to deploy my own custom webapp, a web based chat client in fact, running on Tomcat.

I think you should deploy your servlet directly into the OpenFire embedded application server (Jetty).

It will be great if someone could explain exactly where and how to deploy it.

Hey Gal,

The link provided by it2000 is the correct source of information. There you will see that it talks about WAR files. Openfire plugins could be either WAR or JAR files. They just need to follow the structure described in the plugin guide. Drop them in the plugins folder and Openfire will pick them up.

– Gato

There are some cases when a separate webapp deployment might be needed.

These cases could be, for example, when you want to have separate

namespace/context and/or port dedicated for your webapp.

One solution is to run your webapp via external application server such as

Tomcat. But than it cause too much overhead to run 2 application servers and waste

of resources.

Deploying wars in openfire’s jetty is possible via HttpBindManager class. I

have a hardcode solution.

Nevertheless, before I will post any concrete example, I would like to know

if there is any way to add a module to the Jetty server? (like in XMPPServer class, methods initModules/startModules)

If so than we can build a plugin which load wars and deploy than at certain

context and port.

Please read my answer above.

So, here’s my use case.

I have a plugin that contains a REST interface which receives PUT updates, notifying a specific JID of another presence. There is an outside service that has created a “link” between two clients and needs to notify them - via a new “group” loaded with the other JID.

I need the HttpServlet to receive the doPut(). I’m not sure I can do this from the specified JSP. I’m used to have a /context which is the mapping from the Servlet. Am I just missing this?

Kit