You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Anton Marchenkov <ma...@handybank.ru> on 2009/03/19 15:41:55 UTC

problems with layouts

Hi,

I am getting following result while running Index page created by guide 
http://tapestry.apache.org/tapestry5/guide/layout.html :

<p>
         Would you like to<a href="login">Log In</a>?
</p>


Without any html, h1, body tags or Layout.tml context...

Could you help me find out why it`s happening?

-- 
Best regards,
Anton Marchenkov.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: problems with layouts

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, Mar 19, 2009 at 11:59 AM, Anton Marchenkov <ma...@handybank.ru> wrote:
> It's in the correct place.
> I have Layout.java in components package and i'm tryed to place Layout.tml
> to webapp root and webapp/components. But I got the same result in both
> cases.

I'm sorry, just page templates can go to the webapp root, not component ones.
If your layout class is org.example.components.Layout, your template
should be in the classpath under org/example/components.
If you're already doing this, take a look at the output folder (the
one with the .class files). Maybe you IDE is not copying the template
there.

-- 
Thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: problems with layouts

Posted by Tomas Kolda <ko...@web2net.cz>.
I had same problem. When I ran mvn jetty:run, everything was ok. Problem 
was in Eclipse, because it did not put maven resources on classpath, so 
resource not exist for eclipse jetty instance. Sollution for me was to 
add that path manually to build path.

You can also try to make war and check the contents if it is like you 
expect.

Tom

Robert Zeigler napsal(a):
> Both wrong.
> Component templates need to go in the classpath, same package as the 
> .java file.
> If you're using maven, they go in:
> src/main/resources/path/to/components
>
> Only page templates may be placed in webapp root. webapp/components 
> would refer to pages in:
> src/main/java/path/to/pages/components
>
> Robert
>
> On Mar 19, 2009, at 3/199:59 AM , Anton Marchenkov wrote:
>
>> On 19/03/09 17:49, Thiago H. de Paula Figueiredo wrote:
>>> On Thu, Mar 19, 2009 at 11:41 AM, Anton 
>>> Marchenkov<ma...@handybank.ru>  wrote:
>>>
>>>> Hi,
>>>>
>>> Hi!
>>>
>>>
>>>> Without any html, h1, body tags or Layout.tml context...
>>>>
>>> Make sure the Layout.tml file is in the correct place (under your
>>> webapp root or in the classpath, in the same package as your Layout
>>> class).
>>>
>>>
>> It's in the correct place.
>> I have Layout.java in components package and i'm tryed to place 
>> Layout.tml to webapp root and webapp/components. But I got the same 
>> result in both cases.
>>
>> -- 
>> Best regards,
>>
>> Anton Marchenkov.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: problems with layouts

Posted by Robert Zeigler <ro...@scazdl.org>.
Both wrong.
Component templates need to go in the classpath, same package as  
the .java file.
If you're using maven, they go in:
src/main/resources/path/to/components

Only page templates may be placed in webapp root. webapp/components  
would refer to pages in:
src/main/java/path/to/pages/components

Robert

On Mar 19, 2009, at 3/199:59 AM , Anton Marchenkov wrote:

> On 19/03/09 17:49, Thiago H. de Paula Figueiredo wrote:
>> On Thu, Mar 19, 2009 at 11:41 AM, Anton  
>> Marchenkov<ma...@handybank.ru>  wrote:
>>
>>> Hi,
>>>
>> Hi!
>>
>>
>>> Without any html, h1, body tags or Layout.tml context...
>>>
>> Make sure the Layout.tml file is in the correct place (under your
>> webapp root or in the classpath, in the same package as your Layout
>> class).
>>
>>
> It's in the correct place.
> I have Layout.java in components package and i'm tryed to place  
> Layout.tml to webapp root and webapp/components. But I got the same  
> result in both cases.
>
> -- 
> Best regards,
>
> Anton Marchenkov.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: problems with layouts

Posted by Anton Marchenkov <ma...@handybank.ru>.
On 19/03/09 17:49, Thiago H. de Paula Figueiredo wrote:
> On Thu, Mar 19, 2009 at 11:41 AM, Anton Marchenkov<ma...@handybank.ru>  wrote:
>    
>> Hi,
>>      
> Hi!
>
>    
>> Without any html, h1, body tags or Layout.tml context...
>>      
> Make sure the Layout.tml file is in the correct place (under your
> webapp root or in the classpath, in the same package as your Layout
> class).
>
>    
It's in the correct place.
I have Layout.java in components package and i'm tryed to place 
Layout.tml to webapp root and webapp/components. But I got the same 
result in both cases.

-- 
Best regards,

Anton Marchenkov.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: problems with layouts

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, Mar 19, 2009 at 11:41 AM, Anton Marchenkov <ma...@handybank.ru> wrote:
> Hi,

Hi!

> Without any html, h1, body tags or Layout.tml context...

Make sure the Layout.tml file is in the correct place (under your
webapp root or in the classpath, in the same package as your Layout
class).

-- 
Thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org