Professionally designed FREE Web Scripts
Web pages have only 10 seconds to grab the interest of its first-time visitors. Free web scripts from Fabhosts help you capture your visitors' attention instantly and keep them glued to your site - for FREE!
jzChat V1.0 servlet
How to install jzChat:
Download the package v1.12 here (39.9 KB - zip file).
To install jzChat, your WebServer or ISP has to support JAVA SERVLETS (note that servlets support is not CGI support). Click here to get a list. Some are free.
The package is built as follows :
This directory contains all class files needed to run jzChat :
- jzchat.class (the servlet)
- jzchat.initArgs (servlet init parameter file, Jserv/JavaWebServer only)
- jzChat/*.class (core)
- jzChat/Util/*.class (core)
This directory contains all files needed for jzChat configuration and customization :
- jzchat.conf (chat configuration file)
- adminlogin.jsp (root login web page)
- openchatroom.jsp (root chatroom opening web page)
- viewchatroom.jsp (root chatroom management web page)
- chatlogin.jsp (guest login web page)
- chatroomjs.jsp (chat web page)
The servlet/ directory should be placed under the servlet directory of the web server (servlets/ or servlet/ as usually). The web/ directory could be (and should be) placed outside the web root. Then you have to setup config parameter through init parameters of your servlet engine . Fill in it with jzchat.conf file (absolute path needed). If you're using JSERV servlet engine then edit jzchat.initArgs to do so.
How to setup parameters ?
Edit jzchat.conf from web/ directory change parameters if needed. Pay attention to parameters in red :
- STOREPATH :
This parameter defines the absolute path for stored files (log files, backup file and transcript file). Here are some examples :
STOREPATH = /usr/local/apache/wwwroot/logs (unix os)
STOREPATH = c:\Apache\JServ\web (win32 os)
- STOREFILE :
Use this parameter to setup chatroom backup filename. It's a binary file saved at regular intervals. It's also used to restore chatroom after a servlet engine halt or crash.
- TRANSCRIPTFILE :
Use this parameter to setup chatroom transcript. It's a text file with the whole chat.
- SERVLET :
URI to the jzchat servlet (/servlet/jzchat or /servets/jzchat as usually).
- HOSTURL <== deprecated since v1.10:
http://www.YourDomainName.com. HOSTURL parameter followed by SERVLET parameter must be the absolute URL of the jzChat. (e.g. HOSTURL=http://127.0.01:8080)
- JSPPATH :
This parameter defines the absolute path for JSP files (i.e. web/).
- BUFFERING :
This parameter is linked with the two parameters below. It allows to define whether or not you use buffered-frame mode. Values could be YES or NO.
jzChat provides three displaying mode :
- Non-Framed mode (no frames)
- Framed mode (two frames for a more convenient usage)
- Buffered-Framed mode (three frames to avoid flickering effect)
Default mode is buffered-framed one.
- CHAT :
Chat web page (dynamic-content). This page is sent back to end user with the chat content and users listing. Use buffering.jsp for buffered-framed mode, chatroom.jsp for framed mode or chatroomjs.jsp for non-framed mode .
- ROOM :
FrameSet web page. Use roombf.jsp for buffered-framed mode, room.jsp for framed mode or chatroomjs.jsp for non-framed mode .
- TEXT :
Message frame. Not used in non-framed mode.
- CHATBF :
Customizable chat web page for buffered-framed mode only.
- GUESTLOGINPAGE :
Guest login web page (dynamic-content). This page is sent back to guest user when he asks for the servlet without parameters.
- ADMINLOGINPAGE :
Root login web page. This page is sent back when servlet is called with todo=adminlogin parameter then root user can login to administrate the chatroom.
- OPENCHAT :
Root chatroom opening web page. Once root user has been logged, he could open a chatroom through this web page.
- VIEWCHAT :
Root chatroom administration web page. Once root user has been logged and chatroom has been opened, root user can administrate the chatroom (enter, users listing, kick off user,close ...).
- ADMINLOGIN :
This parameter defines the root user login. Change it !!
Note that root user will be seen as @rootuserlogin in chatroom users list.
Guest users could not use nickname starting with a @.
- ADMINPASSWORD :
This parameter defines the root password. Change it !!
- ADMINLOGINCOMMAND :
This parameter defines the command (default=adminlogin) to access admin panel. You can change it to improve the security of your chatroom.
- KEEPOPEN :
This parameter allows the chatroom to be re-opened automatically after a servlet engine halt or crash. This feature is available only if the backup file hasn't been removed.
- PRIVATEMSG :
This parameter enables private messages feature for the chatroom. Values could be YES or NO. Default is YES.
- HISTORY :
This parameters defines history's length of the chat (max. displayed lines on user's browser).
- AUTOREFRESHLIMIT :
Choose the autorefresh time-limit (seconds) before user's browser asks for refresh. Value between 12 and 30 seems the best. The refresh policy depends on user's activity. The more he chats the more refresh-time is low. If he stops chatting then refresh-time converges to AUTOREFRESHLIMIT value.
- MAXINACTIVE :
User's session time-out (seconds). When session expires user is logged out.
- MAXNICKNAMELENGTH :
Admin user can choose the maximum nickname length for guest users. Default is 10.
- MINUTESTOWAIT :
Time interval (minutes) to wait between each backup of the chatroom.
- DATEPATTERN :
Date format for classic look & feel.
- MSGTIMEPATTERN :
Time format for classic look & feel.
- CHARSET :
Admin user can include an HTML line below <head> tag in all jzChat JSP files. This should be used to set up charset through Content-Type meta tag . Default value is blank.
JzChat also provides MultiLanguage support. You can change a few messages (login, logout, kickoff ...) from jzchat.conf file and customize/translate *.jsp web pages.
How to customize jzChat ?
In addition to HTML customization, you can change "internal chat parameters" like fontsize, fontcolor and fontname for both mIRC and Classic look an feel. To do so have a look at the end of jzchat.conf.
How to access to the admin web panel ?
Try http://www.mydomain.com/servlet/jzchat?todo=adminlogin ( if your servlet is under /servlet/jzchat) . You should get the root login web page.
How to access to the guest web panel ?
Try http://www.mydomain.com/servlet/jzchat ( if your servlet is under /servlet/jzchat) . You should get the guest login web page.
Which servlet engine does jzChat support ?
jzChat V1.x is Servlet API 2.0 compliant so it should run under any servlet engine. Until now we've already passed tests it under Jwsdk, JServ, Tomcat, Jrun, JavaWebServer and Weblogic.
How to configure jzChat.initArgs file ?
The jzChat.initArgs file is only needed for JSERV or JavaWebServer servlet engines.
You have to fill in config parameter with the absolute path to jzchat.conf e.g. :
Unix system : config=/usr/local/apache/web/jzchat.conf
Win32 system : config=c:\\Apache\\JServ\\web\\jzchat.conf
What are init parameters of a servlet engine ?
Init parameters allow to pass arguments to a servlet at the first time. jzChat needs a config init parameter. This config's value must be the absolute path to jzchat.conf (c.f. above).
How to configure web.xml under Tomcat ?
Add the following lines under <web-app> tag :
Which Servlet API jzChat supports ?
jzChat V1.0x runs under Servlets API V2.0. So it should work under any servlet engine.
Does jzChat work under application servers like weblogic, websphere, silverstream ?
Yes, it works. You have to pay attention of the init parameter . Each application server (and servlet engine) have different way to configure init parameters. So don't forget you have to fill in the config init parameter with the absolute path (including filename) to jzchat.conf.
I'm running under APACHE web server, how can I add servlet support ?
You should install JSERV . It's a free servlet engine quite powerful. You can also use Tomcat .
jzChat doesn't work under www.mycgiserver.com ISP ?
mycgiserver.com hosts servlets for free but all servlets must be included in a package named as the account. It's a build operation. mycgiserver.com doesn't support servlets that you can't rebuild. Source code of jzChat is not available so you can't rebuild it for mycgiserver.com. We don't provide support for mycgiserver.com anymore (too many requests).
How to change charset ?
charset could be modified for each web page through CHARSET parameter. You should use FRAMED mode (or NON FRAMED mode) for charset different from iso-8859-1. For instance, to have a BIG5 charset then add the following CHARSET line in jzchat.conf :
CHARSET = <meta http-equiv="Content-Type" content="text/html; charset=Big5">
Why should or shouldn't I use jzChat ?
Here are the pros and cons :
- Nothing to download to init the chatroom.
- Pass through FireWalls.
- Works under HTTPS (SSL).
- Admin features (list users, kick off user, transcripts, open/close chatroom, quota).
- Customizable and multilanguage support.
- Free and ads-free.
- Java Servlet support needed for server-side (new technology, best than CGI but not well known yet).
- Flickering refresh process. (Quite better with buffered-framed mode).
FREE Web templates. Flash, banners, backgrounds and more
FREE Software for web developers All the'must have' free software and free downloads