Some containers use the servlet name default to refer to the default servlet
(can't remember is Jetty is one of them!), and can be mapped using:

<servlet-mapping>
  <servlet-name>default</servlet-name>
 <url-pattern>/whatever/*</url-pattern>
</servlet-mapping>

And now the infamous word of warning: try and deploy in a container that
does not know about the default servlet, and it will all go horribly wrong.

So a better approach might be to use AppFuse's StaticFilter to handle all
static content. Instructions on how to set it up can be found by searching
the AppFuse User mailing list in Nabble.

Is it a bad idea to set things up this way? No, but only as long as you test
early and often using the same deployment architecture that you will use in
production. In my world that normally means develop on the same architecture
if at all possible. Has prevented many a nasty surprise from popping up
later on ;-).

Mike

On 4/30/07, sujal <[EMAIL PROTECTED]> wrote:


Hi folks,

    I'm new to the AppFuse and Struts 2 and Jetty (yes, I'm biting off a
lot :).  I'm familiar with other servlet containers but not Jetty and I
was
wondering if someone could point me in the right direction.

What I'd like to do is run my app so that all actions do not need a file
extension.  I was hoping to do this in development by setting up my
servlet
mappings to use the DefaultServlet in Jetty to handle /images/*,
/styles/*,
and /scripts/* .  That servlet would sit in front of the configuration for
the Struts 2 mappings so that only non-matching URLs would go to the
Struts
app.

I can't figure out how to set that up, and I think it's because I'm
looking
for a configuration file or syntax that is done differently in Jetty.

Any ideas on doing this?  any reason why this is a bad idea?  Eventually,
I'd push all the static content out of the servlet container anyway, but
for
development this seemed like a way to go.

Thanks for your help,

Sujal
--
View this message in context:
http://www.nabble.com/Newbie-questions----no-file-extension-and-Jetty-config-tf3667814s2369.html#a10248333
Sent from the AppFuse - User mailing list archive at Nabble.com.

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


Reply via email to