I've a couple reasons for wanting to be able to essentially have a package
appear as a page. 

One is that I would love to have my static website be a Tapestry
application. Partly because development using components just seems quicker
and easier than development using Dreamweaver templates. I would then also
have the ability to introduce more dynamic features wherever I want.
Tapestry's 'pretty URLs' makes this a possibility.

So say this is a URL at my site (which it is):

     www.dalewhalen.com/HousePlans/TwoStory.html

A user can delete 'TwoStory.html' and be back at the HousePlans section of
the site. 

     www.dalewhalen.com/HousePlans/

It would be the same in a Tapestry version of the site, except that there
would be no '.html' in the URL.

To accomplish this right now, I have to create these two classes:

     com.dalewhalen.site.pages.houseplans.TwoStory
     com.dalewhalen.site.pages.houseplans.HousePlans

(If you haven't read the rest of the postings on this topic, using
houseplans.HousePlans was the only way I could find to accomplish this,
though there seems to be a trailing '/' issue.)

It would be nicer if Tapestry had a default page class (similar to
'index.html' in Apache) that could be placed inside of a package that would
allow that class/page to appear when selecting that package/directory. 

It could be called 'index' or 'default' or anything else really, since you
would never actually see the class/page name in the URL; only the
package/directory name. Maybe 'packageDefault' ?

Anyway, that's just one reason. The existence of 'pretty URLs' to some
degree invites more direct user manipulation of the URL. It would be nice to
be able to accommodate some of those more useful manipulations.




patrick whalen wrote:
> 
> Is there a way to create a page/class that has the same name as the
> package it's in? It would be similar behavior to the way placing an
> index.html file in a directory served by Apache will let you access that
> file via the name of the directory, excluding 'index.html' in the URL.
> 
> For example, in:
> 
>    com.mydomain.myapp.pages.subpackage1.*
> 
> I could reference a page at:
> 
>    www.mydomain.com/myapp/subpackage1
> 
> I've tried creating a class under subpackage1 called 'Index' or 'Start',
> but those didn't work.
> 
> I've also tried creating a class under myapp.pages called (for this
> example) 'Subpackage1'. This works, but then any pages/classes created
> under the package pages.subpackage1 are ignored. As though when Tapestry
> is reading the URL, it assumes i am referencing the class, and doesn't see
> that there is also a matching package as well as more information in the
> URL.
> 
> One other behavior that seems related is that if I have the following page
> class (and related html file):
> 
>    myapp.pages.project.projectinfo
> 
> the URL:
> 
>    www.myapp.com/project/projectinfo
> 
> doesn't work, but this URL:
> 
>    www.myapp.com/project/info
> 
> does work.
> 
> I'm new(ish), and have bounced in and out of tinkering with webapp
> development for a while now. T5 has got me pretty close to being sucked
> back in.
> 
> Thanks much.   patrick
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--Page-with-same-name-as-package-tf4497463.html#a12846148
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to