You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stewart Robertson <st...@mac.com> on 2006/02/13 01:53:49 UTC

Newbie : Tapestry 4 Disgarding the Page Specification

I am new Tapestry 4 user and I am trying to standardize on using just the HTML
page and Annotations.  My page specifications are empty and I have used the
application specification file to indicate the package name for all my Java Page
classes as well.  I no longer want to specify any page specification files at
all since they are pretty much empty, but tapestry throws an exception when I
remove them.  Is there any way to configure tapestry 4 so that you do not have
to specify page specifications.  Thanks for the help and by the way I am very
impressed by Tapestry 4.........



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


Re: Newbie : Tapestry 4 Disgarding the Page Specification

Posted by Alan Chandler <al...@chandlerfamily.org.uk>.
On Monday 13 February 2006 15:12, Jean-Eric Cuendet wrote:
> >> It certainly works, I have three applications running tapestry on my web
> >> site (blog, famtree and akcmoney) all of which don't use them (I
> >> occassionally
>
> Nothing related but what is akcmoney?
> A personal Finance manager on the web?
> Thanks to clarify.
> -jec

I used to have a program called MicroMoney on my palm pilot.  Unfortunately 
about last October my pilot stopped hotsyncing - meaning I had no backup for 
all the data.

I spent December writing a tapestry app to replicate it, and then improve it 
with an ability to handle foreign currencies (in my work I have to travel 
around Europe, and need to claim expenses in Pounds for expenses incurred in 
Euros, Czech Krona etc).

The actual version with my data is hidden behind https and a login, but there 
is a demo available at

http://www.chandlerfamily.org.uk/moneydemo/app

The source code of the app is available for download

-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.

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


Re: Newbie : Tapestry 4 Disgarding the Page Specification

Posted by Jean-Eric Cuendet <je...@rptec.ch>.
>> It certainly works, I have three applications running tapestry on my web site
>> (blog, famtree and akcmoney) all of which don't use them (I occassionally

Nothing related but what is akcmoney?
A personal Finance manager on the web?
Thanks to clarify.
-jec


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


Re: Newbie : Tapestry 4 Disgarding the Page Specification

Posted by Alan Chandler <al...@chandlerfamily.org.uk>.
On Monday 13 February 2006 22:05, Stewart Robertson wrote:
> Alan
>
> Thanks for the help.  In the end I did actually get it working using the
> ognl:beans.delegate.firstError binding.  I am not entirely sure why it
> didn't work  the first few times I tried it but in the end it did.  So
> thanks again.

Did you restart you application server.  Since pages are cached by tapestry 
you can't just update the page and expect it to work.

>
> Can anyone explain or point to where in the Tapestry docs that it discusses
> why you have to move your html files to web root if you don't use page
> specifications.  Also with your html files in the web root directory is
> there any strategies that are used in the tapestry community to prevent a
> user from calling an HTML file directly from the browser and not having it
> protected by being in the WEB-INF directory, or am I missing something and
> tapestry is protecting me from this problem...I am a struts user and just
> trying to get into the tapestry way of thinking.

In my case tomcat is front ended by Apache, so requests for html files never 
get through to tomcat.  However if you are worried you can change the 
extension. (see configuration in the user guide)

-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.

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


Re: Newbie : Tapestry 4 Disgarding the Page Specification

Posted by Geoff Longman <gl...@gmail.com>.
> Can anyone explain or point to where in the Tapestry docs that it discusses why
> you have to move your html files to web root if you don't use page
> specifications.

http://jakarta.apache.org/tapestry/UsersGuide/template.html#template.locations

"In addition, any HTML template in the web application context is
considered a page, even if there is no matching page specification."

>Also with your html files in the web root directory is there
> any strategies that are used in the tapestry community to prevent a user from
> calling an HTML file directly from the browser and not having it protected by
> being in the WEB-INF directory, or am I missing something and tapestry is
> protecting me from this problem...I am a struts user and just trying to get into
> the tapestry way of thinking.

This is one of the downsides of specless pages for sure.

Geoff

>
> Thanks again everyone for the help....cheers.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
The Spindle guy.          http://spindle.sf.net
Get help with Spindle:   
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Blog:                     http://jroller.com/page/glongman
Feature Updates:          http://spindle.sf.net/updates

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


Re: Newbie : Tapestry 4 Disgarding the Page Specification

Posted by Stewart Robertson <st...@mac.com>.
Alan

Thanks for the help.  In the end I did actually get it working using the
ognl:beans.delegate.firstError binding.  I am not entirely sure why it didn't
work  the first few times I tried it but in the end it did.  So thanks again.

Can anyone explain or point to where in the Tapestry docs that it discusses why
you have to move your html files to web root if you don't use page
specifications.  Also with your html files in the web root directory is there
any strategies that are used in the tapestry community to prevent a user from
calling an HTML file directly from the browser and not having it protected by
being in the WEB-INF directory, or am I missing something and tapestry is
protecting me from this problem...I am a struts user and just trying to get into
the tapestry way of thinking.  

