Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
2.7 An Example Using Initialization Parameters
41
Listing 2.8 ShowMessage.java (continued)
      for(int i=0; i
        out.println(message + "
");
      }
      out.println("");
    }
}
Figure 2 5
The ShowMessage servlet with server specific initialization parameters.
Listing 2.9 shows the setup file used to supply initialization parameters to
servlets used with Tomcat 3.0. The idea is that you first associate a name with
the servlet class file, then associate initialization parameters with that name
(not with the actual class file). The setup file is located in
install_dir/webpages/WEB INF
. Rather than recreating a similar version
by hand, you might want to download this file from 
http://www.core 
servlets.com/
, modify it, and copy it to
install_dir/webpages/WEB INF
. 
Listing 2.10 shows the properties file used to supply initialization parame 
ters to servlets in the JSWDK. As with Tomcat, you first associate a name
with the servlet class, then associate the initialization parameters with the
name. The properties file is located in 
install_dir/webpages/WEB INF
. 
Second edition of this book: www.coreservlets.com; Sequel: www.moreservlets.com.
Servlet and JSP training courses by book's author: courses.coreservlets.com.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

jsp web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved