/servlet/JaxcentServlet20(unless the jaxcent20.js file is modified.)
The compiled code for the servlet is available in JaxcentFramework20.jar and Jaxcent20.jar. These jar files need to be put in the classpath for your servlet container (also known as Java application server.) The steps for this would vary depending upon the servlet container. In Tomcat, you can do this by copying these files to the lib folder.
The servlet needs to be configured in the web.xml file. The url-pattern for the servlet is /servlet/JaxcentServlet20, and the servlet-class is jaxcentServlet.JaxcentServlet. In addition, you need to provide some init-parameters, as follows:
JaxcentConfigXML | Path to a config XML file, which will contain the path mappings for Jaxcent. Similar to the servlet mappings, Jaxcent maps URLs to Java classes that it then loads, to process those URLs. This parameter is required. |
ReloadableClasses | Classpath for Jaxcent. The classes you write for Jaxcent, will be loaded from this classpath. You can also provide these classes to the application server, but during development it is recommended that you give the classes to Jaxcent directly. Jaxcent will reload these classes whenever they change. If you reload them using the application server, the context may get reloaded, which will break any existing Jaxcent connections. If Jaxcent does the reloading, existing web pages will continue using the old code, but when the page gets loaded again or refreshed, the new code will be used. This paramter is not required, but is recommended. |
A sample portion of a web.xml file containing a Jaxcent servlet configuration is shown below.
<servlet> <servlet-name>JaxcentServlet</servlet-name> <servlet-class>jaxcentServlet.JaxcentServlet</servlet-class> <init-param> <param-name>JaxcentConfigXML</param-name> <param-value>C:\Jaxcent\samples\JaxcentSampleConfig.xml</param-value> </init-param> <init-param> <param-name>ReloadableClasses</param-name> <param-value>C:\Jaxcent\samples</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>JaxcentServlet</servlet-name> <url-pattern>/servlet/JaxcentServlet20</url-pattern> </servlet-mapping>When the servlet is correctly configured, visit the URL http://localhost/servlet/JaxcentServlet20 (changing the domain name as appropriate) in a browser, to make sure the servlet is working as expected.