Overview Product Tour Registration FAQs |
This guide is help you deploy components in DivertServlet
1. Divert.html and divert.jarYou can place Divert.html in any directory where your webserver is serving html documents.For example, Servers Directory URL to access Apache c:\Apache\htdocs\divert\ http://localhost/divert/Divert.html Tomcat $TOMCAT/webapps/divert/ http://localhost:8080/divert/Divert.html JSDK2.1 c:\jsdk2.1\webpages/divert/ http://localhost:8080/divert/Divert.htmldivert.jar need to be in the same directory as Divert.html. If you place this jar elsewhere you need to modify ARCHIVE parameter in Divert.html. 2. DivertServlet.classYou can place DivertServlet.class in any directory where your webserver is serving servlets.For example, Apache Jserv jserv\servlets Tomcat $TOMCAT/webapps/examples/classes/ JSDK2.1 c:\jsdk2.1\examples\WEB-INF\servletsYou can access the servlet on the browser respectively at http://localhost/servlet/DivertServlet http://localhost:8080/examples/servlet/DivertServlet http://localhost:8080/examples/servlet/DivertServletAfter you have successfully access DivertServlet on the browser, you need to code the location of the servlet in parameter ServletUrl1 in Divert.html. If your servlet is found at http://localhost/servlet/DivertServlet, code <PARAM NAME = ServletUrl1 VALUE = "/servlet/DivertServlet" > ServletUrl1="/servlet/DivertServlet"The first line is for IE browser while the second line is Netscape. If your servlet is found at http://localhost:8080/examples/servlet/DivertServlet, code <PARAM NAME = ServletUrl1 VALUE = "/examples/servlet/DivertServlet" > ServletUrl1="/examples/servlet/DivertServlet"You can ignore ServletUrl2, ServletUrl3 and so on. These parameter attempts to access the DivertServlet at various URL that are common in java webservers. The following classes and resource need to be in the same directory as DivertServlet.class UrlLoad.class UpdParent.class z2Element.class Cookies.class Cookie.class DivertServlet.properties Validate.class 3. z2divert.dll and libz2divert.soz2divert.dll and libz2divert.so are library used by DivertServlet.class. z2divert.dll is meant for win32 while libz2divert.so is compile for linux (Intel).win32You need to place z2divert.dll in one of the folders specified in PATH environment variable. The system is also able to locate the DLL if it is place in the directory where you start the webserver.linuxFor linux, you need to place libz2divert.so in one of the folders specified in LD_LIBRARY_PATH environment variable. If the file is in /usr/local/jakarta/libz2divert.so issue this commandexport LD_LIBRARY_PATH=/usr/local/jakarta/:$LD_LIBRARY_PATHbefore starting the webserver. 4. divert.jarClasses in divert.jar is also access by DivertServlet.class on the server. You need to setup CLASSPATH environment variable so that divert.jar is accessible by servlet. For example, if the jar is in c:\jsdk2.1\webpages\divert\divert.jarset CLASSPATH=c:\jsdk2.1\webpages\divert\divert.jar;%CLASSPATH%before starting the webserver. On linux system the equivalent command is export CLASSPATH=$TOMCAT/webapps/divert/divert.jar:$CLASSPATHOn Apache Jserv, you need to add the following line in jserv.properties. wrapper.classpath=c:\Apache\htdocs\divert\divert.jar 5. Validate.classValidate.class does user validation at the server. There are 2 version of this program. The version in subdirectory /install/win32/ validate user based on password file (passwd.txt). The second version in subdirectory /install/linux/ validate user using ftp and is meant for linux system. Microsoft Windows system could not use the second version because the ftp works differently in MS system.passwd.txtIf you use Validate.class in subdirectory /install/win32, you need to prepare passwd.txt file. passwd.txt file consist of 3 column separated by TAB character.
passwdFile=c:\\jsdk2.1\\examples\\Web-inf\\passwd.txt ftpIf you use Validate.class in subdirectory /install/linux/, make sure the users can ftp the server using their userid and password.CustomiseYou can customize your own version of Validate.class. Follow the link here for more info. |