On Wed, 17 Sep 2003, Matt Raible wrote:

> Date: Wed, 17 Sep 2003 19:50:42 -0500
> From: Matt Raible <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: Is it possible to remove *.do or /do/* from the URL
>
> First of all:
>
> 1.  Is it possible to remove the *.do or /do/* from the path and make all
> requests /* go to the Action Servlet?

While it is technically feasible to create a servlet mapping that does
this, you're going to be really unhappy with the results in most cases.
Just for one example, consider the fact that a "/*" mapping overrides the
default "*.jsp" mapping, meaning that you would not be able to use JSP
pages at all in such an environment.

> 2.  If so, will this mess up any image or css or script files?

If the image or CSS files are local to your webapp, they will be screwed
up by such a mapping.

>  What if they're on an external webserver and that webserver knows that
> /images goes one place and /scripts goes another?
>

IMHO, nobody should really be giving a rip what the URL says in a web
*application* (as opposed to a web site).  For those that still do, I've
found that the best strategy is to hide the actual URLs being used from
the user.  Two easy strategies to make this happen:

* Have your app open a window that doesn't have a "Location" bar,
  so your users are not constantly distracted by the submit URLs.

* Have your app create a frameset with a single frame in it, so that
  the displayed location never changes.

The important principle here is "Web Application != Web Site".  If your
users feel compelled to use bookmarks and the back button in your webapps,
despite efforts to train them correctly, this is a pretty good sign that
you have not provided enough suitable navigation controls in your basic
UI.

> Thanks,
>
> Matt
>
Craig

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

Reply via email to