Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with web.xml file.

Status
Not open for further replies.

SwapSawe

Programmer
Apr 24, 2001
148
US
Hi !!!

I am using the following web.xml file since long but since the time that I have added these two new entries for index1.jsp, AddWish and modified this one Index Servlet.
The AddWish and Index servlet work on Development PC with Linux, but do not work on Testing environment under freeBSD. Can any one please check if I have used the tags with strict rules or have I gone wayward.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!--
                Sun Public License Notice

The contents of this file are subject to the Sun Public License
Version 1.0 (the "License"). You may not use this file except in
compliance with the License. A copy of the License is available at
[URL unfurl="true"]http://www.sun.com/[/URL]

The Original Code is NetBeans. The Initial Developer of the Original
Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
Microsystems, Inc. All Rights Reserved.
-->


<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "[URL unfurl="true"]http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">[/URL]

<web-app>
  <context-param>
    <param-name>driverName</param-name>
    <param-value>org.gjt.mm.mysql.Driver</param-value>
    <description>JDBC Driver</description>
  </context-param>
  <context-param>
    <param-name>url</param-name>
    <param-value>jdbc:mysql://localhost/CONTENTS</param-value>
    <description>a datebase url</description>
  </context-param>
  <context-param>
    <param-name>user</param-name>
    <param-value>iot</param-value>
    <description>the datebase user</description>
  </context-param>
  <context-param>
    <param-name>password</param-name>
    <param-value>iot</param-value>
    <description>the user's password</description>
  </context-param>
  <context-param>
    <param-name>maxConnections</param-name>
    <param-value>10</param-value>
    <description>the number of connection poolings</description>
  </context-param>
  <context-param>
    <param-name>ringtonepath</param-name>
    <param-value>/usr/local/contents/access/sound/</param-value>
  </context-param>
  <servlet>
    <servlet-name>ChkGenre</servlet-name>
    <display-name>ChkGenre</display-name>
		<servlet-class>com.access_sys_eu.tme.melodia.ChkGenre</servlet-class>
    <init-param>
      <param-name>viewFile</param-name>
      <param-value>/jsp/RingtoneList.jsp</param-value>
    </init-param>
    <init-param>
      <param-name>viewFile_nr</param-name>
      <param-value>/jsp/warning.jsp</param-value>
    </init-param>
  </servlet>
  <servlet>
    <servlet-name>ChkWord</servlet-name>
    <display-name>ChkWord</display-name>
    <servlet-class>com.access_sys_eu.tme.melodia.ChkWord</servlet-class>
    <init-param>
      <param-name>viewFile</param-name>
      <param-value>/jsp/RingtoneList.jsp</param-value>
    </init-param>
    <init-param>
      <param-name>viewFile_nr</param-name>
      <param-value>/jsp/warning.jsp</param-value>
    </init-param>
  </servlet>
  <servlet>
    <servlet-name>ChkNew</servlet-name>
    <display-name>ChkNew</display-name>
    <servlet-class>com.access_sys_eu.tme.melodia.ChkNew</servlet-class>
    <init-param>
      <param-name>viewFile</param-name>
      <param-value>/jsp/RingtoneList.jsp</param-value>
    </init-param>
    <init-param>
      <param-name>viewFile_nr</param-name>
      <param-value>/jsp/warning.jsp</param-value>
    </init-param>
  </servlet>
  <servlet>
    <servlet-name>ChkRank</servlet-name>
    <display-name>ChkRank</display-name>
    <servlet-class>com.access_sys_eu.tme.melodia.ChkRank</servlet-class>
    <init-param>
      <param-name>viewFile</param-name>
      <param-value>/jsp/RingtoneList.jsp</param-value>
    </init-param>
    <init-param>
      <param-name>viewFile_nr</param-name>
      <param-value>/jsp/warning.jsp</param-value>
    </init-param>
  </servlet>
  <servlet>
    <servlet-name>Download</servlet-name>
    <display-name>Download</display-name>
    <servlet-class>com.access_sys_eu.tme.melodia.Download</servlet-class>
    <init-param>
      <param-name>viewFile</param-name>
      <param-value>/jsp/RingtoneList.jsp</param-value>
    </init-param>
    <init-param>
      <param-name>viewFile_nr</param-name>
      <param-value>/jsp/warning.jsp</param-value>
    </init-param>
  </servlet>
  <servlet>
    <servlet-name>Index</servlet-name>
    <display-name>Index</display-name>
    <description>Top Page</description>
    <servlet-class>com.access_sys_eu.tme.melodia.Index</servlet-class>
    <init-param>
      <param-name>viewFile</param-name>
      <param-value>/jsp/index.jsp</param-value>
    </init-param>
    <load-on-startup>99</load-on-startup>
  </servlet>

  <servlet>
        <servlet-name>ALIASJSP</servlet-name>
        <jsp-file>/jsp/index1.jsp</jsp-file>
    </servlet>
  <servlet>
    <servlet-name>AddWish</servlet-name>
    <display-name>AddWish</display-name>
    <servlet-class>com.access_sys_eu.tme.melodia.AddWish</servlet-class>
    <init-param>
      <param-name>viewFile1</param-name>
      <param-value>/jsp/wish_confirm.jsp</param-value>
    </init-param>
    <init-param>
      <param-name>viewFile2</param-name>
      <param-value>/jsp/wish_exist.jsp</param-value>
    </init-param>
    <init-param>
      <param-name>viewFile3</param-name>
      <param-value>/jsp/wish_input.jsp</param-value>
    </init-param>
    <init-param>
      <param-name>viewFile_nr</param-name>
      <param-value>/jsp/warning.jsp</param-value>
    </init-param>
  </servlet>

  <servlet-mapping>
    <servlet-name>ChkGenre</servlet-name>
    <url-pattern>/servlet/ChkGenre</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>ChkWord</servlet-name>
    <url-pattern>/servlet/ChkWord</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>ChkNew</servlet-name>
    <url-pattern>/servlet/ChkNew</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>ChkRank</servlet-name>
    <url-pattern>/servlet/ChkRank</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>Download</servlet-name>
    <url-pattern>/servlet/FreeDownload</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>Download</servlet-name>
    <url-pattern>/servlet/PremiumDownload</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>Index</servlet-name>
    <url-pattern>servlet/Index</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
        <servlet-name>ALIASJSP</servlet-name>
        <url-pattern>index.html</url-pattern>
    </servlet-mapping>
  <servlet-mapping>
    <servlet-name>AddWish</servlet-name>
    <url-pattern>/servlet/AddWish</url-pattern>
  </servlet-mapping>


  <session-config>
    <session-timeout>
            30
    </session-timeout>
  </session-config>
  <welcome-file-list>
    <welcome-file>
            index.jsp
    </welcome-file>
  </welcome-file-list>
</web-app>

Thanx,
SwapSawe.
 
Probably doesn't matter, but you are missing a leading "/" in this line :

<url-pattern>servlet/Index</url-pattern>


--------------------------------------------------
Free Database Connection Pooling Software
 
Hello sedj !!!

Thanks for putting in so much effort. However, you were correct that didnot matter. I changed it still i am having same problem.

Regards/SwapSawe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top