Hello -

I'm trying to create servlet mappings for a servlet that I'd like to exist
at the TOP LEVEL of my webapp in Tomcat. You'd think that this task wouldn't
be a pain in the rear but I'm finding it to be so. If you know how to
configure web.xml and a servlet to handle this, please help. I'm about to
scream at the walls.

The entire goal that I'm pursuing is to provide login security for my web
app.

I know how to create servlet mappings in web.xml and I basically know how to
use RequestDispatcher. However, I'm running into either of these two
problems.

    A. I end up with an entry servlet that is recursively called whenever I
call RequestDispatch.forward() based on the following web.xml setup. I
understand why this occurs, but how do I get around this and still have all
requests be handled by the entry mapping.

    <servlet>
        <servlet-name>entry</servlet-name>
        <servlet-class>EntryServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>entry</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>

    B. The other problem I encounter is that sometimes when I request a
page, is that page is not found (404). I'm begining to think that it's
because the forward() method is relative to the requested URI which is
actually a freaking filename (?). Right? This is driving me nuts.

Can anyone point me to an example of a working setup that handles all
requests sent to the entire webapp (root level)? I had this working before
in Resin but can't get that same setup to work in Tomcat.

Thanks,
Philip

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to