RE: Servlet handling both *.html and /
I have a servlet that I want to handle all the URLs. It acts as a super servlet and allows us to parse the URLs we receive and act accordingly. Right now I have it set up to handle .html. However, when someone makes a request to a directory such as: http://www.domain.com/whatever/ You need to set up a servlet-chain for mime-type text/html. This will allow orion to process all pages as normal, and then pass the final output to your servlet if the mime-type is text/html,however the page is produced (static html file, servlet, jsp, cgi, etc). Have a look at the docs for orion-web.xml to see how to do this. -Joe Walnes
RE: Servlet handling both *.html and /
Did you try a servlet mapping with a '/' url pattern? According to the servlet spec that makes your servlet the default servlet of the web app. Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Joel Shellman Sent: Friday, July 07, 2000 3:26 PM To: Orion-Interest Subject: Servlet handling both *.html and / I have a servlet that I want to handle all the URLs. It acts as a super servlet and allows us to parse the URLs we receive and act accordingly. Right now I have it set up to handle .html. However, when someone makes a request to a directory such as: http://www.domain.com/whatever/ the servlet is not hit--it says it can't find it. How can I make it handle these URLs as well? I know I could add a dummy file: [docroot]/whatever/index.html and then it would handle it, but I have lots of directories (and they keep being added) so that is not possible. I'm doing that right now to get around it for the root URI, but it's just a hack till I find a better solution. I can't just have the servlet handle everything as I'd like for images and style sheets and other such files to be served by orion without having to go through my super servlet. Any ideas? Thanks, -- Joel Shellman Chief Software Architect The virally-driven B2B marketplace for outsourcing projects http://www.ants.com/90589781