On 6/12/06, Jérôme BERNARD <[EMAIL PROTECTED]> wrote:

On 6/9/06, Henri Dupre <[EMAIL PROTECTED]> wrote:
> On 6/9/06, Jérôme BERNARD <[EMAIL PROTECTED]> wrote:
> >
> > The only solution I have found so far to work is to:
> > - use a HomeLink component :
> > public abstract class HomeLink extends AbstractLinkComponent {
> >    @InjectObject("service:tapestry.globals.WebRequest")
> >    public abstract WebRequest getRequest();
> >    public ILink getLink(IRequestCycle cycle) {
> >        return new StaticLink(getRequest().getContextPath());
> >    }
> > }
> > - use this HomeLink component in my Border component (instead of a
> > previous
> > PageLink)
> >
> > So far, this means that I'll be able to have my links generated to
'/'.
>
>
> That's the kind of solution I had in mind.
>
> Now in order to serve the 'index' page to '/', I can't use a servlet
mapping
> > of the tapestry servlet to '/' (otherwise, I won't be able anymore to
> > serve
> > static resources like images, css, etc.).
>
>
> I don't get this one... You want "/" to be served by tapestry?

Yes.

> and all the other urls served by static content?

Nope. When I meant static content (images, rss, etc.), I meant static
content served by Tapestry  too.

> Can you put all your static content in your war file? Then it will work.
> Also you can configure Jk to ignore certains paths and let apache serve
> them

I have deployed the solution using UrlRewrite and the "HomeLink"
component.
It works well as you can see on http://www.kalixia.com: I do have a
200 HTTP status on a request for '/'.

Now, I would prefer a solution without UrlRewrite.
The only thing I can think of is to write my own RedirectFilter which
would do a forward to '/' instead of a redirect.

> The only solution I found is to
> > use UrlRewrite (http://tuckey.org/urlrewrite/) with the following rule
> > (this
> > is a forward rule and not a redirect one, so no problem with SEO):
> > <rule>
> >        <from>^/$</from>
> >        <to>/index.html</to>
> > </rule>
>
>
> Again I'm confused... The index.html, is it living in the
tapestry/tomcat
> world or the apache world?

index.html is not a static page, but the result of rendering Tapestry
page 'index'.

> If index.html was a tapestry page. Why don't you just make "index" as
the
> name of the home page?

I have probably missed something on this point. How can I configure
such a thing?
And remember that I want the content of my 'index' page to be served
to '/' and not '/index.html'.


I think if you set "org.apache.tapestry.home-page" to "index" in your
.application file, then that should be enough.
http://jakarta.apache.org/tapestry/UsersGuide/configuration.html




> My shortcut URL (http://wiki.apache.org/tapestry/ShortcutUrls) solution
does
> implement this.

This would make something similar to a RedirectFilter forwarding
instead of redirecting...


Yes that is true. But this should send a 200 when you'll hit '/'. The
forwarding happens inside the servlet container not on the client side.

We have been working recently too to make our website more search engine
friendly... Do you have references or more information on the url format
search engines like?
I have been also thinking of writing in tapestry a dynamic sitemap for
google. Do you know if this is worth it?

Thanks,

Henri.

Reply via email to