Check out:

http://tapestry.apache.org/tapestry5/tapestry-core/guide/component-classes.html

Specifically the section on "Sub-folders / Sub-packages." This deals exactly with your situation. With your example:

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


You ran right in to a logical name transformation that T5 does on names. Read that page - it should be clear after that.

i_hate_screen_names 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


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

Reply via email to