Thanks again everyone for the help....cheers. 





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


Re: Newbie : Tapestry 4 Disgarding the Page Specification

Posted by Stewart Robertson <st...@mac.com>.
Alan Chandler <alan <at> chandlerfamily.org.uk> writes:

> Thats probably
> 
> delegate="ognl:beans.delegate.firstError"
> 

Tried it with the ognl:beans.delegate.firstError binding and it still gave the
same error.  This has only happened since moving the HTML files to the root web
directory, before that it worked fine.






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


Re: Newbie : Tapestry 4 Disgarding the Page Specification

Posted by Alan Chandler <al...@chandlerfamily.org.uk>.
On Monday 13 February 2006 18:00, Stewart Robertson wrote:
> I moved the HTML files to the root web directory and it seems to have
> solved the problem with the system not finding the page specification. 
> However now I am getting a binding exception.  See Below.  This worked
> perfectly before but now this error is occuring after I move the HTML
> files.  The error is occuring on the ognl:delegate.firstError line.  Any
> help would be appreciated.  Thanks.
>
> Unable to read OGNL expression '<parsed OGNL expression>' of
> $BasePage_0@e3ffdf[Home]: $BasePage_0.delegate
> binding: 	ExpressionBinding[Home delegate.firstError]
> location: 	context:/Home.html, line 15
> 10	<div class="instructions">
> 11	Enter either an IBM Number or a Formula Book Number to retrieve the
> MSDS. 12	</div>
> 13
> 14	<div class="errors">
> 15	<span jwcid="@Delegator" delegate="ognl:delegate.firstError"/>
> 16	</div>

Thats probably

delegate="ognl:beans.delegate.firstError"


-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.

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


Re: Newbie : Tapestry 4 Disgarding the Page Specification

Posted by Stewart Robertson <st...@mac.com>.
Chris Chiappone <chiappone <at> gmail.com> writes:

> 
> I think the main thing that causes people problems with this is that
> they don't realize you have to move the .html files from WEB-INF/ to
> the root web directory.
> 


I moved the HTML files to the root web directory and it seems to have solved the
problem with the system not finding the page specification.  However now I am
getting a binding exception.  See Below.  This worked perfectly before but now
this error is occuring after I move the HTML files.  The error is occuring on
the ognl:delegate.firstError line.  Any help would be appreciated.  Thanks.  

Unable to read OGNL expression '<parsed OGNL expression>' of
$BasePage_0@e3ffdf[Home]: $BasePage_0.delegate
binding: 	ExpressionBinding[Home delegate.firstError]
location: 	context:/Home.html, line 15
10	<div class="instructions">
11	Enter either an IBM Number or a Formula Book Number to retrieve the MSDS.
12	</div>
13	
14	<div class="errors">
15	<span jwcid="@Delegator" delegate="ognl:delegate.firstError"/>
16	</div>
17	
18	<form jwcid="@Form" listener="listener:lookupMSDS">
19	<table class="standardForm">
20	<tr>







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


Re: Newbie : Tapestry 4 Disgarding the Page Specification

Posted by Chris Chiappone <ch...@gmail.com>.
I think the main thing that causes people problems with this is that
they don't realize you have to move the .html files from WEB-INF/ to
the root web directory.

On 2/13/06, Alan Chandler <al...@chandlerfamily.org.uk> wrote:
> On Monday 13 February 2006 00:53, Stewart Robertson wrote:
> > I am new Tapestry 4 user and I am trying to standardize on using just the
> > HTML page and Annotations.  My page specifications are empty and I have
> > used the application specification file to indicate the package name for
> > all my Java Page classes as well.  I no longer want to specify any page
> > specification files at all since they are pretty much empty, but tapestry
> > throws an exception when I remove them.  Is there any way to configure
> > tapestry 4 so that you do not have to specify page specifications.  Thanks
> > for the help and by the way I am very impressed by Tapestry 4.........
>
> It certainly works, I have three applications running tapestry on my web site
> (blog, famtree and akcmoney) all of which don't use them (I occassionally
> have a component spec when I don't need a Java class).  You are welcome to
> take a look at them as examples, the code is either in "git" repositories, or
> if you don't know what that is and don't use it, tarballs of the code at
> snapshot points exist in the files download section (go to Software Corner of
> the web site from the url in my signature).
>
>  The application specification sits in the WEB-INF directory and defines the
> class packages location as the example below (from blog) shows (apologies for
> mail word wrap)
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE application PUBLIC
>   "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
>   "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
>
> <!-- Copyright (c) 2006 Alan Chandler, licenced under the GPL (see LICENCE.txt
> file in META-INF directory) -->
>
> <application name="blog" engine-class="org.apache.tapestry.engine.BaseEngine">
>     <description>My Blog</description>
>         <meta key="org.apache.tapestry.page-class-packages" >
>                 uk.org.chandlerfamily.blog.tapestry.pages
>         </meta>
>         <meta key="org.apache.tapestry.component-class-packages">
>                 uk.org.chandlerfamily.blog.tapestry.components
>         </meta>
>         <meta key="org.apache.tapestry.accepted-locales">
>                 en
>         </meta>
>         <meta key="org.apache.tapestry.enable-reset-service">
>                 true
>         </meta>
>         <library id="Contrib"
> specification-path="/org/apache/tapestry/contrib/Contrib.library" />
>         <library id="akc"
> specification-path="/uk/org/chandlerfamily/tapestry/components/akc.library" />
> </application>
>
>
> I am using exclipse (with the wtp package) to develop so although the java
> classes will ultimately be under WEB-INF/classes, the WEB-INF itself is under
> the Webcontent directory and java sources under the JavaSources directory in
> the packages defined above.
>
> The html templates for pages are at the top level in Webcontent, component
> templates are in the WEB-INF directory.
>
> my hivemodule.xml file is in the META-INF directory under Javasource.
>
> --
> Alan Chandler
> http://www.chandlerfamily.org.uk
> Open Source. It's the difference between trust and antitrust.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
~chris

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


