You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Mayne, Peter" <Pe...@ap.spherion.com> on 2003/06/26 03:39:10 UTC

Some HOW-TO questions

Some HOW-TO questions that may very well be in the documentation somewhere,
but I've missed them.

Global object

I can create my own Global object by defining the property
org.apache.tapestry.global-class in the <application>. However, how do I get
access to other Tapestry properties (such as the name of an initialisation
file) from my Global object? Can I make it a subclass of something? Are
there static methods of other classes I can use to hook into Tapestry?

Download binary files

I want to provide downloadable binaries that I generate on the server
("Click here to download this page in PDF format" for example). What's the
best way to do this from Tapestry?

Security

How do I secure pages so that a user is required to login, and then get that
user's login name?

I suspect there's some fall back (at least in part) to facilities provided
by the container, but I can't figure where to start looking.

Thanks.

PJDM
-- 
Peter Mayne
Technology Consultant
Spherion Technology Solutions
Level 1, 243 Northbourne Avenue, Lyneham, ACT, 2602
T: 61 2 62689727  F: 61 2 62689777

The information contained in this email and any attachments to it:

(a) may be confidential and if you are not the intended recipient, any interference with, 
use, disclosure or copying of this material is unauthorised and prohibited; and

(b) may contain personal information of the recipient and/or the sender as defined 
under the Privacy Act 1988 (Cth). Consent is hereby given by the recipient(s) to 
collect, hold and use such information and any personal information contained in a 
response to this email, for any reasonable purpose in the ordinary course of 
Spherion's 
business, including forwarding this email internally or disclosing it to a third party. All 
personal information collected by Spherion will be handled in accordance with 
Spherion's Privacy Policy. If you have received this email in error, please notify the 
sender and delete it.

(c) you agree not to employ or arrange employment for any candidate(s) supplied in 
this email and any attachments without first entering into a contractual agreement with 
Spherion. You further agree not to divulge any information contained in this document 
to any person(s) or entities without the express permission of Spherion.



Re: Some HOW-TO questions

Posted by Tom Miller <tm...@lisco.com>.
Peter

Here is an answer to your security question that I ran across today, it 
is from the Developer's Guide, which is stated to be out of date. Yet it 
has some very good concepts, if you can sort through the 2.x-3.0 
differences.
The link:
http://jakarta.apache.org/tapestry/doc/DevelopersGuide/coding.page-classes.html

The text if you don't want to click:
"It is often useful to create one or two subclasses of BasePage 
<http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/html/BasePage.html> 
specific to your application. Often your application will have a 
consistent navigational border on some or all pages that can be 
supported by the base class. Many applications have one set of pages 
that are visible to unidentified guests, and a second section that is 
visible once the user logs in. A base class for the second set of pages 
could override the validate() method to redirect to a login page if the 
user is not already logged in."

-- 
Tom Miller
Miller Associates, Inc.
tmiller@lisco.com
641.469.3535 Phone
413.581.6326 FAX


Mayne, Peter wrote:

> Some HOW-TO questions that may very well be in the documentation 
> somewhere, but I've missed them.
>
> Global object
>
> I can create my own Global object by defining the property 
> org.apache.tapestry.global-class in the <application>. However, how do 
> I get access to other Tapestry properties (such as the name of an 
> initialisation file) from my Global object? Can I make it a subclass 
> of something? Are there static methods of other classes I can use to 
> hook into Tapestry?
>
> Download binary files
>
> I want to provide downloadable binaries that I generate on the server 
> ("Click here to download this page in PDF format" for example). What's 
> the best way to do this from Tapestry?
>
> Security
>
> How do I secure pages so that a user is required to login, and then 
> get that user's login name?
>
> I suspect there's some fall back (at least in part) to facilities 
> provided by the container, but I can't figure where to start looking.
>
> Thanks.
>
> PJDM
> -- 
> Peter Mayne
> Technology Consultant
> Spherion Technology Solutions
> Level 1, 243 Northbourne Avenue, Lyneham, ACT, 2602
> T: 61 2 62689727  F: 61 2 62689777
>
>The information contained in this email and any attachments to it:
>
>(a) may be confidential and if you are not the intended recipient, any interference with, 
>use, disclosure or copying of this material is unauthorised and prohibited; and
>
>(b) may contain personal information of the recipient and/or the sender as defined 
>under the Privacy Act 1988 (Cth). Consent is hereby given by the recipient(s) to 
>collect, hold and use such information and any personal information contained in a 
>response to this email, for any reasonable purpose in the ordinary course of 
>Spherion's 
>business, including forwarding this email internally or disclosing it to a third party. All 
>personal information collected by Spherion will be handled in accordance with 
>Spherion's Privacy Policy. If you have received this email in error, please notify the 
>sender and delete it.
>
>(c) you agree not to employ or arrange employment for any candidate(s) supplied in 
>this email and any attachments without first entering into a contractual agreement with 
>Spherion. You further agree not to divulge any information contained in this document 
>to any person(s) or entities without the express permission of Spherion.
>
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>