Configuring The Web Server To Use The Java Servlet

The "web.xml" file located in /webapps/ROOT/WEB-INF/ in the jakarta installation needs to be changed to use the "DisplayLCD.class" Servlet.

The edited "web.xml" is located here: web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
	<display-name>LCD Webserver</display-name>
	<description>An Interactive Internet LCD Display</description>


<!-- JSPC servlet mappings start -->

	<servlet>
		<servlet-name>org.apache.jsp.index_jsp</servlet-name>
		<servlet-class>org.apache.jsp.index_jsp</servlet-class>
	</servlet>
	
	<servlet>
		<servlet-name>DisplayLCD</servlet-name>
		<servlet-class>DisplayLCD</servlet-class>
	</servlet>

	<servlet-mapping>
		<servlet-name>org.apache.jsp.index_jsp</servlet-name>
		<url-pattern>/index.jsp</url-pattern>
	</servlet-mapping>
	
	<servlet-mapping>
		<servlet-name>DisplayLCD</servlet-name>
		<url-pattern>/DisplayLCD</url-pattern>
	</servlet-mapping>

<!-- JSPC servlet mappings end -->

</web-app>

Back to the index