tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Prochazka <boprm...@lucky.cdt.luth.se>
Subject How do I map my servlets into the web-application
Date Wed, 22 Mar 2000 14:28:56 GMT
How do I map my servlets into the web-application

I want to acheive so my servlet will appeare under <contextPath>/<servlet-name>

Following situation:

- The web-applications is defined in server.xml with:
        <Context path="/QuickTrade" docBase="QuickTrade/htdocs" 
reloadable="true" > 
        </Context>

- My servlet is in the package qbo with file name
  QBO_LdapProfileServlet.class and package name qbo

- The classe files are all places in QuickTrade/WEB-INF/classes/qbo/*.class

- The web.xml is updated with

    <servlet>
        <servlet-name>
            supplierReg
        </servlet-name>
        <servlet-class>
            qbo.QBO_LdapProfileServlet
        </servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>
            supplierReg
        </servlet-name>
        <url-pattern>
            /supplierReg
        </url-pattern>
    </servlet-mapping>

    As you note I would like the servlet to appear under /QuickTrade/supplierReg

I can access the servlet with the url
/QuickTrade/servlet/qbo.QBO_LdapProfileServlet but that wont do. I use
the same servlet for a number of different services. I select the
service depending of the servlet url (alias/servletname).

I am using tomcat 3.1b1, JDK 1.2.2_05 on Solaris 7

What am I doing wrong. Why does it not work ???

Boris
 
                              \\V//
                              (o o)
--------------------------ooO--(_)--Ooo-----------------------------
        You know you've achieved perfection in design,
                Not when you have nothing more to add,
                        But when you have nothing more to take away.
.....................................................................
Boris Prochazka			http://lucky.cdt.luth.se/~bopr/
Frontec Norr AB    		mailto:bopr@lule.frontec.se
Aurorum				Phone:  +46 920 75122
S-977 75 Lulea, Sweden		Fax:    +46 920 75299



Mime
View raw message