Karl Martino wrote:

> In a web application I have a top level servlet
> url-mapped to the web application's root.
>
> For example, my web application, called content, has a
> url-mapping of /* .  This is a controller servlet in a
> MVC type application.
>

In Struts, <http://jakarta.apache.org/struts>, the recommended approach
is to map the controller to a filename extension pattern, instead of
mapping everything like this.  I prefer the "*.do" extension, because it
implies "go do something" when you submit a form to "/saveCustomer.do".

The advantage of this approach is that the normal mapping of "*.jsp" to
the JSP page compiler still works.  The disadvantage is that users can
bypass your controller and address a JSP page directly.  You cannot do
much about this in a servlet 2.2 environment, but in a 2.3 environment
(like Tomcat 4.0) we'll be able to use the new Filter APIs to do things
like enforce logged-on status.

Craig McClanahan



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to