By Date: <-- -->
By Thread: <-- -->

Servlet in a .jar file? AJAX access?



Yes, certainly you can put a servlet in a JAR... after all, Struts is based on a servlet, and you generally just drop the Struts JAR into your webapp... accessing a servlet via AJAX is, in simplest terms, just a plain old HTTP request like any non-AJAX request, so yes, you can do that too.

If your servlet is in a JAR, and that JAR is in the classpath, then all you need to do is put the appropriate entries in web.xml and your off to the races... if you want to call it via AJAX, that works just fine too, if you just pass simple name/value pair parameters.

Does that answer your question, or did I misunderstand?

Frank


-- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: fzammetti (at) hotmail.com Author of "Practical Ajax Projects With Java Technology" (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it!

Jon Yeargers wrote:
Is it possible to put a servlet in a .jar file and be able to access it via AJAX?

I have some support servlets that I want to share via a common library. To this point Ive only been putting session beans in there. Its easy to point to those using '<jsp:usebean' tags and entries in 'web.xml'. Can I do something similar to a servlet such that I can get to it via an XMLHttpRequest object?

Jon

---------------------------------------------------------------------
To start a new topic, e-mail: users (at) tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe (at) tomcat.apache.org
For additional commands, e-mail: users-help (at) tomcat.apache.org






---------------------------------------------------------------------
To start a new topic, e-mail: users (at) tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe (at) tomcat.apache.org
For additional commands, e-mail: users-help (at) tomcat.apache.org