Java Reference
In-Depth Information
ment, and it is necessary if your classes use the default package. Although the
conf\web.xml file could be modified to remove the comments, it is easier, and
safer if you are unfamiliar with XML, to modify the deployment descriptor
(web.xml) in the root WEB-INF folder.
The following steps modify the deployment descriptor to allow Tomcat to
locate anonymous servlets in the default servlet folder.
To Modify a Deployment Descriptor
1. Use TextPad to open the file, web.xml, in the folder located at
C:\Program Files\Apache Software Foundation\Tomcat 5.5\
webapps\ROOT\WEB-INF.
TextPad displays the file, C:\Program Files\Apache Software Foundation\
Tomcat 5.5\webapps\ROOT\WEB-INF\web.xml, in the coding window
(Figure 12-78).
path to root folder
displays on title ba r
web.xml file
opened
FIGURE 12-78
2. Enter lines 42 through 53 as shown in Figure 12-77. Save the changes.
TextPad displays the inserted lines of code in the coding window
(Figure 12-79). Anonymous servlets in the default servlet folder now
can be loaded and executed.
InvokerServlet name
inserted code
default servlet relative path
FIGURE 12-79
 
Search WWH ::




Custom Search