Text Categorization

TC Web Tools

TC web tools include JDI, STI, STRI, and MLT. Model-View-Controller (MCV) design model are used for this implementation. The main structure is briefly described as below:

I. Structure

  • Development dir: ${DEV}/TC/WebTc.${YEAR}
  • Deployment dir: ${TOMCAT}/webapps/WebTc.${YEAR}
II. Model-View-Controller
  • Model:
    • Model is done in ${WEBTC}/src/tc/m*.java
    • m*.java means model
    • Control data members start with 'c' in the m*.java
    • View data members start with 'v' in the m*.java
    • Provides methods for control, such as hitOK( ), hitDefault, etc.
    • Provides methods for view, such as view( )

    • methods start with lowercase
    • data member end with '_'
  • View:
    • View is done in ${WEBTC}/web/jsp/*/v*.jsp, Java Servlet Page
    • v*.jsp means view pages
    • v*.jsp use ${WEBTC}/web/html/*.html pages
    • v*.jsp calls c*.jsp for the form action
  • Controller:
    • Control is done in ${WEBTC}/web/jsp/*/c*.jsp, Java Servlet Page
    • c*.jsp means control action
    • c*.jsp takes care of all form actions
    • c*.jsp usually returns to v*.jsp
III. Java Servlet Page
  • Use JavaBean on m*.java
  • A JavaBean is a class has no-argument constructor and confirms to the JavaBean naming conventions
  • JavaBean with application scope starts with 'a'
  • JavaBean with session scope starts with 's'
  • JavaBean with request scope starts with 'r'
  • JavaBean with page scope starts with 'p'

  • Use all uppercase for parameter names in form
  • Follow naming convention in model java codes
IV. Tomcat Application Server
  • All libraries go to ${WEBTC}/web/WEB-INF/lib
  • Web application configuration go to ${WEBTC}/web/WEB-INF/web.xml