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: Servlet configuration
Date Sat, 23 Sep 2000 15:31:18 GMT
Hmmm... I'm a bit confused here.

My example covers the first one you mention.  It does go into a little more 
detail with using the getPathInfo() method but, for the most part, it is 
exactly what my example said.

On the second one, I'm not sure I see where the problem is.  It says to add 
the following to tomcat.conf or tomcat-apache.conf to support servlet 
aliasing between Apache+Tomcat:

<LocationMatch /myApp/jsp-bin/* >
     SetHandler jserv-servlet
</LocationMatch>

However, I have this working quite nicely without doing that at all.  It 
think that is a Jserv ONLY issue.  With Tomcat, you just need to provide 
something like the following to your tomcat.conf file:

Alias /examples "C:/Program Files/Apache Group/Jakarta/tomcat/webapps/examples"
<Directory "C:/Program Files/Apache Group/Jakarta/tomcat/webapps/examples">
     Options Indexes FollowSymLinks
</Directory>
ApJServMount /examples/servlet /examples
<Location "/examples/WEB-INF/">
     AllowOverride None
     deny from all
</Location>
<Directory "C:/Program Files/Apache 
Group/Jakarta/tomcat/webapps/examples/WEB-INF/">
     AllowOverride None
     deny from all
</Directory>
<Location "/examples/META-INF/">
     AllowOverride None
     deny from all
</Location>
<Directory "C:/Program Files/Apache 
Group/Jakarta/tomcat/webapps/examples/META-INF/">
     AllowOverride None
     deny from all
</Directory>


In this case, all your aliasing that you have done in your web.xml will 
work just fine through apache.

Am I missing something?  Why would I want to use <LocationMatch>????


Jake


At 10:30 AM 9/23/2000 -0400, you wrote:
>There are two Q&As on JGuru, which address the issue of
>aliasing.
>
>Check out:
>
>How do I use servlet aliasing, so the URL
>"http://foo.com/mywebapp/servlet/a.b.c.MyServlet" can become
>"http://foo.com/mywebapp/Thingy"?
>http://www.jguru.com/jguru/faq/view.jsp?EID=134402
>
>and
>
>How do I make servlet aliasing work with Apache+Tomcat?
>http://www.jguru.com/jguru/faq/view.jsp?EID=140877
>
>   Ken.
>
>
>On Fri, 22 Sep 2000, you wrote:
> > Thanks!!!  For my purposes at this point, I can stick with the "test" root
> > directory, so your answer solves my problem.  I read all about doing what
> > you described below, in the docs online, but somehow they didn't make any
> > sense at all, and you did.  Thanks a bunch!
> >
> > Jeff Nibler
> >
> >
> > > -----Original Message-----
> > > From: Jacob Kjome [mailto:Jacob.R.Kjome@syntegra.com]
> > > Sent: Friday, September 22, 2000 2:37 PM
> > > To: 'tomcat-user@jakarta.apache.org'
> > > Subject: RE: Serlvet configuration
> > >
> > >
> > > 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
> > >
>--
>Kenneth R. Kress                                kkress@home.com

Mime
View raw message