tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <Jacob.R.Kj...@syntegra.com>
Subject RE: Serlvet configuration
Date Fri, 22 Sep 2000 21:36:45 GMT
in your local web.xml in the /webapps/test/WEB-INF directory, you need the
following:

<web-app>

    <display-name>Test Servlets</display-name>
    <description>
	This is where my test servlets are
    </description>

    <servlet>
        <servlet-name>myservlet</servlet-name>
        <servlet-class>ServletName</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>myservlet</servlet-name>
        <url-pattern>/here-too/oh-ya-and-even-here/servletname</url-pattern>
    </servlet-mapping>


</web-app>

That gets you to the point to pointing to:

http://www.myserver.com/test/here-too/oh-ya-and-even-here/servletName

However, I'm not sure how you would set the directory for the initial
context to be different than what the directory (called "test" in this case)
in your webapps directory is?

Anyone?  This would be good to know.


Jake

-----Original Message-----
From: NIBLER JEFF R. (PDX1JRN) [mailto:pdx1jrn@ups.com]
Sent: Friday, September 22, 2000 4:26 PM
To: tomcat-user@jakarta.apache.org
Subject: Serlvet configuration


Hi all, this is my first e-mail to the list, hope I did it correctly (the
FAQ and info E-mail returned nada).  Ok, I have one question about Tomcat:
what configuration file, and where in that file, can you change the url
pathing for where your servlet is accessed?  For instance, lets say my
directory structure looks like:
C:\tomcat\webapps\test\web-inf\classes
Now by default (at least, default on my installation), to view a servlet via
the url, you would nee to type:
http://www.myserver.com/test/servlet/servletName
So how do I change it so that the url pathing would read:
http://www.myserver.com/here/here-too/oh-ya-and-even-here/servletName
?
In addition, when I do that, will I need to modify the tomcat.conf that
Apache references if I want Apache to output the results of the servlet to
the client? Thanks in advance for anyone who can help me on this one.

Jeff Nibler


Mime
View raw message