Reading the rest of your message, regarding the AJAX equivalent of
jsp:useBean, you'll need a servlet that can respond to AJAX requests for
session bean information handing back XML fragments with session data in
them. Then your AJAX code on the client would use that to pull XML
fragments containing session bean data. Might even want the servlet to
do the reverse as well and process GET or POST requests to update
session info.
--David
David Smith wrote:
Let's remove AJAX from the equation and take a look at it. AJAX is
client side code acting on behalf of the user, so it should be
regarded essentially the same as the browser itself when it comes to
object access. Where people tend to get confused is in where the code
is being executed -- on the server or on the client.
If your "servlet" is executing on the server, than access from AJAX is
no different than access from your web browser. Whether the servlet
is in a jar or not makes no more difference than if you accessed the
servlet via the browser's address bar. Place the jar in WEB-INF/lib,
define the servlet and it's url mapping in web.xml; all done.
If your "servlet" is executing on the client within the browser (ie an
applet) -- then it needs to be stored outside of the WEB-INF
directory, but still inside your webapp and you don't need to touch
the WEB-INF/web.xml file for anything. Just need to setup the correct
applet tags in your web pages.
--David
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@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]