I'm using JBoss with Tomcat 4.1.27. I manipulate the URL by adding
param-values that are parts of the actual URL to the web.xml file
I think this will work with a stand alone Tomcat. It looks like
'commons-sandbox' project 'chains' is similar.
i.e.
<web-app>
<context-param>
<param-name>baseURL</param-name>
<param-value>www.nwcascades.com</param-value>
</context-param>
...
We include keywords, dropdown selects (as CDATA), almost anything
that is static from one page to the next. Make maintenance a great
deal easier.
In the JSP pages we use things similar to the following to separate
the static content on apache and the dynamic content generated by
JBoss/Tomcat.
<base href="http://<%=application.getInitParameter("baseUrl")%>/">
<title><%=application.getInitParameter("titleText")%></title>
...
We found that the time it takes to do this is well worth it if you
have a global change that affects a large number of pages.
Hope it helps,
Jack
Rodrigo Ruiz wrote:
>
> The problem is the "/resources" entry. If you map it to the default
> servlet, the directory name itself will not be part of the path, but a
> "root" for the actual one, so the default servlet will understand you
> want to get the path following "resources", and it is "". I guess the
> same will happen with the contents of the directory.
>
> It seems that the default servlet cannot be configured to serve files
> from an alternative directory.
>
> You could try one of the following:
> - Create your own servlet for "resources" requests. Perhaps you could
> subclass DefaultServlet, or use it in any other way.
> - Implement a Filter that redirects any request not to "resources" to
> your own servlet, and let the default configuration to work for the
> resources directory.
>
> Samuel Le Berrigaud wrote:
>
> > Thanks for your help,
> >
> > I'll do it another way I think and I'll probably come back on that
> > problem later on.
> >
> > SaM
> >
> > Tim Funk wrote:
> >
> >> Then there is either
> >> - a bug in tomcat
> >> - a config error (most likely) but don't know what could be the culprit
> >>
> >> I never heard of this before. Seems quite odd.
> >>
> >> -Tim
> >>
> >> Samuel Le Berrigaud wrote:
> >>
> >>> Yes
> >>>
> >>> Tim Funk wrote:
> >>>
> >>>> [Need more coffee]
> >>>>
> >>>> Does that mean that http://myserver/context/resources is serving a
> >>>> dir listing of the contents from http://myserver/context ?
> >>>> (instead of /context/resources)
> >>>>
> >>>> -Tim
> >>>
> >>>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]