Class 2 |
Intermediate Java 30-IT-397 |
|
Modifying web.xml for Packages,
Input Values
-
web.xml is a configuration file in Tomcat for our servlets. In it you
will find common configuration information, in XML format. We can put our
own configuration information in there as well and read it into our
servlet.
-
web.xml can be found in installation
directory/webapps/application
directory/WEB-INF/web.xml
-
Let's make a servlet that will display a bank name based on an input parameter.
-
Of course, if we wanted to deploy this at another bank, all we would need
to do is change that entry in web.xml.
-
Also, let's put the servlet in a package.
-
We can have Tomcat resolve that package name by putting another entry in
web.xml.
-
PersonalBanking.java
Update: Please see Bb for the updated example.
Debugging

Created by: Brandan Jones
December 20, 2001