Re: Newbie : Tapestry 4 Disgarding the Page Specification

Posted by Alan Chandler <al...@chandlerfamily.org.uk>.
On Monday 13 February 2006 00:53, Stewart Robertson wrote:
> I am new Tapestry 4 user and I am trying to standardize on using just the
> HTML page and Annotations.  My page specifications are empty and I have
> used the application specification file to indicate the package name for
> all my Java Page classes as well.  I no longer want to specify any page
> specification files at all since they are pretty much empty, but tapestry
> throws an exception when I remove them.  Is there any way to configure
> tapestry 4 so that you do not have to specify page specifications.  Thanks
> for the help and by the way I am very impressed by Tapestry 4.........

It certainly works, I have three applications running tapestry on my web site 
(blog, famtree and akcmoney) all of which don't use them (I occassionally 
have a component spec when I don't need a Java class).  You are welcome to 
take a look at them as examples, the code is either in "git" repositories, or 
if you don't know what that is and don't use it, tarballs of the code at 
snapshot points exist in the files download section (go to Software Corner of 
the web site from the url in my signature).

 The application specification sits in the WEB-INF directory and defines the 
class packages location as the example below (from blog) shows (apologies for 
mail word wrap)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
  "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">

<!-- Copyright (c) 2006 Alan Chandler, licenced under the GPL (see LICENCE.txt 
file in META-INF directory) -->

<application name="blog" engine-class="org.apache.tapestry.engine.BaseEngine">
    <description>My Blog</description>
 	<meta key="org.apache.tapestry.page-class-packages" >
		uk.org.chandlerfamily.blog.tapestry.pages
	</meta>
 	<meta key="org.apache.tapestry.component-class-packages">
 		uk.org.chandlerfamily.blog.tapestry.components
 	</meta>
 	<meta key="org.apache.tapestry.accepted-locales">
 		en
 	</meta>
 	<meta key="org.apache.tapestry.enable-reset-service">
 		true
 	</meta>
 	<library id="Contrib" 
specification-path="/org/apache/tapestry/contrib/Contrib.library" />
 	<library id="akc" 
specification-path="/uk/org/chandlerfamily/tapestry/components/akc.library" />
</application>


I am using exclipse (with the wtp package) to develop so although the java 
classes will ultimately be under WEB-INF/classes, the WEB-INF itself is under 
the Webcontent directory and java sources under the JavaSources directory in 
the packages defined above.

The html templates for pages are at the top level in Webcontent, component 
templates are in the WEB-INF directory.

my hivemodule.xml file is in the META-INF directory under Javasource.

-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.

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


Re: Newbie : Tapestry 4 Disgarding the Page Specification

Posted by Geoff Longman <gl...@gmail.com>.
Stewart, you need to give us more information in order for us to help out.
Could you pls,

post the application spec contents?
tell us where in the folder layout the app spec is located?

Geoff

On 2/12/06, Stewart Robertson <st...@mac.com> wrote:
> I am new Tapestry 4 user and I am trying to standardize on using just the HTML
> page and Annotations.  My page specifications are empty and I have used the
> application specification file to indicate the package name for all my Java Page
> classes as well.  I no longer want to specify any page specification files at
> all since they are pretty much empty, but tapestry throws an exception when I
> remove them.  Is there any way to configure tapestry 4 so that you do not have
> to specify page specifications.  Thanks for the help and by the way I am very
> impressed by Tapestry 4.........
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
The Spindle guy.          http://spindle.sf.net
Get help with Spindle:   
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Blog:                     http://jroller.com/page/glongman
Feature Updates:          http://spindle.sf.net/updates

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